/* ════════════════════════════════════════════════════════════════════
   ALAT Labs Website — Obsidian Black SHARED CHROME
   Theme tokens · reset · nav (plain black) · footer (white paper) ·
   ambient stars · buttons · eyebrow · well containers.
   This file is the single source for cross-page chrome. Pages should
   only override page-specific styles AFTER linking this stylesheet.

   Source of truth: extracted from Website/index.html (Home v3, locked
   register: Obsidian Black + OBSIDIAN TEAL signal accent, 2026-05-17).
   Lock note: signature animation (.swarm-orb) lives in components/
   swarm-orb-novelty.{md,html} — do not inline its CSS here, it's
   intentionally one-per-page.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Ink — canvas surfaces (dark) */
  --ink-0: #07070A;
  --ink-1: #0A0A0A;
  --ink-2: #16161B;
  --ink-3: #1D1D23;

  /* Signal — OBSIDIAN TEAL (Kevin 2026-05-17). Variable names kept
     --violet-* during transition; values are TEAL. Rename to --signal-*
     is a separate, scheduled migration. */
  --violet-signal: #2EB6B9;
  --violet-bright: #4ED1D4;
  --violet-deep:   #1FA8AB;
  --violet-soft:   rgba(46, 182, 185, 0.10);
  --violet-glow:   rgba(46, 182, 185, 0.42);
  --cyan-lock:     #5DDDD9;

  /* Whites — on-ink text scale */
  --white-100: rgba(255, 255, 255, 0.96);
  --white-80:  rgba(255, 255, 255, 0.78);
  --white-60:  rgba(255, 255, 255, 0.58);
  --white-40:  rgba(255, 255, 255, 0.40);
  --white-06:  rgba(255, 255, 255, 0.06);
  --white-04:  rgba(255, 255, 255, 0.04);

  /* Paper — footer + any page that flips to white surface */
  --paper:        #FFFFFF;
  --paper-2:      #FAFAF7;
  --ink-text:     #0A0A0A;
  --ink-text-muted: #6B6B6B;
  --paper-line:   #E5E0D3;

  /* Typography */
  --font-display: 'Inter', 'Inter Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-text:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Geometry */
  --page-max:        1078px;
  --page-max-wide:   1240px;
  --section-gap:     120px;
  --hero-padding-y:  32px;
  --radius-card:       16px;
  --radius-card-lg:    28px;
  --radius-pill-soft:  12px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ───── Reset ───── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html, body {
  font-family: var(--font-text);
  background: var(--ink-1);
  color: var(--white-80);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.002em;
  scroll-behavior: smooth;
  /* clip (NOT hidden) preserves position: sticky on descendants. */
  overflow-x: clip;
}

/* ───── Atmosphere — fixed body washes, behind content
   Scoped to `body:not([data-app])` so app-shell surfaces (dashboards,
   embedded tools) can safely link this stylesheet without spawning the
   aurora wash behind their data. Marketing pages get the atmosphere
   by default; opt out with <body data-app="true"> on app surfaces. ─── */
body:not([data-app])::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 22%, var(--violet-bright) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 82% 78%, var(--violet-deep) 0%, transparent 55%);
  opacity: 0.26;
  filter: blur(60px);
  mix-blend-mode: screen;
}
body:not([data-app])::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 64% 32%, transparent 220px, rgba(255,255,255,0.025) 221px, transparent 222px),
    radial-gradient(circle at 64% 32%, transparent 300px, rgba(255,255,255,0.020) 301px, transparent 302px),
    radial-gradient(circle at 64% 32%, transparent 380px, rgba(255,255,255,0.015) 381px, transparent 382px),
    radial-gradient(circle at 64% 32%, transparent 460px, rgba(255,255,255,0.012) 461px, transparent 462px);
}
main { position: relative; z-index: 1; }

/* ───── Typography primitives ───── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--white-100);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.1;
}
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--white-60);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ''; width: 64px; height: 1px; background: var(--violet-signal); }

/* ───── Wells (content max-width containers) ───── */
.well       { max-width: var(--page-max);      margin: 0 auto; padding: 0 32px; }
.well-wide  { max-width: var(--page-max-wide); margin: 0 auto; padding: 0 32px; }

/* ───── NAV — plain solid black panel ───── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: #000000;
  border-bottom: 1px solid var(--white-06);
  transition: border-color .25s var(--ease);
}
.nav.is-scrolled { border-bottom-color: rgba(255, 255, 255, 0.10); }

.nav-brand {
  display: inline-flex; align-items: center;
  height: 72px;
  filter: brightness(1.15);
}
.nav-brand img {
  height: 72px; width: auto;
  display: block;
  mix-blend-mode: lighten;
  transition: opacity .15s var(--ease);
}
.nav-brand:hover img { opacity: .80; }

.nav-tabs { display: flex; gap: 8px; list-style: none; }
.nav-tabs a {
  position: relative;
  display: inline-block;
  font-size: 14px; font-weight: 500;
  color: var(--white-80);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .15s var(--ease);
  z-index: 1;
}
.nav-tabs a::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(123,97,255,0.30) 0%, transparent 65%),
    rgba(46, 182, 185, 0.06);
  opacity: 0;
  transition: opacity .25s var(--ease);
  z-index: -1;
  filter: blur(0.5px);
}
.nav-tabs a::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 24px -2px rgba(46, 182, 185, 0.42);
  opacity: 0;
  transition: opacity .25s var(--ease);
  z-index: -1;
}
.nav-tabs a:hover { color: var(--white-100); }
.nav-tabs a:hover::before { opacity: 1; }
.nav-tabs a:hover::after  { opacity: 1; }
.nav-tabs a.is-active {
  color: var(--white-100);
  background: rgba(255, 255, 255, 0.06);
}

.nav-utility { display: flex; align-items: center; gap: 10px; }
.theme-switcher-btn, .nav-utility .btn-ghost-nav {
  font-size: 14px; font-weight: 500;
  color: var(--white-80);
  background: transparent;
  border: 1px solid var(--white-06);
  padding: 9px 18px;
  border-radius: var(--radius-pill-soft);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.theme-switcher-btn { padding: 9px 12px; }
.theme-switcher-btn:hover, .nav-utility .btn-ghost-nav:hover {
  color: var(--white-100);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--white-04);
  box-shadow: 0 0 24px -4px var(--violet-glow);
}

/* ───── Nav mobile toggle (hamburger) + drop-down panel ─────
   Pattern: drop-down (slides under the sticky nav bar, full-width).
   Toggle is hidden ≥720px and revealed below. Panel reuses the
   .nav-tabs link list; built by buildNav() in obsidian-shared.js. */
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--white-06);
  border-radius: var(--radius-pill-soft);
  color: var(--white-80);
  font-size: 16px;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.nav-mobile-toggle:hover {
  color: var(--white-100);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--white-04);
}
.nav-mobile-toggle .nav-mobile-toggle__icon-close { display: none; }
.nav.is-mobile-open .nav-mobile-toggle .nav-mobile-toggle__icon-open  { display: none; }
.nav.is-mobile-open .nav-mobile-toggle .nav-mobile-toggle__icon-close { display: inline-block; }

.nav-mobile-panel {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #000000;
  border-bottom: 1px solid var(--white-06);
  padding: 12px 20px 20px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  pointer-events: none;
  z-index: 49;
}
.nav.is-mobile-open .nav-mobile-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile-panel ul {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 2px;
  margin: 0; padding: 0;
}
.nav-mobile-panel a {
  display: block;
  font-size: 15px; font-weight: 500;
  color: var(--white-80);
  padding: 12px 14px;
  border-radius: 10px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-mobile-panel a:hover { color: var(--white-100); background: var(--white-04); }
.nav-mobile-panel a.is-active { color: var(--white-100); background: rgba(255,255,255,0.06); }
.nav-mobile-panel__util {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--white-06);
  display: flex; gap: 10px;
}
.nav-mobile-panel__util .btn-ghost-nav {
  flex: 1;
  text-align: center;
}

@media (max-width: 720px) {
  .nav { padding: 12px 20px; position: sticky; }
  .nav-tabs { display: none; }
  .nav-utility .btn-ghost-nav { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-mobile-panel { display: block; }
  .nav-brand img { height: 52px; }
  .nav-brand { height: 52px; }
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-text);
  font-size: 15px; font-weight: 500;
  border: 0; cursor: pointer;
  border-radius: var(--radius-pill-soft);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-filled {
  background: var(--violet-signal);
  color: #FFFFFF;
  box-shadow: 0 6px 22px -4px var(--violet-glow);
}
.btn-filled::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.18) 49%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.18) 51%, rgba(255,255,255,0.04) 58%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.85s var(--ease);
  pointer-events: none;
}
.btn-filled:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -4px var(--violet-glow);
  background: var(--violet-bright);
}
.btn-filled:hover::after { transform: translateX(100%); }
.btn-ghost { background: transparent; color: var(--white-100); padding: 14px 8px; }
.btn-ghost::after { content: ' →'; opacity: .7; transition: transform .2s var(--ease); display: inline-block; margin-left: 4px; }
.btn-ghost:hover::after { transform: translateX(4px); }

/* ───── Ambient stars (hero decoration — drifting cyan + purple) ───── */
.ambient-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ambient-star {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #5DDDD9;
  box-shadow: 0 0 6px rgba(93, 221, 217, 0.85),
              0 0 14px rgba(78, 209, 212, 0.42);
  animation:
    ambient-twinkle 3.5s ease-in-out infinite,
    ambient-drift-a 18s ease-in-out infinite alternate;
}
.ambient-star--sm { width: 3px; height: 3px; box-shadow: 0 0 4px rgba(93, 221, 217, 0.75); }
.ambient-star--lg { width: 7px; height: 7px; box-shadow: 0 0 10px rgba(93, 221, 217, 0.85), 0 0 24px rgba(78, 209, 212, 0.45); }
.ambient-star--purple {
  background: #B9A8FF;
  box-shadow: 0 0 6px rgba(155, 133, 255, 0.85),
              0 0 14px rgba(123, 97, 255, 0.42);
}
.ambient-star--purple.ambient-star--lg {
  box-shadow: 0 0 10px rgba(155, 133, 255, 0.95),
              0 0 24px rgba(123, 97, 255, 0.55);
}
@keyframes ambient-twinkle {
  0%, 100% { opacity: 0.30; }
  50%      { opacity: 0.95; }
}
@keyframes ambient-drift-a {
  0%   { transform: translate(0, 0)    scale(0.95); }
  50%  { transform: translate(14px, -10px) scale(1.05); }
  100% { transform: translate(-8px, 12px) scale(0.95); }
}
@keyframes ambient-drift-b {
  0%   { transform: translate(0, 0)    scale(0.95); }
  50%  { transform: translate(-12px, 14px) scale(1.05); }
  100% { transform: translate(10px, -8px) scale(0.95); }
}
@keyframes ambient-drift-c {
  0%   { transform: translate(0, 0)    scale(1); }
  50%  { transform: translate(8px, 16px) scale(1.1); }
  100% { transform: translate(-10px, -6px) scale(1); }
}
@keyframes ambient-drift-d {
  0%   { transform: translate(0, 0)    scale(1); }
  50%  { transform: translate(-14px, -8px) scale(1.04); }
  100% { transform: translate(6px, 14px) scale(1); }
}
.ambient-star:nth-child(2n) {
  animation:
    ambient-twinkle 4.2s ease-in-out infinite -0.8s,
    ambient-drift-b 22s ease-in-out infinite alternate;
}
.ambient-star:nth-child(3n) {
  animation:
    ambient-twinkle 5.0s ease-in-out infinite -1.6s,
    ambient-drift-c 26s ease-in-out infinite alternate;
}
.ambient-star:nth-child(4n+1) {
  animation:
    ambient-twinkle 3.0s ease-in-out infinite -2.2s,
    ambient-drift-d 20s ease-in-out infinite alternate;
}

/* ───── FOOTER — white paper ───── */
.footer {
  margin-top: 80px;
  padding: 100px 0 36px;
  background: var(--paper);
  color: var(--ink-text);
  position: relative; z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand img { height: 96px; width: auto; display: block; margin-bottom: 24px; }
.footer-brand p { color: var(--ink-text-muted); font-size: 14px; line-height: 1.7; max-width: 340px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--ink-text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px; color: var(--ink-text);
  font-weight: 500;
  transition: color .15s var(--ease);
}
.footer-col a:hover { color: var(--violet-signal); }

.footer-legal {
  padding-top: 32px;
  border-top: 1px solid var(--paper-line);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px;
  font-size: 12px;
  color: var(--ink-text-muted);
  line-height: 1.7;
}
.footer-legal .corp {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  max-width: 640px;
}
.footer-legal .corp-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-text);
  margin-bottom: 8px;
}
.footer-legal .corp strong { color: var(--ink-text); font-weight: 600; }

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--paper-line);
  color: var(--ink-text);
  transition: all .15s var(--ease);
}
.footer-social a:hover {
  color: var(--violet-signal);
  border-color: var(--violet-signal);
  background: var(--violet-soft);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .footer { padding: 64px 0 28px; margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
  .footer-brand img { height: 72px; margin-bottom: 16px; }
  .footer-legal { gap: 20px; font-size: 11.5px; }
  .footer-legal .corp { word-wrap: break-word; overflow-wrap: anywhere; }
  .footer-legal .corp-label { letter-spacing: 0.18em; }
}

/* ════════════════════════════════════════════════════════════════════
   Hero-spacing trim — legacy Tailwind compatibility
   --------------------------------------------------------------------
   Pages built from the legacy investor-pitch / Tailwind hero pattern
   nest <section class="relative pt-20"> around <div class="max-w-7xl
   pt-16">, stacking ~144px of empty space below the obsidian nav.
   Trim the first <section> after <main> so the hero reads close to
   the nav instead of floating mid-viewport. Applies to ALL pages with
   the pattern; pages with their own .hero class are unaffected.
   ════════════════════════════════════════════════════════════════════ */
main > section.pt-20:first-of-type,
main > section.pt-24:first-of-type,
main > section.pt-16:first-of-type,
body > section.pt-20:first-of-type,
body > section.pt-24:first-of-type,
body > section.pt-16:first-of-type {
  padding-top: 32px !important;
  padding-bottom: 24px;
}
main > section.pt-20:first-of-type > .max-w-7xl.pt-16,
main > section.pt-24:first-of-type > .max-w-7xl.pt-16,
main > section.pt-20:first-of-type > .max-w-7xl.pt-20,
main > section:first-of-type > .max-w-7xl.pt-16,
body > section.pt-20:first-of-type > .max-w-7xl.pt-16,
body > section.pt-24:first-of-type > .max-w-7xl.pt-16,
body > section.pt-20:first-of-type > .max-w-7xl.pt-20 {
  padding-top: 12px !important;
}

/* ════════════════════════════════════════════════════════════════════
   iOS zoom-on-focus prevention — global input font-size guarantee
   --------------------------------------------------------------------
   iOS Safari zooms in on form fields when font-size < 16px on focus.
   Force 16px minimum on every input/select/textarea at <=720px,
   regardless of page-local Tailwind .text-sm / .text-xs classes. The
   visual sizing is preserved via padding + line-height; only the
   computed font-size is enforced. ════════════════════════════════════ */
@media (max-width: 720px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ───── Mobile shared chrome (typography · wells · buttons) ─────
   Cross-page tiers. Page-specific rules live in each page's <style>. */
@media (max-width: 720px) {
  :root { --section-gap: 80px; }
  .well, .well-wide { padding: 0 20px; }
  /* Default h1/h2 sizes for pages that don't clamp themselves.
     Pages with explicit clamp() (index hero, products hero, how-panel)
     win because their selectors are more specific. */
  h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 5.2vw, 1.8rem); }
  h3 { font-size: 1.2rem; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.24em; gap: 10px; }
  .eyebrow::before { width: 36px; }
}
@media (max-width: 480px) {
  .well, .well-wide { padding: 0 16px; }
  .btn { padding: 12px 22px; font-size: 14.5px; }
  .btn-ghost { padding: 12px 6px; }
}

/* ════════════════════════════════════════════════════════════════════
   Dotted Topography Landscape — component #13 (v2, 2026-05-17)
   --------------------------------------------------------------------
   3D perspective landscape: 40-column × 14-row dot grid warped over a
   height function with two layered peaks. Near rows render large +
   bright, far rows tiny + faded → reads as "looking across mountains
   at low angle." Drift animation = slow horizontal translate so the
   wave appears to travel over the hills.

   Element pattern: <div class="topo-landscape" data-topo-landscape
                         data-topo-cols="40" data-topo-rows="14"
                         data-topo-peaks="2.4"></div>
   The data attributes are optional (defaults listed). The JS generator
   in obsidian-shared.js populates the SVG on DOMContentLoaded.

   Modifiers:
     .topo-landscape.is-band   → fixed bottom band (default), 56% height
     .topo-landscape.is-fill   → fills parent (use inside aspect-ratio box)
   ════════════════════════════════════════════════════════════════════ */
.topo-landscape {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.topo-landscape svg {
  width: 100%; height: 100%;
  display: block;
  animation: topo-drift 14s ease-in-out infinite;
  transform-origin: 50% 100%;
  /* Teal shine — every dot gets a soft halo via filter chain.
     Halo intensity reduced 30% (Kevin 2026-05-17) for quieter atmosphere. */
  filter:
    drop-shadow(0 0 2.5px rgba(78, 209, 212, 0.39))
    drop-shadow(0 0 6px  rgba(46, 182, 185, 0.22))
    drop-shadow(0 0 14px rgba(46, 182, 185, 0.10));
}
.topo-landscape circle.topo-dot {
  fill: var(--violet-signal);
  /* Per-dot opacity + radius are set inline by the JS generator from
     the perspective fade function. The .topo-dot class keeps the fill
     tokenised so re-themes propagate. */
}
.topo-landscape circle.topo-dot--alat {
  /* White word-stars that spell "ALAT" above the mountains. Varying
     brightness/size set inline by the generator (deterministic seed). */
  fill: #FFFFFF;
}
@keyframes topo-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-22px); }
}

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-filled::after { display: none; }
  .ambient-star { animation: none; opacity: 0.6; }
}
