/* ============================================================
   TCOMM — base.css
   Tokens, reset, top nav, and the globe hero (Section 1).
   All colour / type / spacing as CSS variables for the WP port.
   ============================================================ */
:root {
  color-scheme: dark;

  /* brand palette (final hex tuned to logo later — keep in vars) */
  --bg: #040506;                       /* near-black base                */
  --surface-1: #040506;                /* dark surface                   */
  --surface-2: #080d0e;                /* dark grey-green surface         */
  --surface-3: #0b1213;                /* slightly raised grey-green      */
  --green: #56e08a;                    /* primary green (brand)           */
  --green-bright: #b6ffce;             /* highlight green                 */
  --green-net: #4ade80;                /* network / accent green          */
  --ink: #ebfff0;                      /* near-white text                 */
  --grey: rgba(210,235,220,0.62);      /* muted body                      */
  --grey-dim: rgba(210,235,220,0.40);  /* dimmer labels                   */
  --grey-faint: rgba(210,235,220,0.16);/* hairlines, borders              */
  --hairline: rgba(120,200,150,0.14);  /* green-tinted hairline           */

  /* light surfaces (v2 — dark/light rhythm) */
  --bg-light: #f4f7f5;                 /* near-white, green-grey hint     */
  --bg-light-2: #e9efe9;               /* soft grey-green panel           */
  --ink-dark: #0c1512;                 /* near-black text on light        */
  --grey-dark: #5a6b62;                /* muted text on light             */
  --hair-dark: rgba(20,60,40,0.12);    /* hairlines on light              */
  --green-deep: #1f8a52;               /* green that reads on light bg    */

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", monospace;

  --container: 1240px;
  --pad-x: clamp(20px, 6vw, 96px);
  --section-y: clamp(96px, 14vh, 200px);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --reveal-dist: 26px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); }
body { overflow-x: clip; }   /* clip, NOT hidden — hidden breaks position:sticky */

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }

/* shared atoms ------------------------------------------------ */
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--pad-x); }

.eyebrow {
  margin: 0; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--green);
  display: inline-flex; align-items: center; gap: 11px;
}
/* live status LED — blinks once it scrolls into view */
.eyebrow::before {
  content: ""; flex: 0 0 auto; order: -1;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 9px var(--green);
  opacity: .5;
}
.eyebrow.lit::before { opacity: 1; }
/* fiber line — draws in left→right, then a light pulse travels along it */
.eyebrow::after {
  content: ""; flex: 0 0 auto; align-self: center;
  width: 56px; height: 1px;
  background-color: rgba(86, 224, 138, 0.42);
  background-image: linear-gradient(90deg, transparent 0%, var(--green-bright) 50%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 22px 100%;
  background-position: -26px 0;
  transform: scaleX(0); transform-origin: left center;
}
.eyebrow.lit::after { transform: scaleX(1); }
.eyebrow.no-rule::after { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .eyebrow::after { transition: transform .75s var(--ease); }
  .eyebrow.lit::before { animation: eyebrow-led 1.7s steps(1, end) infinite; }
  .eyebrow.lit::after { animation: eyebrow-pulse 2.6s linear infinite .5s; }
}
@keyframes eyebrow-led { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes eyebrow-pulse {
  0% { background-position: -26px 0; }
  55%, 100% { background-position: 62px 0; }
}

.coord-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--grey-dim);
}

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 32px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .18s var(--ease), background .22s, border-color .22s, color .22s, box-shadow .22s;
}
.btn:hover { transform: translateY(-2px); }
/* primary CTA — dark glossy pill (Apple-style) */
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #232327 0%, #0b0b0d 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -12px 22px -14px rgba(0,0,0,0.7),
    0 16px 42px -16px rgba(0,0,0,0.85);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2c2c31 0%, #111113 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 22px 52px -16px rgba(0,0,0,0.9),
    0 0 0 1px rgba(86,224,138,0.22);
}
/* glass / ghost CTA — liquid glass, hovers to a solid white fill */
.btn-ghost { color: var(--ink); border: 1px solid rgba(255,255,255,0.20); }
.btn-ghost:hover { background: #fff; color: #06140e; border-color: #fff; box-shadow: 0 12px 36px -14px rgba(255,255,255,0.5); }
/* on light surfaces the ghost reads as a dark-outline glass */
.s7 .btn-ghost, .s5 .btn-ghost { color: var(--ink-dark); border-color: rgba(20,60,40,0.28); }
.s7 .btn-ghost:hover, .s5 .btn-ghost:hover { background: var(--ink-dark); color: #fff; border-color: var(--ink-dark); }

.ghost-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--green); text-decoration: none; transition: gap .2s var(--ease), color .2s;
}
.ghost-link .arr { transition: transform .2s var(--ease); }
.ghost-link:hover { color: var(--green-bright); }
.ghost-link:hover .arr { transform: translateX(4px); }

/* scroll-reveal primitive (JS adds .in) ---------------------- */
.reveal { opacity: 0; transform: translateY(var(--reveal-dist)); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* ---------- liquid glass utility -------------------------- */
.liquid-glass {
  position: relative; overflow: hidden;
  background: rgba(10, 16, 16, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.liquid-glass::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 38%, transparent 72%);
}
.liquid-glass > * { position: relative; z-index: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-glass { background: rgba(8, 12, 12, 0.86); }
}

/* ---------- top nav --------------------------------------- */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: clamp(14px, 2.2vh, 24px) clamp(20px, 4vw, 64px) 0;
  pointer-events: none;
}
.site-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 10px 12px 10px 20px; border-radius: 16px;
  pointer-events: auto;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-nav.scrolled {
  background: rgba(6, 10, 11, 0.62);
  box-shadow: 0 14px 50px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.site-nav > * { pointer-events: auto; }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
.brand .mark { font-size: 20px; color: var(--ink); }
.brand .mark b { color: var(--green); }
.brand .tld { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--grey-dim); text-transform: uppercase; }
.nav-links { display: flex; gap: 28px; font-size: 13px; font-weight: 500; }
.nav-links a { color: var(--grey); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
/* nav CTA — compact glass button, hovers to solid white */
.nav-cta {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition: background .22s, color .22s, border-color .22s;
}
.nav-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 70%);
}
.nav-cta span { position: relative; z-index: 1; }
.nav-cta:hover { background: #fff; color: #06140e; border-color: #fff; }
.lang { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--grey-dim); background: none; border: 0; cursor: pointer; }
.lang b { color: var(--green-bright); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- hero (Section 1) ------------------------------- */
.hero { position: relative; height: 520vh; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.globe-stage {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(130% 120% at 72% 46%, #0c1012 0%, #060809 58%, #030405 100%);
}
.globe-canvas { display: block; width: 100%; height: 100%; }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none;
  background:
    linear-gradient(101deg,
      rgba(3,5,6,0.95) 0%, rgba(3,5,6,0.78) 26%, rgba(4,7,8,0.30) 52%, rgba(4,7,8,0.0) 72%),
    linear-gradient(to top, rgba(3,5,6,0.65) 0%, rgba(3,5,6,0) 38%);
}

.hero-content {
  position: absolute; z-index: 2;
  left: var(--pad-x); top: 50%; transform: translateY(-50%);
  max-width: 600px; width: min(90vw, 600px);
  opacity: 0; pointer-events: none;
}
.hero-content .eyebrow { margin-bottom: 18px; }
.hero-content h1 {
  font-size: clamp(34px, 5.6vw, 76px); line-height: 1.02; color: var(--ink);
}
.hero-content h1 .accent { color: var(--green); }
.hero-content .subhead { margin: 26px 0 0; max-width: 460px; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6; color: var(--grey); }
.hero-content .cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; pointer-events: auto; }

.globe-caption {
  position: absolute; left: var(--pad-x); bottom: clamp(20px, 5vh, 46px); z-index: 3;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--grey); text-indent: 0.4em; pointer-events: none;
}
.globe-caption .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.globe-caption .pct { color: rgba(150,240,180,0.95); font-variant-numeric: tabular-nums; }

.scroll-cue {
  position: absolute; left: 50%; bottom: clamp(20px, 5vh, 46px); transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.5em; text-indent: 0.5em; text-transform: uppercase;
  color: var(--grey); pointer-events: none; transition: opacity .3s ease;
}
.scroll-cue .rail { width: 1px; height: 40px; background: linear-gradient(rgba(86,224,138,0), rgba(86,224,138,0.9)); position: relative; overflow: hidden; }
.scroll-cue .rail::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--green-bright); animation: drop 1.8s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes drop { 0% { top: -45%; } 60%,100% { top: 105%; } }

#warp { position: fixed; inset: 0; z-index: 30; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 58% 50%, #d6ffe6 0%, #56e08a 45%, #0a3a22 100%); }

@media (prefers-reduced-motion: reduce) {
  .globe-caption .dot, .scroll-cue .rail::after { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   Primary nav — submenu dropdown (hover) + drawer sub-links
   ============================================================ */
.nav-links .nav-item.has-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-links .nav-parent { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-links .nav-parent .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .5; transition: transform .25s ease, opacity .2s;
}
.nav-item.has-dropdown:hover .caret { transform: rotate(180deg); opacity: .9; }
.nav-item.has-dropdown::after { content: ""; position: absolute; top: 100%; left: -12px; right: -12px; height: 18px; }
.nav-dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 214px; display: flex; flex-direction: column; gap: 2px;
  padding: 8px; border-radius: 16px;
  background: rgba(15, 25, 20, 0.86);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 200;
}
.nav-item.has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.site-nav .nav-dropdown a {
  display: block; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 500; line-height: 1.3;
  color: rgba(255, 255, 255, 0.84); white-space: nowrap;
  text-decoration: none; transition: background .15s, color .15s;
}
.site-nav .nav-dropdown a:hover { background: rgba(108, 196, 138, 0.16); color: #fff; }
.drawer-links .drawer-sub { padding-left: 24px; opacity: .82; font-size: .95em; }

/* let the dropdown escape the liquid-glass overflow:hidden clip while hovering */
.site-nav.liquid-glass:has(.nav-item.has-dropdown:hover) { overflow: visible; }
