:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAF8F4;
    --bg-tertiary: #F5F2EC;
    --text-primary: #1A1A1A;
    --text-secondary: #6B6862;
    --text-muted: #9A958C;
    --border: #EAE6DD;
    --accent-cream: #FAEEDA;
    --accent-cream-border: #BA7517;
    --accent-amber-text: #412402;
    --accent-amber-deep: #633806;
    --green-bg: #EAF3DE;
    --green-text: #173404;
    --rose-bg: #FAECE7;
    --rose-text: #4A1B0C;
    --teal-bg: #E1F5EE;
    --teal-text: #04342C;
    --blue-bg: #E6F1FB;
    --blue-text: #042C53;
    --plum-bg: #FBEAF0;
    --plum-text: #4B1528;
    --escalation-1: #FAC775;
    --escalation-2: #EF9F27;
    --escalation-3: #BA7517;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .display {
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
  }

  .mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }

  .container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
  }

  /* ── Header ────────────────────────────────────────────────── */
  header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
  }
  header .container {
    max-width: 1130px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.025em;
  }
  .logo svg { display: block; }
  nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
  }
  nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
  }
  nav a:hover { color: var(--text-primary); }
  /* Buttons inside nav need their button colors back — `nav a` has higher
     specificity than `.btn-primary` and was overriding the white text. */
  nav a.btn-primary { color: var(--bg-primary); }
  nav a.btn-primary:hover { color: var(--bg-primary); }
  nav a.btn-ghost { color: var(--text-primary); }
  .btn {
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }
  .btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
  }
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  }
  .btn-ghost {
    background: transparent;
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover {
    background: var(--bg-secondary);
  }

  /* ── Home first fold (Figma desktop + mobile) ──────────────── */
  :root {
    --home-bg: #FAFAFA;
    --home-title: #252734;
    --home-body: #3C3F53;
    --home-accent: #714FEE;
    --home-chip-bg: #F3F3F6;
    --h2-text: #111111;
    --h2-muted: #6F6F6F;
    --h2-green: #7C3AED;
    --h2-green-deep: #6D28D9;
    --h2-green-border: #C4B5FD;
    --h2-green-bg: #F5F3FF;
  }

  .home-fold {
    background: var(--home-bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
  }
  .home-fold-inner {
    max-width: 1130px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 64px 0 56px;
  }
  .home-fold-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .home-fold-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: left;
    width: 100%;
  }
  .home-eyebrow {
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--home-accent);
    font-size: 14px;
    font-weight: 510;
    letter-spacing: 0;
    line-height: normal;
    text-transform: none;
  }
  .home-title {
    color: var(--home-title);
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 62px;
    font-weight: 860;
    letter-spacing: 0;
    line-height: 1.1;
  }
  .home-accent { color: var(--home-accent); }
  .home-subtitle {
    color: var(--home-body);
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
  }
  .home-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 460px;
    max-width: 100%;
  }
  .home-cta {
    align-items: center;
    background: linear-gradient(90deg, #9871FD 0%, #7751FE 100%);
    border-radius: 10px;
    color: #FFFFFF;
    display: inline-flex;
    font-size: 20px;
    font-weight: 500;
    justify-content: center;
    line-height: 28px;
    min-height: 54px;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    width: 100%;
  }
  .home-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -12px rgba(83, 47, 221, 0.7);
  }
  .home-cta:focus-visible {
    outline: 3px solid rgba(113, 79, 238, 0.32);
    outline-offset: 3px;
  }
  .home-cta-note {
    color: var(--home-accent);
    font-size: 14px;
    font-style: italic;
    line-height: 1.1;
    text-align: center;
  }
  .home-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .home-pill {
    align-items: center;
    background: var(--home-chip-bg);
    border-radius: 20px;
    color: var(--home-body);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 500;
    justify-content: center;
    line-height: 16px;
    padding: 8px 16px;
    text-align: center;
    white-space: nowrap;
  }
  .home-pill-icon {
    display: block;
    height: 16px;
    margin-right: 8px;
    width: 16px;
  }
  .home-visual {
    flex: 0 0 531px;
    max-width: 100%;
  }
  .home-visual img {
    display: block;
    height: auto;
    width: 548px;
    max-width: 100%;
  }

	  @media (max-width: 760px) {
    .home-fold-inner {
      max-width: 430px;
      padding: 70px 20px 0;
      flex-direction: column;
      gap: 14px;
    }
    .home-fold-content {
      align-items: center;
      gap: 32px;
      width: 100%;
    }
    .home-fold-copy {
      text-align: center;
    }
    .home-title {
      font-size: 40px;
      letter-spacing: 0;
      line-height: normal;
    }
    .home-subtitle {
      font-size: 18px;
      line-height: normal;
    }
    .home-actions {
      width: 100%;
    }
    .home-pill-grid {
      justify-content: center;
    }
    .home-pill {
      font-size: 12px;
      font-weight: 600;
      line-height: 16px;
      padding: 6px 12px;
    }
    .home-pill-icon {
      height: 12px;
      width: 12px;
    }
    .home-visual {
      flex: 0 0 auto;
      width: 100%;
    }
    .home-visual img {
      margin: 0 auto;
      width: 402px;
    }
  }

  @media (max-width: 380px) {
    .home-fold-inner {
      padding-left: 16px;
      padding-right: 16px;
    }
    .home-title {
      font-size: 36px;
    }
    .home-subtitle {
      font-size: 17px;
    }
    .home-pill {
      max-width: 100%;
      white-space: normal;
    }
  }

  @media (min-width: 761px) and (max-width: 1200px) {
    .home-fold-inner {
      padding-left: 28px;
      padding-right: 28px;
    }
    .home-title {
      font-size: 54px;
    }
    .home-subtitle {
      font-size: 22px;
    }
    .home-visual {
      flex-basis: 45%;
    }
  }

  @media (max-width: 980px) and (min-width: 761px) {
    .home-fold-inner {
      align-items: flex-start;
    }
    .home-pill {
      font-size: 13px;
    }
  }

  /* ── (legacy) hero — kept for the old reveal sections below ─ */
  .hero {
    padding: 88px 0 80px;
    text-align: center;
  }
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-cream);
    color: var(--accent-amber-text);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 28px;
  }
  .hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    margin-bottom: 24px;
  }
  .hero h1 .accent { color: var(--accent-amber-text); }

  /* ── Cycling middle row — matrix terminal block ────────── */
  /* Two-slot crossfade: each row has 2 stacked elements, opacity-toggled.
     Avoids innerHTML race conditions (the element being faded never has its
     content changed mid-transition — its content is set BEFORE it's revealed). */
  .cycler-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Equal vertical spacing on every side: 14px above the italic,
       14px between italic and box, 14px below the box. */
    margin: 14px 0;
    gap: 14px;
    line-height: 1;
  }

  /* Setup-line stage: italic quote, sits as a caption right above the box.
     Crucially: font-size is set HERE so 1.4em scales to the italic's size,
     not the h1's giant size which is what we'd inherit otherwise. */
  .cycler-setup-stage {
    position: relative;
    width: 100%;
    max-width: 600px;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.35;
    height: 1.4em;                   /* ≈ 22-24px tall, just the italic */
  }
  .cycler-setup {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-style: italic;
    /* Inherit font-size + line-height from .cycler-setup-stage so the
       em-based height calculation lines up with the actual rendered text. */
    font-size: inherit;
    color: var(--text-secondary);
    line-height: inherit;
    letter-spacing: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    padding: 0 8px;
  }
  .cycler-setup.is-visible { opacity: 1; pointer-events: auto; }

  /* Matrix-box stage: dark green-on-black terminal block, fixed size */
  .cycler-stage {
    position: relative;
    width: 640px;
    max-width: 94%;
    height: 60px;
  }
  .cycler {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: transparent;
    color: #15803D;                  /* deep phosphor green — readable on white */
    border: 1.5px solid #15803D;
    padding: 0 18px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-weight: 500;
    font-size: clamp(12px, 1.25vw, 14px);
    line-height: 1;
    letter-spacing: 0.01em;
    flex-wrap: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }
  .cycler.is-visible { opacity: 1; pointer-events: auto; }

  .cycler .ap-icon {
    width: 30px; height: 30px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #6B7280;       /* darker gray edge so tile reads firmly on white */
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
  }
  .cycler .ap-icon img {
    width: 100%; height: 100%; object-fit: contain; display: block;
  }
  .cycler .ap-arrow {
    color: currentColor;
    opacity: 0.55;
    font-weight: 600;
    font-size: 14px;
  }
  .cycler .ap-chip {
    white-space: nowrap;
    color: inherit;                  /* takes the theme color from .cycler */
  }
  .cycler .ap-chip.outcome {
    background: rgba(21, 128, 61, 0.10);
    color: #166534;                  /* darker green for outcome on white */
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid rgba(21, 128, 61, 0.40);
  }

  /* ── Amber theme — alternates with the default green ───── */
  .cycler.theme-amber {
    color: #B45309;                  /* deep amber — readable on white */
    border-color: #B45309;
  }
  .cycler.theme-amber .ap-chip.outcome {
    background: rgba(180, 83, 9, 0.10);
    color: #92400E;                  /* darker amber for outcome */
    border-color: rgba(180, 83, 9, 0.40);
  }
  @media (prefers-reduced-motion: reduce) {
    .cycler, .cycler-setup { transition: none; }
  }
  @media (max-width: 760px) {
    /* Match desktop's equal-spacing rule (14/14/14) */
    .cycler-wrap { margin: 14px 0; gap: 14px; }
    .cycler-stage { height: 52px; }
    .cycler { padding: 0 10px; gap: 7px; font-size: 10.5px; }
    .cycler .ap-icon { width: 22px; height: 22px; padding: 3px; border-radius: 6px; }
    .cycler .ap-arrow { font-size: 11px; }
    .cycler .ap-chip.outcome { padding: 4px 8px; }
    /* Use slightly smaller setup-stage on phones */
    .cycler-setup-stage { font-size: 14px; }
  }
  /* Tightest phones (≤380px): drop a hair more so the 4-node Oura cycle
     fits on a single line without horizontal clip. */
  @media (max-width: 380px) {
    .cycler { padding: 0 8px; gap: 6px; font-size: 10px; }
    .cycler .ap-icon { width: 20px; height: 20px; padding: 2px; }
    .cycler .ap-chip.outcome { padding: 3px 7px; }
  }
  .hero p.lede {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.55;
  }
  .hero-ctas {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* ── Section frame ─────────────────────────────────────────── */
  .section {
    padding: 80px 0;
  }
  .section-tinted {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .section-head {
    text-align: center;
    margin-bottom: 40px;
  }
  .eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
  }
  .section-head h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    margin-bottom: 12px;
  }
  .section-head p {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    font-size: 16px;
  }

  /* ── Home template library ───────────────────────────────── */
  .template-library {
    background: #F3F3F6;
    padding: 72px 20px;
  }
  .template-library-container {
    max-width: 1130px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .template-library-head {
    text-align: center;
    color: #252734;
  }
  .template-library-head .display {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    margin-bottom: 8px;
  }
  .template-library-head p {
    color: #3C3F53;
    font-size: 16px;
    line-height: 24px;
    max-width: 620px;
  }
  .template-library-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 23px;
    width: 100%;
  }
  .template-card {
    width: 264px;
    min-height: 150px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #FBFBFC;
    border: 1px solid #EBEBEF;
    border-radius: 16px;
    box-shadow: 0 4px 8px -4px rgba(18, 20, 20, 0.1);
  }
  .template-card-link {
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }
  .template-card-link:hover {
    box-shadow: 0 12px 24px -18px rgba(18, 20, 20, 0.32);
    transform: translateY(-2px);
  }
  .template-card-icon-wrap {
    display: flex;
    align-items: center;
    padding: 12px 16px 6px;
  }
  .template-card-icon {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
  }
  .template-card-copy {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 92px;
    padding: 0 16px;
  }
  .template-card-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #252734;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
  }
  .template-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #3C3F53;
    font-size: 12px;
    line-height: 16px;
  }
  .template-card-apps {
    overflow: hidden;
    color: #B7B9C2;
    font-size: 12px;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .template-card-apps-empty {
    color: transparent;
  }
  .template-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px 16px;
  }
  .template-card-footer span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    border-radius: 20px;
    background: #EBEBEF;
    color: #818495;
    font-size: 11px;
    line-height: 14px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  .template-library-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 11px 28px;
    border: 1px solid #D2D3D9;
    border-radius: 10px;
    color: #3C3F53;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 0;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
  }
  .template-library-view-all:hover {
    background: #FBFBFC;
    border-color: #B7B9C2;
    color: #252734;
  }

  /* ── Demo gallery (see-it-in-action insert) ──────────────── */
  .demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .demo-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .demo-card .embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0E0E0E;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
  }
  .demo-card .embed iframe,
  .demo-card .embed video,
  .demo-card .embed img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    display: block;
  }
  .demo-card .embed video {
    object-fit: contain;
    background: #0E0E0E;
  }
  .demo-card a.embed:hover img {
    opacity: 0.92;
  }
  .demo-card .embed .play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(14, 14, 14, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, background 0.18s ease;
    border: 1px solid rgba(255,255,255,0.18);
  }
  .demo-card a.embed:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(14, 14, 14, 0.85);
  }
  .demo-card .embed .youtube-tag {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 3px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  }
  .demo-card .body {
    padding: 16px 18px 18px;
  }
  .demo-card .body .meta {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
  }
  .demo-card .body h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text-primary);
  }
  .demo-card .body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
  }
  .demo-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 36px;
  }
  .demo-filter {
    font-size: 13px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 18px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .demo-filter.active {
    background: var(--accent-cream);
    color: var(--accent-amber-text);
    border-color: var(--accent-cream-border);
    font-weight: 600;
  }

  /* ── Wow gallery ───────────────────────────────────────────── */
  .killer-banner {
    background: var(--accent-cream);
    border: 2px solid var(--accent-cream-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 14px;
  }
  .killer-banner-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-amber-text);
    letter-spacing: 0.06em;
  }
  .killer-banner h3 {
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-amber-text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }
  .killer-banner p {
    color: var(--accent-amber-deep);
    font-size: 15px;
    line-height: 1.5;
  }

  .wow-grid-3, .wow-grid-2 {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
  }
  .wow-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .wow-grid-2 { grid-template-columns: repeat(2, 1fr); }

  .wow-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .wow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  }
  .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
  }
  .badge-rose { background: var(--rose-bg); color: var(--rose-text); }
  .badge-blue { background: var(--blue-bg); color: var(--blue-text); }
  .badge-teal { background: var(--teal-bg); color: var(--teal-text); }
  .badge-green { background: var(--green-bg); color: var(--green-text); }
  .badge-plum { background: var(--plum-bg); color: var(--plum-text); }
  .wow-card .title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
  }
  .wow-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* ── Cascades ──────────────────────────────────────────────── */
  .cascades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .cascade {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
  }
  .cascade-eyebrow {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .cascade-goal {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 18px;
  }
  .cascade-step {
    display: flex;
    gap: 14px;
    padding: 10px 0;
  }
  .cascade-bar {
    width: 3px;
    border-radius: 1.5px;
    flex-shrink: 0;
  }
  .cascade-bar.s1 { background: var(--escalation-1); }
  .cascade-bar.s2 { background: var(--escalation-2); }
  .cascade-bar.s3 { background: var(--escalation-3); }
  .cascade-time {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    letter-spacing: 0.02em;
  }
  .cascade-action {
    font-size: 14px;
    line-height: 1.45;
  }
  .strike {
    text-decoration: line-through;
    color: var(--text-muted);
  }
  .delivered {
    font-weight: 600;
    color: var(--green-text);
  }
  .cascade-punchline {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-amber-text);
  }
  .dial-row {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }
  .dial-label {
    font-size: 14px;
    color: var(--text-secondary);
  }
  .dial {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 22px;
    padding: 4px;
    gap: 2px;
  }
  .dial-opt {
    font-size: 13px;
    padding: 6px 14px;
    color: var(--text-secondary);
    border-radius: 18px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .dial-opt.active {
    background: var(--accent-cream);
    color: var(--accent-amber-text);
    font-weight: 600;
  }
  .dial-opt:hover:not(.active) { color: var(--text-primary); }

  /* ── Categories ────────────────────────────────────────────── */
  .cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .cat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  }
  .cat-card .title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
  }
  .cat-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* ── Closer ────────────────────────────────────────────────── */
  .closer {
    background: #0E0E0E;
    color: #fff;
    text-align: center;
    padding: 88px 28px;
  }
  .closer h2 {
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(26px, 3.6vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  .closer h2 .muted { color: rgba(255, 255, 255, 0.55); }
  .closer .btn {
    display: inline-block;
    background: var(--h2-green);
    color: #fff !important;             /* override any inherited link color */
    font-family: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: 18px 38px;
    border-radius: 16px;
    margin-top: 36px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.005em;
    text-decoration: none !important;   /* kill the default <a> underline */
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.30);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }
  .closer .btn:hover {
    background: var(--h2-green-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.42);
  }

  /* ── Footer ────────────────────────────────────────────────── */
  footer {
    padding: 32px 0;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
  }
  .footer-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  .footer-copy {
    flex: 0 0 auto;
    text-align: left;
  }
  .footer-link-row {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-left: auto;
  }
  .footer-socials,
  .footer-legal {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .footer-socials {
    justify-content: flex-start;
  }
  .footer-legal {
    justify-content: flex-end;
  }
  .footer-socials a,
  .footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
  }
  .footer-socials a:hover,
  .footer-legal a:hover { color: var(--text-primary); }
  .footer-social {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .footer-social svg {
    width: 18px;
    height: 18px;
  }
  footer nav .legacy-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding-right: 4px;
  }

  /* ── Language switcher ────────────────────────────────────── */
  .lang-switcher { position: relative; }
  .lang-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
    font: inherit; font-size: 13px; font-weight: 500;
    padding: 6px 10px; border-radius: var(--radius-md); cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .lang-btn:hover { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--text-muted); }
  .lang-btn[aria-expanded="true"] { background: var(--bg-secondary); color: var(--text-primary); }
  .lang-menu {
    /* `display: block` and zeroed gap explicitly override the parent
       `nav ul { display: flex; gap: 28px; }` rule which would otherwise
       cascade into this nested UL and lay the items out horizontally. */
    display: block;
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 160px; padding: 6px 0; margin: 0; gap: 0;
    background: var(--bg-primary); list-style: none;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    opacity: 0; pointer-events: none; transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
  }
  .lang-switcher .lang-menu {
    display: block;
    gap: 0;
  }
  .lang-switcher .lang-btn[aria-expanded="true"] + .lang-menu,
  .lang-switcher:focus-within .lang-menu {
    opacity: 1; pointer-events: auto; transform: translateY(0);
  }
  .lang-menu li { display: block; }
  .lang-menu a {
    display: block; padding: 8px 14px;
    font-size: 14px; color: var(--text-secondary); text-decoration: none;
    white-space: nowrap;
    transition: background 0.1s ease, color 0.1s ease;
  }
  .lang-menu a:hover { background: var(--bg-secondary); color: var(--text-primary); }
  .lang-menu a.current { color: var(--text-primary); font-weight: 600; }
  @media (max-width: 760px) {
    .lang-menu { right: auto; left: 0; }
  }

  /* ── Reveal animation ─────────────────────────────────────── */
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Responsive ───────────────────────────────────────────── */
  @media (max-width: 760px) {
    .header-inner {
      padding: 16px 0;
      flex-wrap: nowrap;
      gap: 10px;
    }
    .logo {
      flex: 0 0 auto;
    }
    .logo img {
      height: 24px !important;
      width: auto !important;
    }
    header nav {
      flex: 1 1 auto;
      min-width: 0;
    }
    header nav > ul {
      display: flex;
      width: auto;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      row-gap: 6px;
      min-width: 0;
    }
    header nav > ul > li { display: flex; align-items: center; }
    nav a { font-size: 11px; }
    nav a.btn-primary,
    nav a.btn-ghost {
      padding: 7px 10px;
      border-radius: var(--radius-md);
      white-space: nowrap;
    }
    header nav a.header-open-airtap-cta,
    header nav a[data-airtap-cta-location="home_nav_signup"],
    header nav a.btn-ghost {
      padding: 6px 8px;
      font-size: 10px;
      line-height: 1.15;
    }
    header nav a.header-open-airtap-cta {
      padding: 5px 7px;
      font-size: 9px;
      line-height: 1.1;
    }
    .lang-btn {
      padding: 6px 8px;
      font-size: 11px;
    }
    .lang-menu { right: 0; left: auto; }
	    .hero { padding: 60px 0 48px; }
	    .section { padding: 56px 0; }
	    .template-library {
	      padding: 56px 20px;
	    }
	    .template-library-head .display {
	      font-size: 34px;
	      line-height: 1.15;
	    }
	    .template-library-head p {
	      font-size: 15px;
	      line-height: 22px;
	    }
	    .template-library-grid {
	      display: grid;
	      grid-template-columns: minmax(0, 1fr);
	      max-width: 420px;
	      gap: 16px;
	    }
	    .template-card {
	      width: 100%;
	    }
	    .template-library-view-all {
	      min-height: 48px;
	      font-size: 18px;
	      line-height: 24px;
	    }
	    .wow-grid-3, .wow-grid-2, .cascades-grid, .cat-grid, .demo-grid {
	      grid-template-columns: 1fr;
	    }
    .killer-banner { padding: 18px 20px; }
    .killer-banner h3 { font-size: 18px; }
    .container { padding: 0 20px; }
    header .header-inner {
      padding-top: 16px;
      padding-bottom: 16px;
    }
    footer {
      padding: 24px 0;
    }
    .footer-inner {
      flex-direction: row;
      align-items: center;
      gap: 12px;
    }
    .footer-link-row {
      width: auto;
      flex-direction: column;
      align-items: flex-end;
      justify-content: center;
      gap: 8px;
      margin-left: auto;
    }
    .footer-socials {
      justify-content: flex-end;
      gap: 8px;
    }
    .footer-copy {
      text-align: left;
      font-size: 12px;
      line-height: 1.35;
    }
    .footer-legal {
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: nowrap;
    }
    .footer-legal a {
      font-size: 12px;
      line-height: 1.2;
      white-space: nowrap;
    }
  }
	  @media (max-width: 380px) {
	    .container { padding: 0 16px; }
	    .template-library { padding-left: 16px; padding-right: 16px; }
    header .header-inner {
      padding-top: 14px;
      padding-bottom: 14px;
      gap: 8px;
    }
    .logo img { height: 22px !important; }
    header nav > ul { gap: 6px; }
    nav a { font-size: 10px; }
    nav a.btn-primary,
    nav a.btn-ghost { padding: 7px 9px; }
    header nav a.header-open-airtap-cta,
    header nav a[data-airtap-cta-location="home_nav_signup"],
    header nav a.btn-ghost {
      padding: 6px 7px;
      font-size: 9px;
    }
    header nav a.header-open-airtap-cta {
      padding: 5px 6px;
      font-size: 9px;
    }
    .lang-btn {
      padding: 6px 7px;
      font-size: 10px;
    }
    .dial {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .dial-opt {
      flex: 1 1 0;
      min-width: 0;
      padding: 6px 5px;
      text-align: center;
      font-size: 11px;
      line-height: 1.15;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .footer-inner { gap: 10px; }
    .footer-link-row { gap: 8px; }
    .footer-legal { gap: 8px; }
  }
