/* ==========================================================================
   LIONS LANE — design system v2 "Nocturne"
   Mark: unchanged Data Lion. Wordmark: Michroma.
   Type: Sora (display, light weights) · Atkinson Hyperlegible Next (reading) ·
         Atkinson Hyperlegible Mono (data) · Michroma (wordmark + labels only)
   Colour: Abyss canvas, Lane Blue kept for action, Glacier for highlights,
           soft paper text instead of pure white. Glow is light, not paint.
   Motion grammar: everything travels in the lane — enter left, exit right.
   Built mobile-first: base rules are for phones, min-width queries scale up.
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License), latin + latin-ext subsets, no third-party requests */
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/AtkinsonHyperlegibleMonoExt.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/AtkinsonHyperlegibleMono.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/AtkinsonHyperlegibleNextExt.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/AtkinsonHyperlegibleNext.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/MichromaExt.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/Michroma.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(../fonts/SoraExt.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(../fonts/Sora.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* colour */
  --midnight: #000000;      /* page canvas */
  --night: #0A1428;         /* surfaces */
  --navy: #0F1E3D;          /* elevated */
  --navy-2: #142850;
  --lane: #0B7BFF;          /* Lane Blue — kept, used for action */
  --lane-600: #0B6CF0;
  --lane-soft: #5AA2FF;     /* blue for type on dark */
  --glacier: #B8D6FF;       /* highlight */
  --cyan: #8EC1FF;          /* soft signal (labels, borders, glows) */
  --slate: #7A8BA6;
  --slate-2: #A9B7CC;       /* secondary text */
  --text: #C9D3E2;          /* reading text */
  --white: #EEF2F8;         /* paper — headings */
  --mist: #EEF3FA;
  --line: rgba(184, 214, 255, 0.09);
  --line-strong: rgba(184, 214, 255, 0.2);
  --lane-grad: linear-gradient(90deg, #4C9BFF 0%, #7DB6FF 100%);
  --cta-grad: linear-gradient(100deg, #0B7BFF 0%, #4A9BFF 100%);
  --glow: 0 0 0 1px rgba(90,162,255,.35), 0 10px 40px -10px rgba(11,123,255,.55);

  /* type */
  --font: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  --font-display: "Sora", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  --font-mark: "Michroma", "Sora", "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, monospace;

  /* space */
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --measure: 40rem;
  --section: clamp(112px, 16vw, 240px);
  --header-h: 72px;
  --tap: 48px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-lane: cubic-bezier(0.83, 0, 0.17, 1);
  color-scheme: dark;
}
/* Light mode remaps the same tokens. Dark mode stays the :root values above. */
html[data-theme="light"] {
  color-scheme: light;
  --midnight: #F6F3EC;
  --night: #FFFcf7;
  --navy: #E7EEF6;
  --navy-2: #D5E0EE;
  --lane: #0B7BFF;
  --lane-600: #085FCC;
  --lane-soft: #0A4F9C;
  --glacier: #0A4E9E;
  --cyan: #0B5FBF;
  --slate: #4A5870;
  --slate-2: #2E3C52;
  --text: #243044;
  --white: #101826;
  --mist: #F6F3EC;
  --line: rgba(16, 24, 38, 0.10);
  --line-strong: rgba(16, 24, 38, 0.18);
  --lane-grad: linear-gradient(90deg, #0B6FE6 0%, #4C9BFF 100%);
  --cta-grad: linear-gradient(100deg, #0B6FE6 0%, #3D8EF0 100%);
  --glow: 0 0 0 1px rgba(11,111,230,.22), 0 12px 32px -14px rgba(11,111,230,.35);
}
@media (min-width: 1024px) { :root { --header-h: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
main, .site-footer { overflow-x: clip; }
html { background: var(--midnight); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1024px) { body { font-size: 18px; } }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
::selection { background: var(--lane); color: #fff; }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.03em; color: var(--white); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.lane-word { color: var(--lane-soft); font-weight: 500; }
.lane-word > *, .lane-word .split-line { color: inherit; }
.muted { color: var(--slate-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; margin-inline: auto; }
@media (max-width: 719px) { .hide-sm { display: none; } }

/* ---------- Type scale (light, airy, readable) ---------- */
.display { font-family: var(--font-display); font-size: clamp(2.7rem, 8.4vw, 7rem); font-weight: 300; letter-spacing: -0.045em; line-height: 1; }
.h-xl { font-family: var(--font-display); font-size: clamp(2.3rem, 6vw, 5.2rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1.04; }
.h-lg { font-family: var(--font-display); font-size: clamp(1.9rem, 4.4vw, 3.5rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.08; }
.h-md { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 400; letter-spacing: -0.025em; line-height: 1.18; }
.display b, .h-xl b, .h-lg b, .h-md b { font-weight: 500; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--text); line-height: 1.65; max-width: 36rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mark); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase; color: var(--lane-soft);
}
.chapter-no { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--slate); font-variant-numeric: tabular-nums; }
.split-line { overflow: hidden; display: block; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- Buttons (≥48px tap targets) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--tap); padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  font: 500 0.95rem/1 var(--font-display); letter-spacing: 0.01em; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: border-color .4s var(--ease-out), box-shadow .5s var(--ease-out), color .3s ease, transform .5s var(--ease-out);
}
.btn-lane { background: var(--lane); color: #fff; box-shadow: var(--glow); }
.btn-lane:hover { background: #1E86FF; }
.roll { display: inline-flex; overflow: hidden; line-height: 1.15; height: 1.15em; }
.roll .ch { display: inline-block; white-space: pre; transition: transform .55s var(--ease-out); text-shadow: 0 1.15em 0 currentColor; }
.btn:hover .roll .ch, a:hover > .roll .ch { transform: translateY(-1.15em); }
.btn-lane:hover { box-shadow: 0 0 0 1px rgba(142,193,255,.6), 0 16px 50px -12px rgba(11,123,255,.75); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: rgba(142,193,255,.6); }
.btn .arr { display: inline-block; transition: transform .6s var(--ease-out); }
.btn:hover .arr { transform: translateX(5px); }
.btn-sm { padding: 12px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.light .btn-ghost { color: var(--navy); border-color: rgba(15,30,61,.2); background: rgba(255,255,255,.6); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 80; height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; pointer-events: none;
  transition: transform .7s var(--ease-out), background-color .5s ease;
}
.site-header.scrolled { background: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,0)); }
.site-header.hidden { transform: translateY(-110%); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-header a, .site-header button { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); }
.brand img { width: 50px; height: auto; filter: drop-shadow(0 0 12px rgba(90,162,255,.35)); transition: transform .7s var(--ease-out); }
.brand:hover img { transform: translateX(3px); }
.wm { font-family: var(--font-mark); font-weight: 400; font-size: 1rem; letter-spacing: 0.14em; line-height: 1; color: var(--white); white-space: nowrap; }
.wm .l { color: var(--lane-soft); }
.wm small { display: none; font-family: var(--font-mark); font-size: 0.42rem; letter-spacing: 0.38em; color: var(--slate); margin-top: 7px; }
@media (min-width: 720px) { .wm { font-size: 1.18rem; } .wm small { display: block; font-size: 0.5rem; margin-top: 8px; } .brand img { width: 64px; } }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center;
  background: rgba(15,30,61,.5); border: 1px solid var(--line-strong); color: var(--white); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .3s ease;
}
.icon-btn:hover { border-color: rgba(142,193,255,.6); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.menu-btn { gap: 12px; display: inline-flex; align-items: center; justify-content: center; font: 400 0.6rem var(--font-mark); letter-spacing: 0.26em; }
.menu-btn .lbl { display: none; }
@media (min-width: 720px) { .menu-btn { width: auto; padding: 0 20px 0 18px; border-radius: 999px; } .menu-btn .lbl { display: inline; } }
.menu-btn .bars { width: 18px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .6s var(--ease-out), top .6s var(--ease-out), right .6s var(--ease-out); }
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { top: 8px; right: 6px; }
body.menu-open .menu-btn .bars::before { top: 4px; transform: rotate(45deg); }
body.menu-open .menu-btn .bars::after { top: 4px; right: 0; transform: rotate(-45deg); }
.sound-btn .wave { display: flex; gap: 2px; align-items: center; height: 14px; }
.sound-btn .wave i { width: 2px; height: 4px; background: currentColor; border-radius: 2px; }
body.sound-on .sound-btn .wave i { animation: eq 1s ease-in-out infinite; }
body.sound-on .sound-btn .wave i:nth-child(2) { animation-delay: .15s; }
body.sound-on .sound-btn .wave i:nth-child(3) { animation-delay: .3s; }
body.sound-on .sound-btn .wave i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }
.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-flex; } }

/* ---------- Desktop horizontal nav ---------- */
.site-nav { display: none; }

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 14px;
  }

  .site-nav > a,
  .site-nav .more-trigger {
    position: relative;
    color: var(--slate-2);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 6px 0;
    cursor: pointer;
    transition: color .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
  }

  .site-nav > a:hover,
  .site-nav .more-trigger:hover { color: var(--white); }

  .site-nav > a[aria-current="page"]::after,
  .site-nav .more-trigger[aria-expanded="true"]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--lane);
    border-radius: 2px;
  }

  .site-nav .chev {
    width: 8px; height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
    display: inline-block;
  }
  .site-nav .more-trigger[aria-expanded="true"] .chev {
    transform: rotate(-135deg) translateY(-2px);
  }
}

/* ---------- More dropdown ---------- */
.nav-more { position: relative; }

.more-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 280px;
  background: rgba(10, 15, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px;
  z-index: 90;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.more-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.more-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--white);
  transition: background .15s ease;
}
.more-panel a:hover { background: rgba(255,255,255,0.06); }

.more-panel strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white);
}

.more-panel span {
  display: block;
  font-size: 12.5px;
  color: var(--slate-2);
  margin-top: 2px;
}

@media (min-width: 1024px) {
  .menu-btn { display: none; }
}

.header-cta { display: none; }
@media (min-width: 900px) {
  .header-cta { display: inline-flex; align-items: center; gap: 6px; }
}
.header-cta .arw {
  font-size: 0.9em;
  opacity: 0.7;
  transition: transform .2s ease, opacity .2s ease;
}
.header-cta:hover .arw {
  transform: translate(2px, -2px);
  opacity: 1;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ---------- Scroll lane (progress) ---------- */
.scroll-lane { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; }
.scroll-lane i { display: block; height: 100%; background: var(--lane-grad); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px rgba(142,193,255,.6); }

/* ---------- WhatsApp, fixed at the right edge ---------- */
.dock {
  position: fixed; z-index: 85; right: max(16px, var(--gutter)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center;
  background: rgba(37,211,102,.12); border: 1px solid rgba(37,211,102,.35); color: #7FE3A6;
}
.dock svg { width: 20px; height: 20px; }
.dock[hidden] { display: none; }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 70; background: var(--midnight);
  display: grid; grid-template-columns: minmax(0, 1fr); visibility: hidden; clip-path: inset(0 100% 0 0);
  overflow-y: auto; overscroll-behavior: contain;
}
.menu-links { padding: calc(var(--header-h) + 3vh) var(--gutter) calc(120px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.menu-links a { display: flex; align-items: baseline; gap: 16px; font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 8.4vw, 5rem); letter-spacing: -0.045em; line-height: 1.1; padding: 6px 0; color: var(--white); min-height: var(--tap); }
.menu-links a .n { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; color: var(--slate); width: 2.4em; flex: none; }
.menu-links a .t { display: inline-block; transition: transform .7s var(--ease-out), color .3s ease; }
.menu-links a .p { display: none; font-family: var(--font-mark); font-size: 0.56rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--lane-soft); opacity: 0; transform: translateX(-12px); transition: opacity .4s ease, transform .7s var(--ease-out); }
.menu-links a:hover .t, .menu-links a[aria-current="page"] .t { transform: translateX(14px); }
.menu-links a[aria-current="page"] .t { color: var(--lane-soft); }
.menu-links a:hover .p { opacity: 1; transform: none; }
.menu-side { display: none; }
@media (min-width: 900px) {
  .menu { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .menu-links a .p { display: inline; }
  .menu-side { border-left: 1px solid var(--line); padding: calc(var(--header-h) + 4vh) var(--gutter) 6vh; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
  .menu-side .lion-ghost { position: absolute; right: -12%; bottom: -6%; width: 120%; height: auto; opacity: .14; pointer-events: none; }
  .menu-side h4 { font-family: var(--font-mark); font-size: 0.58rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
  .menu-side p { color: var(--slate-2); max-width: 32ch; }
}

/* ---------- Page transition (lane wipe) ---------- */
.lane-wipe { position: fixed; inset: 0; z-index: 200; pointer-events: none; display: grid; grid-template-rows: repeat(5, 1fr); }
.lane-wipe i { display: block; background: var(--night); transform: scaleX(0); transform-origin: left; position: relative; }
.lane-wipe i:nth-child(even) { background: #08112A; }
.lane-wipe i::after { content: ""; position: absolute; right: 0; top: 50%; height: 1px; width: 60%; background: linear-gradient(90deg, rgba(90,162,255,0), rgba(142,193,255,.7)); }
.lane-wipe .label { position: fixed; inset: 0; display: grid; place-items: center; z-index: 201; opacity: 0; }
.lane-wipe .label div { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lane-wipe .label img { width: 84px; filter: drop-shadow(0 0 24px rgba(90,162,255,.5)); }
.lane-wipe .label span { font-family: var(--font-mark); font-size: 0.62rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--glacier); }

/* ---------- Preloader ---------- */

/* ---------- Cursor (fine pointers only) ---------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 400; pointer-events: none; will-change: transform; display: none; }
html.has-cursor .cursor, html.has-cursor .cursor-ring { display: grid; }
.cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--glacier); box-shadow: 0 0 12px var(--lane-soft); }
.cursor-ring { width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 1px solid rgba(142,193,255,.4); place-items: center; transition: width .5s var(--ease-out), height .5s var(--ease-out), margin .5s var(--ease-out), background-color .5s ease, border-color .5s ease; }
.cursor-ring span { font-family: var(--font-mark); font-size: 0.5rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0; transition: opacity .3s ease; color: #fff; }
body.cursor-hover .cursor-ring { width: 70px; height: 70px; margin: -35px 0 0 -35px; border-color: rgba(142,193,255,.8); background: rgba(11,123,255,.1); }
body.cursor-label .cursor-ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: rgba(11,123,255,.85); border-color: transparent; backdrop-filter: blur(4px); }
body.cursor-label .cursor-ring span { opacity: 1; }
body.cursor-label .cursor { opacity: 0; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

/* ---------- Grain ---------- */
.grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: grain 1.4s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); } 50% { transform: translate(2%,-3%); } 75% { transform: translate(-2%,-1%); } 100% { transform: translate(0,0); } }

/* ---------- Sections ---------- */
section { position: relative; }
.pad { padding-block: var(--section); }
.light { background: var(--mist); color: #23314F; }
.light h1, .light h2, .light h3 { color: var(--navy); }
.light .lede, .light .muted { color: #4A5D7C; }
.light .eyebrow { color: #0857C2; }
.light .chapter-no { color: #4A5D7C; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack-sm > * + * { margin-top: 18px; }
.stack-md > * + * { margin-top: 28px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line); padding-block: 22px; }
.marquee .track { display: inline-flex; gap: 40px; will-change: transform; }
.marquee span { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 3.4rem); font-weight: 200; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 40px; color: var(--white); }
.marquee span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lane-soft); box-shadow: 0 0 14px var(--lane-soft); }
.marquee .ghost { color: var(--slate); }

/* ---------- Spotlight cards ---------- */
/* Editorial module: a hairline rule that draws in Lane Blue on hover. No boxes, no glass. */
.spot { position: relative; border-top: 1px solid var(--line-strong); padding-top: 26px; }
.spot::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--lane-soft); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease-out); }
.spot:hover::before, .spot:focus-within::before { transform: scaleX(1); }
/* Framed panel for working tools (forms, diagnostic): solid, hairline, square */
.box { background: var(--night); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 3.4vw, 44px); }
.box.spot { border-top-color: var(--line-strong); }
.box.spot::before { top: -1px; }
/* Technical metadata, editorial-tech style */
.meta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--slate); text-transform: uppercase; }
.rule { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--slate); text-transform: uppercase; }
.rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Topographic contour texture (procedural, drawn on canvas) */
canvas.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); background: var(--midnight); padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-block: 56px 32px; }
.footer-brand .brand { display: flex; align-items: center; margin-bottom: 24px; }
.footer-brand p { max-width: 280px; margin: 0; color: var(--slate); font-size: 14px; line-height: 1.6; }
.footer-col h4 { margin: 0 0 20px; font-family: var(--font-mark); font-size: 12px; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; color: var(--white); }
.footer-subhead { margin-top: 32px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--slate-2); font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: var(--white); }
.footer-contact-list li { color: var(--slate-2); font-size: 14px; }
.footer-countries { margin: 0; font-size: 12px; color: var(--slate-2); line-height: 1.6; }
.footer-legal { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 14px; border-top: 1px solid var(--line-strong); padding-block: 24px; margin-top: 40px; font-size: 12px; color: var(--slate-2); text-align: center; }
.footer-socials { display: flex; gap: 16px; align-items: center; }
.footer-socials a { color: var(--slate-2); text-decoration: none; }
.footer-socials a:hover { color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; padding-right: calc(var(--tap) + 12px); }
.footer-links a { color: var(--slate-2); text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-wordmark { overflow: hidden; margin-top: 40px; padding-bottom: calc(var(--tap) + 48px); }
.giant-text { margin: 0; font-family: var(--font-display); font-size: clamp(2.4rem, 14.2vw, 18rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.85; color: rgba(255,255,255,0.04); white-space: nowrap; }
.giant-text .lane-word { color: var(--lane); opacity: 0.15; }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; padding-block: 80px 40px; }
  .footer-brand { grid-column: auto; }
  .footer-legal { grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; }
  .footer-socials { justify-self: center; }
  .footer-links { justify-self: end; }
}

/* ---------- Forms (16px+ inputs: no iOS zoom) ---------- */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-family: var(--font-mark); font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--slate-2); }
.field input, .field select, .field textarea {
  font: 400 1.08rem var(--font); color: var(--white); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 12px 0; min-height: var(--tap); border-radius: 0; width: 100%; transition: border-color .3s ease;
}
.field select option { background: var(--navy); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--glacier); }
.field .err { font-size: 0.88rem; color: #FF9C9C; display: none; }
.field.invalid .err { display: block; }
.field.invalid input { border-bottom-color: #FF9C9C; }

[data-reveal] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Breadcrumbs (inner pages) ---------- */
.crumbs { position: absolute; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 4px); left: 0; right: 0; z-index: 3; pointer-events: none; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-2); }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: "/"; color: var(--slate); }
.crumbs a { pointer-events: auto; color: var(--slate-2); min-height: 32px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.crumbs a:hover { color: var(--white); }
.crumbs [aria-current] { color: var(--white); }

/* Skip link: first thing a keyboard user reaches */
.skip-link { position: fixed; left: var(--gutter); top: 10px; z-index: 400; padding: 12px 18px; border-radius: 999px; background: var(--white); color: var(--midnight); font-weight: 700; transform: translateY(-160%); transition: transform .25s var(--ease-out); }
.skip-link:focus { transform: translateY(0); }

/* ---------- Light theme surfaces that are not token-driven ---------- */
html[data-theme="light"] .icon-btn { background: rgba(255, 252, 247, .86); }
html[data-theme="light"] .site-header.scrolled { background: linear-gradient(to bottom, rgba(246,243,236,.94), rgba(246,243,236,0)); }
html[data-theme="light"] .more-panel { background: rgba(255, 252, 247, .96); box-shadow: 0 20px 50px rgba(16, 24, 38, .12); }
html[data-theme="light"] .more-panel a:hover { background: rgba(16, 24, 38, .05); }
html[data-theme="light"] .giant-text { color: rgba(16, 24, 38, .07); }
html[data-theme="light"] .giant-text .lane-word { color: #0B5FBF; opacity: .28; }
html[data-theme="light"] .form-card { background: rgba(255, 252, 247, .92); }
html[data-theme="light"] .gchip { color: var(--white); }
html[data-theme="light"] .gchip[aria-pressed="true"] { color: #fff; }
html[data-theme="light"] .form-error { color: #8E2430; background: rgba(142, 36, 48, .06); }
html[data-theme="light"] .form-error a { color: #101826; }
html[data-theme="light"] .voice-card { background: radial-gradient(80% 60% at 100% 0%, rgba(11,123,255,.12), transparent 56%), linear-gradient(165deg, #fff 0%, #F7F4EE 100%); }
html[data-theme="light"] .cap-icon { box-shadow: 0 0 0 6px var(--midnight), 0 0 16px 2px rgba(11,123,255,.35); }
html[data-theme="light"] .ans { background: #fff; }
html[data-theme="light"] .reader article p { color: var(--text); }
html[data-theme="light"] .reader article p.pull,
html[data-theme="light"] .ins { color: var(--white); }
html[data-theme="light"] .qnav button:hover { color: var(--white); }
html[data-theme="light"] .result { color: var(--text); }
/* The jungle walk stays a dark film in both themes. */
html[data-theme="light"] .jungle {
  background: #000;
  color: #C9D3E2;
  color-scheme: dark;
  --midnight: #000;
  --white: #EEF2F8;
  --text: #C9D3E2;
  --slate: #7A8BA6;
  --slate-2: #A9B7CC;
  --lane-soft: #5AA2FF;
  --line-strong: rgba(184, 214, 255, 0.2);
  --lane-grad: linear-gradient(90deg, #4C9BFF 0%, #7DB6FF 100%);
}
/* Analytics consent (only shown when LL.config.ga4 is set) */
.consent { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); z-index: 150; display: grid; gap: 14px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--midnight); color: var(--slate-2); font-size: .95rem; line-height: 1.5; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.consent a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.consent div { display: flex; gap: 10px; justify-content: flex-end; }
@media (min-width: 900px) { .consent { left: auto; right: var(--gutter); bottom: 110px; width: min(440px, 40vw); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--slate-2); font: inherit; cursor: pointer; min-height: 40px; }
.link-btn:hover { color: var(--white); }

/* <picture> fallback for the particle lion: the picture is the positioned box */
.lion-fallback { display: block; }
.lion-fallback img { display: block; width: 100%; height: auto; }
