:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: #b7b0a3;
  --night: #0b0e0d;
  --surface: #141817;
  --surface-2: #1c211f;
  --line: rgba(247, 243, 234, 0.14);
  --amber: #ffb657;
  --amber-strong: #ffc979;
  --green: #8fd0a5;
  --red: #ff9b91;
  --max: 1180px;
  --radius: 28px;
}

* { box-sizing: border-box; }

html {
  background: var(--night);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background:
    radial-gradient(circle at 82% 2%, rgba(255, 182, 87, 0.12), transparent 30rem),
    radial-gradient(circle at 10% 30%, rgba(96, 142, 119, 0.08), transparent 32rem),
    var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  translate: 0 -150%;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--night);
}

.skip-link:focus { translate: 0; }

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 13, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: contents;
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 182, 87, 0.5);
  border-radius: 50% 50% 44% 56%;
  background: linear-gradient(145deg, rgba(255, 182, 87, 0.24), rgba(255, 182, 87, 0.04));
  color: var(--amber-strong);
  font-size: 16px;
}

.menu-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.menu-button span { margin-block: -11px; }

.main-nav {
  position: absolute;
  top: 72px;
  right: 20px;
  left: 20px;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #111513;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.main-nav[data-open="true"] { display: grid; }

.main-nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding-inline: 14px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
}

main { min-height: 70vh; }

.hero,
.page-hero {
  position: relative;
  display: grid;
  gap: 38px;
  padding-block: clamp(68px, 12vw, 140px) clamp(58px, 9vw, 110px);
}

.hero-copy { max-width: 780px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--amber-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 12vw, 92px);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.page-hero h1 { max-width: 15ch; font-size: clamp(42px, 9vw, 76px); }

h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 4vw, 22px);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 780;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button-primary {
  border-color: var(--amber);
  background: var(--amber);
  color: #20160b;
}

.button:hover { transform: translateY(-2px); border-color: rgba(255, 182, 87, 0.7); }

.hero-orbit {
  position: relative;
  min-height: 310px;
  isolation: isolate;
}

.orbit-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(76vw, 380px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid rgba(255, 182, 87, 0.28);
  border-radius: 50%;
  animation: rotate 24s linear infinite;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 40px rgba(255, 182, 87, 0.65);
  content: "";
}

.orbit-ring::before { top: 17%; left: 5%; }
.orbit-ring::after { right: 6%; bottom: 20%; width: 9px; }

.compass-card {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(66vw, 260px);
  aspect-ratio: 0.78;
  translate: -50% -50%;
  rotate: 3deg;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 243, 234, 0.18);
  border-radius: 42px;
  background: linear-gradient(155deg, #222825, #111513 65%);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.55);
}

.compass {
  display: grid;
  width: 130px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 182, 87, 0.45);
  border-radius: 50%;
  color: var(--amber-strong);
  font-size: 44px;
}

.compass::after {
  position: absolute;
  width: 3px;
  height: 92px;
  border-radius: 4px;
  background: linear-gradient(var(--amber) 50%, rgba(247, 243, 234, 0.2) 50%);
  content: "";
  animation: needle 5s ease-in-out infinite;
}

.section { padding-block: clamp(62px, 10vw, 112px); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 34px; }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }

.grid { display: grid; gap: 14px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

.card,
.story-step,
.legal-section,
.community-post {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent), var(--surface);
}

.card-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 36px;
  place-items: center;
  border: 1px solid rgba(255, 182, 87, 0.34);
  border-radius: 50%;
  color: var(--amber-strong);
  font-size: 13px;
  font-weight: 850;
}

.card p,
.story-step p,
.legal-section p,
.legal-section li { color: var(--muted); }
.card p:last-child, .story-step p:last-child, .legal-section p:last-child { margin-bottom: 0; }

.card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 10px;
  color: var(--amber-strong);
  font-weight: 800;
  text-decoration: none;
}

.split { display: grid; gap: 28px; }
.statement { padding: clamp(28px, 7vw, 58px); border-radius: 34px; background: var(--ink); color: #171511; }
.statement p { max-width: 62ch; margin-bottom: 0; color: #4f4a42; font-size: 18px; }

.route-chip-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.route-chip-list a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }

.note {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--amber);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 182, 87, 0.08);
  color: var(--muted);
}

.auth-layout { display: grid; gap: 22px; }
.auth-panel { padding: clamp(24px, 6vw, 40px); border: 1px solid var(--line); border-radius: 30px; background: var(--surface); }
.auth-panel label { display: grid; gap: 8px; margin-top: 16px; color: var(--muted); font-weight: 700; }
.auth-panel input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #090b0b; color: var(--ink); }
.auth-panel input:focus-visible { outline: 3px solid rgba(255, 182, 87, 0.35); border-color: var(--amber); }
.auth-message { min-height: 26px; color: var(--muted); }
.auth-message[data-state="error"] { color: var(--red); }
.auth-message[data-state="success"] { color: var(--green); }

.privacy-boundary { padding: 20px; border: 1px solid rgba(143, 208, 165, 0.35); border-radius: 20px; background: rgba(143, 208, 165, 0.07); }
.privacy-boundary h2 { font-size: 24px; }
.privacy-boundary ul { padding-left: 21px; color: var(--muted); }

.community-feed { display: grid; gap: 12px; margin-top: 24px; }
.post-meta, .post-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.post-stats { justify-content: flex-start; }
.community-post p { color: var(--ink); }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); }
[hidden] { display: none !important; }

.site-footer { padding-block: 52px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.footer-links a { display: flex; min-height: 44px; align-items: center; color: var(--muted); text-decoration: none; }
.footer-note { color: var(--muted); font-size: 14px; }

[data-reveal] { opacity: 0; translate: 0 22px; transition: opacity 600ms ease, translate 600ms ease; }
[data-reveal][data-visible="true"] { opacity: 1; translate: 0; }

@keyframes rotate { to { rotate: 1turn; } }
@keyframes needle { 0%, 100% { rotate: -28deg; } 50% { rotate: 34deg; } }

@media (min-width: 760px) {
  .shell { width: min(calc(100% - 64px), var(--max)); }
  .site-header { grid-template-columns: minmax(220px, 1fr) auto; }
  .menu-button { display: none; }
  .main-nav { position: static; display: flex; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .main-nav a { min-height: 44px; }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr); align-items: center; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
  .auth-layout { grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr); align-items: start; }
  .footer-grid { grid-template-columns: 1.3fr 1fr; }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; translate: 0; }
}
