/* ============================================================
   MAGELLAN LABS — Landing
   Motif: celestial navigation. Star = waypoint, ring = trajectory.
   Two directions switch on  html[data-theme="celestial"|"wayfinding"]
   ============================================================ */

/* ----------  TOKENS  ---------- */
:root {
  --accent: #0066D9;
  --accent-bright: #2E86FF;
  --accent-soft: rgba(0, 102, 217, 0.14);
  --navy-900: #0A1628;
  --navy-800: #001B3B;
  --gray: #70767C;
  --gray-light: #B8B9BB;
  --white: #FFFFFF;

  --maxw: 1240px;
  --gutter: clamp(22px, 5vw, 80px);
  --section-pad: clamp(92px, 13vh, 180px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --motion-scale: 1; /* tweakable: 0 = calm, 1 = standard, 1.6 = lively */

  --font: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* weight ladder per brand spec */
  --w-h1: 800;
  --w-h2: 700;
  --w-h3: 600;
  --w-body: 500;
  --w-label: 600;
  --w-fine: 400;
}

/* ----------  CELESTIAL (dark, default)  ---------- */
html[data-theme="celestial"] {
  --bg: #0A1628;
  --bg-elevated: #0d1d35;
  --bg-deep: #060f1d;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-border: rgba(255, 255, 255, 0.09);
  --panel-border-strong: rgba(255, 255, 255, 0.16);
  --text: #FFFFFF;
  --text-dim: #B8B9BB;
  --text-muted: #70767C;
  --line: rgba(255, 255, 255, 0.10);
  --line-faint: rgba(255, 255, 255, 0.055);
  --star: var(--accent-bright);
  --star-glow: rgba(46, 134, 255, 0.55);
  --grid: rgba(120, 160, 220, 0.06);
  --chart-line: rgba(120, 170, 255, 0.30);
  --btn-text: #FFFFFF;
  --halo: radial-gradient(closest-side, rgba(0,102,217,0.22), transparent);
  --starfield: 1;
}

/* ----------  WAYFINDING (light)  ---------- */
html[data-theme="wayfinding"] {
  --bg: #FBFCFE;
  --bg-elevated: #FFFFFF;
  --bg-deep: #F1F5FB;
  --panel: rgba(0, 27, 59, 0.012);
  --panel-border: rgba(0, 27, 59, 0.10);
  --panel-border-strong: rgba(0, 27, 59, 0.18);
  --text: #0A1628;
  --text-dim: #4a5560;
  --text-muted: #70767C;
  --line: rgba(0, 27, 59, 0.12);
  --line-faint: rgba(0, 27, 59, 0.06);
  --star: var(--accent);
  --star-glow: rgba(0, 102, 217, 0.30);
  --grid: rgba(0, 27, 59, 0.045);
  --chart-line: rgba(0, 102, 217, 0.40);
  --btn-text: #FFFFFF;
  --halo: radial-gradient(closest-side, rgba(0,102,217,0.12), transparent);
  --starfield: 0;
}

/* ----------  RESET  ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--w-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ----------  TYPE  ---------- */
.eyebrow {
  font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  font-weight: var(--w-label);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { width: 16px; }

h1, .h1 { font-weight: var(--w-h1); font-size: clamp(2.3rem, 4.7vw, 4.3rem); }
h2, .h2 { font-weight: var(--w-h2); font-size: clamp(1.95rem, 4.2vw, 3.4rem); }
h3, .h3 { font-weight: var(--w-h3); font-size: clamp(1.2rem, 1.9vw, 1.6rem); letter-spacing: -0.01em; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--text-dim); font-weight: var(--w-body); line-height: 1.55; }
.body { color: var(--text-dim); }
.fine { font-weight: var(--w-fine); font-size: 0.9rem; color: var(--text-muted); }

.accent { color: var(--accent-bright); }
html[data-theme="wayfinding"] .accent { color: var(--accent); }

/* ----------  BUTTONS  ---------- */
.btn {
  --bg-btn: var(--accent);
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: var(--w-label);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.6em;
  border-radius: 100px;
  position: relative;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease), background 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px -10px rgba(0,102,217,0.7), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(0,102,217,0.85); }
.btn-ghost {
  background: var(--panel);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--panel-border-strong);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent-bright); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-text {
  font-weight: var(--w-label); color: var(--text);
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.98rem;
}
.btn-text .underline { position: relative; }
.btn-text .underline::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: var(--accent-bright); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease-out);
}
.btn-text:hover .underline::after { transform: scaleX(1); }
html[data-theme="wayfinding"] .btn-text .underline::after { background: var(--accent); }

/* ----------  STAR / WAYPOINT primitives  ---------- */
.star {
  display: inline-block;
  color: var(--star);
  filter: drop-shadow(0 0 10px var(--star-glow));
}
.star svg { width: 100%; height: 100%; fill: currentColor; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line-faint);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .mark { width: 28px; height: 28px; }
.brand .mark svg { width: 100%; height: 100%; fill: var(--star); filter: drop-shadow(0 0 8px var(--star-glow)); }
.brand .name {
  font-weight: var(--w-h1); font-size: 1.28rem; letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline; gap: 0.32em; line-height: 1;
}
.brand .name small { font-weight: var(--w-label); font-size: inherit; letter-spacing: -0.01em; color: var(--text-muted); text-transform: none; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav-links a {
  font-weight: var(--w-label); font-size: 0.92rem; color: var(--text-dim);
  transition: color 0.25s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* direction toggle */
.dir-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 100px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-border);
}
.dir-toggle button {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: var(--w-label); font-size: 0.74rem; letter-spacing: 0.04em;
  padding: 7px 13px; border-radius: 100px; color: var(--text-muted);
  transition: color 0.3s, background 0.3s;
}
.dir-toggle button .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.dir-toggle button.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--panel-border-strong); }
.dir-toggle button.active .dot { background: var(--accent-bright); opacity: 1; box-shadow: 0 0 8px var(--star-glow); }
.nav .menu-btn { display: none; }

@media (max-width: 940px) {
  .nav-links { display: none; }
  .dir-toggle button span.lbl { display: none; }
}

/* ============================================================
   GLOBAL CHART BACKDROP  (fixed, behind everything)
   ============================================================ */
#starfield {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: calc(var(--starfield) * 1);
  transition: opacity 0.6s var(--ease);
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
  opacity: 0.7;
}

/* right-rail scroll guide-star */
.rail {
  position: fixed; top: 0; right: clamp(14px, 3vw, 46px); bottom: 0; z-index: 40;
  width: 2px; pointer-events: none;
  display: flex; justify-content: center;
}
.rail .track { position: absolute; top: 14vh; bottom: 14vh; width: 1px; background: var(--line); }
.rail .trail {
  position: absolute; top: 14vh; width: 2px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(var(--accent-bright), transparent);
  height: 0; border-radius: 2px;
  box-shadow: 0 0 12px var(--star-glow);
}
.rail .guide {
  position: absolute; left: 50%; top: 14vh;
  width: 16px; height: 16px; transform: translate(-50%, -50%);
  color: var(--star);
}
.rail .guide svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 0 8px var(--star-glow)); }
.rail .pct {
  position: absolute; left: -8px; top: 14vh; transform: translate(-100%, -50%);
  font-size: 0.62rem; font-weight: var(--w-label); letter-spacing: 0.1em;
  color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
@media (max-width: 720px) { .rail { display: none; } }

main { position: relative; z-index: 2; }
section { position: relative; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 80px; overflow: hidden; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.28fr 0.72fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.hero-copy { position: relative; z-index: 3; }
.hero h1 { margin-top: 24px; line-height: 1.06; }
.hero h1 .line { display: block; }
.hero h1 .muted2 { color: var(--text-dim); font-weight: var(--w-h2); }
.hero .lead { margin-top: 28px; max-width: 30ch; }
.hero-cta { display: flex; align-items: center; gap: 22px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta { margin-top: 54px; display: flex; gap: clamp(22px, 4vw, 54px); }
.hero-meta .stat .n { font-weight: var(--w-h2); font-size: clamp(1.4rem, 2.4vw, 2.1rem); display: flex; align-items: baseline; gap: 3px; }
.hero-meta .stat .l { font-size: 0.78rem; color: var(--text-muted); font-weight: var(--w-label); letter-spacing: 0.08em; margin-top: 4px; }
.hero-meta .stat + .stat { padding-left: clamp(22px, 4vw, 54px); border-left: 1px solid var(--line); }

/* hero orbital system */
.orrery { position: relative; aspect-ratio: 1; width: 100%; display: grid; place-items: center; }
.orrery .halo { position: absolute; inset: -12%; background: var(--halo); filter: blur(8px); }
.orrery .logo-mark { width: 46%; position: relative; z-index: 4; filter: drop-shadow(0 16px 50px rgba(0,102,217,0.35)); }
.orrery .logo-mark img { width: 100%; }
html[data-theme="wayfinding"] .orrery .logo-mark { filter: drop-shadow(0 16px 40px rgba(0,27,59,0.18)); }
html[data-theme="wayfinding"] .orrery .logo-mark img { filter: none; }
/* white version: swap the plain mark for the full M-logo header lockup */
.orrery .logo-mark .mark-header { display: none; }
html[data-theme="wayfinding"] .orrery .logo-mark { width: 62%; }
html[data-theme="wayfinding"] .orrery .logo-mark .mark-default { display: none; }
html[data-theme="wayfinding"] .orrery .logo-mark .mark-header { display: block; }

.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-svg ellipse, .ring-svg circle { fill: none; }
.orbit-rot { transform-box: fill-box; transform-origin: center; }
.wp { color: var(--star); }
.wp svg { fill: currentColor; filter: drop-shadow(0 0 6px var(--star-glow)); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .orrery { width: 78%; margin: 0 auto; order: -1; }
  .hero { padding-top: 132px; }
}

/* ============================================================
   PROBLEM  — "off course / noise"
   ============================================================ */
.problem { padding-block: var(--section-pad); }
.problem .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.noise-vis { position: relative; aspect-ratio: 4/3; border-radius: 20px; overflow: hidden;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-border); }
.noise-vis svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.problem h2 .x { color: var(--accent-bright); }
html[data-theme="wayfinding"] .problem h2 .x { color: var(--accent); }
.pain-list { margin-top: 30px; display: flex; flex-direction: column; gap: 2px; }
.pain-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-faint); }
.pain-item:last-child { border-bottom: 1px solid var(--line-faint); }
.pain-item .ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--panel-border); margin-top: 2px; }
html[data-theme="wayfinding"] .pain-item .ic { color: var(--accent); }
.pain-item .ic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.pain-item p { font-weight: var(--w-body); }
.pain-item .lbl { font-weight: var(--w-h3); color: var(--text); display: block; }
@media (max-width: 860px) { .problem .wrap { grid-template-columns: 1fr; } .noise-vis { order: 2; } }
.problem-prose { margin-top: 26px; display: flex; flex-direction: column; gap: 20px; max-width: 54ch; }
.problem-prose p { color: var(--text-dim); font-size: clamp(1rem, 1.15vw, 1.1rem); }
.problem-prose .close { color: var(--text); font-weight: var(--w-body); }
.hype-callout { padding: 18px 22px; border-radius: 14px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--panel-border); }
.hype-callout p { color: var(--text); font-weight: var(--w-h3); font-size: clamp(1.04rem, 1.3vw, 1.18rem); line-height: 1.4; }
.hype-callout .accent { font-weight: var(--w-h2); }

/* ============================================================
   GUIDE — Jim
   ============================================================ */
.guide { padding-block: var(--section-pad); }
.guide .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.guide-portrait { position: relative; aspect-ratio: 4/5; }
.guide-portrait .ph {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--line-faint) 0 2px, transparent 2px 11px),
    var(--panel);
  box-shadow: inset 0 0 0 1px var(--panel-border);
  display: grid; place-items: center;
}
.guide-portrait .ph .ph-label { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.05em; text-align: center; padding: 0 20px; }
.guide-portrait .ring-badge {
  position: absolute; right: -22px; bottom: 38px; width: 96px; height: 96px;
  display: grid; place-items: center;
}
.guide-portrait .ring-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.guide-portrait .ring-badge .star { width: 26px; height: 26px; }
.guide blockquote { font-weight: var(--w-h3); font-size: clamp(1.5rem, 2.7vw, 2.3rem); line-height: 1.22; letter-spacing: -0.015em; }
.guide blockquote .accent { font-weight: var(--w-h2); }
.guide .sig { margin-top: 28px; display: flex; align-items: center; gap: 14px; }
.guide .sig .nm { font-weight: var(--w-h3); }
.guide .sig .rl { font-size: 0.85rem; color: var(--text-muted); font-weight: var(--w-label); }
.guide .creds { margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap; }
.guide .creds .c { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-dim); font-weight: var(--w-label); }
.guide .creds .c .star { width: 13px; height: 13px; }
.guide-body { margin-top: 22px; display: flex; flex-direction: column; gap: 15px; max-width: 56ch; }
.guide-body p { color: var(--text-dim); font-size: clamp(1rem, 1.1vw, 1.08rem); }
.guide-emblem {
  position: relative; aspect-ratio: 4/5; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--panel-border);
  display: grid; place-items: center; text-align: center;
}
html[data-theme="celestial"] .guide-emblem { background: linear-gradient(160deg, rgba(0,102,217,0.12), rgba(0,27,59,0)); }
.guide-emblem .emblem-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.guide-emblem .emblem-inner { position: relative; z-index: 2; display: grid; gap: 12px; justify-items: center; padding: 28px; }
.guide-emblem .emblem-inner .star { width: 22px; height: 22px; }
.guide-emblem .n { font-weight: var(--w-h1); font-size: clamp(3rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.guide-emblem .n .plus { color: var(--accent-bright); }
html[data-theme="wayfinding"] .guide-emblem .n .plus { color: var(--accent); }
.guide-emblem .l { font-weight: var(--w-label); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; max-width: 20ch; line-height: 1.55; }
@media (prefers-reduced-motion: no-preference) {
  .guide-emblem .spin { transform-box: fill-box; transform-origin: center; animation: emblem-spin 60s linear infinite; }
  .guide-emblem .spin-rev { transform-box: fill-box; transform-origin: center; animation: emblem-spin 60s linear infinite reverse; }
}
@keyframes emblem-spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .guide .wrap { grid-template-columns: 1fr; } .guide-portrait, .guide-emblem { max-width: 320px; } }

/* ============================================================
   HOW IT WORKS — 3 waypoints
   ============================================================ */
.how { padding-block: var(--section-pad); }
.how .head { text-align: center; max-width: 660px; margin: 0 auto 70px; display: grid; gap: 20px; justify-items: center; }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.constellation path { fill: none; stroke: var(--chart-line); stroke-width: 1.5; stroke-dasharray: 5 7; }
.step { position: relative; z-index: 2; padding: 34px 30px 38px; border-radius: 18px;
  background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--panel-border);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease); }
html[data-theme="celestial"] .step { background: var(--panel); }
.step:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--accent-bright), 0 24px 50px -28px rgba(0,102,217,0.6); }
.step .node {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--panel-border-strong); margin-bottom: 26px;
}
.step .node .star { width: 24px; height: 24px; }
.step .node .idx { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.74rem; font-weight: var(--w-h2); display: grid; place-items: center;
  box-shadow: 0 4px 12px -3px rgba(0,102,217,0.7); }
.step h3 { margin-bottom: 12px; }
.step p { color: var(--text-dim); font-size: 0.98rem; }
.step .micro { margin-top: 22px; font-size: 0.78rem; font-weight: var(--w-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.step .micro .ln { flex: 1; height: 1px; background: var(--line); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 16px; } .constellation { display: none; } }

/* ============================================================
   WHAT WE DO — services
   ============================================================ */
.services { padding-block: var(--section-pad); }
.services .head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; margin-bottom: 56px; }
.services .head .lead { max-width: 40ch; }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.svc {
  position: relative; padding: 36px 34px; border-radius: 18px; overflow: hidden;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-border);
  transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease-out), background 0.5s;
  min-height: 240px; display: flex; flex-direction: column;
}
.svc:hover { box-shadow: inset 0 0 0 1px var(--panel-border-strong); transform: translateY(-4px); }
.svc .svc-orbit { position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; opacity: 0; transition: opacity 0.6s var(--ease); }
.svc:hover .svc-orbit { opacity: 1; }
.svc .svc-orbit svg { width: 100%; height: 100%; }
.svc .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.svc .num { font-family: ui-monospace, Menlo, monospace; font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.1em; }
.svc .star { width: 18px; height: 18px; }
.svc h3 { margin-bottom: 12px; position: relative; z-index: 2; }
.svc p { color: var(--text-dim); font-size: 0.97rem; position: relative; z-index: 2; }
.svc .out { margin-top: auto; padding-top: 22px; font-weight: var(--w-label); font-size: 0.86rem; color: var(--accent-bright); display: flex; align-items: center; gap: 8px; }
html[data-theme="wayfinding"] .svc .out { color: var(--accent); }
.svc.wide { grid-column: span 2; }
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } .svc.wide { grid-column: auto; } .services .head { grid-template-columns: 1fr; } }
.svc-note { margin-top: 24px; font-size: 0.93rem; color: var(--text-muted); font-weight: var(--w-label); display: flex; align-items: center; gap: 10px; }
.svc-note .star { width: 13px; height: 13px; flex: none; }

/* ============================================================
   WHO THIS IS FOR
   ============================================================ */
.audience { padding-block: var(--section-pad); }
.audience .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.fit-list { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.fit { display: flex; align-items: center; gap: 16px; font-weight: var(--w-h3); font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--text); }
.fit .star { width: 16px; height: 16px; flex: none; }
.fit.dim { color: var(--text-muted); font-weight: var(--w-body); font-size: 1rem; }
.fit.dim .x { width: 16px; height: 16px; flex: none; color: var(--text-muted); }
.fit.dim .x svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.6; }
.vertical-card {
  position: relative; padding: 40px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-deep));
  box-shadow: inset 0 0 0 1px var(--panel-border);
}
html[data-theme="celestial"] .vertical-card { background: linear-gradient(160deg, rgba(0,102,217,0.10), rgba(0,27,59,0.0)); }
.vertical-card .youhere { font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-bright); display: flex; align-items: center; gap: 8px; }
html[data-theme="wayfinding"] .vertical-card .youhere { color: var(--accent); }
.vertical-card h3 { margin: 18px 0 14px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: var(--w-h2); }
.vertical-card p { color: var(--text-dim); }
.vertical-card .coords { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 24px; font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.06em; }
.vertical-card .chartdot { position: absolute; right: 34px; top: 34px; width: 120px; height: 120px; opacity: 0.7; }
@media (max-width: 860px) { .audience .wrap { grid-template-columns: 1fr; } }

/* ============================================================
   CTA
   ============================================================ */
.cta { padding-block: clamp(110px, 16vh, 200px); text-align: center; position: relative; overflow: hidden; }
.cta .wrap { position: relative; z-index: 3; display: grid; justify-items: center; gap: 30px; }
.cta .big-orbit { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none; }
.cta .big-orbit svg { width: min(760px, 120%); height: auto; overflow: visible; }
.cta h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); max-width: 16ch; }
.cta .lead { max-width: 46ch; }
.cta-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.cta .fine { margin-top: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding-block: 64px 40px; background: var(--bg-deep); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { margin-bottom: 18px; }
.foot-brand p { color: var(--text-muted); max-width: 30ch; font-size: 0.94rem; }
.foot-col h4 { font-size: 0.74rem; font-weight: var(--w-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px; }
.foot-col a { display: block; padding: 7px 0; color: var(--text-dim); font-size: 0.94rem; font-weight: var(--w-body); transition: color 0.25s; }
.foot-col a:hover { color: var(--accent-bright); }
html[data-theme="wayfinding"] .foot-col a:hover { color: var(--accent); }
.foot-bottom { margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line-faint); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-bottom .fine { display: flex; align-items: center; gap: 10px; }
.foot-coords { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.08em; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; } .foot-brand { grid-column: span 2; } }

/* section divider star */
.divider { display: flex; align-items: center; justify-content: center; gap: 18px; padding-block: 8px; }
.divider .ln { height: 1px; width: min(120px, 16vw); background: linear-gradient(90deg, transparent, var(--line), transparent); }
.divider .star { width: 12px; height: 12px; }

/* Tweaks panel host (when present) sits above all */
#tweaks-root { position: fixed; z-index: 200; }
