/* Paceway — marketing site.
   Tokens mirror design/tokens.json. Dark-first, never low-contrast:
   the palette is the app's, so the site and the product read as one thing. */

:root {
  /* Foundation */
  --asphalt-950: #0b1220;
  --asphalt-900: #141e2e;
  --asphalt-800: #1c293d;
  --asphalt-700: #304158;
  --cloud-50: #f6f8fb;
  --cloud-300: #a8b5c6;
  --pace-mint: #46d7a8;
  --way-blue: #66a7ff;
  --approach-amber: #ffc857;
  --attention-coral: #ff6b6b;

  /* Semantic */
  --bg: var(--asphalt-950);
  --surface: var(--asphalt-900);
  --surface-raised: var(--asphalt-800);
  --separator: var(--asphalt-700);
  --text: var(--cloud-50);
  --text-muted: var(--cloud-300);
  --brand: var(--pace-mint);
  --info: var(--way-blue);

  /* Spacing — the app's 4 pt rhythm */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-capsule: 999px;

  --motion-standard: 220ms;
  --motion-state: 350ms;
  --ease: cubic-bezier(0.42, 0, 0.58, 1);

  --page: min(1120px, calc(100% - 40px));
  --page-narrow: min(760px, calc(100% - 40px));

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% -4%, rgba(102, 167, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 2% 12%, rgba(70, 215, 168, 0.1), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h3 {
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.num {
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.muted {
  color: var(--text-muted);
}

.lede {
  color: var(--text-muted);
  font-size: clamp(17px, 1.4vw, 19px);
  max-width: 68ch;
}

.eyebrow {
  margin-bottom: var(--s3);
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.icon-flip {
  transform: rotate(180deg);
}

/* ---------- Layout ---------- */

.wrap {
  width: var(--page);
  margin-inline: auto;
}

.wrap-narrow {
  width: var(--page-narrow);
}

.section {
  padding-block: clamp(56px, 8vw, 96px);
  scroll-margin-top: 72px;
}

.section-alt {
  border-block: 1px solid var(--separator);
  background: rgba(20, 30, 46, 0.42);
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--s10);
}

.section-head h2 {
  margin-bottom: var(--s4);
}

.grid {
  display: grid;
  gap: var(--s4);
}

.grid-1 {
  grid-template-columns: 1fr;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid + .grid,
.grid + .note,
.stats + .grid {
  margin-top: var(--s4);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s10);
  align-items: center;
}

.split-grid-wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.stack {
  display: grid;
  gap: var(--s6);
}

/* ---------- Header ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: var(--s3) var(--s5);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--asphalt-950);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: var(--s4);
  top: var(--s4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(48, 65, 88, 0.7);
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--s6);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 5px 14px rgba(0, 0, 0, 0.28);
}

.brand-word {
  font-size: 18px;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  gap: var(--s5);
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding-block: var(--s5);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--motion-standard) var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px var(--s3);
  border: 1px solid var(--separator);
  border-radius: var(--radius-capsule);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition:
    color var(--motion-standard) var(--ease),
    border-color var(--motion-standard) var(--ease);
}

.lang .icon {
  width: 16px;
  height: 16px;
}

.lang:hover,
.lang:focus-visible {
  color: var(--text);
  border-color: var(--cloud-300);
}

/* ---------- Buttons and chips ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s6);
  border: 1px solid transparent;
  border-radius: var(--radius-capsule);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color var(--motion-standard) var(--ease),
    border-color var(--motion-standard) var(--ease),
    color var(--motion-standard) var(--ease);
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--brand);
  color: #06251b;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #5ee3b7;
}

.btn-ghost {
  border-color: var(--separator);
  background: rgba(28, 41, 61, 0.6);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--cloud-300);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s6);
  padding: 0;
  list-style: none;
}

.chip {
  padding: 6px var(--s3);
  border: 1px solid var(--separator);
  border-radius: var(--radius-capsule);
  background: rgba(20, 30, 46, 0.7);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 650;
}

/* ---------- Cards, lists, notes ---------- */

.card {
  padding: var(--s6);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.card-tight {
  padding: var(--s5);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
}

.card-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}

.card-row > .icon {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--brand);
}

.tone-brand {
  color: var(--brand);
}
.tone-measure {
  color: var(--info);
}
.tone-approach {
  color: var(--approach-amber);
}
.tone-alert {
  color: var(--attention-coral);
}

.list {
  display: grid;
  gap: var(--s2);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.list li {
  position: relative;
  padding-left: var(--s6);
}

.list li::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}

.list-yes li::before {
  content: "✓";
  color: var(--brand);
}

.list-no li::before {
  content: "×";
  color: var(--attention-coral);
  font-size: 18px;
  line-height: 1.35;
}

.list-plain li::before {
  content: "—";
  color: var(--separator);
}

.note {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-top: var(--s6);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: rgba(28, 41, 61, 0.5);
  color: var(--text-muted);
  font-size: 15px;
}

.note .icon {
  margin-top: 2px;
  color: var(--info);
}

.note-strong {
  border-color: rgba(70, 215, 168, 0.35);
  background: rgba(70, 215, 168, 0.08);
  color: var(--text);
}

.note-strong .icon {
  color: var(--brand);
}

.figure {
  margin: 0;
}

.figure figcaption,
.hero-device figcaption {
  margin-top: var(--s3);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 5vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  margin-bottom: var(--s5);
}

/* Width-constrained so the caption wraps with the phone instead of stretching
   the grid item to its max-content width and scrolling the page sideways. */
.hero-device {
  margin: 0;
  justify-self: center;
  width: min(330px, 100%);
}

/* ---------- Status band ---------- */

.status-band {
  border-block: 1px solid var(--separator);
  background: rgba(20, 30, 46, 0.6);
}

.status-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  padding-block: var(--s6);
}

.status-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.status-inner .muted {
  max-width: 62ch;
  font-size: 15px;
}

.status-action {
  display: grid;
  gap: var(--s2);
  justify-items: start;
}

.status-action small {
  font-size: 12.5px;
}

/* ---------- Steps ---------- */

.rail-art {
  width: 100%;
  height: 28px;
  margin-bottom: var(--s5);
  opacity: 0.9;
}

.copy-block p + p {
  margin-top: var(--s4);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: var(--s6) var(--s5) var(--s5);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.step::before {
  position: absolute;
  top: -1px;
  left: var(--s5);
  right: var(--s5);
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--tone, var(--separator));
  content: "";
}

.step.tone-approach {
  --tone: var(--approach-amber);
}
.step.tone-measure {
  --tone: var(--way-blue);
}
.step.tone-done {
  --tone: var(--pace-mint);
}

.step-tag {
  display: inline-block;
  margin-bottom: var(--s3);
  color: var(--tone);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-index {
  position: absolute;
  top: var(--s5);
  right: var(--s5);
  color: var(--separator);
  font-family: var(--font-rounded);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.step h3 {
  margin-bottom: var(--s3);
}

.step blockquote {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  margin-bottom: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 14.5px;
  font-style: italic;
}

.step blockquote .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--tone);
  font-style: normal;
}

.step .muted {
  font-size: 14.5px;
}

/* ---------- Stats ---------- */

.stat {
  padding: var(--s6) var(--s5);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stat-value {
  font-family: var(--font-rounded);
  font-size: clamp(38px, 4.4vw, 52px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--info);
}

.stat:nth-child(3) .stat-value {
  color: var(--brand);
}

.stat:nth-child(4) .stat-value {
  color: var(--text-muted);
}

.stat-label {
  margin-top: var(--s3);
  font-size: 15px;
  font-weight: 650;
}

.stat-note {
  font-size: 13px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: var(--s2);
}

.faq details {
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5);
  font-size: 16.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  flex: 0 0 auto;
  color: var(--brand);
  content: "+";
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--motion-standard) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 var(--s5) var(--s5);
  font-size: 15.5px;
}

/* ---------- Closing CTA ---------- */

.cta-inner {
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(70, 215, 168, 0.3);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 0%, rgba(70, 215, 168, 0.14), transparent 60%),
    var(--surface);
  text-align: center;
}

.cta-inner h2 {
  margin-bottom: var(--s4);
}

.cta-inner .lede {
  margin-inline: auto;
}

.cta-inner .btn-row {
  justify-content: center;
}

/* ---------- Prose pages ---------- */

.prose-head {
  padding-bottom: var(--s6);
}

.prose-head h1 {
  margin-block: var(--s3) var(--s5);
  font-size: clamp(34px, 5vw, 52px);
}

.doc-meta {
  margin-top: var(--s5);
  font-size: 14px;
}

.prose {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.summary-card {
  margin-bottom: var(--s10);
}

.summary-card h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose-section {
  padding-top: var(--s8);
  border-top: 1px solid var(--separator);
  margin-top: var(--s8);
}

.prose-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.prose-section h2 {
  margin-bottom: var(--s4);
  font-size: 22px;
  letter-spacing: -0.015em;
}

.prose-section p {
  margin-bottom: var(--s4);
  color: var(--text-muted);
  font-size: 16.5px;
}

.prose-section p:last-child {
  margin-bottom: 0;
}

.prose-section a {
  color: var(--brand);
  text-decoration-color: rgba(70, 215, 168, 0.5);
  text-underline-offset: 3px;
}

.prose-back {
  margin-top: var(--s10);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--separator);
  padding-block: var(--s10) var(--s12);
  background: rgba(11, 18, 32, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: var(--s8);
  align-items: start;
}

.footer-brand p {
  margin-top: var(--s3);
  max-width: 34ch;
  font-size: 14.5px;
}

.footer-links {
  display: grid;
  gap: var(--s2);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--motion-standard) var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.footer-legal p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-legal p + p {
  margin-top: var(--s2);
}

/* ---------- Phone mockup ---------- */

.phone {
  width: min(330px, 100%);
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: 46px;
  background: #05080d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  overflow: hidden;
  border-radius: 37px;
  background: var(--bg);
  font-size: 12px;
}

.status-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 22px 4px;
}

.status-time {
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 700;
}

.status-island {
  width: 84px;
  height: 24px;
  border-radius: var(--radius-capsule);
  background: #000;
}

.status-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.status-loc {
  width: 12px;
  height: 12px;
  color: var(--info);
}

.status-battery {
  width: 20px;
  height: 10px;
  border: 1px solid var(--cloud-300);
  border-radius: 3px;
  background: linear-gradient(to right, var(--cloud-300) 70%, transparent 70%);
  background-clip: content-box;
  padding: 1px;
}

.app-titlebar {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(48, 65, 88, 0.6);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.app-body {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  padding: 14px 14px 0;
  align-content: start;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-icon {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 10px;
}

.app-header-text {
  display: grid;
  gap: 1px;
}

.app-header-text strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.app-header-text small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.state-banner {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.state-banner > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.state-banner span {
  display: grid;
  gap: 2px;
}

.state-banner strong {
  font-size: 13px;
}

.state-banner small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.state-banner em {
  color: var(--text);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
}

.metric-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}

.metric-label .icon {
  width: 15px;
  height: 15px;
}

.metric-hero {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-family: var(--font-rounded);
  font-size: 50px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
}

.metric-unit {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.progress {
  position: relative;
  height: 6px;
  margin-top: 16px;
  border-radius: var(--radius-capsule);
  background: var(--separator);
  overflow: hidden;
}

.progress span {
  display: block;
  width: var(--fill, 50%);
  height: 100%;
  border-radius: inherit;
  background: var(--info);
}

.metric-caption {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.metric-divider {
  height: 1px;
  margin: 12px 0;
  background: var(--separator);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.metric-tile {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(28, 41, 61, 0.72);
}

.metric-tile small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.metric-tile b {
  font-family: var(--font-rounded);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-tile i {
  color: var(--text-muted);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 650;
}

.app-cta {
  padding: 12px 14px;
}

.glass-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(70, 215, 168, 0.45);
  border-radius: var(--radius-capsule);
  background: rgba(70, 215, 168, 0.16);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 10px 26px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.glass-button .icon {
  width: 16px;
  height: 16px;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 0 14px;
  border-top: 1px solid rgba(48, 65, 88, 0.6);
}

.tab {
  display: grid;
  gap: 2px;
  justify-items: center;
  color: var(--text-muted);
}

.tab .icon {
  width: 19px;
  height: 19px;
}

.tab small {
  font-size: 9.5px;
  font-weight: 600;
}

.tab.is-active {
  color: var(--brand);
}

/* ---------- Live Activity and Dynamic Island ---------- */

.activity {
  padding: 16px 18px;
  border: 1px solid var(--separator);
  border-radius: 26px;
  background: #05080d;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.activity-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s5);
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.activity-title .icon {
  width: 17px;
  height: 17px;
}

.activity-zone {
  margin-top: 4px;
  font-size: 12.5px;
}

.activity-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.activity-right {
  text-align: right;
}

.activity-value {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  font-family: var(--font-rounded);
  font-size: 30px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.activity-value .unit {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.activity .progress {
  margin-top: 14px;
}

.island {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-capsule);
  background: #000;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.island-lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--info);
}

.island-lead .icon {
  width: 17px;
  height: 17px;
}

.island-pill {
  width: 46px;
  height: 20px;
  border-radius: var(--radius-capsule);
  background: #101010;
}

.island-trail {
  color: var(--cloud-50);
}

/* ---------- CarPlay ---------- */

.carplay {
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: #070d18;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.carplay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--separator);
  background: rgba(20, 30, 46, 0.8);
  font-size: 13px;
}

.carplay-title {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 700;
}

.carplay-title .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.carplay-time {
  color: var(--text-muted);
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
}

.carplay-rows {
  padding: var(--s2) var(--s5);
}

.carplay-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s5);
  padding: var(--s3) 0;
  border-bottom: 1px solid rgba(48, 65, 88, 0.55);
  color: var(--text-muted);
  font-size: 15px;
}

.carplay-row:last-child {
  border-bottom: 0;
}

.carplay-row b {
  color: var(--text);
  font-family: var(--font-rounded);
  font-size: 19px;
  font-weight: 700;
}

.carplay-row.is-status b {
  color: var(--brand);
}

.carplay-actions {
  padding: var(--s3) var(--s5) var(--s5);
}

.carplay-button {
  display: block;
  padding: var(--s3);
  border: 1px solid rgba(70, 215, 168, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(70, 215, 168, 0.12);
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ---------- 2026 editorial refresh ---------- */

body {
  background:
    linear-gradient(rgba(102, 167, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 167, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(102, 167, 255, 0.16), transparent 31rem),
    radial-gradient(circle at 8% 22%, rgba(70, 215, 168, 0.1), transparent 28rem),
    var(--bg);
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
}

.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(68px, 8vw, 116px) clamp(54px, 7vw, 92px);
}

.hero::before {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 167, 255, 0.5), transparent);
  content: "";
}

.hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(44px, 7vw, 104px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 11.5ch;
  font-size: clamp(50px, 6.5vw, 78px);
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.hero-copy > .lede {
  max-width: 58ch;
  margin-top: var(--s6);
  font-size: clamp(18px, 1.65vw, 21px);
  line-height: 1.62;
}

.hero-device {
  width: min(410px, 100%);
}

.hero-stage {
  position: relative;
  min-height: 690px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-route {
  position: absolute;
  inset: 0 -64px -24px -64px;
  z-index: -2;
  width: calc(100% + 128px);
  height: calc(100% + 24px);
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(102, 167, 255, 0.15));
}

.hero-route path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-route-grid {
  stroke: rgba(48, 65, 88, 0.52);
  stroke-width: 2;
  stroke-dasharray: 4 12;
}

.hero-route-road {
  stroke: rgba(48, 65, 88, 0.72);
  stroke-width: 34;
}

.hero-route-measure {
  stroke: var(--brand);
  stroke-width: 4;
}

.hero-route-gates {
  stroke: var(--info);
  stroke-width: 5;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 560px;
  border-radius: 50%;
  background: rgba(102, 167, 255, 0.16);
  filter: blur(58px);
}

.phone-real {
  width: min(336px, 82vw);
  padding: 8px;
  border-color: rgba(168, 181, 198, 0.32);
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: rotate(1.8deg);
}

.phone-real img {
  width: 100%;
  height: auto;
  border-radius: 38px;
}

.stage-activity {
  position: absolute;
  right: -44px;
  bottom: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 286px;
  padding: 13px 15px;
  border: 1px solid rgba(102, 167, 255, 0.3);
  border-radius: 22px;
  background: rgba(5, 8, 13, 0.9);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  text-align: left;
}

.stage-activity > span:first-child {
  color: var(--info);
}

.stage-activity small,
.stage-activity strong {
  display: block;
}

.stage-activity small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 650;
}

.stage-activity strong {
  color: var(--info);
  font-family: var(--font-rounded);
  font-size: 23px;
  line-height: 1.1;
}

.stage-activity i {
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.stage-distance {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.status-band {
  border: 0;
  background: transparent;
}

.status-inner {
  margin-top: -1px;
  padding: var(--s6) var(--s8);
  border: 1px solid rgba(70, 215, 168, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(105deg, rgba(70, 215, 168, 0.08), transparent 42%),
    rgba(20, 30, 46, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.section-alt {
  border-block-color: rgba(48, 65, 88, 0.5);
  background:
    radial-gradient(circle at 84% 28%, rgba(102, 167, 255, 0.07), transparent 28rem),
    rgba(20, 30, 46, 0.32);
}

.card,
.step,
.stat {
  border-color: rgba(48, 65, 88, 0.72);
  background: linear-gradient(145deg, rgba(28, 41, 61, 0.76), rgba(20, 30, 46, 0.9));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.grid-3 .card:nth-child(2) {
  transform: translateY(-8px);
}

.stat {
  border-top: 3px solid rgba(102, 167, 255, 0.55);
}

.stat:nth-child(3) {
  border-top-color: rgba(70, 215, 168, 0.7);
}

.stat:nth-child(4) {
  border-top-color: rgba(168, 181, 198, 0.4);
}

.cta-inner {
  overflow: hidden;
  border-color: rgba(70, 215, 168, 0.38);
  background:
    radial-gradient(circle at 8% -30%, rgba(70, 215, 168, 0.28), transparent 46%),
    radial-gradient(circle at 94% 120%, rgba(102, 167, 255, 0.22), transparent 48%),
    var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 1;
}

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--motion-state) var(--ease),
    transform var(--motion-state) var(--ease);
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .site-header-inner {
    justify-content: space-between;
  }

  .hero-grid,
  .split-grid,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-device {
    order: -1;
  }

  .hero-stage {
    min-height: 620px;
  }

  .rail-art {
    display: none;
  }
}

@media (max-width: 620px) {
  :root {
    --page: min(1120px, calc(100% - 32px));
    --page-narrow: min(760px, calc(100% - 32px));
  }

  body {
    font-size: 16px;
  }

  .grid-2,
  .grid-4,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-inner {
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-action {
    justify-items: stretch;
    width: 100%;
  }

  .status-action small {
    text-align: center;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-stage {
    width: 100%;
    min-width: 0;
    min-height: 535px;
  }

  .hero-device {
    width: 100%;
    min-width: 0;
  }

  .phone-real {
    width: 280px;
    transform: rotate(1deg);
  }

  .hero-route {
    inset-inline: -20px;
    width: calc(100% + 40px);
  }

  .stage-activity {
    right: 0;
    bottom: 30px;
    min-width: 232px;
    padding: 11px 12px;
  }

  .stage-activity .icon {
    width: 17px;
    height: 17px;
  }

  .hero-device figcaption {
    max-width: 30ch;
    margin-inline: auto;
  }

  .status-inner {
    padding-inline: var(--s5);
  }

  .grid-3 .card:nth-child(2) {
    transform: none;
  }
}

/* ---------- Accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #ccd6e2;
    --separator: #4a5f7c;
  }

  .site-header,
  .card,
  .note {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface);
  }

  .glass-button {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(70, 215, 168, 0.22);
  }
}

@media (forced-colors: active) {
  .card,
  .note,
  .step,
  .stat,
  .phone,
  .activity,
  .carplay {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header,
  .cta-section,
  .hero-device,
  .rail-art {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .section-alt {
    border-color: #999;
    background: #fff;
  }
}
