/* =========================================================================
   SMACSS categories map onto CSS cascade layers, declared here in the
   order they should win. A layer listed later always beats one listed
   earlier, regardless of selector specificity.

   Token conventions:
   - --space-* tokens are for margin/padding/gap only. Widths, heights,
     and grid track sizes use direct rem values instead.
   - Numeric-magnitude scales (space, font-size, letter-spacing) use
     t-shirt sizing (xs/sm/md/lg/xl/2xl/...) rather than numbered steps.
     Color palette shades (ink-900, ange-700, etc.) keep their numeric
     scale, since that's the conventional way to name a tint/shade
     progression.
   - Primitives only keep a slot if the value is genuinely reused;
     off-scale or single-use values are hardcoded at their one call site.
   - Semantic tokens are for colors (theme-ability) or for values shared
     by 2+ call sites with a real, intended relationship.
   - Every spacing value (margin/padding/gap) resolves through a
     --space-* primitive or semantic token — no ad-hoc numbers.
   ========================================================================= */

@layer tokens.primitive, tokens.semantic, base, layout, modules, states, themes;

@layer tokens.primitive {
  /* =========================================================================
     0a. TOKENS — PRIMITIVE
     ========================================================================= */

  :root {
    /* --- colour: Ink (neutral ramp; 050 is the page, 950 pure black) ---- */
    --palette-ink-000: #ffffff;
    --palette-ink-050: #f5f6f1;
    --palette-ink-100: #ecede7;
    --palette-ink-200: #e3e4de;
    /* Secondary text on black: light enough to read at body size, still below white. */
    --palette-ink-300: #c9cac4;
    --palette-ink-400: #9a9b95;
    --palette-ink-500: #6b6c66;
    --palette-ink-900: #0a0a0a;
    --palette-ink-950: #000000;

    --palette-ink-000-a06: rgba(255, 255, 255, 0.06);
    --palette-ink-000-a12: rgba(255, 255, 255, 0.12);
    --palette-ink-000-a22: rgba(255, 255, 255, 0.22);
    --palette-ink-950-a06: rgba(0, 0, 0, 0.06);
    --palette-ink-950-a14: rgba(0, 0, 0, 0.14);

    /* --- colour: Forest (the green-black of raised surfaces on black) --- */
    --palette-forest-850: #0f1a12;
    --palette-forest-900: #0d1611;

    /* --- colour: Ange (accent ramp) ------------------------------------- */
    --palette-ange-400: #4ade80;
    --palette-ange-500: #22c55e;
    --palette-ange-700: #15803d;
    --palette-ange-500-a10: rgba(34, 197, 94, 0.1);
    --palette-ange-500-a22: rgba(34, 197, 94, 0.22);

    --palette-rose-500: #ef4444;
    --palette-rose-600: #dc2626;

    /* --- space (rem-based) --------------------------------------------- */
    --space-2xs: 0.125rem; /* 2px */
    --space-xs: 0.25rem; /* 4px */
    --space-sm: 0.5rem; /* 8px */
    --space-md: 0.75rem; /* 12px */
    --space-lg: 1rem; /* 16px */
    --space-xl: 1.25rem; /* 20px */
    --space-2xl: 1.5rem; /* 24px */
    --space-3xl: 2rem; /* 32px */
    --space-4xl: 2.5rem; /* 40px */
    --space-5xl: 3rem; /* 48px */
    --space-6xl: 4rem; /* 64px */
    --space-7xl: 5rem; /* 80px */
    --space-8xl: 7rem; /* 112px */

    /* --- type ----------------------------------------------------------
       Inter carries every role, the way the mockups set it: heavy and
       tightly tracked for headlines, regular for body copy. */
    --font-family-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --font-size-xs: 0.75rem; /* 12px — fine print */
    --font-size-sm: 0.8125rem; /* 13px — labels, eyebrows */
    --font-size-md: 0.9375rem; /* 15px — card copy, nav */
    --font-size-lg: 1.0625rem; /* 17px — buttons, list rows */
    --font-size-xl: 1.1875rem; /* 19px — ledes */
    --font-size-2xl: 1.3125rem; /* 21px — card titles */
    --font-size-3xl: 2.5rem; /* 40px — figures */

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-flat: 1;
    --line-height-tight: 1.1;
    --line-height-snug: 1.3;
    --line-height-normal: 1.65;

    --tracking-display: -0.055em;
    --tracking-title: -0.025em;
    --tracking-label: 0.2em;

    /* --- line, shape, motion ------------------------------------------ */
    --border-width-hairline: 1px;
    --border-width-thick: 2px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-pill: 999px;
    --icon-stroke-width: 2px;

    --duration-fast: 120ms;
    --duration-base: 220ms;
    --easing-standard: ease;

    --measure-page: 77.5rem; /* 1240px content column */
    /* The sticky header's height. The hero sizes itself to the screen below it, and an
       anchor jumped to has to land below it, so the three move together. */
    --measure-header: 4rem;
  }
}

@layer tokens.semantic {
  /* =========================================================================
     0b. TOKENS — SEMANTIC
     The light treatment is the default. A section or a single card opts
     into another treatment with a theme class (section 5), which re-points
     these same names.
     ========================================================================= */

  :root {
    /* --- surfaces ------------------------------------------------------ */
    --color-surface-page: var(--palette-ink-050);
    --color-surface-band: var(--palette-ink-100);
    --color-surface-card: var(--palette-ink-000);
    --color-surface-field: var(--palette-ink-050);
    --color-surface-chip: var(--palette-ink-100);
    --color-surface-inverse: var(--palette-ink-900);

    /* --- text ---------------------------------------------------------- */
    --color-text-primary: var(--palette-ink-900);
    --color-text-secondary: var(--palette-ink-500);
    --color-text-placeholder: var(--palette-ink-400);
    --color-text-on-inverse: var(--palette-ink-000);

    /* --- lines --------------------------------------------------------- */
    --color-border: var(--palette-ink-200);
    --color-border-strong: var(--palette-ink-900);

    /* --- accent ---------------------------------------------------------
       Two greens: the bright brand green for headline words, icons on
       dark, and the primary action; the deeper one for small green text
       on a light ground, where the bright green is too light to read. */
    --color-accent: var(--palette-ange-500);
    --color-accent-text: var(--palette-ange-700);
    --color-accent-tint: var(--palette-ange-500-a10);
    --color-accent-line: var(--palette-ange-500-a22);

    --color-action-bg: var(--palette-ange-500);
    --color-action-bg-hover: var(--palette-ange-400);
    --color-action-text: var(--palette-ink-900);

    --color-focus-ring: var(--palette-ange-700);
    --color-danger: var(--palette-rose-600);

    /* --- device frames: the same black phone on any ground ------------- */
    --color-device: var(--palette-ink-900);
    --color-device-screen: var(--palette-ink-050);
    --color-device-status: var(--palette-ink-900);
    --color-device-status-light: var(--palette-ink-000);

    /* --- texture: the dotted grid and green glow of the dark heroes ---- */
    --color-grid-dot: var(--palette-ink-000-a12);
    --color-glow: var(--palette-ange-500-a10);

    /* --- elevation ----------------------------------------------------- */
    --shadow-float: 0 1.5rem 3rem -1rem var(--palette-ink-950-a14);
    --shadow-phone: 0 2.5rem 5rem -1.5rem var(--palette-ink-950-a14);

    /* --- borders ------------------------------------------------------- */
    --border-hairline: var(--border-width-hairline) solid var(--color-border);
    --border-strong: var(--border-width-hairline) solid var(--color-border-strong);

    /* --- space by role ------------------------------------------------- */
    --space-none: 0;
    --space-inset-card: var(--space-3xl) var(--space-3xl);
    /* Section rhythm follows the screen: full on a large desktop, tighter on a tablet or a
       short laptop, where 112px above and below every section left little room for content. */
    --space-section: clamp(var(--space-6xl), min(12svh, 9vw), var(--space-8xl));
    --space-stack-head: clamp(var(--space-3xl), min(7svh, 5vw), var(--space-6xl));

    /* --- type by role -------------------------------------------------- */
    --font-display: var(--font-family-sans);
    --font-body: var(--font-family-sans);

    --text-hero: clamp(2.5rem, 5vw, 4.5rem);
    --text-section: clamp(2.125rem, 3.5vw, 3.125rem);
    --text-card-title: var(--font-size-2xl);
    --text-lede: var(--font-size-xl);
    --text-body: var(--font-size-md);
    --text-button: var(--font-size-lg);
    --text-label: var(--font-size-sm);
    --text-fine: var(--font-size-xs);

    --weight-display: var(--font-weight-extrabold);
    --weight-title: var(--font-weight-bold);
    --weight-label: var(--font-weight-semibold);

    --motion-press: var(--duration-fast) var(--easing-standard);
    --motion-open: var(--duration-base) var(--easing-standard);
  }
}

@layer base {
  /* =========================================================================
     1. BASE
     ========================================================================= */

  * {
    box-sizing: border-box;
  }

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

  /* An anchor jumped to lands below the sticky header, not under it. Keep
     this at least the header's height. */
  [id] {
    scroll-margin-top: calc(var(--measure-header) + var(--space-lg));
  }

  body {
    margin: var(--space-none);
    background: var(--color-surface-page);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3,
  h4 {
    margin: var(--space-none);
    font-family: var(--font-display);
    color: var(--color-text-primary);
  }

  h1 {
    font-size: var(--text-hero);
    font-weight: var(--weight-display);
    line-height: 1.05;
    letter-spacing: var(--tracking-display);
  }
  h2 {
    font-size: var(--text-section);
    font-weight: var(--weight-display);
    line-height: var(--line-height-tight);
    letter-spacing: var(--tracking-display);
  }
  h3 {
    font-size: var(--text-card-title);
    font-weight: var(--weight-title);
    line-height: var(--line-height-snug);
    letter-spacing: var(--tracking-title);
  }
  h4 {
    font-size: var(--text-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }

  p {
    margin: var(--space-none);
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul,
  ol {
    margin: var(--space-none);
    padding: var(--space-none);
    list-style: none;
  }

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

  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
  }

  :focus-visible {
    outline: var(--border-width-thick) solid var(--color-focus-ring);
    outline-offset: 0.125rem;
  }
}

@layer layout {
  /* =========================================================================
     2. LAYOUT
     ========================================================================= */

  .l-container {
    /* The side margin grows with the window, from 24px on a phone to about 64px on a
       laptop, until the column reaches its full width. */
    width: min(100% - clamp(3rem, 10vw, 8rem), var(--measure-page));
    margin-inline: auto;
  }

  .l-section {
    padding-block: var(--space-section);
    background: var(--color-surface-page);
    color: var(--color-text-primary);
  }

  .l-section-band {
    background: var(--color-surface-band);
  }

  /* A section that brings its own padding, like the logo strip. */
  .l-section-flush {
    padding-block: var(--space-none);
  }

  .l-stack {
    display: grid;
    gap: var(--space-xl);
  }

  /* Two columns of equal weight: copy on one side, a picture or a form on
     the other. */
  .l-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-6xl);
  }
  .l-split-top {
    align-items: start;
  }
  /* Unequal splits: copy narrower than what sits beside it, or wider. */
  .l-split-lead {
    grid-template-columns: min(35rem, 48%) minmax(0, 1fr);
    gap: var(--space-5xl);
  }
  .l-split-trail {
    grid-template-columns: minmax(0, 1fr) min(36.75rem, 55%);
  }

  /* The narrow-copy split of the FAQ: a short heading beside a long list. */
  .l-split-faq {
    grid-template-columns: minmax(0, 1fr) min(46.25rem, 62%);
    align-items: start;
  }

  .l-grid-2,
  .l-grid-3,
  .l-grid-4 {
    display: grid;
    gap: var(--space-xl);
  }
  .l-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .l-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .l-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  @media (max-width: 900px) {
    .l-split,
    .l-split-lead,
    .l-split-trail,
    .l-split-faq {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-5xl);
    }
    .l-grid-3,
    .l-grid-4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* Three cards in two columns would leave the third alone beside an empty slot; it
       takes the whole row instead. */
    .l-grid-3 > :last-child:nth-child(odd) {
      grid-column: 1 / -1;
    }
  }

  @media (max-width: 640px) {
    .l-section {
      padding-block: var(--space-6xl);
    }
    .l-grid-2,
    .l-grid-3 {
      grid-template-columns: 1fr;
    }
    .l-grid-4 {
      gap: var(--space-md);
    }
  }
}

@layer modules {
  /* =========================================================================
     3. MODULES
     ========================================================================= */

  /* --- icon ------------------------------------------------------------- */
  .icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: var(--icon-stroke-width);
    stroke-linecap: butt;
    stroke-linejoin: miter;
  }
  .icon-sm {
    width: 1rem;
    height: 1rem;
  }
  .icon-lg {
    width: 1.5rem;
    height: 1.5rem;
  }
  .icon-accent {
    color: var(--color-accent);
  }
  .icon-accent-text {
    color: var(--color-accent-text);
  }
}

@layer modules {
  /* --- accent words inside a headline ----------------------------------- */
  .accent {
    color: var(--color-accent);
  }
}

@layer modules {
  /* --- buttons ---------------------------------------------------------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    height: 3.625rem;
    padding-inline: var(--space-3xl);
    border: var(--border-width-hairline) solid transparent;
    border-radius: var(--radius-md);
    background: var(--color-action-bg);
    color: var(--color-action-text);
    font-size: var(--text-button);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-title);
    white-space: nowrap;
    cursor: pointer;
    transition:
      background-color var(--motion-press),
      border-color var(--motion-press),
      transform var(--motion-press);
  }
  .btn:hover {
    background: var(--color-action-bg-hover);
  }
  .btn:active {
    transform: translateY(1px);
  }

  .btn-ink {
    background: var(--color-surface-inverse);
    color: var(--color-text-on-inverse);
  }
  .btn-ink:hover {
    background: var(--color-surface-inverse);
    opacity: 0.88;
  }

  .btn-outline {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text-primary);
  }
  .btn-outline:hover {
    background: var(--color-accent-tint);
  }

  .btn-md {
    height: 3.125rem;
    padding-inline: var(--space-2xl);
    font-size: 1rem;
  }

  .btn-sm {
    height: 2.75rem;
    padding-inline: var(--space-xl);
    border-radius: var(--radius-md);
    font-size: var(--text-body);
  }

  .btn-block {
    width: 100%;
  }

  .btn[disabled] {
    opacity: 0.6;
    cursor: progress;
  }
}

@layer modules {
  /* --- store badges (App Store / Google Play) --------------------------- */
  .store {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    height: 3.625rem;
    padding-inline: var(--space-xl) var(--space-2xl);
    border-radius: var(--radius-md);
    background: var(--color-surface-inverse);
    color: var(--color-text-on-inverse);
  }
  .store-text {
    display: flex;
    flex-direction: column;
    line-height: var(--line-height-flat);
  }
  .store-small {
    font-size: var(--text-fine);
    opacity: 0.75;
  }
  .store-name {
    margin-top: var(--space-2xs);
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-title);
  }
}

@layer modules {
  /* --- site header ------------------------------------------------------ */
  .header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--color-surface-page);
    color: var(--color-text-primary);
    border-bottom: var(--border-hairline);
  }
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-2xl);
    height: var(--measure-header);
  }
  .header-logo img {
    width: 7.75rem;
    height: auto;
  }
  .header-nav {
    display: flex;
    gap: clamp(var(--space-xl), 2.2vw, var(--space-3xl));
  }
  .header-link {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    letter-spacing: -0.01em;
    transition: color var(--motion-press);
  }
  .header-link:hover,
  .header-link[aria-current='page'] {
    color: var(--color-text-primary);
  }
  .header-link[aria-current='page'] {
    font-weight: var(--font-weight-semibold);
  }
  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-xl);
  }
  .header-signin {
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-title);
  }
  .header-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
  }
  .header-toggle .icon {
    width: 1.75rem;
    height: 1.75rem;
  }
  .header-menu {
    display: none;
  }

  @media (max-width: 900px) {
    .header-inner {
      grid-template-columns: 1fr auto;
      height: 4.5rem;
    }
    .header-nav,
    .header-actions {
      display: none;
    }
    .header-toggle {
      display: inline-flex;
    }
    .header-logo img {
      width: 8.125rem;
    }
  }
}

@layer modules {
  /* --- mobile menu ------------------------------------------------------ */
  .menu {
    display: grid;
    gap: var(--space-xs);
    padding-block: var(--space-sm) var(--space-2xl);
  }
  .menu-link {
    padding-block: var(--space-md);
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-title);
    border-bottom: var(--border-hairline);
  }
  .menu-actions {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
  }
}

@layer modules {
  /* --- eyebrow: the small capitalised label above a heading ------------- */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent-text);
    font-size: var(--text-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    line-height: var(--line-height-flat);
  }
  .eyebrow-pill {
    height: 2.125rem;
    padding-inline: var(--space-lg);
    border: var(--border-width-hairline) solid var(--color-accent-line);
    border-radius: var(--radius-pill);
    background: var(--color-surface-chip);
    color: var(--color-accent);
  }
}

@layer modules {
  /* --- section head ----------------------------------------------------- */
  .section-head {
    display: grid;
    justify-items: start;
    gap: var(--space-lg);
    margin-bottom: var(--space-stack-head);
  }
  .section-head-flush {
    margin-bottom: var(--space-none);
  }
  .section-head-center {
    justify-items: center;
    text-align: center;
  }
  .section-lede {
    max-width: 42rem;
    color: var(--color-text-secondary);
    font-size: var(--text-lede);
    line-height: var(--line-height-normal);
  }
  .section-head-center .section-lede {
    font-size: 1.0625rem;
  }

  @media (max-width: 640px) {
    .section-head {
      margin-bottom: var(--space-3xl);
    }
    .section-head-center {
      justify-items: start;
      text-align: left;
    }
  }
}

@layer modules {
  /* --- hero ------------------------------------------------------------- */
  .hero {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-page);
    color: var(--color-text-primary);
  }
  /* The dark heroes carry a dotted grid and a green glow from the right.
     The dot pitch matches the mockups; a smaller one reads as a texture
     rather than a grid. */
  .hero-textured {
    background:
      radial-gradient(48rem 34rem at 92% 30%, var(--color-glow), transparent 70%),
      radial-gradient(circle, var(--color-grid-dot) 1px, transparent 1.5px) 0 0 / 2.75rem 2.75rem,
      var(--color-surface-page);
  }
  .hero-inner {
    display: grid;
    grid-template-columns: min(43rem, 52%) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-none);
    min-height: 50.5rem;
    padding-block: var(--space-6xl);
  }
  .hero-copy {
    display: grid;
    justify-items: start;
    gap: var(--space-2xl);
  }
  .hero-copy h1 {
    margin-top: var(--space-xs);
  }
  .hero-lede {
    max-width: 37.5rem;
    color: var(--color-text-secondary);
    font-size: var(--text-lede);
    line-height: var(--line-height-normal);
  }
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-lg);
  }
  .hero-stats {
    display: flex;
    gap: var(--space-5xl);
    width: 100%;
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: var(--border-hairline);
  }
  .hero-stat-value {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: var(--line-height-flat);
  }
  .hero-stat-label {
    margin-top: var(--space-sm);
    color: var(--color-text-secondary);
    font-size: var(--text-body);
  }
  .hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40rem;
  }
  /* Where the phones and floating cards sit on each hero. */
  .hero-phone-back {
    right: var(--space-none);
    bottom: var(--space-4xl);
  }
  .hero-phone-front {
    z-index: 2;
    margin-right: var(--space-7xl);
  }
  .hero-float-brand {
    top: 10rem;
    left: calc(-1 * var(--space-xl));
  }
  .hero-float-done {
    right: calc(-1 * var(--space-xl));
    bottom: var(--space-6xl);
  }
  .hero-float-company {
    bottom: var(--space-6xl);
    left: var(--space-none);
  }
  .hero-float-audience {
    top: var(--space-8xl);
    left: var(--space-none);
  }
  .hero-float-fee {
    right: calc(-1 * var(--space-xl));
    bottom: var(--space-7xl);
  }

  /* On a laptop the whole hero, phones included, fits the screen below the header: copy
     and phones scale with the screen's height down to a floor, rather than running past the
     fold at their full size. Phone height is about 2.2 times its width, hence the factor; on
     a narrow window the phones also give up width, so they never reach over the copy. */
  @media (min-width: 901px) {
    .hero-inner {
      min-height: min(50.5rem, calc(100svh - var(--measure-header)));
      padding-block: clamp(var(--space-2xl), 6svh, var(--space-6xl));
    }
    .hero-copy {
      gap: clamp(var(--space-md), 2.6svh, var(--space-2xl));
    }
    .hero-copy h1 {
      font-size: min(var(--text-hero), 8svh);
    }
    .hero-lede {
      font-size: clamp(1rem, 2.6svh, var(--text-lede));
    }
    .hero-actions {
      margin-top: clamp(var(--space-none), 1.5svh, var(--space-lg));
    }
    .hero-stats {
      margin-top: clamp(var(--space-sm), 2.6svh, var(--space-3xl));
      padding-top: clamp(var(--space-md), 2.6svh, var(--space-3xl));
    }
    .hero-stat-value {
      font-size: clamp(1.75rem, 5svh, var(--font-size-3xl));
    }
    .hero-visual {
      --hero-phone: min(18.75rem, calc((100svh - var(--measure-header)) * 0.37), 20vw);
      min-height: 0;
    }
    .hero-visual .phone {
      width: var(--hero-phone);
    }
    .hero-visual .phone-sm {
      width: calc(var(--hero-phone) * 0.8);
    }
    /* The pair is centred in its column and placed from that centre: the front phone sits
       left of it and the back phone starts just right of it, so they overlap by a quarter of
       a phone at any column width and stay close to the copy. The "İndirim uygulandı" card
       follows the phones rather than the column's edge. */
    .hero-visual-pair .hero-phone-front {
      margin-right: calc(var(--hero-phone) * 0.55);
    }
    .hero-visual-pair .hero-phone-back {
      right: auto;
      left: calc(50% - var(--hero-phone) * 0.025);
    }
    .hero-visual-pair .hero-float-done {
      right: auto;
      left: calc(50% + var(--hero-phone) * 0.1);
    }
    /* The three phones overlap only where they meet, in proportion to their size: an overlap
       on their outer edges, or a fixed one on smaller phones, spills the group over the copy. */
    .hero-visual.devices-trio .phone-sm {
      margin-inline: var(--space-none);
    }
    .hero-visual.devices-trio .phone-sm:first-of-type {
      margin-right: calc(var(--hero-phone) * -0.27);
    }
    .hero-visual.devices-trio .phone-sm:last-of-type {
      margin-left: calc(var(--hero-phone) * -0.27);
    }
  }

  /* The about page opens on copy alone, set narrower and shorter. */
  .hero-text-only {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-block: var(--space-6xl) var(--space-7xl);
  }
  .hero-text-only .hero-copy {
    max-width: 57rem;
    margin-inline: var(--space-8xl) auto;
  }
  .hero-text-only h1 {
    font-size: clamp(2.5rem, 4.6vw, 4.0625rem);
  }

  @media (max-width: 900px) {
    .hero-inner {
      grid-template-columns: 1fr;
      min-height: 0;
      padding-block: var(--space-5xl);
    }
    .hero-visual {
      min-height: 0;
    }
    .hero-text-only .hero-copy {
      margin-inline: var(--space-none);
    }
  }

  @media (max-width: 640px) {
    .hero-inner {
      padding-block: var(--space-3xl) var(--space-5xl);
      gap: var(--space-3xl);
    }
    .hero-copy {
      gap: var(--space-xl);
    }
    .hero-actions {
      display: grid;
      width: 100%;
      margin-top: var(--space-sm);
    }
    .hero-actions .btn {
      width: 100%;
    }
    /* The phone follows the buttons directly on a phone, as in the mockups. */
    .hero-stats {
      display: none;
    }
    .hero-lede {
      font-size: 1rem;
    }
    .hero-phone-back {
      display: none;
    }
    .hero-phone-front {
      margin-right: var(--space-none);
    }
  }
}

@layer modules {
  /* --- phone: an app screenshot in a device frame ----------------------- */
  .phone {
    position: relative;
    container-type: inline-size;
    width: 18.75rem;
    flex: none;
    padding: var(--space-md);
    border-radius: 3rem;
    background: var(--color-device);
    box-shadow:
      0 0 0 var(--border-width-hairline) var(--color-border),
      var(--shadow-phone);
  }
  .phone-screen {
    position: relative;
    overflow: hidden;
    border-radius: 2.25rem;
    background: var(--color-device-screen);
    aspect-ratio: 390 / 844;
  }
  .phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }
  /* The screenshots leave the status bar's height empty at the top; this
     draws the bar into it. Everything is sized against the frame's width
     (cqw), so a phone that shrinks to fit its column keeps its bar in
     proportion; any taller and the bar runs into the screen's first row,
     the greeting on the home screen. */
  .phone-status {
    position: absolute;
    inset: 0 7% auto 9%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 12.5cqw;
    color: var(--color-device-status);
    font-size: 4.4cqw;
    font-weight: var(--font-weight-semibold);
  }
  .phone-status-icons {
    display: flex;
    gap: var(--space-2xs);
  }
  .phone-status .icon {
    width: 4.6cqw;
    height: 4.6cqw;
    stroke-width: 2.5px;
  }
  .phone-status-light {
    color: var(--color-device-status-light);
  }

  .phone-md {
    width: 16.25rem;
  }

  .phone-sm {
    width: 15rem;
    padding: var(--space-sm);
    border-radius: 2.5rem;
  }
  .phone-sm .phone-screen {
    border-radius: 2rem;
  }

  /* On a laptop a whole phone fits the screen below the header, so a short screen shows
     smaller phones rather than cutting them off. A phone is about 2.2 times as tall as it is
     wide; each size keeps its proportion to the others. The step cards' phone-peek, which
     only shows the top of a phone, keeps its own width below. */
  @media (min-width: 901px) {
    .phone {
      width: min(18.75rem, 37svh);
    }
    .phone-md {
      width: min(16.25rem, 32svh);
    }
    .phone-sm {
      width: min(15rem, 29.5svh);
    }
  }

  /* A phone set behind another, offset and partly hidden. */
  .phone-back {
    position: absolute;
  }

  /* Only the top of the phone, as on the step cards: the frame runs out at
     the card's edge instead of closing. */
  .phone-peek {
    width: 100%;
    height: 20.75rem;
    overflow: hidden;
    padding-bottom: var(--space-none);
    border-radius: 2rem 2rem 1.75rem 1.75rem;
    box-shadow: var(--shadow-phone);
  }
  .phone-peek .phone-screen {
    height: 100%;
    aspect-ratio: auto;
    border-radius: 1.5rem;
  }

  @media (max-width: 640px) {
    .phone {
      width: 15rem;
      padding: var(--space-sm);
      border-radius: 2.5rem;
    }
    .phone-screen {
      border-radius: 2rem;
    }
    .phone-peek {
      width: 100%;
    }
  }
}

@layer modules {
  /* --- floating card beside a phone ------------------------------------- */
  .float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl) var(--space-md) var(--space-md);
    border-radius: var(--radius-lg);
    background: var(--color-surface-card);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-float);
  }
  .float-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
    overflow: hidden;
    border: var(--border-hairline);
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
  }
  .float-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .float-mark-accent {
    border: none;
    background: var(--color-action-bg);
    color: var(--color-action-text);
  }
  .float-title {
    font-weight: var(--font-weight-bold);
    font-size: 0.9375rem;
    letter-spacing: var(--tracking-title);
    line-height: var(--line-height-snug);
  }
  .float-meta {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: var(--line-height-snug);
  }
  .float-figure {
    margin-left: var(--space-md);
    color: var(--color-accent-text);
    font-size: 1.375rem;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-title);
  }
  .float-figure-ink {
    margin-left: var(--space-none);
    margin-right: var(--space-xs);
    color: var(--color-text-primary);
    font-size: 1.75rem;
  }

  /* The company card on the companies hero: a dark panel, not a chip. */
  .float-panel {
    display: grid;
    gap: var(--space-xs);
    width: 16.875rem;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
  }
  .float-panel-label {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
  }
  .float-panel-value {
    font-size: 2.75rem;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: 1.1;
  }
  .float-panel-meta {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
  }
  .float-panel-bar {
    height: 0.375rem;
    margin-top: var(--space-xl);
    border-radius: var(--radius-pill);
    background: var(--color-border-strong);
  }
  .float-panel-fill {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: var(--color-accent);
  }
  .float-panel-note {
    margin-top: var(--space-sm);
    color: var(--color-accent-text);
    font-size: 0.875rem;
  }

  @media (max-width: 640px) {
    .float {
      display: none;
    }
  }
}

@layer modules {
  /* --- logo strip and logo grid ---------------------------------------- */
  .logos {
    display: grid;
    justify-items: center;
    gap: var(--space-2xl);
    padding-block: var(--space-6xl) var(--space-5xl);
    border-bottom: var(--border-hairline);
  }
  .logos-title {
    color: var(--color-text-secondary);
    font-size: var(--text-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }
  .logos-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-md);
    width: 100%;
  }
  .logo-tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: var(--space-lg);
    border: var(--border-hairline);
    border-radius: var(--radius-lg);
    background: var(--color-surface-card);
  }
  .logo-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  /* A brand tile that is its logo on its own colour: the image is the whole tile. */
  .logo-tile.logo-tile-fill {
    padding: 0;
    overflow: hidden;
  }
  .logo-tile-fill img {
    object-fit: cover;
  }
  /* Tiles keep the size of the strip's, however few brands there are: the
     grid centres rather than stretching a short list across the page. */
  .logo-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 8.8125rem));
    justify-content: center;
    gap: var(--space-lg);
  }
  .logo-grid .logo-tile {
    aspect-ratio: 1 / 1;
  }

  @media (max-width: 900px) {
    .logos-row {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .logo-grid {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }
  }
  @media (max-width: 640px) {
    .logos-row {
      gap: var(--space-sm);
    }
    .logo-tile {
      padding: var(--space-sm);
      border-radius: var(--radius-md);
    }
  }
  @media (max-width: 640px) {
    .logo-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: var(--space-sm);
    }
    .logo-grid .logo-tile {
      border-radius: var(--radius-md);
    }
  }
}

@layer modules {
  /* --- card ------------------------------------------------------------- */
  .card {
    position: relative;
    display: grid;
    align-content: start;
    gap: var(--space-md);
    padding: var(--space-inset-card);
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
    color: var(--color-text-primary);
  }
  .card-icon {
    margin-bottom: var(--space-xl);
    color: var(--color-accent-text);
  }
  .card-icon-ink {
    color: var(--color-text-primary);
  }
  .card-no {
    color: var(--color-accent-text);
    font-size: var(--text-body);
    font-weight: var(--font-weight-bold);
  }
  .card-no-corner {
    position: absolute;
    top: var(--space-3xl);
    right: var(--space-3xl);
  }
  .card-body {
    color: var(--color-text-secondary);
    font-size: var(--text-body);
    line-height: var(--line-height-normal);
  }
  .card-compact {
    padding: var(--space-2xl) var(--space-3xl);
  }
  /* The icon left of the title, as on the dark feature tiles. */
  .card-row {
    grid-template-columns: auto 1fr;
    column-gap: var(--space-lg);
    row-gap: var(--space-xs);
    align-items: start;
  }
  .card-row .card-icon {
    grid-row: span 2;
    margin-bottom: var(--space-none);
    margin-top: var(--space-2xs);
  }
  .card-row h3 {
    font-size: 1.25rem;
  }

  /* On a phone the numbered steps become a compact list: number, then
     title and text, with no icon. */
  @media (max-width: 640px) {
    .card-step {
      grid-template-columns: 2.25rem 1fr;
      column-gap: var(--space-sm);
      row-gap: var(--space-xs);
      padding: var(--space-xl) var(--space-2xl);
    }
    .card-step-icon {
      display: none;
    }
    .card-step-no {
      position: static;
      grid-row: span 2;
      padding-top: var(--space-2xs);
    }
    .card-step h3 {
      font-size: 1.0625rem;
    }
    .card-step .card-body {
      font-size: 0.875rem;
    }
  }
}

@layer modules {
  /* --- audience: one of the three "who wins" cards ---------------------- */
  .audience {
    display: flex;
    flex-direction: column;
    padding: var(--space-4xl) var(--space-4xl) var(--space-4xl);
    border: var(--border-hairline);
    border-radius: var(--radius-2xl);
    background: var(--color-surface-card);
    color: var(--color-text-primary);
  }
  .audience-icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-lg);
    background: var(--color-surface-chip);
  }
  .audience h3 {
    margin-top: var(--space-md);
    font-size: 1.5rem;
    line-height: 1.25;
    min-height: 5.6rem;
  }
  .audience .checklist {
    margin-top: var(--space-xl);
  }
  .audience-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-3xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
  }
  .audience-link-accent {
    color: var(--color-accent);
  }

  @media (max-width: 900px) {
    .audience h3 {
      min-height: 0;
    }
  }
}

@layer modules {
  /* --- checklist -------------------------------------------------------- */
  .checklist {
    display: grid;
    gap: var(--space-lg);
  }
  .checklist li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
    line-height: var(--line-height-snug);
  }
  .checklist .icon {
    color: var(--color-accent-text);
  }
  .checklist strong {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
  }
  .checklist-tight {
    gap: var(--space-sm);
  }
  .checklist-tight li {
    color: var(--color-text-primary);
    font-size: var(--text-body);
    font-weight: var(--font-weight-semibold);
  }
}

@layer modules {
  /* --- category tile ---------------------------------------------------- */
  .category {
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: space-between;
    min-height: 11.25rem;
    padding: var(--space-3xl) var(--space-3xl) var(--space-2xl);
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
    transition: border-color var(--motion-press);
  }
  .category:hover {
    border-color: var(--color-border-strong);
  }
  .category-glyph {
    grid-column: 1 / -1;
    width: 1.75rem;
    height: 1.75rem;
    stroke-width: 1.75px;
  }
  .category-name {
    align-self: end;
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
    line-height: 1.25;
  }
  .category-arrow {
    align-self: end;
    color: var(--color-text-secondary);
  }

  @media (max-width: 640px) {
    .category {
      min-height: 8.5rem;
      padding: var(--space-xl);
    }
    .category-name {
      font-size: 1rem;
    }
    .category-arrow {
      display: none;
    }
  }
}

@layer modules {
  /* --- savings calculator ----------------------------------------------- */
  .calc {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }
  /* Each cell is a size container so its figure can shrink with it: at a fixed size a
     four-digit amount is wider than a narrow cell, and the input crops it. */
  .calc-cell {
    container-type: inline-size;
    display: grid;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
    padding: var(--space-2xl);
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
  }
  .calc-label {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
  }
  .calc-value {
    display: flex;
    align-items: baseline;
    font-size: min(2.25rem, 24cqi);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: 1.2;
  }
  .calc-input {
    width: 100%;
    min-width: 0;
    padding: var(--space-none);
    border: none;
    background: none;
    font-weight: inherit;
    letter-spacing: inherit;
    -moz-appearance: textfield;
  }
  .calc-input::-webkit-outer-spin-button,
  .calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }
  .calc-op {
    color: var(--color-text-placeholder);
    font-size: 1.75rem;
  }
  .calc-result {
    border-color: var(--color-action-bg);
    background: var(--color-action-bg);
    color: var(--color-action-text);
  }
  .calc-result .calc-label {
    color: var(--color-action-text);
    opacity: 0.75;
  }

  @media (max-width: 640px) {
    .calc {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
    }
    .calc-op:nth-of-type(2) {
      display: none;
    }
    .calc-result {
      grid-column: 1 / -1;
    }
  }
}

@layer modules {
  /* --- FAQ -------------------------------------------------------------- */
  .faq {
    display: grid;
    gap: var(--space-md);
  }
  .faq-item {
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
    transition: border-color var(--motion-open);
  }
  .faq-item[open] {
    border-color: var(--color-border-strong);
    border-width: 1.5px;
  }
  .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-3xl) var(--space-xl) var(--space-3xl);
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-title);
    list-style: none;
    cursor: pointer;
  }
  .faq-question::-webkit-details-marker {
    display: none;
  }
  .faq-answer {
    padding: var(--space-none) var(--space-3xl) var(--space-2xl);
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: var(--line-height-normal);
  }
  .faq-icon-close {
    display: none;
  }
  .faq-item[open] .faq-icon-open {
    display: none;
  }
  .faq-item[open] .faq-icon-close {
    display: block;
  }
  .faq-note {
    margin-top: var(--space-xl);
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
  }

  @media (max-width: 640px) {
    .faq-question {
      padding: var(--space-lg) var(--space-xl);
      font-size: 1rem;
    }
    .faq-answer {
      padding: var(--space-none) var(--space-xl) var(--space-xl);
    }
  }
}

@layer modules {
  /* --- call-to-action band ---------------------------------------------- */
  .cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4xl);
    padding: var(--space-6xl) var(--space-6xl);
    border: var(--border-hairline);
    border-radius: var(--radius-2xl);
    background: var(--color-surface-card);
  }
  .cta h2 {
    font-size: clamp(2rem, 3.4vw, 3rem);
  }
  .cta-copy {
    min-width: 0;
  }
  .cta-copy {
    display: grid;
    gap: var(--space-md);
  }
  .cta-lede {
    max-width: 42rem;
    color: var(--color-text-secondary);
    font-size: var(--text-lede);
  }
  .cta-actions {
    display: flex;
    gap: var(--space-md);
    flex: none;
  }
  .cta-section {
    padding-block: var(--space-8xl) var(--space-8xl);
  }

  @media (max-width: 900px) {
    .cta {
      flex-direction: column;
      align-items: start;
      padding: var(--space-4xl);
    }
  }
  @media (max-width: 640px) {
    .cta {
      padding: var(--space-3xl) var(--space-2xl);
    }
    .cta-actions {
      display: grid;
      width: 100%;
    }
  }
}

@layer modules {
  /* --- footer ----------------------------------------------------------- */
  .footer {
    padding-block: var(--space-6xl) var(--space-4xl);
    border-top: var(--border-hairline);
    background: var(--color-surface-page);
    color: var(--color-text-primary);
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.15fr 1.15fr;
    gap: var(--space-4xl);
  }
  .footer-logo img {
    width: 10.625rem;
    height: auto;
  }
  .footer-about {
    max-width: 17.5rem;
    margin-top: var(--space-xl);
    color: var(--color-text-secondary);
    font-size: var(--text-body);
  }
  .footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
  }
  .footer-social-link {
    display: grid;
    place-items: center;
    width: 2.625rem;
    height: 2.625rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
  }
  .footer-head {
    color: var(--color-text-secondary);
    font-size: var(--text-label);
  }
  .footer-list {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    font-size: 1rem;
    line-height: var(--line-height-snug);
  }
  .footer-list a:hover {
    color: var(--color-accent);
  }
  /* On a phone each link gets room to be tapped: the padding replaces the list's gap. */
  @media (max-width: 640px) {
    .footer-list {
      gap: var(--space-none);
    }
    .footer-list a {
      display: inline-block;
      padding-block: var(--space-sm);
    }
  }
  .footer-base {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-6xl);
    padding-top: var(--space-3xl);
    border-top: var(--border-hairline);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
  }

  @media (max-width: 900px) {
    .footer-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-brand {
      grid-column: 1 / -1;
    }
  }
  @media (max-width: 640px) {
    .footer-contact {
      grid-column: 1 / -1;
    }
    .footer-base {
      flex-direction: column;
    }
  }
}

@layer modules {
  /* --- steps: numbered process along a top rule ------------------------- */
  .steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-xl);
  }
  .step {
    display: grid;
    align-content: start;
    gap: var(--space-sm);
    padding-top: var(--space-3xl);
    border-top: var(--border-width-thick) solid var(--color-border-strong);
  }
  .step:first-child {
    border-top-color: var(--color-accent);
  }
  .step-no {
    color: var(--color-accent-text);
    font-weight: var(--font-weight-bold);
  }
  .step h3 {
    margin-top: var(--space-xs);
    font-size: 1.25rem;
  }
  .step p:last-child {
    color: var(--color-text-secondary);
    font-size: var(--text-body);
  }

  @media (max-width: 900px) {
    .steps {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      row-gap: var(--space-4xl);
    }
  }
  @media (max-width: 640px) {
    .steps {
      grid-template-columns: 1fr;
    }
  }
}

@layer modules {
  /* --- numbered list beside the brand application form ------------------ */
  .numbered {
    display: grid;
  }
  .numbered li {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    padding-block: var(--space-xl);
    border-top: var(--border-hairline);
  }
  .numbered-no {
    grid-row: span 2;
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
  }
  .numbered-title {
    font-size: 1.0625rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
  }
  .numbered-meta {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
  }
}

@layer modules {
  /* --- contact lines ---------------------------------------------------- */
  .contact-lines {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-4xl);
  }
  .contact-line {
    display: flex;
    overflow-wrap: anywhere;
    align-items: center;
    gap: var(--space-md);
    font-size: 1.0625rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
  }
  .contact-line .icon {
    color: var(--color-accent-text);
  }

  /* The about page's version: each line a black pill with a caption. */
  .contact-tile {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-lg);
    background: var(--color-surface-inverse);
    color: var(--color-text-on-inverse);
  }
  .contact-tile .icon {
    color: var(--color-accent);
  }
  .contact-tile-label {
    display: block;
    font-size: var(--text-fine);
    opacity: 0.7;
  }
  .contact-tile-value {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.0625rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
    line-height: var(--line-height-snug);
  }
}

@layer modules {
  /* --- forms ------------------------------------------------------------ */
  .form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: var(--space-xl);
    padding: var(--space-4xl);
    border: var(--border-hairline);
    border-radius: var(--radius-2xl);
    background: var(--color-surface-card);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-float);
  }
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl) var(--space-lg);
  }
  /* Two fields side by side only while each still has room for its placeholder; in a narrow
     column, as on a small laptop, they stack. Measured on the form, not the screen, because
     the same form sits in columns of different widths. */
  .form {
    container-type: inline-size;
  }
  @container (max-width: 28rem) {
    .form-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .form-group {
    display: grid;
    gap: var(--space-lg);
  }
  .form-group + .form-group {
    padding-top: var(--space-3xl);
    border-top: var(--border-hairline);
  }
  .form-field {
    display: grid;
    gap: var(--space-sm);
  }
  .form-field-wide {
    grid-column: 1 / -1;
  }
  .form-label {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
  }
  .form-input {
    width: 100%;
    height: 3.25rem;
    padding: var(--space-none) var(--space-lg);
    border: var(--border-hairline);
    border-radius: var(--radius-md);
    background: var(--color-surface-field);
    font-size: 1rem;
    transition: border-color var(--motion-press);
  }
  .form-input::placeholder {
    color: var(--color-text-placeholder);
  }
  .form-input:focus {
    border-color: var(--color-border-strong);
    outline: none;
  }
  .form-input:focus-visible {
    outline: var(--border-width-thick) solid var(--color-focus-ring);
  }
  textarea.form-input {
    height: 7.5rem;
    padding-block: var(--space-md);
    resize: vertical;
  }
  select.form-input {
    appearance: none;
    background-image:
      linear-gradient(45deg, transparent 50%, currentColor 50%),
      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
      calc(100% - 1.375rem) 50%,
      calc(100% - 1.0625rem) 50%;
    background-size:
      0.3125rem 0.3125rem,
      0.3125rem 0.3125rem;
    background-repeat: no-repeat;
    color: var(--color-text-primary);
  }
  select.form-input:invalid,
  select.form-input:has(option[value='']:checked) {
    color: var(--color-text-placeholder);
  }
  .form-section-title {
    color: var(--color-accent-text);
    font-size: var(--text-label);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }
  .form-consent {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
  }
  .form-consent input {
    width: 1.375rem;
    height: 1.375rem;
    flex: none;
    margin: var(--space-none);
    accent-color: var(--color-surface-inverse);
  }
  .form-legal {
    color: var(--color-text-placeholder);
    font-size: var(--text-fine);
    text-align: center;
  }
  .form-legal a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  /* Hidden from people; see the comment beside the field in the HTML. */
  .form-honeypot {
    position: absolute;
    left: -100vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .form-status {
    display: none;
    font-size: 0.9375rem;
    text-align: center;
  }
  .form-status-line {
    display: none;
  }
  .form-status a {
    text-decoration: underline;
  }

  @media (max-width: 640px) {
    .form {
      padding: var(--space-2xl);
      border-radius: var(--radius-xl);
    }
    .form-grid {
      grid-template-columns: 1fr;
    }
  }
}

@layer modules {
  /* --- segmented choice (radio buttons drawn as tabs) ------------------- */
  .segmented {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: var(--space-xs);
    margin: var(--space-none);
    padding: var(--space-xs);
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-surface-band);
  }
  .segmented-option {
    position: relative;
  }
  .segmented-option input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: var(--space-none);
    cursor: pointer;
  }
  .segmented-label {
    display: grid;
    place-items: center;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    transition:
      background-color var(--motion-press),
      color var(--motion-press);
  }
  .segmented-option input:checked + .segmented-label {
    background: var(--color-surface-inverse);
    color: var(--color-text-on-inverse);
  }
  .segmented-option input:focus-visible + .segmented-label {
    outline: var(--border-width-thick) solid var(--color-focus-ring);
  }

  @media (max-width: 640px) {
    .segmented-label {
      font-size: 0.8125rem;
    }
  }
}

@layer modules {
  /* --- rate: the example rate card on the brands page ------------------- */
  .rate {
    display: flex;
    align-items: center;
    gap: var(--space-3xl);
    margin-top: var(--space-4xl);
    padding: var(--space-2xl) var(--space-3xl);
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
  }
  .rate-figure {
    padding-right: var(--space-3xl);
    border-right: var(--border-hairline);
  }
  .rate-value {
    color: var(--color-accent-text);
    font-size: 3.5rem;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: var(--line-height-flat);
  }
  .rate-label {
    margin-top: var(--space-xs);
    color: var(--color-text-secondary);
    font-size: var(--text-fine);
  }

  @media (max-width: 640px) {
    .rate {
      gap: var(--space-xl);
      padding: var(--space-xl);
    }
    .rate-figure {
      padding-right: var(--space-xl);
    }
    .rate-value {
      font-size: 2.75rem;
    }
    .rate .checklist-tight li {
      font-size: 0.8125rem;
    }
  }
}

@layer modules {
  /* --- figure: a big number with its caption ---------------------------- */
  .figure {
    padding: var(--space-3xl) var(--space-2xl);
    border: var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--color-surface-card);
  }
  .figure-value {
    font-size: 2.875rem;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: var(--line-height-flat);
  }
  .figure-value-accent {
    color: var(--color-accent-text);
  }
  .figure-label {
    margin-top: var(--space-md);
    color: var(--color-text-secondary);
  }
  .figure-compact {
    container-type: inline-size;
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }
  /* Shrinks with its box, so a four-digit amount in a narrow column stays inside it, but
     never below a readable size. */
  .figure-compact .figure-value {
    font-size: clamp(1.125rem, 28cqi, 2rem);
    color: var(--color-accent);
  }
  .figure-compact .figure-label {
    margin-top: var(--space-sm);
  }

  @media (max-width: 640px) {
    .figure-value {
      font-size: 2.25rem;
    }
  }
}

@layer modules {
  /* --- brand panel: a partner's discount, the way the app shows it ------
     The ground is the brand's own colour, which is content rather than
     theme, so the page passes it in as --brand-colour on the element.
     Pair it with .theme-dark: the panel sets light text on it. */
  .brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 32.5rem;
    padding: var(--space-3xl);
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--brand-colour);
    color: var(--color-text-primary);
  }
  .brand-panel-logo {
    width: 13.75rem;
    margin: var(--space-6xl) auto var(--space-none);
    border-radius: var(--radius-xl);
  }
  .brand-panel-foot {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
  }
  .brand-panel-mark {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-inverse);
    object-fit: contain;
  }
  .brand-panel-name {
    font-size: 1.625rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-title);
    line-height: 1.2;
  }
  .brand-panel-meta {
    opacity: 0.85;
  }
  .brand-panel-rate {
    margin-left: auto;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    background: var(--color-action-bg);
    color: var(--color-action-text);
    font-size: 1.875rem;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-display);
  }
}

@layer modules {
  /* --- step card: a numbered step over a peek of its screen ------------- */
  .step-card {
    display: grid;
    align-content: start;
    gap: var(--space-sm);
    padding: var(--space-3xl) var(--space-3xl) var(--space-4xl);
    border-radius: var(--radius-2xl);
    background: var(--color-surface-card);
  }
  .step-card .phone {
    margin-bottom: var(--space-xl);
  }
  .step-card h3 {
    font-size: 1.375rem;
  }
  .step-card p:last-child {
    color: var(--color-text-secondary);
  }
}

@layer modules {
  /* --- device group: two or three phones arranged together -------------- */
  .devices {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
  }
  .devices-lower {
    align-items: flex-end;
  }
  /* "Markalar temsilidir.": under every group of phones whose screens show brands, because
     the brands in the screenshots are made up. Placed out of the flow so the phones keep
     their positions. */
  .phone-note {
    position: absolute;
    inset-inline: 0;
    bottom: calc(-1 * var(--space-3xl));
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    text-align: center;
  }
  .hero-visual > .phone-note {
    z-index: 3;
    bottom: calc(-1 * var(--space-2xl));
  }
  /* Under one phone, when the note is about that screen alone. */
  .phone > .phone-note {
    top: calc(100% + var(--space-md));
    bottom: auto;
  }
  .step-card > .phone-note {
    position: static;
    margin-top: calc(-1 * var(--space-md));
    text-align: start;
  }
  /* Phones in a group give up width before the group overflows its column;
     the screen keeps its aspect ratio, so each just gets smaller. */
  .devices .phone {
    flex: 0 1 auto;
    min-width: 0;
  }
  .devices .phone-raised {
    z-index: 2;
    transform: translateY(-2rem);
  }
  /* Three phones overlapping, the outer two tucked behind the middle one. */
  .devices-trio {
    gap: var(--space-none);
  }
  .devices-trio .phone-sm {
    margin-inline: calc(-1 * var(--space-6xl));
    transform: translateY(var(--space-3xl));
  }
  .devices-trio .phone-raised {
    transform: none;
  }

  @media (max-width: 640px) {
    .devices .phone + .phone {
      display: none;
    }
    .devices .phone-raised {
      transform: none;
    }
  }
}

@layer states {
  /* =========================================================================
     4. STATES
     ========================================================================= */

  .is-hidden {
    display: none;
  }

  /* The mobile menu, opened by the header's toggle. */
  .is-open .header-menu {
    display: block;
  }

  /* Form outcomes, set by site.js on the <form>. */
  .is-sending .form-status,
  .is-sent .form-status,
  .is-failed .form-status {
    display: block;
  }
  .is-sending .form-status-sending,
  .is-sent .form-status-sent,
  .is-failed .form-status-failed {
    display: block;
  }
  .is-sent .form-status-sent {
    color: var(--color-accent-text);
    font-weight: var(--font-weight-semibold);
  }
  .is-failed .form-status-failed {
    color: var(--color-danger);
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    * {
      transition-duration: 0.01ms !important;
    }
  }
}

@layer themes {
  /* =========================================================================
     5. THEMES
     Each re-points the semantic tokens for everything inside the element
     it is put on, and does nothing else.
     ========================================================================= */

  /* A black section: the dark heroes, the app section, the CTA band, the
     footer. Cards inside it are the raised forest green. */
  .theme-dark {
    --color-surface-page: var(--palette-ink-950);
    --color-surface-band: var(--palette-ink-950);
    --color-surface-card: var(--palette-forest-900);
    --color-surface-field: var(--palette-forest-900);
    --color-surface-chip: var(--palette-forest-850);
    --color-surface-inverse: var(--palette-ink-000);

    --color-text-primary: var(--palette-ink-000);
    --color-text-secondary: var(--palette-ink-300);
    --color-text-placeholder: var(--palette-ink-400);
    --color-text-on-inverse: var(--palette-ink-900);

    --color-border: var(--palette-ink-000-a06);
    --color-border-strong: var(--palette-ink-000-a22);

    --color-accent-text: var(--palette-ange-500);
    --color-focus-ring: var(--palette-ange-400);
    --color-danger: var(--palette-rose-500);
  }

  /* A single black card on a light ground. Blacker than a card inside a
     dark section, which is what keeps it from reading as a hole. */
  .theme-ink {
    --color-surface-card: var(--palette-ink-900);
    --color-surface-chip: var(--palette-forest-850);
    --color-text-primary: var(--palette-ink-000);
    --color-text-secondary: var(--palette-ink-300);
    --color-border: var(--palette-ink-900);
    --color-border-strong: var(--palette-ink-000-a22);
    --color-accent-text: var(--palette-ange-500);
  }

  /* Back to the light treatment, for a white form inside a dark section. */
  .theme-light {
    --color-surface-page: var(--palette-ink-050);
    --color-surface-band: var(--palette-ink-100);
    --color-surface-card: var(--palette-ink-000);
    --color-surface-field: var(--palette-ink-050);
    --color-surface-chip: var(--palette-ink-100);
    --color-surface-inverse: var(--palette-ink-900);
    --color-text-primary: var(--palette-ink-900);
    --color-text-secondary: var(--palette-ink-500);
    --color-text-placeholder: var(--palette-ink-400);
    --color-text-on-inverse: var(--palette-ink-000);
    --color-border: var(--palette-ink-200);
    --color-border-strong: var(--palette-ink-900);
    --color-accent-text: var(--palette-ange-700);
    --color-focus-ring: var(--palette-ange-700);
    --color-danger: var(--palette-rose-600);
  }
}
