/* Odyz site header, on every page of odyz.app. Written into each page by
   tools/site-header.py; behaviour in header.js. At the top of the page it is
   a full-width frosted bar; once you scroll it detaches into a floating pill
   that hugs its content. Pages with light sections (the homepage) add
   .on-light to switch the material. Self-contained: it sets its own font and
   colours so it looks the same on pages built on styles.css. */
.nav { --hdr-ease: cubic-bezier(.22, 1, .36, 1); color: #f5f5f7; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 17px; line-height: 1.47; letter-spacing: -.012em; -webkit-font-smoothing: antialiased; }
.nav *, .nav *::before, .nav *::after { box-sizing: border-box; }
.nav img { display: block; max-width: none; }
.nav a { color: inherit; }

/* ---------- wOzy home link, the same as every wOzy app page header ---------- */
.wz-crumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wz-home { display: inline-flex; align-items: center; gap: 7px; flex: none; margin-left: -4px; padding: 4px 8px 4px 4px; border-radius: 10px; text-decoration: none; color: var(--wz-ink, #F39A1E); font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -0.3px; line-height: 1; transition: background .15s; }
.wz-home:hover { background: var(--wz-hover, rgba(243, 154, 30, .14)); }
.wz-home:focus-visible { outline: 2px solid #F39A1E; outline-offset: 2px; }
.wz-home img { width: 26px; height: 26px; display: block; }
.wz-sep { flex: none; width: 1.5px; height: 22px; border-radius: 1px; background: var(--wz-sep, rgba(255, 255, 255, .22)); }
.nav.on-light { --wz-ink: #C8740A; --wz-sep: rgba(0, 0, 0, .16); }
@media (max-width: 560px) { .wz-crumb { gap: 10px; } .wz-home { padding: 4px; } .wz-home span { display: none; } }


/* Header: a full-width bar at the top of the page that, once you scroll,
   detaches into a floating pill with the same frosted material (like Flighty).
   Only transform and opacity animate, so iOS never re-lays-out or re-blurs
   the header mid-animation: the bar's frosted background (.nav::before) fades
   out while the pill's (.nav-in::before) fades in, each at a fixed size; the
   layout switches once, and header.js slides the logo, links and Download
   button from their old places to their new ones. */
.nav { contain: layout style; --mat: rgba(22, 22, 26, .62); --edge: rgba(255, 255, 255, .12); position: fixed; z-index: 50; inset: 0 0 auto; height: 52px; pointer-events: none; }
.nav.on-light { --mat: rgba(245, 245, 247, .72); --edge: rgba(0, 0, 0, .08); color: #1d1d1f; }
.nav::before, .nav-in::before { content: ""; position: absolute; inset: 0; z-index: 0; background: var(--mat); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); pointer-events: none; transition: opacity .45s var(--hdr-ease); will-change: opacity; }
.nav::before { border-bottom: 1px solid var(--edge); }
.nav-in::before { border-radius: 999px; border: 1px solid var(--edge); box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .45); opacity: 0; }
.nav.on-light .nav-in::before { box-shadow: 0 12px 40px -14px rgba(30, 40, 80, .25); }
/* While the bar turns into the pill (or back), header.js adds .is-anim: no
   blur at all for that half second, just a near-opaque fill, so iOS never
   blurs two cross-fading layers per frame. The blur returns when it's done. */
.nav.is-anim::before, .nav.is-anim .nav-in::before { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--mat-solid); }
.nav { --mat-solid: rgba(22, 22, 26, .94); }
.nav.on-light { --mat-solid: rgba(245, 245, 247, .96); }
.nav.is-float::before { opacity: 0; }
.nav.is-float .nav-in::before { opacity: 1; }
.nav-in { pointer-events: auto; position: relative; width: 100%; height: 100%; margin: 0 auto; padding: 0 max(22px, calc((100% - 1040px) / 2 + 22px)); display: flex; align-items: center; justify-content: space-between; gap: 20px; transition: transform .5s var(--hdr-ease); will-change: transform; }
.nav.is-float .nav-in { width: max-content; max-width: calc(100% - 24px); gap: 26px; padding: 0 8px 0 14px; transform: translate3d(0, 12px, 0); }
@media (max-width: 760px) { .nav.is-float .nav-in { transform: translate3d(0, 8px, 0); } }
.nav-in > * { position: relative; z-index: 1; flex-shrink: 0; transition: transform .5s var(--hdr-ease); }
/* In the pill, the wOzy name fades away beside its icon; Odyz keeps its name. */
.wz-home { position: relative; }
.wz-home span { transition: opacity .2s; }
.nav.is-float .wz-home { gap: 0; }
.nav.is-float .wz-home span { position: absolute; left: 100%; opacity: 0; pointer-events: none; }
.nav-links a, .nav-logo, .nav-cta { white-space: nowrap; }
.nav-cta { transition: padding .45s var(--hdr-ease), font-size .45s var(--hdr-ease); }
.nav.is-float .nav-cta { padding: 9px 18px; font-size: 14px; }
@media (max-width: 760px) { .nav.is-float { top: 8px; } }
.nav-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
.nav-logo img { border-radius: 7px; }
.nav-links { display: flex; gap: 26px; font-size: 13px; }
.nav-links a { display: inline-grid; text-decoration: none; opacity: .72; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
/* The section you're in: bold and full strength. A hidden bold copy of the
   label keeps each link at its bold width, so the pill never changes size. */
.nav-links a.is-active { opacity: 1; font-weight: 700; }
.nav-links a::after { content: attr(data-label); font-weight: 700; height: 0; visibility: hidden; overflow: hidden; }
.nav-cta { font-size: 14px; font-weight: 600; text-decoration: none; background: #2997ff; color: #fff; padding: 8px 17px; border-radius: 999px; }
@media (max-width: 760px) { .nav-links { display: none; } }
