/* ============================================================
   SOL Tamil App — Landing Page
   Vanilla CSS, no build step. Cascade layers keep specificity flat.
   ============================================================ */

@layer fonts, reset, tokens, base, layout, components, motion, utilities;

/* ─────────────────────────── FONTS ─────────────────────────── */
@layer fonts {
  @font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url('../fonts/nunito-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
      U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
      U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
      U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
      U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/nunitosans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
      U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
      U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/nunitosans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
      U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
      U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
}

/* ─────────────────────────── RESET ─────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
  }

  body {
    min-height: 100svh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

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

  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; }

  ul, ol { list-style: none; padding: 0; }
  a { color: inherit; text-decoration: none; }

  h1, h2, h3 { line-height: 1.1; text-wrap: balance; }
  p { text-wrap: pretty; }

  :target { scroll-margin-top: 5.5rem; }

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

/* ─────────────────────────── TOKENS ────────────────────────── */
@layer tokens {
  :root {
    /* Palette — carried over from the SOL brand */
    --sky-500: #8CCDFA;
    --sky-400: #A9DBFC;
    --sky-200: #C8E4F9;
    --sky-100: #EAF4FD;
    --paper:   #F6F9FD;
    --line:    #E2EAF4;
    --line-strong: #D3E6F7;

    --navy-900: #14264A;
    --navy-700: #1D3B6E;
    --navy-500: #2C5497;
    --blue-400: #3E7FC1;

    --ink:        #14264A;
    --ink-body:   #1F3557;
    --ink-muted:  #41547A;
    --ink-soft:   #7186A5;
    --ink-invert: #ffffff;

    --focus: #1D3B6E;

    /* Type */
    --font-display: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
    --font-tamil: 'Noto Sans Tamil', 'Nirmala UI', 'Latha', 'Tamil Sangam MN', sans-serif;

    --step--1: clamp(0.875rem, 0.85rem + 0.12vw, 0.938rem);
    --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.063rem);
    --step-1:  clamp(1.063rem, 1rem + 0.3vw, 1.188rem);
    --step-2:  clamp(1.25rem, 1.15rem + 0.4vw, 1.375rem);
    --step-3:  clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
    --step-4:  clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem);
    --step-5:  clamp(2.375rem, 1.6rem + 3.4vw, 3.875rem);

    /* Space & shape */
    --wrap: 1120px;
    --gutter: clamp(1.125rem, 4vw, 1.75rem);
    --section-y: clamp(3.75rem, 8vw, 5.25rem);
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 20px;
    --r-xl: 26px;
    --r-pill: 999px;

    --shadow-card: 0 1px 2px rgb(20 38 74 / 0.04), 0 8px 24px -12px rgb(20 38 74 / 0.12);
    --shadow-lift: 0 2px 4px rgb(20 38 74 / 0.05), 0 20px 40px -16px rgb(20 38 74 / 0.22);
    --shadow-phone: 0 26px 50px rgb(20 38 74 / 0.28);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-xs: 120ms;
    --dur-sm: 200ms;
    --dur-md: 380ms;
    --dur-lg: 700ms;
  }

  /* Modern spring easing where linear() is supported */
  @supports (transition-timing-function: linear(0, 1)) {
    :root {
      --spring: linear(
        0, 0.0088 1.2%, 0.0355 2.5%, 0.1436 5.1%, 0.5361 12.4%, 0.7075 15.9%,
        0.8383 19.5%, 0.9348 23.3%, 1.0046 27.4%, 1.0396 31.6%, 1.0451 37.1%,
        1.0203 44.5%, 0.9971 51.5%, 0.9927 57.8%, 1.0007 76.6%, 1
      );
    }
  }

  /* Smooth height on <details> where supported */
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
  }
}

/* ──────────────────────────── BASE ─────────────────────────── */
@layer base {
  body {
    font-family: var(--font-body);
    font-size: var(--step-0);
    color: var(--ink-body);
    background: var(--paper);
    overflow-x: clip;
  }

  strong { font-weight: 700; }
  [lang="ta"] { font-family: var(--font-tamil); }

  ::selection { background: var(--sky-500); color: var(--navy-900); }
}

/* ─────────────────────────── LAYOUT ────────────────────────── */
@layer layout {
  .wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .wrap--narrow { max-width: 760px; }

  .section { padding-block: var(--section-y); }
  .section--paper { background: var(--paper); }
  .section--sky { background: var(--sky-100); }

  .section__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--step-4);
    letter-spacing: -0.02em;
    color: var(--ink);
    max-width: 17em;
    margin-block-start: 0.6rem;
  }
  .section__title--narrow { max-width: 14em; }
  .section__title--sm { font-size: var(--step-3); max-width: 18em; }

  .section__lede {
    font-size: var(--step-1);
    line-height: 1.65;
    color: var(--ink-muted);
    max-width: 56ch;
    margin-block-start: 1.125rem;
  }
}

/* ────────────────────────── COMPONENTS ─────────────────────── */
@layer components {

  /* ---- Skip link ---- */
  .skip-link {
    position: fixed;
    inset-block-start: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 999;
    padding: 0.7rem 1.1rem;
    background: var(--navy-700);
    color: #fff;
    border-radius: var(--r-sm);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--dur-sm) var(--ease-out);
  }
  .skip-link:focus-visible { transform: translateY(0); }

  /* ---- Scroll progress ---- */
  .scroll-progress {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    z-index: 60;
    pointer-events: none;
  }
  .scroll-progress__bar {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--sky-500), var(--navy-500));
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
  }

  /* ---- Header ---- */
  .site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    border-block-end: 1px solid transparent;
    transition: background var(--dur-md) var(--ease-out),
                border-color var(--dur-md) var(--ease-out),
                box-shadow var(--dur-md) var(--ease-out);
  }
  @supports (backdrop-filter: blur(1px)) {
    .site-header { backdrop-filter: blur(12px) saturate(1.4); }
  }
  .site-header[data-stuck] {
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    border-block-end-color: var(--line);
    box-shadow: 0 6px 24px -18px rgb(20 38 74 / 0.5);
  }

  .nav {
    max-width: var(--wrap);
    margin-inline: auto;
    padding: 0.875rem var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: none;
    margin-inline-end: auto;
  }
  .brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    transition: transform var(--dur-md) var(--spring);
  }
  .site-header[data-stuck] .brand__mark { transform: scale(0.92); }
  .brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
  .brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    color: var(--navy-700);
  }
  .brand--footer { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
  .brand--footer img { border-radius: 8px; }

  .nav__menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }
  .nav__list { display: flex; align-items: center; gap: 1.25rem; }

  .nav__link {
    position: relative;
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--ink-muted);
    padding-block: 0.25rem;
    transition: color var(--dur-sm) var(--ease-out);
  }
  .nav__link::after {
    content: '';
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--sky-500);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform var(--dur-md) var(--ease-out);
  }
  .nav__link:hover { color: var(--navy-700); }
  .nav__link:hover::after,
  .nav__link[aria-current="true"]::after { transform: scaleX(1); }
  .nav__link[aria-current="true"] { color: var(--navy-700); }

  /* ---- Nav toggle (mobile) ---- */
  .nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy-700);
    cursor: pointer;
  }
  .nav-toggle__box {
    position: relative;
    width: 16px;
    height: 12px;
  }
  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    position: absolute;
    inset-inline: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--dur-md) var(--ease-out),
                opacity var(--dur-xs) linear;
  }
  .nav-toggle__bar { inset-block-start: 5px; }
  .nav-toggle__bar::before { content: ''; inset-block-start: -5px; }
  .nav-toggle__bar::after  { content: ''; inset-block-start: 5px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(5px) rotate(-90deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { opacity: 0; }

  /* ---- Buttons ---- */
  .btn {
    --btn-bg: var(--navy-700);
    --btn-fg: #fff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.94rem 1.75rem;
    border-radius: var(--r-pill);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.063rem;
    line-height: 1.2;
    color: var(--btn-fg);
    background: var(--btn-bg);
    cursor: pointer;
    isolation: isolate;
    overflow: hidden;
    translate: var(--mx, 0px) var(--my, 0px);
    transition: background var(--dur-sm) var(--ease-out),
                box-shadow var(--dur-md) var(--ease-out),
                scale var(--dur-md) var(--spring),
                translate var(--dur-md) var(--ease-out);
  }
  .btn__label { position: relative; z-index: 2; }

  /* sheen sweep */
  .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(110deg, transparent 32%,
      color-mix(in srgb, #fff 34%, transparent) 48%, transparent 64%);
    translate: -110% 0;
    transition: translate var(--dur-lg) var(--ease-out);
  }
  .btn:hover::before { translate: 110% 0; }

  .btn:hover { scale: 1.03; }
  .btn:active { scale: 0.975; transition-duration: var(--dur-xs); }

  .btn--primary {
    box-shadow: 0 8px 20px rgb(29 59 110 / 0.25);
  }
  .btn--primary:hover {
    --btn-bg: var(--navy-500);
    box-shadow: 0 14px 30px rgb(29 59 110 / 0.32);
  }

  .btn--ghost {
    --btn-bg: #fff;
    --btn-fg: var(--navy-700);
    border: 1px solid var(--line-strong);
    font-weight: 700;
    box-shadow: var(--shadow-card);
  }
  .btn--ghost:hover { --btn-bg: var(--sky-100); }

  .btn--sky {
    --btn-bg: var(--sky-500);
    --btn-fg: var(--navy-900);
    flex: none;
    padding-inline: 1.875rem;
  }
  .btn--sky:hover { --btn-bg: var(--sky-400); }

  .btn--sm {
    padding: 0.625rem 1.125rem;
    font-size: 0.938rem;
    font-weight: 700;
  }

  /* click ripple */
  .ripple {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    background: color-mix(in srgb, #fff 45%, transparent);
    pointer-events: none;
    animation: ripple 620ms var(--ease-out) forwards;
  }
  @keyframes ripple {
    from { scale: 0; opacity: 0.85; }
    to   { scale: 2.6; opacity: 0; }
  }

  /* busy state */
  .btn__spinner {
    width: 1.05em;
    height: 1.05em;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
    border-block-start-color: currentColor;
    display: none;
    z-index: 2;
    animation: spin 700ms linear infinite;
  }
  .btn[data-busy] { pointer-events: none; }
  .btn[data-busy] .btn__spinner { display: block; }
  @keyframes spin { to { rotate: 1turn; } }

  /* ---- Hero ---- */
  .hero {
    padding-block: clamp(3.25rem, 7vw, 4.75rem) clamp(3rem, 6vw, 4rem);
    padding-inline: 0;
    background: linear-gradient(180deg, var(--sky-500) 0%, var(--sky-400) 58%, var(--paper) 100%);
  }
  .hero__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(2rem, 5vw, 3rem);
    align-items: center;
  }
  @media (min-width: 960px) {
    .hero__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
  }
  .hero__copy { min-width: 0; }

  .hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--step-5);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: var(--ink);
  }
  .mark {
    display: inline-block;
    font-style: normal;
    color: var(--navy-700);
    background: #fff;
    padding: 0.02em 0.26em 0.08em;
    line-height: 1;
    border-radius: 0.22em;
    rotate: -1.2deg;
  }

  .hero__lede {
    font-size: var(--step-1);
    line-height: 1.6;
    max-width: 32em;
    margin-block-start: 1.375rem;
    color: var(--ink-body);
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-block-start: 1.875rem;
  }
  .hero__meta {
    font-size: var(--step--1);
    color: #33507D;
    margin-block-start: 1rem;
  }

  /* ---- Phones ---- */
  .hero__stage {
    min-width: 0;
    display: flex;
    /* Without this the shorter phone stretches to match the taller one and its
       dark background shows below the image, reading as a thicker bottom border. */
    align-items: flex-start;
    justify-content: center;
    gap: 1.125rem;
    perspective: 1200px;
  }
  .phone {
    flex: 0 1 246px;
    min-width: 0;
    border-radius: var(--r-xl);
    border: 6px solid var(--navy-900);
    box-shadow: var(--shadow-phone);
    overflow: hidden;
    background: var(--navy-900);
    transform-style: preserve-3d;
    will-change: transform;
  }
  .phone img { border-radius: 20px; }
  .phone--back  { rotate: -3deg; }
  .phone--front { rotate: 3deg; margin-block-start: 2.125rem; }

  /* ---- Cards ---- */
  .card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-md) var(--ease-out),
                box-shadow var(--dur-md) var(--ease-out),
                border-color var(--dur-md) var(--ease-out);
  }
  /* cursor-follow spotlight */
  .card[data-spotlight]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
      15rem circle at var(--px, 50%) var(--py, 50%),
      color-mix(in srgb, var(--sky-500) 26%, transparent),
      transparent 70%
    );
    transition: opacity var(--dur-md) var(--ease-out);
  }
  .card[data-spotlight]:hover::after { opacity: 1; }
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-lift);
  }

  .card__title {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-block: 1.125rem 0.5rem;
  }
  .card__text {
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--ink-muted);
  }

  /* ---- Steps (sequence → numbering is meaningful) ---- */
  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-block-start: 2.75rem;
  }
  .step__num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--sky-500);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--navy-700);
    transition: rotate var(--dur-md) var(--spring), scale var(--dur-md) var(--spring);
  }
  .step:hover .step__num { rotate: -8deg; scale: 1.08; }

  /* ---- Audience ---- */
  .audience {
    background: var(--navy-700);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 1.625rem 1.75rem;
    margin-block-start: 1.25rem;
  }
  .audience__label {
    font-family: var(--font-display);
    font-size: 0.938rem;
    font-weight: 700;
    color: var(--sky-500);
  }
  .audience__text {
    font-size: var(--step-1);
    line-height: 1.55;
    margin-block-start: 0.5rem;
  }

  /* ---- Eyebrow ---- */
  .eyebrow {
    font-family: var(--font-display);
    font-size: 0.813rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-400);
  }

  /* ---- Tour ---- */
  .tour {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.625rem;
    margin-block-start: 2.875rem;
  }
  .tour__item { min-width: 0; }
  .shot {
    border-radius: 22px;
    border: 5px solid var(--navy-900);
    background: var(--navy-900);
    box-shadow: 0 14px 30px rgb(20 38 74 / 0.18);
    overflow: hidden;
    margin-block-end: 0.875rem;
    transition: transform var(--dur-md) var(--spring),
                box-shadow var(--dur-md) var(--ease-out);
  }
  .shot img { border-radius: 17px; width: 100%; }
  .tour__item:hover .shot {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 26px 46px rgb(20 38 74 / 0.26);
  }
  .tour__title {
    font-family: var(--font-display);
    font-size: 1.063rem;
    font-weight: 800;
    color: var(--ink);
    margin-block-end: 0.25rem;
  }
  .tour__text {
    font-size: 0.938rem;
    line-height: 1.5;
    color: var(--ink-muted);
  }

  /* ---- Slider dots (mobile only, shown by JS) ---- */
  .slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-block-start: 1.5rem;
  }
  .slider-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--navy-700) 22%, transparent);
    cursor: pointer;
    transition: width var(--dur-md) var(--spring),
                background var(--dur-sm) var(--ease-out);
  }
  .slider-dots button[aria-current="true"] {
    width: 24px;
    background: var(--navy-700);
  }

  /* ---- About ---- */
  .about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 5vw, 3rem);
    align-items: start;
  }
  .about__copy { min-width: 0; }
  .about__text {
    font-size: var(--step-1);
    line-height: 1.65;
    color: var(--ink-muted);
    margin-block-start: 1.125rem;
    max-width: 60ch;
  }
  .about__note {
    font-size: var(--step--1);
    line-height: 1.6;
    color: var(--ink-soft);
    font-style: italic;
    margin-block-start: 1.375rem;
  }

  .principles { min-width: 0; padding: 1.875rem; border-radius: 22px; }
  .principles__label {
    font-family: var(--font-display);
    font-size: 0.813rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-400);
  }
  .principles__list {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    margin-block-start: 1.25rem;
  }
  .principles__item dt {
    font-family: var(--font-display);
    font-size: 1.063rem;
    font-weight: 800;
    color: var(--ink);
    margin-block-end: 0.3rem;
  }
  .principles__item dd {
    margin: 0;
    font-size: 0.938rem;
    line-height: 1.55;
    color: var(--ink-muted);
  }

  /* ---- FAQ ---- */
  .faq {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-block-start: 2.125rem;
  }
  .faq__item {
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color var(--dur-md) var(--ease-out),
                box-shadow var(--dur-md) var(--ease-out);
  }
  .faq__item[open] {
    border-color: var(--sky-500);
    box-shadow: var(--shadow-card);
  }
  .faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.375rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.063rem;
    font-weight: 800;
    color: var(--ink);
    list-style: none;
    transition: background var(--dur-sm) var(--ease-out);
  }
  .faq__q::-webkit-details-marker { display: none; }
  .faq__q:hover { background: #F3F9FE; }

  .faq__icon {
    position: relative;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sky-500);
    transition: rotate var(--dur-md) var(--spring),
                background var(--dur-sm) var(--ease-out);
  }
  .faq__icon::before,
  .faq__icon::after {
    content: '';
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    width: 11px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--navy-700);
    translate: -50% -50%;
    transition: opacity var(--dur-sm) var(--ease-out);
  }
  .faq__icon::after { rotate: 90deg; }
  .faq__item[open] .faq__icon { rotate: 180deg; }
  .faq__item[open] .faq__icon::after { opacity: 0; }

  .faq__a {
    padding-inline: 1.375rem;
    padding-block-end: 1.375rem;
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--ink-muted);
  }

  /* ---- Waitlist ---- */
  .waitlist {
    padding-block: clamp(4rem, 8vw, 5.375rem);
    background: var(--navy-700);
    position: relative;
    overflow: hidden;
  }
  .waitlist::before {
    content: '';
    position: absolute;
    inset-block-start: -40%;
    inset-inline-start: 50%;
    width: min(140%, 1100px);
    aspect-ratio: 1;
    translate: -50% 0;
    background: radial-gradient(circle, color-mix(in srgb, var(--sky-500) 22%, transparent), transparent 62%);
    pointer-events: none;
  }
  .waitlist__inner {
    position: relative;
    max-width: 640px;
    text-align: center;
  }
  .waitlist__mark {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin: 0 auto 1.375rem;
    animation: float 6s var(--ease-in-out) infinite;
  }
  @keyframes float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -8px; }
  }
  .waitlist__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--step-4);
    letter-spacing: -0.02em;
    color: #fff;
  }
  .waitlist__lede {
    font-size: var(--step-1);
    line-height: 1.6;
    color: var(--sky-200);
    margin-block-start: 1rem;
  }

  .waitlist__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
    margin-block-start: 1.875rem;
  }
  .field { flex: 1 1 260px; min-width: 0; text-align: start; }
  .field__input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--r-pill);
    border: 2px solid transparent;
    background: #fff;
    font-size: 1.063rem;
    color: var(--ink);
    outline: none;
    transition: border-color var(--dur-sm) var(--ease-out),
                box-shadow var(--dur-sm) var(--ease-out);
  }
  .field__input::placeholder { color: var(--ink-soft); }
  .field__input:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky-500) 35%, transparent);
  }
  .field__input[aria-invalid="true"] {
    border-color: #FF9A8B;
    box-shadow: 0 0 0 4px rgb(255 154 139 / 0.28);
  }
  .field__error {
    margin-block-start: 0.5rem;
    padding-inline-start: 1.25rem;
    font-size: var(--step--1);
    font-weight: 600;
    color: #FFC9BF;
  }
  .shake { animation: shake 420ms var(--ease-in-out); }
  @keyframes shake {
    0%, 100% { translate: 0; }
    20%      { translate: -6px; }
    40%      { translate: 5px; }
    60%      { translate: -3px; }
    80%      { translate: 2px; }
  }

  .check {
    display: flex;
    align-items: flex-start;
    gap: 0.563rem;
    justify-content: center;
    margin-block-start: 1rem;
    font-size: var(--step--1);
    color: #A9C9E8;
    cursor: pointer;
    text-align: start;
  }
  .check input { position: absolute; opacity: 0; width: 0; height: 0; }
  .check__box {
    flex: none;
    position: relative;
    width: 18px;
    height: 18px;
    margin-block-start: 2px;
    border-radius: 5px;
    border: 2px solid #A9C9E8;
    transition: background var(--dur-sm) var(--ease-out),
                border-color var(--dur-sm) var(--ease-out),
                scale var(--dur-xs) var(--spring);
  }
  .check__box::after {
    content: '';
    position: absolute;
    inset-block-start: 1px;
    inset-inline-start: 5px;
    width: 4px;
    height: 9px;
    border: solid var(--navy-700);
    border-width: 0 2.5px 2.5px 0;
    rotate: 45deg;
    scale: 0;
    transition: scale var(--dur-md) var(--spring);
  }
  .check input:checked + .check__box {
    background: var(--sky-500);
    border-color: var(--sky-500);
  }
  .check input:checked + .check__box::after { scale: 1; }
  .check:active .check__box { scale: 0.9; }
  .check input:focus-visible + .check__box {
    outline: 3px solid var(--sky-500);
    outline-offset: 3px;
  }

  .waitlist__done {
    margin-block-start: 1.875rem;
    padding: 1.625rem;
    border-radius: 18px;
    border: 0;
  }
  .waitlist__thanks {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 800;
    color: var(--navy-700);
  }
  .waitlist__sub {
    margin-block-start: 0.5rem;
    font-size: var(--step-0);
    color: var(--ink-muted);
  }

  /* ---- Footer ---- */
  .site-footer { background: var(--navy-900); padding-block: 2.125rem; }
  .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.125rem;
    align-items: center;
    justify-content: space-between;
  }
  .site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.938rem;
  }
  .site-footer__links a {
    color: #A9C9E8;
    transition: color var(--dur-sm) var(--ease-out);
  }
  .site-footer__links a:hover { color: #fff; }
  .site-footer__legal { font-size: var(--step--1); color: #7A93B8; }
}

/* ─────────────────────────── MOTION ────────────────────────── */
@layer motion {

  /* --- Orchestrated hero entrance (one sequence, on load) --- */
  [data-hero] {
    opacity: 0;
    translate: 0 14px;
    animation: enter 800ms var(--ease-out) forwards;
    animation-delay: calc(var(--hero-step, 1) * 90ms);
  }
  [data-hero="1"] { --hero-step: 1; }
  [data-hero="2"] { --hero-step: 2; }
  [data-hero="3"] { --hero-step: 3; }
  [data-hero="4"] { --hero-step: 4; }
  [data-hero="5"] { --hero-step: 5; }
  [data-hero="6"] { --hero-step: 3; translate: 0 26px; }

  @keyframes enter {
    to { opacity: 1; translate: 0 0; }
  }

  /* --- Scroll reveal: native scroll-driven animation --- */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      [data-reveal] {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 8% cover 22%;
      }
      /* stagger inside groups */
      [data-reveal-group] > [data-reveal]:nth-child(2) { animation-range: entry 4% cover 24%; }
      [data-reveal-group] > [data-reveal]:nth-child(3) { animation-range: entry 2% cover 26%; }
      [data-reveal-group] > [data-reveal]:nth-child(4) { animation-range: entry 0% cover 28%; }
      [data-reveal-group] > [data-reveal]:nth-child(5) { animation-range: entry 0% cover 30%; }
    }
  }
  @keyframes reveal {
    from { opacity: 0; translate: 0 18px; }
    to   { opacity: 1; translate: 0 0; }
  }

  /* --- Fallback: JS IntersectionObserver adds .js-reveal --- */
  .js-reveal [data-reveal] {
    opacity: 0;
    translate: 0 18px;
    transition: opacity var(--dur-lg) var(--ease-out),
                translate var(--dur-lg) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js-reveal [data-reveal].is-visible { opacity: 1; translate: 0 0; }

  /* --- Native scroll progress where supported --- */
  @supports (animation-timeline: scroll()) {
    .scroll-progress__bar {
      transform: scaleX(0);
      animation: grow linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes grow { to { transform: scaleX(1); } }
  }

  /* --- View Transitions --- */
  @view-transition { navigation: auto; }

  /* --- Reduced motion --- */
  @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;
      scroll-behavior: auto !important;
    }
    [data-hero] { opacity: 1; translate: none; }
    .js-reveal [data-reveal] { opacity: 1; translate: none; }
    .phone { transform: none !important; }
  }
}

/* ────────────────────────── UTILITIES ──────────────────────── */
@layer utilities {
  .visually-hidden:not(:focus):not(:active) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  [hidden] { display: none !important; }
}

/* ───────────────────────── RESPONSIVE ──────────────────────── */
@media (max-width: 860px) {
  @layer components {
    .nav-toggle { display: inline-flex; }

    /* The panel is a solid overlay hung off the header. An earlier version
       animated grid-template-rows from 0fr, which only sizes the first row —
       with two children the second stayed visible. Opacity + translate is
       predictable regardless of how many children the menu holds. */
    .nav__menu {
      position: absolute;
      inset-block-start: 100%;
      inset-inline: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 0.75rem var(--gutter) 1.25rem;
      background: var(--paper);
      border-block-end: 1px solid var(--line);
      box-shadow: 0 24px 40px -28px rgb(20 38 74 / 0.55);

      opacity: 0;
      visibility: hidden;
      translate: 0 -0.75rem;
      transition: opacity var(--dur-sm) var(--ease-out),
                  translate var(--dur-md) var(--ease-out),
                  visibility 0s linear var(--dur-md);
    }
    .nav__menu[data-open] {
      opacity: 1;
      visibility: visible;
      translate: 0 0;
      transition-delay: 0s;
    }

    .nav__list {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }
    .nav__link {
      display: block;
      padding: 0.875rem 0.25rem;
      font-size: 1.063rem;
      color: var(--navy-700);
      border-block-end: 1px solid var(--line);
    }
    .nav__link::after { display: none; }
    .nav__menu .btn {
      margin-block-start: 1rem;
      justify-content: center;
    }

    /* Staggered entrance for the items once the panel is open */
    .nav__menu[data-open] .nav__list > li,
    .nav__menu[data-open] .btn {
      animation: nav-item 420ms var(--ease-out) backwards;
      animation-delay: calc(var(--i, 0) * 45ms + 60ms);
    }
    .nav__menu .nav__list > li:nth-child(1) { --i: 1; }
    .nav__menu .nav__list > li:nth-child(2) { --i: 2; }
    .nav__menu .nav__list > li:nth-child(3) { --i: 3; }
    .nav__menu .nav__list > li:nth-child(4) { --i: 4; }
    .nav__menu .btn { --i: 5; }
  }
}

@keyframes nav-item {
  from { opacity: 0; translate: 0 -8px; }
  to   { opacity: 1; translate: 0 0; }
}

@media (max-width: 760px) {
  @layer components {
    /* The five screens become a swipeable track. Native scroll-snap keeps
       keyboard, screen-reader and momentum scrolling working for free. */
    .tour {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      /* Snapping ignores padding unless scroll-padding matches it, which would
         otherwise pull the first card flush against the viewport edge. */
      scroll-padding-inline: var(--gutter);
      overscroll-behavior-inline: contain;
      /* Bleed to the viewport edges so the next card peeks in */
      margin-inline: calc(var(--gutter) * -1);
      padding-inline: var(--gutter);
      padding-block-end: 0.5rem;
      scrollbar-width: none;
    }
    .tour::-webkit-scrollbar { display: none; }

    .tour__item {
      flex: 0 0 min(68%, 240px);
      scroll-snap-align: start;
    }

    .tour__item:hover .shot { transform: none; }
  }
}

@media (max-width: 760px) {
  @layer motion {
    /* Cards sitting off to the right of a horizontal track shouldn't wait on a
       vertical reveal to become visible. */
    .tour__item[data-reveal],
    .js-reveal .tour__item[data-reveal] {
      animation: none;
      opacity: 1;
      translate: none;
    }
  }
}

@media (max-width: 600px) {
  @layer components {
    /* Rotated cards report a wider bounding box than their layout box,
       so the stage needs inset room or the corners clip the viewport. */
    .hero__stage {
      gap: 0.625rem;
      padding-inline: 0.75rem;
    }
    .phone {
      flex: 0 1 200px;
      border-width: 5px;
    }
    .phone--back  { rotate: -2deg; }
    .phone--front { rotate: 2deg; margin-block-start: 1.5rem; }
    .site-footer__inner { justify-content: flex-start; }
  }
}

@media (prefers-contrast: more) {
  @layer components {
    .card, .faq__item { border-color: var(--navy-700); }
    .nav__link { color: var(--navy-700); }
  }
}

@media print {
  .site-header, .scroll-progress, .nav-toggle, .btn { display: none !important; }
  body { background: #fff; }
  .faq__a { display: block !important; }
}
