/* ================================================================
   WANDERING HORIZONS — shared system
   Two directions share this spine. Direction-specific overrides
   live in scope of [data-dir="atlas"] and [data-dir="compass"].
   ================================================================ */

:root {
  /* shared oceanic spine */
  --ink:        #12242f;
  --ink-2:      #35546a;
  --ink-3:      #7a93a4;
  --line:       #d4e0e8;
  --line-2:     #bfd0dc;
  --card:       #ffffff;

  --bg:         #eef4f8;
  --bg-2:       #e2ecf2;

  --accent:     oklch(0.55 0.08 230);
  --accent-ink: oklch(0.38 0.07 235);
  --accent-soft:oklch(0.93 0.025 230);
  --accent-warm: oklch(0.62 0.11 55);   /* warm counterpoint: sand/terra */
  --accent-deep: oklch(0.42 0.11 235);

  --radius:     14px;
  --radius-lg:  22px;

  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Hoefler Text", "Georgia", serif;
  --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

.mono { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.serif-i { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.015em; }

/* ---------- Direction switcher (floating) ---------- */
.dir-switch {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 90;
  display: inline-flex;
  padding: 5px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px -14px rgba(10, 30, 50, 0.25);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.dir-switch button {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  transition: all 0.18s ease;
}
.dir-switch button.is-active {
  background: var(--ink);
  color: var(--bg);
}
.dir-switch .label {
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  left: 18px; bottom: 18px;
  z-index: 90;
  padding: 14px 16px 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px -14px rgba(10, 30, 50, 0.25);
  display: none;
  min-width: 220px;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h6 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.tweaks-panel .row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.tweaks-panel .row + .row { border-top: 1px dashed var(--line); }
.tweaks-panel .row .k { color: var(--ink-2); }
.tweaks-panel .seg {
  display: inline-flex; padding: 3px;
  background: var(--bg-2);
  border-radius: 999px;
}
.tweaks-panel .seg button {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-2);
}
.tweaks-panel .seg button.is-active { background: var(--ink); color: var(--bg); }

/* ---------- Nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em;
}
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center; overflow: hidden;
}
.brand .mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 16px; display: flex; flex-direction: column; line-height: 1.1; }
.brand-name .co { font-size: 10px; font-family: var(--font-mono); letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; font-weight: 500; margin-bottom: 1px; }
.brand-name .name { font-weight: 600; }

.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-current { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--ink);
  transition: transform .18s ease;
}
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Typography ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.kicker::before {
  content: ""; width: 22px; height: 1px; background: var(--ink-3);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 500;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  font-family: var(--font-sans);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

h1.display {
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  font-weight: 600;
  margin: 22px 0 22px;
}
h1.display .serif-i { color: var(--accent-ink); font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em; }
h2.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 16px 0 18px;
}
h2.section-title .serif-i { color: var(--accent-ink); font-family: var(--font-serif); font-style: italic; font-weight: 500; }
.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 28px;
}

section { padding: 96px 0; position: relative; }
@media (max-width: 600px) { section { padding: 64px 0; } }
.section-head { max-width: 780px; margin-bottom: 56px; }
.section-head p { font-size: 18px; color: var(--ink-2); margin: 0; max-width: 60ch; }

/* ---------- Utility bits ---------- */
.dashed-hr {
  border: 0;
  border-top: 1px dashed var(--line-2);
  margin: 0;
}
.stamp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink);
  transform: rotate(-1.2deg);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.stamp svg { width: 11px; height: 11px; }

/* ---------- Subtle ambient grain ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(18,36,47,.08) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 80%, rgba(18,36,47,.07) 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 50%, rgba(18,36,47,.05) 50%, transparent 51%);
  background-size: 160px 160px, 220px 220px, 300px 300px;
  z-index: 0;
}
nav.top, section, footer { position: relative; z-index: 1; }

/* ================================================================
   DIRECTION A — "Atlas"
   Bright editorial, warm oceanic with sand accents, lots of dashes.
   ================================================================ */
[data-dir="atlas"] {
  --bg:         #eef4f8;
  --bg-2:       #e3ecf2;
  --card:       #ffffff;
  --ink:        #12242f;
  --ink-2:      #35546a;
  --ink-3:      #7a93a4;
  --accent:     oklch(0.55 0.08 230);
  --accent-ink: oklch(0.38 0.07 235);
  --accent-soft:oklch(0.94 0.025 230);
}

/* ================================================================
   DIRECTION B — "Compass"
   Darker, cinematic: slate nights, luminous contour linework.
   ================================================================ */
[data-dir="compass"] {
  --bg:         #0f1e2a;
  --bg-2:       #152836;
  --card:       #182c3b;
  --ink:        #e8eef3;
  --ink-2:      #a9bccc;
  --ink-3:      #6b8498;
  --line:       #24384a;
  --line-2:     #2f4a60;
  --accent:     oklch(0.72 0.09 210);   /* luminous teal-sky */
  --accent-ink: oklch(0.82 0.09 205);
  --accent-soft:oklch(0.28 0.06 215);
  --accent-warm: oklch(0.75 0.12 60);   /* brass/warm glow */
}
[data-dir="compass"] body::before {
  opacity: 0.4;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(180,210,235,.18) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 80%, rgba(180,210,235,.14) 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 50%, rgba(180,210,235,.10) 50%, transparent 51%);
}
[data-dir="compass"] nav.top {
  background: color-mix(in srgb, #0f1e2a 82%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}
[data-dir="compass"] .nav-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f1e2a;
}
[data-dir="compass"] .eyebrow {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
  color: var(--accent-ink);
}
[data-dir="compass"] .stamp {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--card) 50%, transparent);
}
[data-dir="compass"] h1.display .serif-i,
[data-dir="compass"] h2.section-title .serif-i { color: var(--accent-ink); }

/* ---------- Tweaks switcher colors per dir ---------- */
[data-dir="atlas"] .dir-switch { background: color-mix(in srgb, #ffffff 92%, transparent); }
[data-dir="compass"] .dir-switch { background: color-mix(in srgb, #182c3b 92%, transparent); }
[data-dir="compass"] .dir-switch button { color: var(--ink-2); }
[data-dir="compass"] .dir-switch button.is-active { background: var(--accent); color: #0f1e2a; }
[data-dir="compass"] .dir-switch .label { color: var(--ink-3); }

[data-dir="compass"] .tweaks-panel { background: color-mix(in srgb, #182c3b 94%, transparent); }
[data-dir="compass"] .tweaks-panel .seg { background: var(--bg-2); }
[data-dir="compass"] .tweaks-panel .seg button.is-active { background: var(--accent); color: #0f1e2a; }
