/* ═══════════════════════════════════════════════════════════════════════════
   AITIZER site navigation (12/10/2026). One component for every page:
   a floating island (logo · links · language · log in · Start free), a
   Product panel on desktop, a full-screen sheet on phones, and the reading
   progress line fixed to the very top of the viewport (it used to sit at
   --nav-h and float mid-page whenever the bar hid itself on scroll).
   Theme: light by default (matches the platform UI); pages with a dark body
   get the same geometry with dark glass: any .nav without .lt is the dark variant.
   Loaded after site.css / home-mix.css on purpose: every rule here wins.
   ═══════════════════════════════════════════════════════════════════════════ */
.nav, .mobnav {
  --nv-font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nv-bg: rgba(255, 255, 255, .76);
  --nv-bg-solid: #ffffff;
  --nv-line: rgba(13, 12, 18, .09);
  --nv-fg: #0d0c12;
  --nv-muted: #5a576a;
  --nv-hover: rgba(124, 58, 237, .07);
  --nv-active: #6d28d9;
  --nv-shadow: 0 1px 2px rgba(15, 12, 30, .04), 0 18px 40px -24px rgba(76, 29, 149, .35);
  --nv-grad: linear-gradient(100deg, #7c3aed 0%, #c026d3 45%, #ec4899 70%, #f59e0b 100%);
  --nv-h: 60px;
}
.nav:not(.lt), .mobnav:not(.lt) {
  --nv-bg: rgba(14, 14, 20, .72);
  --nv-bg-solid: #0f0f15;
  --nv-line: rgba(255, 255, 255, .10);
  --nv-fg: #f4f4f6;
  --nv-muted: #a2a2b0;
  --nv-hover: rgba(255, 255, 255, .07);
  --nv-active: #d8bcff;
  --nv-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 50px -24px rgba(0, 0, 0, .8);
}

/* ── the bar: transparent strip, the island is .nav-in ── */
.nav, .nav.lt, .nav.stuck, .nav.lt.stuck {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  height: auto; padding: 12px clamp(12px, 2vw, 24px) 0; gap: 0; display: block;
  background: transparent; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-family: var(--nv-font);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.nav.hide { transform: translateY(calc(-100% - 8px)); }
.nav .nav-in {
  position: relative; max-width: 1180px; margin: 0 auto; height: var(--nv-h);
  display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px;
  border-radius: 999px; border: 1px solid var(--nv-line);
  background: var(--nv-bg); color: var(--nv-fg); box-shadow: var(--nv-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.nav.stuck .nav-in { background: color-mix(in srgb, var(--nv-bg-solid) 92%, transparent); }
/* AI accent: a faint gradient halo that breathes while the page is at the top */
.nav .nav-in::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; pointer-events: none;
  background: var(--nv-grad); opacity: .07; filter: blur(18px); transform: translateY(6px) scaleX(.96);
  animation: nv-breathe 8s ease-in-out infinite;
}
.nav.stuck .nav-in::before { opacity: .04; animation: none; }
@keyframes nv-breathe { 0%, 100% { opacity: .06; } 50% { opacity: .13; } }

/* logo */
.nav .lockup, .nav.lt .lockup {
  display: block; height: 30px; width: 104px; flex: 0 0 auto; margin-right: 6px;
  background: url("../brand/logo-full-dark.png") left center / contain no-repeat;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1); filter: none;
}
.nav:not(.lt) .lockup { background-image: url("../brand/logo-full-white.png"); }
.nav .lockup:hover { transform: translateY(-1px); filter: none; }

/* links: segmented group with a sliding highlight */
.nav .nav-in .links, .nav.lt .nav-in .links, .nav.stuck .nav-in .links {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 2px; margin: 0; padding: 3px;
  border-radius: 999px; border: 0; background: transparent; box-shadow: none;
}
.nav .nav-in .nav-hl {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px;
  background: var(--nv-hover); opacity: 0; pointer-events: none;
  transition: left .35s cubic-bezier(.22, 1, .36, 1), width .35s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
.nav .nav-in .links.lit .nav-hl { opacity: 1; }
.nav .nav-in .nav-item, .nav.lt .nav-in .nav-item, .nav .nav-in .links a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: none; cursor: pointer;
  font: 500 14.5px/1 var(--nv-font); color: var(--nv-muted); white-space: nowrap; text-decoration: none;
  transition: color .2s ease;
}
.nav .nav-in .nav-item:hover, .nav .nav-in .nav-item.here, .nav .nav-in .nav-item[aria-expanded="true"],
.nav .nav-in .nav-item[aria-current="page"], .nav.lt .nav-in .nav-item:hover { color: var(--nv-fg); background: none; }
.nav .nav-in .nav-item.here::after, .nav .nav-in .nav-item[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--nv-grad);
}
.nav .nav-in .nav-item .chev { width: 13px; height: 13px; opacity: .6; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.nav .nav-in .nav-item[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav .nav-in .links a::after { display: none; }
.nav .nav-in .nav-item.here::after { display: block; }

.nav .nav-in .spacer { flex: 1; }

/* language (markup injected by build-i18n) */
.nav .nav-in .lang-sel > summary, .nav.lt .nav-in .lang-sel > summary {
  height: 36px; padding: 0 10px; gap: 6px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--nv-muted); font: 600 13px/1 var(--nv-font); transition: background .2s ease, color .2s ease;
}
.nav .nav-in .lang-sel > summary:hover, .nav .nav-in .lang-sel[open] > summary { background: var(--nv-hover); color: var(--nv-fg); }
.nav .nav-in .lang-sel .ls-menu { top: calc(100% + 12px); border-radius: 16px; border-color: var(--nv-line); background: var(--nv-bg-solid); color: var(--nv-fg); box-shadow: var(--nv-shadow); }

/* log in + CTA */
.nav .nav-in .nav-login, .nav .nav-in .ghost, .nav.lt .nav-in .ghost {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: none;
  font: 500 14.5px/1 var(--nv-font); color: var(--nv-muted); text-decoration: none; white-space: nowrap; transition: color .2s ease, background .2s ease;
}
.nav .nav-in .nav-login:hover, .nav .nav-in .ghost:hover { color: var(--nv-fg); background: var(--nv-hover); border-color: transparent; }
.nav .nav-in .nav-cta, .nav .nav-in .btn-sm, .nav.lt .nav-in .btn-sm {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px 0 14px; margin-left: 2px;
  border-radius: 999px; border: 0; background: #0d0c12; color: #fff; font: 600 14.5px/1 var(--nv-font); text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 22px -12px rgba(13, 12, 18, .6); overflow: hidden; isolation: isolate;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
.nav:not(.lt) .nav-in .nav-cta { background: #fff; color: #0d0c12; }
.nav:not(.lt) .nav-in .nav-cta:hover { color: #fff; }
.nav .nav-in .nav-cta::before { /* gradient edge that lights up on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--nv-grad); opacity: 0; z-index: -1; transition: opacity .3s ease;
}
.nav .nav-in .nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(124, 58, 237, .65); color: #fff; }
.nav .nav-in .nav-cta:hover::before { opacity: 1; }
.nav .nav-in .nav-cta svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav .nav-in .nav-cta .arr { display: none; }

/* burger (phones) */
.nav .nav-in .nav-burger, .burger { display: none; }
.nav .nav-in .nav-burger {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--nv-line); background: transparent; cursor: pointer; padding: 0; position: relative; flex: 0 0 auto; margin-left: 2px;
}
.nav .nav-in .nav-burger span { position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px; background: var(--nv-fg); transition: transform .3s cubic-bezier(.22, 1, .36, 1), width .3s ease; }
.nav .nav-in .nav-burger span:nth-child(1) { top: 15px; }
.nav .nav-in .nav-burger span:nth-child(2) { top: 23px; width: 12px; }
.nav .nav-in .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav .nav-in .nav-burger[aria-expanded="true"] span:nth-child(2) { width: 18px; transform: translateY(-4px) rotate(-45deg); }

/* ── Product panel (desktop) ── */
.nav .mega, .nav.lt .mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 190; padding: 10px clamp(12px, 2vw, 24px) 0;
  opacity: 0; transform: translateY(-6px) scale(.985); pointer-events: none; transform-origin: 50% 0;
  transition: opacity .22s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
  background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.nav .mega[hidden] { display: block; }
.nav .mega.open { opacity: 1; transform: none; pointer-events: auto; }
.nav .mega-in {
  display: grid; grid-template-columns: 1.05fr 1.15fr 1.05fr .95fr; gap: 8px;
  max-width: 1180px; margin: 0 auto; padding: 16px;
  border-radius: 26px; border: 1px solid var(--nv-line); background: var(--nv-bg-solid); color: var(--nv-fg);
  box-shadow: var(--nv-shadow), 0 40px 90px -40px rgba(15, 12, 30, .5);
}
.nav .mega-col, .nav .mega-side { display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.nav .mega-k { display: flex; align-items: center; gap: 7px; font: 600 11px/1 var(--nv-font); letter-spacing: .14em; text-transform: uppercase; color: var(--nv-muted); padding: 8px 12px 10px; }
.nav .mega-k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nv-grad); }
.nav .mega-col a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; text-decoration: none; transition: background .2s ease, transform .3s cubic-bezier(.22, 1, .36, 1); }
.nav .mega-col a:hover { background: var(--nv-hover); transform: translateX(2px); }
.nav .mega-col a b { font: 600 14px/1.3 var(--nv-font); color: var(--nv-fg); letter-spacing: -.01em; }
.nav .mega-col a span { font: 400 12.5px/1.45 var(--nv-font); color: var(--nv-muted); }
.nav .mega-side { border-left: 1px solid var(--nv-line); padding-left: 14px; }
.nav .mega-film { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px 58px; border-radius: 16px; text-decoration: none; background: linear-gradient(135deg, rgba(124, 58, 237, .10), rgba(236, 72, 153, .06)); border: 1px solid rgba(124, 58, 237, .18); transition: transform .3s cubic-bezier(.22, 1, .36, 1), border-color .25s; }
.nav .mega-film:hover { transform: translateY(-2px); border-color: rgba(124, 58, 237, .5); }
.nav .mega-film b { font: 600 14px/1.3 var(--nv-font); color: var(--nv-fg); }
.nav .mega-film span { font: 400 12.5px/1.45 var(--nv-font); color: var(--nv-muted); }
.nav .mega-film .mf-play { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--nv-grad); display: grid; place-items: center; }
.nav .mega-film .mf-play svg { width: 16px; height: 16px; }
.nav .mega-cta { margin-top: 10px; padding: 10px 12px; font: 600 13.5px/1.3 var(--nv-font); color: var(--nv-active); text-decoration: none; border-radius: 12px; }
.nav .mega-cta:hover { background: var(--nv-hover); color: var(--nv-fg); }

/* ── reading progress: top edge of the viewport, above everything ── */
.progress { position: fixed; left: 0; top: 0 !important; height: 3px; width: 0%; background: var(--nv-grad, linear-gradient(90deg, #7c3aed, #ec4899, #f59e0b)); z-index: 400; pointer-events: none; border-radius: 0 3px 3px 0; }

/* ── mobile sheet ── */
.mobnav, .mobnav.lt {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; gap: 0;
  padding: calc(var(--nv-h) + 24px) 20px 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--nv-bg-solid); color: var(--nv-fg); border: 0; font-family: var(--nv-font);
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.mobnav[hidden] { display: flex; }
.mobnav.open { opacity: 1; transform: none; pointer-events: auto; }
.mobnav::before { /* soft gradient wash at the top, like the hero */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 46vh; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 50% at 20% 0%, rgba(124, 58, 237, .14), transparent 70%), radial-gradient(50% 40% at 90% 10%, rgba(236, 72, 153, .10), transparent 70%);
}
.mobnav > a, .mobnav .btn { display: none; } /* legacy flat links, if any page still has them */
.mobnav .mob-langs { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 18px; margin: 0; border: 0; }
.mobnav .mob-langs a { display: inline-flex !important; align-items: center; gap: 7px; padding: 8px 12px !important; border-radius: 999px; border: 1px solid var(--nv-line); background: transparent; color: var(--nv-muted); font: 600 13px/1 var(--nv-font) !important; text-decoration: none; }
.mobnav .mob-langs a[aria-current] { border-color: var(--nv-active); color: var(--nv-fg); font-weight: 700; }
.mobnav .sheet-groups { display: grid; gap: 6px; }
.mobnav .sheet-group { border: 1px solid var(--nv-line); border-radius: 18px; padding: 12px 6px 6px; background: color-mix(in srgb, var(--nv-bg-solid) 70%, transparent); }
.mobnav .sheet-k { display: flex; align-items: center; gap: 7px; padding: 0 12px 8px; font: 600 11px/1 var(--nv-font); letter-spacing: .14em; text-transform: uppercase; color: var(--nv-muted); }
.mobnav .sheet-k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nv-grad); }
.mobnav .sheet-group a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px; border-radius: 12px; font: 500 16.5px/1.25 var(--nv-font); color: var(--nv-fg); text-decoration: none; }
.mobnav .sheet-group a:active { background: var(--nv-hover); }
.mobnav .sheet-group a::after { content: "→"; color: var(--nv-muted); font-size: 15px; opacity: .6; }
.mobnav .sheet-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0; }
.mobnav .sheet-row a { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--nv-line); font: 500 14px/1 var(--nv-font); color: var(--nv-fg); text-decoration: none; }
.mobnav .sheet-row a[aria-current="page"] { border-color: var(--nv-active); color: var(--nv-active); }
.mobnav .sheet-cta { position: sticky; bottom: 0; margin: 18px -20px 0; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; background: linear-gradient(to top, var(--nv-bg-solid) 70%, transparent); }
.mobnav .sheet-cta a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 999px; font: 600 15.5px/1 var(--nv-font); text-decoration: none; }
.mobnav .sheet-cta .sc-login { border: 1px solid var(--nv-line); color: var(--nv-fg); background: transparent; }
.mobnav .sheet-cta .sc-start { background: var(--nv-grad); color: #fff; box-shadow: 0 14px 30px -14px rgba(124, 58, 237, .7); }
.mobnav .sheet-cta .sc-start svg { width: 17px; height: 17px; }
.mobnav .sheet-fine { padding: 10px 2px 18px; font: 400 12.5px/1.5 var(--nv-font); color: var(--nv-muted); text-align: center; }
/* staggered entrance */
.mobnav.open .mob-langs, .mobnav.open .sheet-groups, .mobnav.open .sheet-row, .mobnav.open .sheet-cta { animation: nv-rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.mobnav.open .sheet-groups { animation-delay: .05s; } .mobnav.open .sheet-row { animation-delay: .1s; } .mobnav.open .sheet-cta { animation-delay: .15s; }
@keyframes nv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.nav-open { overflow: hidden; }

/* ── breakpoints ── */
@media (max-width: 900px) {
  .nav { padding: 10px 12px 0; }
  .nav .nav-in { padding: 0 6px 0 14px; --nv-h: 56px; }
  .nav .nav-in .links, .nav .nav-in .nav-login, .nav .nav-in .ghost, .nav .nav-in .lang-sel, .nav .mega { display: none; }
  .nav .nav-in .nav-cta, .nav .nav-in .btn-sm { display: inline-flex; height: 36px; padding: 0 14px 0 12px; font-size: 14px; }
  .nav .nav-in .nav-burger { display: block; }
  .rail { display: none; }
  .nav.hide { transform: none; } /* phones never hide the bar */
}
@media (max-width: 380px) { .nav .nav-in .nav-cta span { display: none; } .nav .nav-in .nav-cta { padding: 0 11px; } }
@media (min-width: 901px) { .mobnav { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .nav .nav-in::before { animation: none; } .mobnav.open * { animation: none !important; } }
