/* ==========================================================================
   UpCommute -- main stylesheet
   No external requests. System font stacks only. Tokens below are the
   single source of truth for color and type across the page.
   ========================================================================== */

:root {
  /* color -- ink (navy base) */
  --ink: #0c1b2e;
  --ink-soft: #142a45;
  --ink-line: rgba(255, 255, 255, 0.14);
  --ink-line-strong: rgba(255, 255, 255, 0.38);
  --text-on-ink: #f2f4f0;
  --text-on-ink-muted: #a9b6c6;

  /* color -- paper (light base) */
  --paper: #f1f3ef;
  --paper-card: #ffffff;
  --paper-line: #dbe0d7;
  --text-on-paper: #101c2b;
  --text-on-paper-muted: #55606b;

  /* color -- accent (signal amber) + diagram secondary */
  --accent: #e0a036;
  --accent-deep: #965c16;
  --accent-soft: rgba(224, 160, 54, 0.16);
  --path-secondary: #5f7c8e;

  /* type */
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;

  /* layout */
  --max: 1180px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --space-section: clamp(3.5rem, 6vw, 6.5rem);
  --measure: 68ch;
  --h3: 1.25rem;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                    */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text-on-paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

#main, #platform { scroll-margin-top: 4.75rem; }

.visually-hidden,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 200;
  background: var(--accent);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.hero :focus-visible,
.agencies :focus-visible,
.proof :focus-visible,
.final-cta :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* Typographic building blocks                                              */
/* ---------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.hero .eyebrow,
.agencies .eyebrow,
.proof .eyebrow,
.final-cta .eyebrow { color: var(--accent); }

.mark {
  display: inline-block;
  width: 28px;
  height: 8px;
  position: relative;
  flex: none;
}
.mark::before {
  content: "";
  position: absolute;
  left: 0; top: 3.5px;
  width: 20px; height: 1.5px;
  background: #b9c2b2;
}
.mark::after {
  content: "";
  position: absolute;
  right: 0; top: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.mark-light::before { background: rgba(255, 255, 255, 0.32); }

.h2-serif {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 22ch;
}
.h2-on-ink { color: var(--text-on-ink); }

.section-intro {
  margin-top: 1.1rem;
  max-width: 64ch;
  font-size: 1.08rem;
  color: var(--text-on-paper-muted);
}
.section-intro.on-ink { color: var(--text-on-ink-muted); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-accent {
  background: var(--accent);
  color: var(--ink);
}
.btn-accent:hover { background: #eeb055; }
.btn-accent:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--text-on-ink);
  border-color: var(--ink-line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.05rem; }

.cta-support {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-on-ink-muted);
  max-width: 32ch;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                   */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-line-strong);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-on-ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.wm-mark {
  width: 20px;
  height: 20px;
  margin: 0 0.05rem;
  color: var(--text-on-ink);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                     */
/* ---------------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 18ch;
  margin: 0 0 1.1rem;
}
.hero-h2 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-on-ink);
  max-width: 46ch;
  margin-bottom: 1.1rem;
}
.hero-sub {
  color: var(--text-on-ink-muted);
  max-width: 52ch;
  font-size: 1rem;
  margin-bottom: 2rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.75rem;
}

.hero-art { width: 100%; }
.route-map { width: 100%; height: auto; overflow: visible; }
.map-label {
  font-family: var(--mono);
  font-size: 12px;
  fill: var(--text-on-ink-muted);
}
.map-label-strong {
  fill: var(--text-on-ink);
  font-weight: 600;
}
@media (prefers-reduced-motion: no-preference) {
  .route-a { stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 1.6s ease-out 0.15s forwards; }
  .route-b { stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 1.6s ease-out 0.4s forwards; }
  .pulse-rings circle { animation: pulse 2.6s ease-in-out infinite; }
  .pulse-rings circle:nth-child(2) { animation-delay: 0.4s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse {
  0%, 100% { opacity: 0.15; transform: scale(0.92); }
  50% { opacity: 0.55; transform: scale(1.05); }
}
.pulse-rings circle { transform-box: fill-box; transform-origin: center; }

/* ---------------------------------------------------------------------- */
/* Trust bar                                                                */
/* ---------------------------------------------------------------------- */
.trust {
  background: var(--paper-card);
  border-bottom: 1px solid var(--paper-line);
  padding: clamp(2rem, 3vw, 2.75rem) 0;
}
.trust-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem 2rem;
}
.trust-item { border-left: 2px solid var(--accent); padding-left: 0.9rem; }
.trust-figure {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-on-paper);
  margin-bottom: 0.35rem;
}
.trust-caption {
  font-size: 0.88rem;
  color: var(--text-on-paper-muted);
  line-height: 1.45;
}

/* ---------------------------------------------------------------------- */
/* Platform pillars                                                         */
/* ---------------------------------------------------------------------- */
.platform { background: var(--paper); padding: var(--space-section) 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.5rem 1.75rem;
}
.icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
.icon svg { width: 22px; height: 22px; }
.card h3 {
  font-family: var(--serif);
  font-size: var(--h3);
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text-on-paper);
}
.card p {
  font-size: 0.95rem;
  color: var(--text-on-paper-muted);
  line-height: 1.6;
}
/* ---------------------------------------------------------------------- */
/* Built for agencies                                                       */
/* ---------------------------------------------------------------------- */
.agencies { background: var(--ink); color: var(--text-on-ink); padding: var(--space-section) 0; }

.agency-blocks {
  border-top: 1px solid var(--ink-line);
}
.agency-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--ink-line);
}
.agency-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.2rem;
}
.agency-body h3 {
  font-family: var(--serif);
  font-size: var(--h3);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.agency-body p {
  color: var(--text-on-ink-muted);
  max-width: var(--measure);
  margin-bottom: 0.85rem;
}
.agency-body p:last-child { margin-bottom: 0; }

.admin-frame {
  margin-top: 1.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 480px;
  border: 1px solid var(--ink-line);
}
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--text-on-ink-muted);
}
.admin-label-strong { fill: var(--text-on-ink); font-weight: 600; }
.admin-label-accent { fill: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Team                                                                     */
/* ---------------------------------------------------------------------- */
.team { background: var(--paper); padding: var(--space-section) 0; }
.team-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 1.75rem 0;
  margin-bottom: 2.5rem;
}
.team-stat { border-left: 2px solid var(--accent); padding-left: 0.9rem; }
.team-copy { max-width: var(--measure); }
.team-copy p {
  color: var(--text-on-paper-muted);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}
.team-copy p:first-child {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text-on-paper);
}
.cross-link { font-size: 0.95rem; }
.cross-link a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* Client proof                                                             */
/* ---------------------------------------------------------------------- */
.proof { background: var(--ink); color: var(--text-on-ink); padding: var(--space-section) 0; }
.proof-list {
  display: grid;
  gap: 1.5rem;
}
.proof-item {
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.75rem;
  background: var(--ink-soft);
}
.proof-item h3 {
  font-family: var(--serif);
  font-size: var(--h3);
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.proof-item p {
  color: var(--text-on-ink-muted);
  max-width: var(--measure);
}
.figure {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
}
.footnote {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-on-ink-muted);
}

/* ---------------------------------------------------------------------- */
/* Final CTA                                                                */
/* ---------------------------------------------------------------------- */
.final-cta {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: var(--text-on-ink);
  padding: var(--space-section) 0;
  text-align: center;
}
.final-cta-inner {
  max-width: 56ch;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.final-cta-inner p { color: var(--text-on-ink-muted); }
.final-cta-inner .cta-support { max-width: 44ch; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                   */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding: 1.75rem 0;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-on-ink-muted);
  font-size: 0.88rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { text-decoration: underline; text-underline-offset: 2px; color: var(--text-on-ink); }
.footer-links a:hover { color: var(--accent); }
.footer-copy a { color: var(--text-on-ink); text-decoration: underline; text-underline-offset: 2px; }
.footer-copy a:hover { color: var(--accent); }

/* Simple interior pages (privacy, accessibility) */
.page { background: var(--paper); padding: var(--space-section) 0; }
.page h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 1.25rem;
}
.page h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--h3);
  margin: 1.75rem 0 0.5rem;
}
.page p { max-width: var(--measure); color: var(--text-on-paper-muted); margin-bottom: 0.9rem; }
.page a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.page .page-updated { font-family: var(--mono); font-size: 0.82rem; margin-bottom: 2rem; }

/* 404 page */
.hero-404 { padding-bottom: clamp(4rem, 10vw, 7rem); }
.hero-404 .hero-h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }

/* ---------------------------------------------------------------------- */
/* Scroll reveal (progressive enhancement -- see js/main.js)               */
/* Elements are fully visible by default. Only .js-ready adds the hidden   */
/* start state, so the page works completely with JS disabled.            */
/* ---------------------------------------------------------------------- */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-rail { grid-template-columns: repeat(2, 1fr); }
  .team-rail { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin-top: 1.5rem; }
  .agency-block { grid-template-columns: 1fr; gap: 0.5rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  #main, #platform { scroll-margin-top: 4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .trust-rail { grid-template-columns: repeat(2, 1fr); }
  .team-rail { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; gap: 1.25rem; }
  .header-row { padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .btn-small { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
