/* Readable nav on cinematic pages (scripts/apply-nav-glass.py). */
html.cine .nav { mix-blend-mode: normal; }

/* A soft shade from the top while the hero plays, so the logo, clock and button read over bright sky. */
html.cine:not(.past-hero):not(.at-footer) .navshade { opacity: 1; height: 150px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,0) 100%); }
html.cine .nav__brand, html.cine .nav__clock { filter: drop-shadow(0 1px 10px rgba(0,0,0,.45)); }
html.cine .nav__clock { opacity: .92; }

/* The links: a dark glass capsule, white text, a glowing pill behind the one you point at. */
@media (min-width: 761px) {
  html.cine .nav__links { position: relative; isolation: isolate; overflow: hidden; gap: 2px; padding: 5px;
    border-radius: 999px; background: rgba(10,10,10,.42); border: 1px solid rgba(255,255,255,.16);
    -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 10px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.1); }
  html.cine .nav__links a { opacity: 1; padding: 7px 14px; border-radius: 999px; background: none; letter-spacing: .01em;
    text-shadow: 0 1px 6px rgba(0,0,0,.35); transition: background-color .3s cubic-bezier(.16,1,.3,1), color .3s, box-shadow .3s; }
  html.cine .nav__links a:hover, html.cine .nav__links a:focus-visible { background-color: rgba(255,255,255,.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 18px rgba(255,255,255,.12); }
  html.cine .nav__links a[aria-current="page"] { background-color: rgba(255,255,255,.18); }

  /* One slow light sweep across the capsule when the page opens. */
  html.cine .nav__links::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 0%, transparent 38%, rgba(255,255,255,.22) 50%, transparent 62%, transparent 100%);
    transform: translateX(-120%); animation: navsweep 1.6s cubic-bezier(.4,0,.2,1) 1.4s 1 forwards; }
  @keyframes navsweep { to { transform: translateX(120%); } }

  /* Over light sections: pale glass, dark text. */
  html.cine[data-tone="light"] .nav { color: #0b0b0b; }
  html.cine[data-tone="light"] .nav__links { background: rgba(255,255,255,.62); border-color: rgba(0,0,0,.1);
    box-shadow: 0 10px 30px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.6); }
  html.cine[data-tone="light"] .nav__links a { text-shadow: none; }
  html.cine[data-tone="light"] .nav__links a:hover, html.cine[data-tone="light"] .nav__links a:focus-visible { background-color: rgba(0,0,0,.07); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
  html.cine[data-tone="light"] .nav__brand, html.cine[data-tone="light"] .nav__clock { filter: none; }
  html.cine[data-tone="light"] .nav__cta { background: #0b0b0b; color: #fff; }
  html.cine[data-tone="light"] .nav__cta:hover { background: transparent; color: #0b0b0b; }
}

/* The section counter waits until the hero is behind you (it sat on the hero's own bottom line). */
html.cine:not(.past-hero) .hudline { opacity: 0; }
/* Phones: the hero's decorative bottom line (clock, coordinates) sat behind the Skip intro card. */
@media (max-width: 760px) { html.cine .hero__hud { display: none; } }

@media (prefers-reduced-motion: reduce) { html.cine .nav__links::before { animation: none; display: none; } }
