/* Ananda Loka prototype styles
   Two themes as a pair: light (day, ivory and ink) and dark (night, indigo and moonlight).
   Every color is a token, so both themes and the inverted band share one stylesheet. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@400;500;600;700&family=Tiro+Devanagari+Sanskrit:ital@0;1&display=swap');

/* ---------- Tokens ---------- */
:root,
[data-theme="light"] {
  --bg: #f5f0e6;
  --bg-2: #efe8da;
  --surface: #fbf8f2;
  --surface-2: #f2ecdf;
  --ink: #1a1814;
  --ink-2: #4a453c;
  --ink-3: #6b6458;
  --line: rgba(26, 24, 20, 0.12);
  --line-strong: rgba(26, 24, 20, 0.24);
  --accent: #b1441d;          /* saffron-vermilion, 5.1:1 on --bg */
  --accent-soft: rgba(177, 68, 29, 0.12);
  --gold: #8a6420;            /* text-safe gold */
  --gold-line: rgba(168, 123, 42, 0.45);
  --on-accent: #fffaf2;
  --ocean: #ece5d6;
  --land: #d8cdb7;
  --land-line: rgba(26, 24, 20, 0.16);
  --grat: rgba(26, 24, 20, 0.07);
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.06), 0 12px 32px -12px rgba(40, 30, 10, 0.18);
  --header-bg: rgba(245, 240, 230, 0.78);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d0e13;
  --bg-2: #12131a;
  --surface: #16171e;
  --surface-2: #1d1f28;
  --ink: #ede7da;
  --ink-2: #b9b2a3;
  --ink-3: #8f887a;
  --line: rgba(237, 231, 218, 0.1);
  --line-strong: rgba(237, 231, 218, 0.22);
  --accent: #ec8f5f;
  --accent-soft: rgba(236, 143, 95, 0.14);
  --gold: #d9b263;
  --gold-line: rgba(217, 178, 99, 0.4);
  --on-accent: #1a0e08;
  --ocean: #10121a;
  --land: #262935;
  --land-line: rgba(237, 231, 218, 0.12);
  --grat: rgba(237, 231, 218, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(13, 14, 19, 0.74);
  color-scheme: dark;
}

/* The yin-yang band: always wears the opposite theme. */
[data-theme="light"] .invert {
  --bg: #0d0e13; --bg-2: #12131a; --surface: #16171e; --surface-2: #1d1f28;
  --ink: #ede7da; --ink-2: #b9b2a3; --ink-3: #8f887a;
  --line: rgba(237, 231, 218, 0.1); --line-strong: rgba(237, 231, 218, 0.22);
  --accent: #ec8f5f; --accent-soft: rgba(236, 143, 95, 0.14); --gold: #d9b263;
  --gold-line: rgba(217, 178, 99, 0.4); --on-accent: #1a0e08;
}
[data-theme="dark"] .invert {
  --bg: #f5f0e6; --bg-2: #efe8da; --surface: #fbf8f2; --surface-2: #f2ecdf;
  --ink: #1a1814; --ink-2: #4a453c; --ink-3: #6b6458;
  --line: rgba(26, 24, 20, 0.12); --line-strong: rgba(26, 24, 20, 0.24);
  --accent: #b1441d; --accent-soft: rgba(177, 68, 29, 0.12); --gold: #8a6420;
  --gold-line: rgba(168, 123, 42, 0.45); --on-accent: #fffaf2;
}

:root {
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --deva: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', serif;
  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
/* paper grain, very faint */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold-line); }
.muted { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.5s var(--ease);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: 0.005em; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.brand-text { line-height: 1; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  cursor: pointer; padding: 0;
  transition: border-color 0.2s, background-color 0.2s;
}
.theme-toggle:hover { border-color: var(--ink); background: var(--surface); }
.theme-toggle svg { width: 24px; height: 24px; transition: transform 0.9s var(--ease); }
[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
.yy-light-dot { fill: var(--bg); transition: fill 0.5s; }

.menu-btn { display: none; }

/* ---------- Home: hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero h1 {
  font-size: clamp(64px, 10vw, 136px);
  font-weight: 500; line-height: 0.9; letter-spacing: -0.025em;
  margin: 22px 0 10px;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero .gloss { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 28px); color: var(--ink-2); margin: 0 0 26px; }
.hero .lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 34em; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-facts div { font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em; }
.hero-facts strong { display: block; font-family: var(--serif); font-size: 34px; font-weight: 500; color: var(--ink); line-height: 1.1; }

.hero-globe { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; justify-self: center; }
.hero-globe .rings { position: absolute; inset: -8%; color: var(--gold-line); pointer-events: none; animation: spin 240s linear infinite; }
.hero-globe .loka-map { position: absolute; inset: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(40px, 5.2vw, 68px); margin-top: 18px; }
.section-head p { font-size: 18px; color: var(--ink-2); margin-top: 18px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Spiritpunk */
.manifesto-line {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.12; letter-spacing: -0.015em;
  max-width: 20ch;
}
.manifesto-line span { color: var(--ink-3); }
.manifesto-line em { color: var(--accent); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.pillar { padding: 34px 32px 8px 0; }
.pillar + .pillar { padding-left: 32px; border-left: 1px solid var(--line); }
.pillar .num { font-family: var(--serif); font-size: 15px; color: var(--gold); font-style: italic; }
.pillar h3 { font-size: 32px; margin: 10px 0 12px; }
.pillar p { color: var(--ink-2); font-size: 16px; }

/* Naming */
.naming { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.deva {
  font-family: var(--deva);
  font-size: clamp(110px, 16vw, 220px);
  line-height: 1; color: var(--accent);
  text-align: center;
  position: relative;
}
.deva-caption { text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); margin-top: 8px; }
.naming h2 { font-size: clamp(38px, 4.6vw, 60px); margin: 18px 0 22px; }
.naming p { color: var(--ink-2); font-size: 18px; }

/* Hub cards */
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.hub-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.hub-art { aspect-ratio: 16 / 8; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.hub-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.hub-body h3 { font-size: 34px; }
.hub-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-body p { color: var(--ink-2); font-size: 16px; margin: 0; }
.hub-link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--accent); }
.hub-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.hub-card:hover .hub-link svg { transform: translateX(4px); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: transparent;
}
.tag-accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.tag-demo { border-style: dashed; color: var(--ink-3); }
.tag svg { width: 12px; height: 12px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step .n { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--gold); font-style: italic; }
.step h3 { font-size: 30px; margin: 18px 0 10px; }
.step p { color: var(--ink-2); font-size: 16px; margin: 0; }

/* Mission quote */
.mission { text-align: center; max-width: 900px; margin-inline: auto; }
.mission blockquote {
  margin: 28px 0 0;
  font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.25; font-weight: 400;
}
.mission blockquote em { color: var(--accent); }
.mission cite { display: block; margin-top: 28px; font-style: normal; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* Inverted yin-yang band */
.invert { background: var(--bg); color: var(--ink); }
.band { border-radius: 28px; padding: clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.band .band-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.band h2 { font-size: clamp(42px, 5.6vw, 76px); }
.band p { color: var(--ink-2); font-size: 18px; max-width: 34em; }
.band .seed {
  position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid var(--gold-line);
}
.band .seed::after { content: ""; position: absolute; inset: 120px; border-radius: 50%; border: 1px solid var(--gold-line); }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: clamp(72px, 10vw, 120px); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer li a { color: var(--ink-2); font-size: 15px; }
.site-footer li a:hover { color: var(--accent); }
.site-footer .fine { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; margin-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer-blurb { color: var(--ink-2); font-size: 15px; max-width: 30em; margin-top: 14px; }
.site-footer .footer-soon li { color: var(--ink-3); font-size: 15px; }

/* ---------- Map (shared) ---------- */
.loka-map { position: relative; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.loka-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loka-map.draggable { cursor: grab; }
.loka-map.dragging { cursor: grabbing; }
.m-ocean { fill: var(--ocean); transition: fill 0.5s; }
.m-rim { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.m-glow { fill: none; stroke: var(--gold-line); stroke-width: 1; opacity: 0.6; }
.m-grat { fill: none; stroke: var(--grat); stroke-width: 0.8; }
.m-land { fill: var(--land); stroke: none; transition: fill 0.5s; }
.m-borders { fill: none; stroke: var(--land-line); stroke-width: 0.5; }
.m-pin { cursor: pointer; outline: none; }
.m-pin .halo { fill: var(--accent); opacity: 0.16; transition: opacity 0.25s, r 0.25s; }
.m-pin .core { stroke: var(--accent); fill: var(--surface); stroke-width: 1.8; }
.m-pin .fill { fill: var(--accent); }
.m-pin:hover .halo, .m-pin:focus-visible .halo, .m-pin.active .halo { opacity: 0.34; }
.m-pin.active .pulse { display: block; }
.m-pin .pulse { display: none; fill: none; stroke: var(--accent); stroke-width: 1.2; animation: pulse 2.2s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
.m-seed { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: 0.75; pointer-events: all; cursor: help; }
.map-tip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: 7px 12px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0; transition: opacity 0.15s;
}
.map-tip.show { opacity: 1; }
.map-tip small { display: block; font-weight: 500; opacity: 0.7; font-size: 11.5px; }

/* ---------- Map explorer page ---------- */
.explorer { display: grid; grid-template-columns: 400px 1fr; height: calc(100vh - 72px); height: calc(100dvh - 72px); }
.panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.panel-head { padding: 26px 26px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 16px; }
.panel-head h1 { font-size: 38px; }
.panel-head h1 + p { margin: -8px 0 0; color: var(--ink-2); font-size: 14.5px; }
.search {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface);
}
.search svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 500 15px var(--sans); outline: none; min-width: 0; }
.search:focus-within { border-color: var(--accent); }
.filter-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2);
  font: 500 13px var(--sans); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background 0.25s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.3s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.filters-toggle { display: none; }

.results { overflow-y: auto; padding: 14px 14px 24px; display: grid; gap: 8px; align-content: start; flex: 1; }
.results-count { padding: 4px 12px 6px; font-size: 13px; color: var(--ink-3); }
.result {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  padding: 14px 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid transparent; text-align: left; background: transparent; color: inherit; font: inherit; width: 100%;
  transition: background 0.2s, border-color 0.2s;
}
.result:hover { background: var(--surface); border-color: var(--line); }
.result.active { background: var(--surface); border-color: var(--accent); }
.result .glyph { width: 18px; height: 18px; margin-top: 4px; }
.result h3 { font-size: 22px; font-weight: 600; }
.result .where { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.result .hub-meta { margin-top: 10px; }
.result .tag { height: 24px; font-size: 11.5px; padding: 0 9px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 15px; }

.stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, var(--bg-2), var(--bg) 70%); }
.stage .loka-map { position: absolute; inset: 0; }
.view-switch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.view-switch button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink-2);
  font: 600 14px var(--sans); cursor: pointer; transition: all 0.25s var(--ease);
}
.view-switch button svg { width: 16px; height: 16px; }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.legend {
  position: absolute; left: 20px; bottom: 20px; z-index: 4;
  padding: 14px 16px; border-radius: 14px; display: grid; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; color: var(--ink-2);
}
.legend .row { display: flex; align-items: center; gap: 10px; }
.legend svg { width: 16px; height: 16px; flex: none; }
.legend .sep { height: 1px; background: var(--line); margin: 2px 0; }
.hint { position: absolute; right: 20px; top: 26px; z-index: 3; font-size: 12.5px; color: var(--ink-3); }

.popup {
  position: absolute; right: 20px; bottom: 20px; z-index: 6;
  width: min(380px, calc(100% - 40px));
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 20px;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.popup.show { transform: none; opacity: 1; pointer-events: auto; }
.popup h3 { font-size: 30px; margin: 10px 0 4px; padding-right: 28px; }
.popup .where { font-size: 14px; color: var(--ink-3); }
.popup p { font-size: 15px; color: var(--ink-2); margin: 12px 0 16px; }
.popup .close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.popup .close:hover { background: var(--surface-2); color: var(--ink); }
.popup .close svg { width: 16px; height: 16px; }

/* ---------- Hub page ---------- */
.hub-hero { padding: clamp(40px, 6vw, 80px) 0 40px; }
.crumbs { font-size: 14px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--accent); }
.hub-hero h1 { font-size: clamp(52px, 7.5vw, 104px); letter-spacing: -0.02em; margin: 22px 0 16px; line-height: 1.06; }
.hub-hero .where { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--ink-2); }
.hub-hero .hub-meta { margin-top: 22px; }
.hub-banner { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 21 / 8; position: relative; background: var(--surface-2); margin-bottom: clamp(40px, 5vw, 64px); }
.hub-banner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hub-layout h2 { font-size: 36px; margin: 0 0 16px; }
.prose p { font-size: 18px; color: var(--ink-2); }
.block { padding: 36px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; color: var(--ink-2); }
.list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.note {
  padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--gold-line);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  font-size: 14.5px; color: var(--ink-2);
}
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; margin-top: 8px; }
.track::before { content: ""; position: absolute; left: 12%; right: 12%; top: 14px; height: 1px; background: var(--line-strong); }
.track .t { position: relative; text-align: center; font-size: 13px; color: var(--ink-3); }
.track .t svg { width: 28px; height: 28px; margin: 0 auto 10px; background: var(--bg); border-radius: 50%; position: relative; }
.track .t.on { color: var(--ink); font-weight: 600; }
.track .t.done { color: var(--ink-2); }
.aside { position: sticky; top: 96px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 26px; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--ink-2); }
.locator, .locator.loka-map { aspect-ratio: 1; width: 100%; height: auto; min-height: 0; position: relative; margin: -6px 0 6px; overflow: hidden; }
.fact-list { display: grid; gap: 12px; margin: 0; }
.fact-list div { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fact-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-list dt { color: var(--ink-3); }
.fact-list dd { margin: 0; text-align: right; font-weight: 600; }

/* ---------- Join page ---------- */
.join-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 96px); padding: clamp(40px, 6vw, 88px) 0 0; align-items: start; }
.join-layout h1 { font-size: clamp(52px, 7vw, 96px); margin: 20px 0 20px; line-height: 0.95; }
.join-layout .lead { font-size: 19px; color: var(--ink-2); }
.honor { margin-top: 40px; counter-reset: h; display: grid; gap: 0; }
.honor li { list-style: none; display: grid; grid-template-columns: 44px 1fr; padding: 16px 0; border-top: 1px solid var(--line); counter-increment: h; color: var(--ink-2); font-size: 16px; }
.honor li::before { content: counter(h, upper-roman); font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 20px; line-height: 1.3; }
.honor { padding: 0; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form h2 { font-size: 34px; margin-bottom: 6px; }
.form > p { color: var(--ink-3); font-size: 14.5px; }
.field { display: grid; gap: 8px; margin-top: 20px; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  border-radius: 12px; padding: 12px 14px; font: 500 16px var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
fieldset.field { border: 0; margin: 20px 0 0; padding: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check, .field label.check {
  display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); cursor: pointer; font-size: 14.5px; color: var(--ink-2); font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.check:hover { border-color: var(--line-strong); }
.check input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.extra { display: none; margin-top: 8px; padding: 6px 20px 22px; border-radius: 16px; border: 1px dashed var(--gold-line); }
.extra.show { display: block; }
.form-actions { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions small { color: var(--ink-3); font-size: 13px; }
.thanks { text-align: center; padding: 30px 10px; }
.thanks svg { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--accent); }
.thanks h2 { font-size: 42px; }
.thanks p { color: var(--ink-2); margin-top: 12px; }
.mode-switch { display: flex; gap: 6px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; width: fit-content; }
.mode-switch button { border: 0; background: none; color: var(--ink-2); font: 600 14px var(--sans); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.mode-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.field-hint { font-size: 13px; color: var(--ink-3); min-height: 1.2em; }
.field-hint.bad { color: var(--accent); }
.field-hint.good { color: var(--gold); }
.form-error { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14.5px; }
.form-error:empty { display: none; }
.form-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--gold); color: var(--ink); font-size: 14.5px; }
.form-note:empty { display: none; }
.form-captcha { margin-top: 18px; min-height: 65px; }
.list-note { margin-top: 28px; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--gold-line); color: var(--ink-2); font-size: 15px; }
.list-note h3 { font-size: 22px; margin-bottom: 6px; color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- View transition for the theme switch ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-globe { max-width: 520px; order: -1; margin-bottom: -10px; }
  .naming, .hub-layout, .join-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .band .band-inner { grid-template-columns: 1fr; }
  .band-actions { justify-content: flex-start; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .explorer { grid-template-columns: 340px 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .menu-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
  .menu-btn svg { width: 18px; height: 18px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }
  .pillars, .steps, .hub-grid { grid-template-columns: 1fr; }
  .pillar + .pillar { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .explorer { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; }
  .stage { order: -1; min-height: 58vh; }
  .panel { border-right: 0; border-top: 1px solid var(--line); }
  .results { overflow: visible; }
  .legend { display: none; }
  .hint { display: none; }
  .view-switch { top: 12px; }
  .view-switch button { padding: 0 14px; }
  .popup { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .checks, .two { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .track .t { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
