/* =========================================================
   SITE-NAV — shared module v10
   --------------------------------------------------------
   v10: Mobile-drawer renovation — fit-on-screen + more "pop".
   Three problems with the v9 drawer on phones: (a) the stacked
   brand + 5 tall (72px) link rows + 3 footer sections + © floor
   overflowed a typical phone viewport, so the drawer scrolled and
   the "© 2026 Zaras" floor clipped below the fold; (b) the primary
   nav read as flat undifferentiated text; (c) the at-rest nav-bar
   "Request access" pill stayed visible behind the open drawer,
   doubling the CTA already inside the drawer.

   Changes (CSS-only; markup adds one section label in the partial):
   - Hide the nav-bar CTA while the drawer is open
     (body.site-nav-locked .site-nav-cta { display:none }) and let
     the toggle take the right edge (margin-left:auto). One CTA on
     screen at a time — the drawer's filled button.
   - Compress vertical rhythm to fit a phone without scrolling:
     brand block 20/24 → 16/18, primary link rows 72 → 58px, footer
     padding 32/16 → 24/12 and section gap 24 → 18, © floor margins
     16 → 12. Budget recovered ≈ 120px.
   - "Menu" caps label above the primary list (parity with the
     Try Zaras / Contact / Legal sections — every block is now
     labelled) + a muted per-row chevron that animates to --signal
     on hover/active, so rows read as tappable destinations.
   - Drawer "Request access" goes filled: var(--ink) bg + var(--bg)
     text (white-on-black inverts to a solid white button), the
     loudest element in the drawer.

   Historical descriptions retained below.
   --------------------------------------------------------
   v9: paint the html canvas --bg (iOS top-inset / overscroll strip);
   sticky bar reserves env(safe-area-inset-top); always-on bottom-edge
   ::after separator that strengthens on .is-scrolled; opaque --bg fill
   on .is-scrolled; drawer-open scroll-lock hardening (overscroll:none).

   v7: Mobile-nav breakpoint splits 720 → 960 + 720. With Careers
   added to the desktop nav (5 links), the row's content footprint at
   tablet widths exceeded the available space — the CTA clipped past
   the row's right edge between roughly 720 and 900px. Switch to
   hamburger drawer now triggers at <=960px (links hidden, hamburger
   shown, CTA pushed right via margin-left:auto). Narrow-mobile
   treatment (wordmark → mark swap, CTA padding shrink, row gap
   reduction) stays at <=720px.

   v5: Migrated .site-nav-drawer-legal-sep color from --ink-faint
   (~1.7:1, failing WCAG AA) to --ink-label (~6.5:1, AAA).

   v4 increases header presence: row height 64 → 80px, logo SVG
   22 → 28px, links 13 → 14.5px with gap 28 → 40px, CTA 12 → 13px /
   9 18 → 11 20px padding. Drawer top-padding tracks the new row
   height (64 → 80).

     - Brand block: status-line only — teal signal dot +
       ZRS // OPERATIONS mono caps, wrapped in /-link.
     - Primary list: flat destinations, hairline dividers.
     - Footer: populated sections (Try Zaras / Contact / Legal)
       with visible content under each caps label, plus a single-
       line © floor.

   Cache-busting: filename-versioned (vN → vN+1 on any change).
   Behavior + JS: js/site-nav.v4.js (sibling module).
   ========================================================= */

[hidden] { display: none !important; }

/* Anchor-jump clearance for the sticky site-nav — applies to
   every page that loads this module. 80px nav (see .site-nav-row
   below) + 16px breathing. Single source of truth; per-element
   scroll-margin-top stacks with this and should be avoided. */
html { scroll-padding-top: 96px; }

/* v9: paint the document canvas so the iOS top-inset / overscroll strip reads
   as --bg instead of the default (white) canvas behind the fixed nav and the
   drawer-open scroll-lock. Global via the nav module (loaded on every page);
   --bg is a :root token on all consumers. */
html { background: var(--bg); }

/* -- Sticky header bar -------------------------------------------------
   At rest the bar stays transparent glass over the hero (only .site-nav-blur
   + the faint top inner-highlight); the opaque fill is added on .is-scrolled
   below. v9: reserve the iOS top safe-area as padding so the bar's fill/
   separator span the notch region; the 80px row stays centred beneath it
   (the drawer already assumes an 80px+inset bar via its own padding-top). */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  box-shadow: inset 0 1px 0 0
    color-mix(in oklab, var(--ink) 6%, transparent);
}

/* Separator (v9): an ALWAYS-ON material highlight at the bar's bottom edge —
   faded at the sides, extremely low at rest, picking up a touch of --signal so
   it belongs to Zaras's glow system rather than reading as a SaaS border. It
   strengthens (opacity 0.55 → 1) on .is-scrolled, in step with the fill below.
   site-nav.v3.js toggles .is-scrolled on scrollY>0. No layout shift (it's a
   positioned ::after, not a border). */
.site-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in oklab, var(--ink) 10%, transparent) 26%,
    color-mix(in oklab, var(--signal) 9%, transparent) 50%,
    color-mix(in oklab, var(--ink) 10%, transparent) 74%,
    transparent 100%);
  opacity: 0.55;
  transition: opacity 260ms ease;
}
.site-nav.is-scrolled::after { opacity: 1; }

/* On scroll: fill the bar with opaque --bg so arbitrary page content can't be
   seen sliding under the transparent at-rest glass (Bug A). The blur layers are
   negative-z children that paint over this fill, so the result is solid --bg
   glass. At rest (no class) there is no fill — the cinematic transparent look
   over the hero/haze is preserved. */
.site-nav.is-scrolled { background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  .site-nav::after { transition: none; }
}

.site-nav-blur,
.site-nav-blur > * {
  pointer-events: none;
}
.site-nav-blur__l1,
.site-nav-blur__l2,
.site-nav-blur__l3 {
  position: absolute;
  inset: 0 0 -28px 0;
}
.site-nav-blur__l1 {
  z-index: -3;
  background: color-mix(in oklab, var(--bg) 65%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to bottom,
    black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%, black 50%, transparent 100%);
}
.site-nav-blur__l2 {
  z-index: -2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mask-image: linear-gradient(to bottom,
    black 0%, black 40%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%, black 40%, transparent 90%);
}
.site-nav-blur__l3 {
  z-index: -1;
  background: color-mix(in oklab, var(--bg) 25%, transparent);
  backdrop-filter: blur(48px) saturate(140%);
  -webkit-backdrop-filter: blur(48px) saturate(140%);
  mask-image: linear-gradient(to bottom,
    black 0%, black 25%, transparent 65%);
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%, black 25%, transparent 65%);
}

/* -- Row layout (v4: 64 → 80 height, 32 → 36 gap) -------------------- */
.site-nav-row {
  max-width: var(--maxw, 1240px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
  height: 80px;
  display: flex;
  align-items: center;
  gap: 36px;
}

/* -- Logo (v4: 20 → 24 wrapper, 22 → 28 SVG) ------------------------- */
.site-nav-logo {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-bottom: none;
  flex: 0 0 auto;
}
.site-nav-logo svg { height: 28px; width: auto; display: block; }
.site-nav-logo .site-nav-brand-mark { display: none; }
.site-nav-logo .site-nav-brand-full { display: block; }

/* -- Desktop nav links (v4: 13 → 14.5 size, 28 → 40 gap) -------------- */
.site-nav-links {
  display: flex;
  gap: 40px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 14.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-sub);
}
.site-nav-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color 180ms ease;
}
.site-nav-links a:hover { color: var(--ink); }

body[data-page="platform"] .site-nav-links a[href="/platform"] {
  color: var(--ink);
}
body[data-page="industries"] .site-nav-links a[href="/industries"] {
  color: var(--ink);
}
body[data-page="pricing"] .site-nav-links a[href="/pricing"] {
  color: var(--ink);
}
body[data-page="company"] .site-nav-links a[href="/company"] {
  color: var(--ink);
}
body[data-page="careers"] .site-nav-links a[href="/careers"] {
  color: var(--ink);
}

/* -- CTA (v4: 12 → 13 size, 9 18 → 11 20 padding) -------------------- */
.site-nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 11px 20px;
  border: 1px solid var(--rule-hi);
  border-radius: 999px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.site-nav-cta:hover {
  border-color: var(--signal);
  color: var(--signal-ink);
}
.site-nav-cta:active {
  border-color: var(--ink);
  background: rgba(255,255,255,0.04);
  transform: scale(0.97);
  transition: transform 120ms cubic-bezier(.2,.6,.1,1), background 120ms ease, border-color 120ms ease;
}

/* -- Hamburger (unchanged from v1) ------------------------------------ */
.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 1px solid var(--rule-hi);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  gap: 5px;
  transition: border-color 180ms ease, background 180ms ease;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}
.site-nav-toggle:active { background: rgba(255,255,255,0.04); }
.site-nav-toggle-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  color: var(--ink);
  transition: transform 240ms cubic-bezier(.2,.6,.1,1), opacity 160ms ease;
  transform-origin: center;
  pointer-events: none;
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* =====================================================================
   MOBILE DRAWER — v10 renovation (compressed rhythm + labelled sections)
   ===================================================================== */
.site-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-top: calc(80px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-nav-drawer-inner {
  max-width: var(--maxw, 1240px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
  display: flex;
  flex-direction: column;
}

/* -- Brand block — status-line only (v10: 20/24 → 16/18) -------------- */
.site-nav-drawer-brand {
  display: block;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.site-nav-drawer-brand-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-nav-drawer-brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px rgba(118,199,178,0.6);
}

/* -- Primary nav block (v10: "Menu" caps label above the list) -------- */
.site-nav-drawer-nav {
  padding-top: 18px;
}
.site-nav-drawer-nav .site-nav-drawer-label {
  display: block;
  margin-bottom: 4px;
}

/* -- Primary nav list (v10: 72 → 58px rows, animated row chevron) ----- */
.site-nav-drawer-primary {
  display: flex;
  flex-direction: column;
}
.site-nav-drawer-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 0 0 16px;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 180ms ease, padding-left 220ms cubic-bezier(.2,.6,.1,1);
}
/* Per-row chevron (v10): muted at rest, animates to --signal and nudges
   right on hover/active so each row reads as a tappable destination —
   the "pop" the flat v9 list lacked. Pseudo-element, so the partial's
   link markup stays clean. */
.site-nav-drawer-link::after {
  content: "→";
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: var(--ink-mute);
  opacity: 0.55;
  transition: transform 220ms cubic-bezier(.2,.6,.1,1), color 180ms ease, opacity 180ms ease;
}
.site-nav-drawer-link:hover::after,
.site-nav-drawer-link:active::after {
  color: var(--signal);
  opacity: 1;
  transform: translateX(4px);
}
/* Active page: 2px teal bar inside the row's left padding (set by
   site-nav.v4.js via aria-current="page" — body[data-page] driven). */
.site-nav-drawer-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 22px;
  background: var(--signal);
}
.site-nav-drawer-link[aria-current="page"]::after {
  color: var(--signal);
  opacity: 1;
}
.site-nav-drawer-link:active {
  padding-left: 22px;
  color: var(--ink-sub);
}

/* -- Footer — populated sections under each caps label ---------------
   v10: padding 32/16 → 24/12, section gap 24 → 18. */
.site-nav-drawer-footer {
  padding: 24px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.site-nav-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-nav-drawer-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
/* v10: filled white-on-black button — the loudest element in the drawer
   and the single on-screen CTA (the nav-bar pill is hidden while open). */
.site-nav-drawer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  text-decoration: none;
  margin-top: 4px;
  min-height: 56px;
  transition: background 180ms ease, border-color 180ms ease, transform 120ms cubic-bezier(.2,.6,.1,1);
}
.site-nav-drawer-cta:hover {
  background: color-mix(in oklab, var(--ink) 90%, var(--bg));
  border-color: color-mix(in oklab, var(--ink) 90%, var(--bg));
}
.site-nav-drawer-cta:active {
  background: color-mix(in oklab, var(--ink) 82%, var(--bg));
  border-color: color-mix(in oklab, var(--ink) 82%, var(--bg));
  transform: scale(0.99);
}
.site-nav-drawer-cta-arrow {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--bg);
  letter-spacing: 0;
}
.site-nav-drawer-email {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  align-self: flex-start;
}
.site-nav-drawer-email:hover { border-bottom-color: var(--signal); }
.site-nav-drawer-legal {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-sub);
  letter-spacing: 0.06em;
}
.site-nav-drawer-legal a {
  color: var(--ink-sub);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 180ms ease, border-color 180ms ease;
}
.site-nav-drawer-legal a:hover {
  color: var(--ink);
  border-bottom-color: var(--signal);
}
.site-nav-drawer-legal-sep {
  color: var(--ink-label);
  margin: 0 8px;
}
.site-nav-drawer-copyright {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-mute);
}

/* -- Body scroll lock when drawer open ------------------------------
   v9: overscroll-behavior:none stops iOS rubber-band from dragging the
   fixed/locked body and revealing a strip above it. The locked bar keeps its
   own opaque --bg + hard border-bottom (the drawer-open separator), and it
   inherits the base padding-top: env(safe-area-inset-top) so its fill spans the
   top inset — no bare strip above the bar. The always-on ::after highlight is
   suppressed while locked so it doesn't double up with that border-bottom. */
body.site-nav-locked {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  overscroll-behavior: none;
}
body.site-nav-locked .site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
body.site-nav-locked .site-nav-blur { display: none; }
body.site-nav-locked .site-nav::after { display: none; }

/* v10: while the drawer is open, drop the nav-bar "Request access" pill —
   the drawer carries its own filled CTA, so one is enough. The toggle (now
   the ✕) takes the right edge in the CTA's place. */
body.site-nav-locked .site-nav-cta { display: none; }
body.site-nav-locked .site-nav-toggle { margin-left: auto; }

/* -- Tablet + mobile breakpoint (v7: moved up from 720 → 960) --------
   Switch to hamburger drawer. The 5-link desktop nav + CTA stops
   fitting cleanly below ~960px; below this width links are hidden
   and the hamburger takes over. CTA stays full size (it has room
   at 720–960). */
@media (max-width: 960px) {
  .site-nav-links { display: none; }
  .site-nav-cta { margin-left: auto; }
  .site-nav-toggle {
    display: inline-flex;
    order: 1;
  }
}

/* -- Narrow mobile (unchanged behavior from v1, breakpoint preserved
   at 720px): swap full wordmark for logo mark, tighten CTA,
   reduce row gap. */
@media (max-width: 720px) {
  .site-nav-row { gap: 10px; }
  .site-nav-cta {
    padding: 10px 14px;
    font-size: 11px;
    min-height: 44px;
    letter-spacing: 0.04em;
  }
  .site-nav-logo .site-nav-brand-full { display: none; }
  .site-nav-logo .site-nav-brand-mark { display: block; }
}

@media (max-width: 380px) {
  .site-nav-row { gap: 8px; }
  .site-nav-cta { padding: 9px 12px; font-size: 10.5px; letter-spacing: 0.03em; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav-drawer-link,
  .site-nav-drawer-link::after,
  .site-nav-drawer-cta,
  .site-nav-toggle-bar { transition: none !important; }
}

@media print {
  .site-nav-toggle,
  .site-nav-drawer { display: none !important; }
}
