:root {
  /* Brand palette — jetset tokens */
  --base-25: #F5F7FA;
  --base-50: #F2F6FA;
  --base-100: #E8EFF6;
  --base-150: #D6E7F5;
  --base-200: #D9E1EA;
  --base-300: #B7C7D6;
  --base-500: #3F5A73;
  --base-600: #175280;
  --base-700: #0F4468;
  --base-800: #003153;
  --base-900: #00243E;
  --base-950: #061521;
  --white: #FFFFFF;
  --accent-dark: #7CD4FF;   /* accent.onDark */
  --accent-light: #005F9E;  /* accent.onLight */

  /* Radius */
  --r-pill: 999px;
  --r-field: 12px;
  --r-card: 16px;
  --r-tile: 12px;
  --r-sheet: 20px;
  --r-icon: 10px;

  /* Space */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px;
  --s-20: 20px; --s-24: 24px; --s-32: 32px;

  /* Shadows (defined — not in token set) */
  --e1: 0 1px 2px rgba(6,21,33,.08);
  --e2: 0 8px 24px rgba(6,21,33,.12);
  --e3: 0 24px 64px rgba(6,21,33,.28);

  /* Type */
  --font-sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Phone scale */
  --phone-scale: 1;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--base-800);
  background: var(--base-25);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: var(--r-icon);
}
/* On the dark hero, focus uses sky */
.site-header :focus-visible { outline-color: var(--accent-dark); }

/* ---------- Header / hero band ---------- */
.site-header {
  position: relative;
  background: linear-gradient(160deg, var(--base-800) 0%, var(--base-900) 60%, var(--base-950) 100%);
  color: var(--base-50);
  overflow: hidden;
}
.site-header::before {
  content: "";
  position: absolute;
  top: -220px; right: -160px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(124,212,255,0.30) 0%, rgba(124,212,255,0.08) 45%, transparent 70%);
  pointer-events: none;
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 0%, rgba(15,68,104,0.55) 0%, transparent 60%);
  pointer-events: none;
}
.beta-banner {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 8px 64px;
  color: var(--base-300);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-top: 1px solid rgba(183,199,214,0.16);
}
.beta-banner .beta-date { color: var(--accent-dark); }
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 104px;
  padding: 0 64px;
  max-width: 1440px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(183,199,214,0.16);
}
.wordmark { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--base-50); }
.wordmark img { height: 70px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--base-300); transition: color 160ms ease; }
.nav-links a:hover { color: var(--accent-dark); }
.nav-links a[aria-current="page"] { color: var(--accent-dark); }

.hero {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px 64px 96px;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  justify-content: center;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 0 0 20px;
}
.site-header .eyebrow { color: var(--accent-dark); }
.hero-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 0 20px;
  align-self: flex-start;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 600;
  color: var(--base-50);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 20px;
  line-height: 1.5;
  color: var(--base-300);
  margin: 0;
  max-width: 56ch;
}

/* ---------- Product grid ---------- */
.product {
  max-width: 1400px;
  margin: 0 auto;
  padding: 96px 64px 120px;
  display: grid;
  grid-template-columns: 420px 413px 320px;
  gap: 48px;
  justify-content: center;
  align-items: start;
}

/* ---------- Accordion ---------- */
.accordion {
  position: sticky;
  top: 32px;
  align-self: start;
}
.section { border-bottom: 1px solid var(--base-200); }
.section + .section { margin-top: 8px; }
.section-head-wrap { margin: 0; }
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 56px;
  padding: 0 8px;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  color: var(--base-800);
}
.section-index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.04em;
  min-width: 20px;
}
.section-title { font-size: 24px; line-height: 1.25; font-weight: 600; flex: 1; }
.chevron {
  display: grid;
  place-items: center;
  color: var(--base-500);
  transition: transform 220ms ease;
}
.section.is-closed .chevron { transform: rotate(0deg); }
.section:not(.is-closed) .chevron { transform: rotate(180deg); }

.section-body { overflow: hidden; }
.section.is-closed .section-body { display: none; }

.feature-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px 12px 24px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: var(--r-tile);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  color: var(--base-800);
  transition: background-color 160ms ease;
}
.feature-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background-color 160ms ease;
}
.feature-row:hover { background: var(--base-50); }

.feature-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--r-icon);
  background: var(--base-100);
  color: var(--base-800);
  display: grid;
  place-items: center;
  transition: background-color 160ms ease, color 160ms ease;
}
.feature-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-title { font-size: 15px; line-height: 1.333; font-weight: 600; color: var(--base-800); }
.feature-teaser {
  font-size: 13px;
  line-height: 1.385;
  color: var(--base-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selected feature */
.feature-row[aria-pressed="true"] { background: var(--base-100); }
.feature-row[aria-pressed="true"]::before { background: var(--accent-light); }
.feature-row[aria-pressed="true"] .feature-icon { background: var(--accent-light); color: var(--white); }
.feature-row[aria-pressed="true"] .feature-title { color: var(--base-800); }

/* Ripple */
.ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: rgba(124,212,255,0.25);
  pointer-events: none;
  transform: scale(0);
  animation: ripple 450ms ease-out forwards;
  z-index: 1;
}
@keyframes ripple {
  to { transform: scale(3); opacity: 0; }
}

/* ---------- Phone + cool card columns ---------- */
.phone-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.phone {
  display: flex;
  justify-content: center;
}

/* Back-to-features button (stacked layout only) */
.back-to-features {
  display: none;
}
.phone-frame {
  width: calc(413px * var(--phone-scale));
  padding: calc(10px * var(--phone-scale));
  background: var(--base-950);
  border-radius: calc(48px * var(--phone-scale));
  box-shadow: var(--e3);
}
.phone-screen {
  position: relative;
  width: calc(393px * var(--phone-scale));
  height: calc(852px * var(--phone-scale));
  border-radius: calc(40px * var(--phone-scale));
  overflow: hidden;
  background: var(--base-25);
}
.screen-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.screen-layer.is-front { opacity: 1; }
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,49,83,0.60);
  transition: opacity 220ms ease-out;
}
.scrim.is-hidden { opacity: 0; pointer-events: none; }
.phone-caption {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  max-width: 72%;
  line-height: 1.4;
  transition: opacity 220ms ease-out;
}
.phone-caption.is-hidden { opacity: 0; pointer-events: none; }

/* Cool card */
.cool-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--e2);
  padding: 24px;
}
.cool-card .eyebrow { color: var(--accent-light); margin-bottom: 8px; }
.cool-card h3 {
  position: relative;
  display: inline-block;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--base-800);
  margin: 0 0 16px;
}
.cool-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-light);
}
.cool-line {
  font-size: 17px;
  line-height: 1.412;
  color: var(--base-500);
  margin: 0 0 10px;
}
.cool-line:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--base-950); color: var(--base-300); padding: 64px; }
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer .copyright { font-size: 13px; color: var(--base-500); }
.footer-links { display: flex; gap: 32px; align-items: center; }
.footer-links a { font-size: 15px; font-weight: 600; color: var(--base-300); transition: color 160ms ease; }
.footer-links a:hover { color: var(--accent-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product {
    grid-template-columns: minmax(0, 480px);
    gap: 64px;
    padding: 72px 24px 96px;
  }
  .accordion { position: static; width: 100%; max-width: 480px; margin: 0 auto; }
  .phone-column { width: 100%; max-width: 480px; margin: 0 auto; }
  .phone { scroll-margin-top: 24px; }
  .cool-card { width: 100%; max-width: 480px; margin: 0 auto; }

  .back-to-features {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-pill);
    background: var(--white);
    border: 1px solid var(--base-200);
    color: var(--base-500);
    box-shadow: var(--e1);
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }
  .back-to-features:hover {
    color: var(--accent-light);
    border-color: var(--base-300);
    box-shadow: var(--e2);
  }
  .back-to-features:active { transform: translateY(1px); }
  .back-to-features:focus-visible { border-radius: var(--r-pill); }

  .feature-row, .accordion { scroll-margin-top: 24px; }

  .nav { padding: 0 24px; }
  .beta-banner { padding: 8px 24px; }
  .hero { padding: 48px 24px 72px; min-height: 340px; }
  .site-footer { padding: 48px 24px; }
}

@media (max-width: 640px) {
  :root { --phone-scale: 0.72; }
  /* All sections open — collapse toggle disabled */
  .section.is-closed .section-body { display: block; }
  .chevron { display: none; }
  .section-head { cursor: default; }

  .product { padding: 56px 20px 80px; gap: 48px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 17px; }
  .nav-links { gap: 20px; }
  .wordmark { font-size: 20px; }
  .wordmark img { height: 56px; }
  .nav { height: 80px; }
  .nav-links a { font-size: 14px; }
  .feature-teaser { white-space: normal; }
  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 400px) {
  :root { --phone-scale: 0.62; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .screen-layer { transition: none !important; }
  .scrim, .phone-caption { transition: none !important; }
}
