
  :root {
    /* Joe-B personal theme: dark greys, wine-blood reds, black/white */
    --bg: #0a0a0e;
    --bg-2: #141418;
    --ink: #f7f6f4;
    --ink-soft: rgba(247,246,244,0.72);
    --ink-faint: rgba(247,246,244,0.42);
    --accent: #8B2332;          /* deep burgundy — "wine blood" */
    --accent-hot: #b03e4a;      /* brighter crimson on hover */
    --accent-deep: #5a1722;     /* darkest red for shadows */
    --accent-blood: #1a060c;    /* near-black oxblood — moody button base */
    --accent-abyss: #0f0407;    /* deepest red-tinted black */
    --muted: #4a4a52;
    --border: rgba(255,255,255,0.08);
    /* NexVerto partnership colors — NEVER override with --accent */
    --nv-blue: #104FB6;
    --nv-blue-hover: #2D6FD9;
    --type-display: 'Canela', 'Playfair Display', 'Georgia', serif;
    --type-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
    --type-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html {
    scroll-behavior: auto; overflow-x: clip;
    /* Tells the OS/browser to render native widgets (select dropdowns, date pickers,
       context menus) in a dark palette so our light text stays readable. */
    color-scheme: dark;
    /* Themed scrollbar — Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-deep) var(--bg);
  }
  body { background: var(--bg); color: var(--ink); font-family: var(--type-body); overflow-x: clip; min-height: 100vh; line-height: 1.5; }

  /* Themed scrollbar — WebKit / Chromium */
  ::-webkit-scrollbar { width: 10px; height: 10px; background: var(--bg); }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-deep), var(--accent-abyss));
    border-radius: 6px;
    border: 2px solid var(--bg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  }
  ::-webkit-scrollbar-corner { background: var(--bg); }
  /* Inside the modal, which has its own dark panel */
  .modal ::-webkit-scrollbar { width: 8px; }
  .modal ::-webkit-scrollbar-thumb { border-color: rgba(13,15,24,0.94); }

  /* ── Scroll host (5 beats × 100vh) ── */
  .scroll-host { position: relative; height: calc(100vh * 5); }

    /* ── Scroll snapping (added 2026-08-16) ──
       PROXIMITY, deliberately, not mandatory: the beats crossfade from a
       per-frame rAF loop reading scrollY, and mandatory snapping yanks the
       scroll position hard enough to make those fades stutter. Proximity only
       engages near a boundary, so it glides into each beat and leaves free
       scrolling alone.

       scroll-behavior is deliberately NOT set to smooth here. ui.js animates
       its intro by calling window.scrollTo(0, y) once per frame; with smooth
       behaviour each of those frames becomes its own animated scroll and they
       fight each other. Section-to-section gliding already works because the
       chapter buttons pass {behavior:'smooth'} per call. */
    html { scroll-snap-type: y proximity; }
    .snap-beat { scroll-snap-align: start; scroll-snap-stop: normal; }


  /* ── Cinematic stage ── */
  .stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; background: var(--bg); overflow: hidden; }
  .cine-stack { position: relative; width: 100vw; height: 100vh; overflow: hidden; filter: saturate(1.06) contrast(1.08) brightness(0.82); }
  .cine-layer {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    background: var(--bg);
  }

  /* Vignette + grain */
  .vignette { position: fixed; inset: 0; z-index: 3; pointer-events: none;
    background:
      radial-gradient(ellipse at center, transparent 32%, rgba(0,0,0,0.72) 85%, rgba(0,0,0,0.94) 100%),
      linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.45) 100%);
  }

  .grain { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 200px 200px; }
  .scanline { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.03;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.5) 2px, rgba(0,0,0,0.5) 3px); }

  /* ── Top UI ── */
  .top-bar {
    position: fixed; top: 22px; left: 28px; z-index: 50;
    font-family: var(--type-mono); font-size: 0.64rem; letter-spacing: 0.36em;
    text-transform: uppercase; color: var(--ink-soft); font-weight: 500;
    max-width: 58vw;
  }

  .top-bar strong { color: var(--accent); font-weight: 600; letter-spacing: 0.32em; }
  .top-bar .tb-role {
    display: inline-block;
    opacity: 0; transform: translateY(-5px) translateX(-4px);
    transition: opacity 0.7s cubic-bezier(0.22,0.61,0.36,1),
                transform 0.7s cubic-bezier(0.22,0.61,0.36,1);
    margin-left: 8px;
    white-space: nowrap;
  }
  .top-bar .tb-role.on { opacity: 1; transform: translateY(0) translateX(0); }
  .top-bar .tb-role .dot { color: var(--ink-faint); margin-right: 9px; font-weight: 400; letter-spacing: 0; }
  .top-bar .tb-flourish {
    display: block;
    margin-top: 8px;
    font-family: var(--type-display); font-style: italic; font-weight: 400;
    font-size: 0.8rem; letter-spacing: 0; text-transform: none;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 1s cubic-bezier(0.22,0.61,0.36,1) 0.2s,
                transform 1s cubic-bezier(0.22,0.61,0.36,1) 0.2s;
  }
  .top-bar .tb-flourish.on { opacity: 1; transform: translateX(0); }
  .top-bar .tb-flourish::before {
    content: ''; display: inline-block; vertical-align: middle;
    width: 28px; height: 1px; background: var(--accent); opacity: 0.6;
    margin-right: 10px;
  }

  .chapter-marker {
    position: fixed; top: 22px; right: 28px; z-index: 50;
    font-family: var(--type-mono); font-size: 0.62rem; letter-spacing: 0.32em;
    color: var(--ink-faint);
  }
  .chapter-marker .current { color: var(--accent); font-weight: 600; }

    /* Blog mark, right of the chapter counter (Joe, 2026-08-16). Inherits the
       counter's faint ink and lifts to accent on hover, same as .current. */
    .chapter-marker .chapter-blog { display: inline-flex; align-items: center; vertical-align: middle;
        margin-left: 12px; color: inherit; opacity: .72; transition: opacity .2s ease, color .2s ease; }
    .chapter-marker .chapter-blog:hover,
    .chapter-marker .chapter-blog:focus-visible { opacity: 1; color: var(--accent); }


  /* Chapter jump pill */
  .beat-jump {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 50;
    display: flex; gap: 8px; padding: 10px 18px;
    background: rgba(10,12,22,0.65); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: 999px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  }
  .beat-jump button {
    width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,0.22); cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }
  .beat-jump button:hover { background: rgba(255,255,255,0.55); transform: scale(1.25); }
  .beat-jump button.active { background: var(--accent); transform: scale(1.5); box-shadow: 0 0 12px var(--accent); }

  /* Progress track */
  .progress-track { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 51; background: rgba(255,255,255,0.04); }
  .progress-bar { height: 2px; width: 0%; background: linear-gradient(90deg, var(--accent-abyss), var(--accent-deep), var(--accent)); transition: width 0.08s linear; box-shadow: 0 0 8px rgba(139,35,50,0.55); }

  /* ── Waypoint text (one per beat) ──
     Opacity is driven per-frame by the rAF scroll loop (same signal as the
     cinematic image layers), so image + text crossfade in lock-step. No CSS
     opacity transition here — it would fight the per-frame updates.

     Glass panel so text reads over any beat regardless of what's behind
     (terminal code, monitors, window glare). */
  .waypoint {
    position: fixed; z-index: 5;
    padding: 28px 32px; max-width: min(620px, 88vw);
    opacity: 0; pointer-events: none;
    will-change: opacity;
    background: rgba(10, 12, 20, 0.36);
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow:
      0 24px 70px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  .waypoint.pe-on { pointer-events: auto; }

  .waypoint .kicker {
    font-family: var(--type-mono); font-size: 0.6rem; letter-spacing: 0.45em;
    text-transform: uppercase; color: var(--accent); font-weight: 500;
    margin-bottom: 16px;
  }
  .waypoint h2 {
    font-family: var(--type-display); font-weight: 400; letter-spacing: -0.025em;
    font-size: clamp(2.25rem, 5.5vw, 4.25rem); line-height: 1.04; color: var(--ink);
    margin-bottom: 20px;
  }
  .waypoint p {
    font-size: clamp(0.95rem, 1.4vw, 1.125rem); line-height: 1.55;
    color: var(--ink-soft);
    max-width: 46ch;
  }
  .waypoint .meta {
    margin-top: 22px;
    display: flex; gap: 22px; flex-wrap: wrap;
    font-family: var(--type-mono); font-size: 0.64rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
  }
  .waypoint .meta strong { color: var(--accent); font-weight: 600; letter-spacing: 0.12em; }

  /* Beat-specific positions — eye travels corners: BL → TR → TL → BR → center */
  .wp-1 { left: 7vw; bottom: 14vh; }                                                /* intro — desk, lower-left */
  .wp-2 { right: 7vw; top: 14vh; text-align: right; }                               /* services — upper-right over monitor */
  .wp-2 p { margin-left: auto; }
  .wp-2 .meta { justify-content: flex-end; }
  .wp-3 { left: 7vw; top: 14vh; }                                                   /* security — upper-left */
  .wp-4 { right: 7vw; bottom: 14vh; text-align: right; }                            /* builds — lower-right on desk */
  .wp-4 p { margin-left: auto; }
  .wp-4 .meta { justify-content: flex-end; }
  .wp-5 { left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 560px; }
  .wp-5 p { margin: 0 auto; }
  .wp-5 .meta { justify-content: center; }

  /* ── CTA — icon that expands to pill on hover ── */
  .cta {
    position: fixed; bottom: 60px; right: 26px; z-index: 60;
    display: flex; align-items: center; justify-content: flex-end;
    width: 46px; height: 46px;
    padding: 0;
    background: rgba(10,12,22,0.6);
    color: rgba(247,246,244,0.86);
    border: 1px solid var(--border);
    border-radius: 23px;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    cursor: pointer; text-decoration: none; overflow: hidden;
    opacity: 0; pointer-events: none;
    transition: width 0.38s cubic-bezier(0.4,0,0.2,1),
                background 0.35s, border-color 0.35s,
                box-shadow 0.35s, opacity 0.5s, transform 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  }
  .cta.visible { opacity: 1; pointer-events: auto; }
  .cta .cta-label {
    flex: 1;
    font-family: var(--type-body); font-size: 0.66rem; letter-spacing: 0.24em;
    text-transform: uppercase; font-weight: 700;
    white-space: nowrap;
    color: rgba(247,246,244,0.94);
    padding: 0 4px 0 18px;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.22s, transform 0.32s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
  }
  .cta .cta-icon {
    width: 46px; height: 46px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  }
  .cta .cta-icon svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    color: rgba(247,246,244,0.82);
    transition: color 0.25s;
  }
  .cta:hover {
    width: 232px;
    background: var(--accent-blood);
    border-color: rgba(139,35,50,0.5);
    box-shadow: 0 10px 28px rgba(0,0,0,0.65), 0 0 40px rgba(139,35,50,0.25);
  }
  .cta:hover .cta-label { opacity: 1; transform: translateX(0); transition-delay: 0.08s; }
  .cta:hover .cta-icon svg { color: #fff; }
  .cta:focus-visible {
    width: 232px; outline: none;
    background: var(--accent-blood);
    border-color: rgba(139,35,50,0.55);
  }
  .cta:focus-visible .cta-label { opacity: 1; transform: translateX(0); }

  /* ── Scroll hint ── */
  .scroll-hint {
    position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 6;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-family: var(--type-mono); font-size: 0.58rem; letter-spacing: 0.4em;
    text-transform: uppercase; font-weight: 500; color: var(--ink-faint);
    opacity: 0; transition: opacity 0.8s;
    pointer-events: none;
  }
  .scroll-hint.visible { opacity: 1; }
  .scroll-hint::after {
    content: ''; width: 1px; height: 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
    animation: hintPulse 2.2s ease-in-out infinite;
  }
  @keyframes hintPulse { 0%,100% { transform: scaleY(0.7); opacity: 0.5; } 50% { transform: scaleY(1); opacity: 1; } }

  /* ── Auto-intro skip hint ── */
  .intro-skip {
    position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 7;
    font-family: var(--type-mono); font-size: 0.54rem; letter-spacing: 0.38em;
    text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
    padding: 7px 14px; border: 1px solid var(--border);
    background: rgba(10,12,22,0.55); backdrop-filter: blur(10px);
    border-radius: 999px;
    opacity: 0; transition: opacity 0.6s; pointer-events: none;
    white-space: nowrap;
  }
  .intro-skip.visible { opacity: 1; }
  .intro-skip .dot {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); margin-right: 8px; vertical-align: middle;
    animation: liveDot 1.4s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent);
  }
  @keyframes liveDot { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

  /* ── Site footer — 3 columns: © left · privacy center · NexVerto right ── */
  .site-footer {
    position: fixed; left: 24px; right: 24px; bottom: 16px; z-index: 6;
    display: flex; justify-content: space-between; align-items: center;
    pointer-events: none; white-space: nowrap;
  }
  .site-footer > * { pointer-events: auto; }
  .site-footer .f-left {
    font-family: var(--type-mono); font-size: 0.56rem; letter-spacing: 0.32em;
    text-transform: uppercase; color: rgba(247,246,244,0.36); font-weight: 500;
  }
  .site-footer .f-left a { color: inherit; text-decoration: none; transition: color 0.2s; }
  .site-footer .f-left a:hover { color: rgba(247,246,244,0.7); }
  .site-footer .f-center a {
    font-family: var(--type-body); font-size: 0.78rem; font-weight: 500;
    color: rgba(247,246,244,0.42); text-decoration: none;
    transition: color 0.2s;
  }
  .site-footer .f-center a:hover { color: var(--ink-soft); }
  .site-footer .f-right {
    display: inline-flex; align-items: baseline; gap: 9px;
  }
  .site-footer .f-right .f-tag {
    font-family: var(--type-mono); font-size: 0.52rem; letter-spacing: 0.38em;
    text-transform: uppercase; color: rgba(247,246,244,0.32); font-weight: 500;
  }
  .site-footer .nv-brand {
    font-family: var(--type-body); font-size: 0.95rem; letter-spacing: -0.005em;
    font-weight: 700; text-decoration: none; line-height: 1;
    display: inline-flex; align-items: baseline;
    transition: opacity 0.2s;
  }
  .site-footer .nv-brand:hover { opacity: 0.82; }
  /* NexVerto wordmark on joe-b — site accent burgundy on Verto (per this demo's theme) */
  .nv-brand { font-weight: 600; text-decoration: none; letter-spacing: 0.02em; }
  .nv-brand .nv-nex { color: var(--ink); }
  .nv-brand .nv-verto { color: var(--accent); }
  .nv-brand:hover .nv-verto { opacity: 0.85; }
  .site-footer .nv-brand .nv-nex { color: var(--ink); }
  .site-footer .nv-brand .nv-verto { color: var(--accent); }

  /* ── Back-to-top ── */
  .to-top {
    position: fixed; bottom: 116px; right: 26px; z-index: 10;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(10,12,22,0.6);
    backdrop-filter: blur(12px); color: var(--ink);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; padding: 0;
    transition: opacity 0.4s, transform 0.2s, background 0.2s, border-color 0.2s;
  }
  .to-top.visible { opacity: 1; pointer-events: auto; }
  .to-top:hover { background: rgba(139,35,50,0.2); border-color: var(--accent); transform: translateY(-2px); }
  .to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* ── Consulting modal ── */
  .modal-bg {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(5,6,10,0);
    backdrop-filter: blur(0px) saturate(1); -webkit-backdrop-filter: blur(0px) saturate(1);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1),
                background 0.4s ease, backdrop-filter 0.4s ease,
                visibility 0s linear 0.45s;
  }
  .modal-bg.open {
    opacity: 1; pointer-events: auto; visibility: visible;
    background: rgba(5,6,10,0.42);
    backdrop-filter: blur(6px) saturate(0.9); -webkit-backdrop-filter: blur(6px) saturate(0.9);
    transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1),
                background 0.4s ease, backdrop-filter 0.4s ease,
                visibility 0s;
  }
  .modal {
    background: rgba(13,15,24,0.94);
    backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    max-width: 500px; width: 100%;
    padding: 38px 32px 28px;
    position: relative;
    box-shadow:
      0 40px 90px rgba(0,0,0,0.7),
      0 0 0 1px rgba(0,0,0,0.4),
      0 0 60px rgba(139,35,50,0.08);
    transform: scale(0.84) translateY(28px);
    opacity: 0;
    transform-origin: center bottom;
    transition: transform 0.55s cubic-bezier(0.25, 1.35, 0.4, 1.02),
                opacity 0.4s ease-out;
  }
  .modal-bg.open .modal { transform: scale(1) translateY(0); opacity: 1; }
  /* Stagger-fade children so text "emerges" */
  .modal h3, .modal > p, .modal form label, .modal form input,
  .modal form select, .modal form textarea, .modal form .btn-submit {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease-out, transform 0.5s cubic-bezier(0.22,0.61,0.36,1);
  }
  .modal-bg.open .modal h3        { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal > p       { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form label:nth-of-type(1) { transition-delay: 0.34s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form input[name="name"]   { transition-delay: 0.36s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form label:nth-of-type(2) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form input[name="email"]  { transition-delay: 0.42s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form label:nth-of-type(3) { transition-delay: 0.46s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form select               { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form label:nth-of-type(4) { transition-delay: 0.52s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form textarea             { transition-delay: 0.54s; opacity: 1; transform: translateY(0); }
  .modal-bg.open .modal form .btn-submit          { transition-delay: 0.60s; opacity: 1; transform: translateY(0); }
  .modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); cursor: pointer; font-size: 16px; line-height: 1; }
  .modal h3 { font-family: var(--type-display); font-size: 1.8rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 10px; }
  .modal p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 22px; }
  .modal label { display: block; font-family: var(--type-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
  .modal input, .modal select, .modal textarea { width: 100%; padding: 11px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 9px; color: var(--ink); font-family: inherit; font-size: 0.92rem; margin-bottom: 14px; color-scheme: dark; }
  .modal input:focus, .modal textarea:focus, .modal select:focus { border-color: var(--accent); outline: none; }
  /* Force the native dropdown panel to be dark-on-dark. color-scheme handles
     most browsers; the explicit option styling catches Windows/Linux rendering. */
  .modal select { appearance: none; -webkit-appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='rgba(247,246,244,0.6)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center;
  }
  .modal select option { background: #13141c; color: var(--ink); padding: 6px; }
  .modal select option:checked,
  .modal select option:hover { background: var(--accent-deep); color: #fff; }
  .modal textarea { min-height: 90px; resize: vertical; }
  .modal .btn-submit {
    width: 100%;
    background: var(--accent-blood);
    color: rgba(247,246,244,0.92);
    border: 1px solid rgba(139,35,50,0.35);
    padding: 13px; border-radius: 9px;
    font-family: var(--type-body); font-size: 0.78rem; letter-spacing: 0.24em;
    text-transform: uppercase; font-weight: 700; cursor: pointer;
    transition: transform 0.18s, box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,0,0,0.3);
  }
  .modal .btn-submit:hover {
    background: var(--accent); color: #fff;
    border-color: rgba(176,62,74,0.6);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(139,35,50,0.45), 0 0 40px rgba(139,35,50,0.2);
  }

  /* ── Mobile ── */
  @media (max-width: 768px) {
    /* Zoom out on mobile so the whole cinematic frame is visible (not center-cropped) */
    .cine-layer { object-fit: contain; }
    .cine-stack { filter: saturate(1.02) contrast(1.04) brightness(0.88); }

    .top-bar { top: 14px; left: 16px; font-size: 0.56rem; max-width: 66vw; letter-spacing: 0.28em; }
    .top-bar .tb-flourish { display: none; }
    .top-bar .tb-role:nth-of-type(3) { display: none; }  /* hide "Operator" on mobile */
    .chapter-marker { top: 14px; right: 16px; font-size: 0.52rem; }
    .beat-jump { top: 48px; padding: 8px 12px; gap: 6px; }
    .beat-jump button { width: 7px; height: 7px; }

    .waypoint { padding: 18px 20px; max-width: 90vw; }
    .waypoint .kicker { font-size: 0.54rem; letter-spacing: 0.34em; margin-bottom: 10px; }
    .waypoint h2 { font-size: clamp(1.6rem, 7.5vw, 2.4rem); line-height: 1.08; margin-bottom: 12px; }
    .waypoint p { font-size: 0.92rem; line-height: 1.5; }
    .waypoint .meta { margin-top: 12px; gap: 12px; font-size: 0.54rem; }

    /* Mobile waypoints — all anchored in the bottom band with gentle Y/X variance
       so crossfades feel continuous (no teleport between top and bottom). */
    .wp-1, .wp-2, .wp-3, .wp-4 {
      left: 4vw; right: 4vw; top: auto;
      max-width: 92vw;
    }
    .wp-1 { bottom: 140px; text-align: left; }      /* intro */
    .wp-2 { bottom: 190px; text-align: left; }      /* services — lifted a step */
    .wp-3 { bottom: 160px; text-align: left; }      /* security — mid */
    .wp-4 { bottom: 140px; text-align: right; }     /* builds — right-aligned shift */
    .wp-5 {
      left: 4vw; right: 4vw; top: 50%;
      transform: translateY(-50%);
      text-align: center; max-width: none;
    }
    .wp-2 p, .wp-3 p { margin-left: 0; margin-right: auto; }
    .wp-2 .meta, .wp-3 .meta { justify-content: flex-start; }
    .wp-4 p { margin-left: auto; margin-right: 0; }
    .wp-4 .meta { justify-content: flex-end; }

    /* CTA expanded by default on mobile (no hover on touch) */
    .cta {
      bottom: 16px; right: 14px;
      width: auto; height: 42px;
      padding: 0 6px 0 0;
      background: var(--accent-blood);
      border-color: rgba(139,35,50,0.45);
    }
    .cta .cta-label {
      opacity: 1; transform: none;
      padding: 0 6px 0 16px;
      font-size: 0.6rem; letter-spacing: 0.2em;
      color: rgba(247,246,244,0.94);
    }
    .cta .cta-icon { width: 36px; height: 36px; }
    .cta .cta-icon svg { width: 17px; height: 17px; color: #fff; }

    .scroll-hint { bottom: 76px; font-size: 0.54rem; letter-spacing: 0.34em; }
    .to-top { bottom: 70px; right: 14px; width: 40px; height: 40px; }
    .intro-skip { bottom: 120px; font-size: 0.5rem; letter-spacing: 0.32em; padding: 6px 11px; }

    .site-footer { left: 12px; right: 12px; bottom: 10px; }
    .site-footer .f-center { display: none; }
    .site-footer .f-left { font-size: 0.48rem; letter-spacing: 0.24em; }
    .site-footer .f-right .f-tag { display: none; }
    .site-footer .nv-brand { font-size: 0.82rem; }

    /* Modal — tighter on mobile */
    .modal { padding: 28px 20px 22px; border-radius: 16px; max-width: 92vw; }
    .modal h3 { font-size: 1.5rem; margin-bottom: 8px; }
    .modal p { font-size: 0.88rem; margin-bottom: 16px; }
    .modal label { font-size: 0.56rem; letter-spacing: 0.22em; margin-bottom: 5px; }
    .modal input, .modal select, .modal textarea { padding: 10px 12px; font-size: 0.9rem; margin-bottom: 12px; }
    .modal .btn-submit { padding: 12px; font-size: 0.72rem; letter-spacing: 0.22em; }
  }
  @media (max-width: 420px) {
    .top-bar { font-size: 0.5rem; letter-spacing: 0.22em; }
    .top-bar .tb-role:nth-of-type(2) { display: none; }  /* also hide "Engineer" on narrow phones */
    .waypoint h2 { font-size: clamp(1.6rem, 8.8vw, 2.2rem); }
    .site-footer .nv-brand { font-size: 0.76rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    .cta, .scroll-hint { transition: none !important; }
    .scroll-hint::after { animation: none; }
  }

/* ─── tap target minimums (WCAG 2.5.5) ─── */
@media (max-width: 768px) {
  nav a, header a,
  .nav-links a, .nav-cta,
  footer a, .site-footer a, .footer__nav a, .footer-grid a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  /* Hamburger buttons: only ensure 44x44 hit area, don't override their internal flex layout */
  .hamburger, .nav-toggle, .nav__hamburger, button[aria-label*="menu" i],
  button[aria-label="Menu"], .back-to-top {
    min-width: 44px;
    min-height: 44px;
  }
  nav .nav-icon, header .nav-icon {
    width: 18px; height: 18px;
  }
}


/* ── Added 2026-10-05 with the CMS kit: the strict security policy allows no style attributes, so the
      rules below replace the style attributes this page had (same values). ── */
.scroll-host > .snap-beat { height: 100vh; pointer-events: none; }

/* Separator between the footer links (as on the live release, b3b5a81). */
.f-sep { opacity: .45; margin: 0 6px; }

/* Animation state: ui.js writes these rules (CSSOM) instead of style attributes. Start values = the CSS
   defaults above (.cine-layer and .waypoint opacity 0, .progress-bar width 0%). */
.cine-layer[data-layer="0"] { opacity: 0; }
.waypoint[data-beat="0"] { opacity: 0; }
.cine-layer[data-layer="1"] { opacity: 0; }
.waypoint[data-beat="1"] { opacity: 0; }
.cine-layer[data-layer="2"] { opacity: 0; }
.waypoint[data-beat="2"] { opacity: 0; }
.cine-layer[data-layer="3"] { opacity: 0; }
.waypoint[data-beat="3"] { opacity: 0; }
.cine-layer[data-layer="4"] { opacity: 0; }
.waypoint[data-beat="4"] { opacity: 0; }
#pbar { width: 0%; }
