/* ============================================================
   The BLUE Field · design system
   Palette: twilight indigo ground, soft sky field, warm cream,
   a single gold accent. Calm and a little cosmic.
   ============================================================ */

:root {
  --deep:      #10182e;  /* twilight indigo, grounding */
  --deep-2:    #0b1122;  /* darker, for the noise */
  --indigo:    #24355e;
  --sky:       #b9cfe8;  /* the field */
  --sky-soft:  #d3e1f2;
  --cream:     #f6f1e6;
  --ink:       #1c2440;  /* text on light */
  --milk:      #f2ecdf;  /* text on dark */
  --milk-dim:  rgba(242, 236, 223, 0.62);
  --gold:      #d9a441;
  --gold-soft: #eec87a;
  --node:      #35507e;

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Nunito Sans", -apple-system, "Segoe UI", sans-serif;

  --orb-size: clamp(64px, 10vw, 92px);
  --node-size: clamp(58px, 9vw, 78px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--deep);
  color: var(--milk);
  line-height: 1.6;
  overflow-x: clip;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .closing-line, .field-line, .beat {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- wordmark ---------- */

.wordmark {
  position: fixed;
  top: 1.1rem; left: 1.25rem;
  z-index: 40;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--milk-dim);
  display: flex; gap: 0.5em;
  pointer-events: none;
  mix-blend-mode: difference; /* stays readable over light and dark */
}
.wordmark-sep { color: var(--gold); }

/* ---------- the orb ---------- */

.orb {
  position: fixed;
  top: 0; left: 0;
  width: var(--orb-size);
  height: var(--orb-size);
  z-index: 20;
  pointer-events: none;
  will-change: transform;
  opacity: 0; /* positioned and faded in by JS, avoids a corner flash */
}
.compass-orb { opacity: 1; }
.orb-core {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  /* a glow, not a sphere: the gradient fades out before the edge,
     so there is no hard rim anywhere */
  background: radial-gradient(circle at 45% 42%,
              rgba(253, 246, 227, 0.95) 0%,
              rgba(238, 200, 122, 0.8) 36%,
              rgba(217, 164, 65, 0.35) 60%,
              rgba(217, 164, 65, 0) 74%);
  box-shadow:
    0 0 46px 8px rgba(238, 200, 122, 0.32),
    0 0 110px 30px rgba(238, 200, 122, 0.16),
    0 0 160px 60px rgba(130, 155, 215, 0.14);
  animation: orb-breathe 4.5s ease-in-out infinite;
}
@keyframes orb-breathe {
  0%, 100% { transform: scale(1);    filter: brightness(1); }
  50%      { transform: scale(1.06); filter: brightness(1.08); }
}

/* static orbs: shown only in reduced-motion / no-JS fallback */
.orb-static {
  display: none;
  width: var(--orb-size); height: var(--orb-size);
  margin: 0 auto 2.2rem;
}
.orb-static .orb-core { animation: none; }

/* ---------- panels (shared section layout) ---------- */

.panel {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vh, 7rem) 1.5rem;
  position: relative;
  text-align: center;
}
.panel.light { background: var(--cream); color: var(--ink); }
.narrow { max-width: 34rem; margin: 0 auto; text-align: left; }

/* ---------- 1. stillness ---------- */

#stillness {
  background: radial-gradient(120% 90% at 50% 32%, #1e2c52 0%, var(--deep) 62%, #0d1428 100%);
}
.hook {
  font-size: clamp(1.6rem, 4.6vw, 2.6rem);
  max-width: 18em;
  margin-top: calc(var(--orb-size) + 3.5rem); /* room for the fixed orb above */
  opacity: 0; /* faded in by JS (or .rm fallback) */
}
.scroll-cue {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  opacity: 0;
}
.cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft));
  animation: cue-drift 3s ease-in-out infinite;
}
.cue-word {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--milk-dim);
}
@keyframes cue-drift {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 1;   transform-origin: top; }
}

/* ---------- 2. the noise ---------- */

#noise {
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 55%, var(--deep) 100%);
  min-height: 180vh;
  justify-content: flex-start;
}
.noise-sky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  margin-bottom: -100vh; /* let the text flow over it */
}
.chip {
  position: absolute;
  left: var(--cx); top: var(--cy);
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.45em 1em;
  border-radius: 999px;
  border: 1px solid rgba(185, 207, 232, 0.18);
  background: rgba(36, 53, 94, 0.35);
  color: rgba(211, 225, 242, 0.6);
  font-size: clamp(0.68rem, 1.8vw, 0.82rem);
  white-space: nowrap;
  will-change: transform;
}
.chip.dot {
  width: 12px; height: 12px; padding: 0;
  background: rgba(217, 164, 65, 0.55);
  border-color: transparent;
  box-shadow: 0 0 12px rgba(217, 164, 65, 0.5);
}
.noise-lines {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 38vh;
  padding-top: 42vh;
  padding-bottom: 24vh;
  max-width: 30rem;
}
.noise-line {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: var(--milk-dim);
  opacity: 0;
}
.noise-line.emphasis {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.8vw, 1.8rem);
  color: var(--milk);
}

/* ---------- 3-5. the field ---------- */

.field-section {
  height: 480vh;
  background: linear-gradient(180deg,
    var(--deep) 0%, #4a6a9c 7%, var(--sky) 14%,
    var(--sky) 88%, var(--sky-soft) 96%, var(--cream) 100%);
}
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}
.field-orb { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); margin: 0; }

.field-line {
  position: absolute;
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 30em);
  text-align: center;
  font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  color: var(--ink);
  opacity: 0;
}
.wander-hint {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(28, 36, 64, 0.62);
  opacity: 0;
}
.beats { pointer-events: none; }
.beat {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  width: min(88%, 22em);
  text-align: center;
  font-size: clamp(1.15rem, 3.4vw, 1.55rem);
  color: var(--ink);
  opacity: 0;
}

/* while a card is open, the wander hint steps aside */
body.card-is-open .wander-hint { opacity: 0 !important; }

/* ---------- nodes (built by JS, shared with compass) ---------- */

.node {
  position: absolute;
  width: var(--node-size);
  height: var(--node-size);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* faded in by JS / .rm fallback */
}
.node-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* soft-edged glow, no 3D shading */
  background: radial-gradient(circle at 46% 42%,
              rgba(196, 214, 240, 0.9) 0%,
              rgba(110, 140, 190, 0.55) 42%,
              rgba(53, 80, 126, 0.18) 62%,
              rgba(53, 80, 126, 0) 76%);
  box-shadow: 0 0 34px 6px rgba(125, 155, 206, 0.3);
  transition: transform 0.45s ease, box-shadow 0.45s ease, opacity 0.45s ease;
}
.node-label {
  position: absolute;
  top: calc(100% + 0.45em);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  color: var(--ink);
  letter-spacing: 0.04em;
}
.node:hover .node-dot,
.node:focus-visible .node-dot,
.node.lit .node-dot {
  transform: scale(1.14);
  box-shadow: 0 0 50px 12px rgba(238, 200, 122, 0.35);
  background: radial-gradient(circle at 46% 42%,
              rgba(250, 233, 195, 0.95) 0%,
              rgba(238, 200, 122, 0.6) 42%,
              rgba(217, 164, 65, 0.2) 62%,
              rgba(217, 164, 65, 0) 76%);
}

/* soft thread between a weaving pair, drawn by JS during beats */
.pair-line {
  position: absolute;
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg,
              rgba(238, 200, 122, 0) 0%,
              rgba(238, 200, 122, 0.55) 50%,
              rgba(238, 200, 122, 0) 100%);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
}
.node:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

/* compass nodes sit on a dark ground: lighter labels */
#compass .node-label { color: var(--milk); }

/* ---------- node card (reusable) ---------- */

.node-card {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(92vw, 26rem);
  max-height: 72vh;
  overflow-y: auto;
  background: rgba(16, 24, 46, 0.96);
  color: var(--milk);
  border: 1px solid rgba(238, 200, 122, 0.28);
  border-radius: 18px;
  padding: 1.4rem 1.5rem 1.3rem;
  box-shadow: 0 18px 60px rgba(8, 12, 26, 0.5);
}
.node-card:focus { outline: none; }
.card-title {
  font-size: 1.25rem;
  color: var(--gold-soft);
  margin-bottom: 0.35rem;
}
.card-line { font-size: 0.98rem; }
.card-try {
  margin-top: 0.8rem;
  margin-right: 1.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.card-try .chev { font-size: 1.1em; }
.g-again {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--milk-dim);
  text-decoration: underline;
  text-decoration-color: rgba(238, 200, 122, 0.4);
  text-underline-offset: 3px;
  padding: 0;
}
.g-again:hover { color: var(--gold-soft); }
.card-more {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.card-more .chev { transition: transform 0.25s ease; font-size: 1.1em; }
.card-more[aria-expanded="true"] .chev { transform: rotate(90deg); }
.card-full {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: var(--milk-dim);
  border-top: 1px solid rgba(242, 236, 223, 0.12);
  padding-top: 0.7rem;
}
/* ---------- card mini-games: one tiny felt demo per principle ---------- */

.card-game { margin-top: 0.9rem; }
.g-prompt {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 236, 223, 0.55);
  margin-bottom: 0.6rem;
}
.g-done {
  font-size: 0.9rem;
  font-family: var(--serif);
  color: var(--gold-soft);
  margin-top: 0.7rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.g-done.show { opacity: 1; }

/* balance: an overloaded beam, tap chips to set them down */
.g-beam-wrap { padding: 0.4rem 0 0.2rem; }
.g-beam {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 2px solid rgba(238, 200, 122, 0.5);
  padding-bottom: 0.5rem;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.5, 1);
  transform: rotate(var(--tilt, 0deg));
}
.g-side { display: flex; flex-wrap: wrap; gap: 0.35rem; max-width: 60%; }
.g-side-label { font-size: 0.78rem; color: rgba(242, 236, 223, 0.6); white-space: nowrap; }
.g-chip {
  font-size: 0.74rem;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  border: 1px solid rgba(238, 200, 122, 0.4);
  background: rgba(238, 200, 122, 0.12);
  color: var(--milk);
  cursor: pointer;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.g-chip:hover { background: rgba(238, 200, 122, 0.25); }
.g-chip.dropped { opacity: 0; transform: translateY(14px) scale(0.8); pointer-events: none; }
.g-later {
  min-height: 1.4em;
  margin-top: 0.55rem;
  font-size: 0.74rem;
  color: rgba(242, 236, 223, 0.45);
}

/* logicize: tap the knot, it becomes steps */
.g-knot {
  display: block;
  margin: 0 auto;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.g-knot svg { display: block; }
.g-knot.solved { opacity: 0; transform: scale(0.6); pointer-events: none; position: absolute; }
.g-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 64px;
}
.g-step {
  font-size: 0.78rem;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 1px solid rgba(185, 207, 232, 0.4);
  color: var(--milk);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.g-step.on { opacity: 1; transform: none; }
.g-step-arrow { color: rgba(238, 200, 122, 0.6); opacity: 0; transition: opacity 0.6s ease; }
.g-step-arrow.on { opacity: 1; }

/* understand: the ask, and what is underneath it */
.g-under { position: relative; padding: 0.2rem 0; }
.g-surface {
  font-size: 0.95rem;
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
.g-under.revealed .g-surface {
  opacity: 0.35;
  filter: blur(1px);
  transform: translateY(-4px);
}
.g-beneath {
  font-size: 0.95rem;
  font-family: var(--serif);
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s ease 0.3s, transform 0.9s ease 0.3s;
  margin-top: 0.4rem;
}
.g-under.revealed .g-beneath { opacity: 1; transform: none; }
.g-listen {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(238, 200, 122, 0.4);
  border-radius: 999px;
  padding: 0.45em 1.2em;
  transition: opacity 0.5s ease;
}
.g-under.revealed .g-listen { opacity: 0.4; pointer-events: none; }

/* enjoy: tap the gray until it warms up */
.g-enjoy {
  position: relative;
  height: 96px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(120, 126, 140, 0.18), rgba(90, 96, 112, 0.14));
  transition: background 0.9s ease;
}
.g-enjoy.warm-1 { background: linear-gradient(140deg, rgba(150, 140, 120, 0.2), rgba(110, 106, 112, 0.16)); }
.g-enjoy.warm-2 { background: linear-gradient(140deg, rgba(190, 160, 110, 0.24), rgba(130, 116, 108, 0.18)); }
.g-enjoy.warm-3 { background: linear-gradient(140deg, rgba(220, 178, 100, 0.3), rgba(160, 130, 100, 0.2)); }
.g-enjoy.warm-4 { background: linear-gradient(140deg, rgba(238, 200, 122, 0.38), rgba(190, 150, 100, 0.24)); }
.g-word {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: rgba(200, 202, 210, 0.6);
  transition: color 0.9s ease, text-shadow 0.9s ease;
  pointer-events: none;
}
.g-enjoy.warm-4 .g-word {
  color: var(--gold-soft);
  text-shadow: 0 0 22px rgba(238, 200, 122, 0.6);
}
.g-spark {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 233, 195, 0.95) 0%, rgba(238, 200, 122, 0) 70%);
  pointer-events: none;
  animation: spark 0.9s ease-out forwards;
}
@keyframes spark {
  0%   { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(4);   opacity: 0; }
}
html.rm .g-spark { animation: none; opacity: 0; }

.card-close {
  position: absolute;
  top: 0.5rem; right: 0.75rem;
  font-size: 1.4rem;
  color: var(--milk-dim);
  line-height: 1;
  padding: 0.25rem;
}
.card-close:hover { color: var(--milk); }

/* hover tooltip: just the one-liner, the full card opens on click */
.node-tip {
  position: fixed;
  transform: translate(-50%, -100%);
  z-index: 70;
  max-width: 15rem;
  padding: 0.55em 0.9em;
  border-radius: 10px;
  background: rgba(16, 24, 46, 0.94);
  color: var(--milk);
  border: 1px solid rgba(238, 200, 122, 0.25);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}

/* ---------- 6. the partner ---------- */

#partner { background: var(--cream); }
#partner h2, #install h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.8rem;
}
.lead { color: rgba(28, 36, 64, 0.75); margin-bottom: 2rem; }

.partner-art {
  display: block;
  width: 100%;
  border-radius: 18px;
  margin-bottom: 2rem;
  box-shadow: 0 18px 50px rgba(28, 36, 64, 0.25);
}
.p-name {
  font-style: normal;
  font-family: var(--serif);
  color: var(--gold-soft);
  letter-spacing: 0.03em;
}
.chat { display: flex; flex-direction: column; gap: 0.9rem; }
.msg {
  max-width: 88%;
  padding: 0.9rem 1.15rem;
  border-radius: 16px;
  font-size: 0.95rem;
}
.msg p + p { margin-top: 0.6em; }
.from-you {
  align-self: flex-end;
  background: #e4dcc9;
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.from-blue {
  align-self: flex-start;
  background: var(--indigo);
  color: var(--milk);
  border-bottom-left-radius: 4px;
  box-shadow: 0 0 0 1px rgba(238, 200, 122, 0.25), 0 10px 30px rgba(36, 53, 94, 0.18);
}
.aside {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(28, 36, 64, 0.6);
}

/* ---------- 7. install ---------- */

.install { background: var(--cream); }
.install .narrow { max-width: 36rem; }
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2.2rem;
}
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: #ffffff;
  border: 1px solid rgba(28, 36, 64, 0.1);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
}
.step-t { display: block; }
.step-n {
  flex: 0 0 auto;
  width: 1.7em; height: 1.7em;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
}
.steps code {
  background: rgba(36, 53, 94, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
}
.download-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: var(--indigo);
  color: var(--cream);
  text-decoration: none;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 0 0 1px rgba(238, 200, 122, 0.4), 0 14px 40px rgba(36, 53, 94, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--gold), 0 18px 50px rgba(36, 53, 94, 0.4);
}
.btn-sub {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
}
.free-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: rgba(28, 36, 64, 0.7);
}

/* install tabs: Claude / ChatGPT and others */
.ai-tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.3rem;
  margin-bottom: 1.4rem;
  border-radius: 999px;
  background: rgba(36, 53, 94, 0.08);
}
.ai-tab {
  padding: 0.55em 1.25em;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(28, 36, 64, 0.65);
  transition: background 0.25s ease, color 0.25s ease;
}
.ai-tab[aria-selected="true"] {
  background: var(--indigo);
  color: var(--cream);
}
.ai-tab:not([aria-selected="true"]):hover { color: var(--ink); }
.ai-panel[hidden] { display: none; }

/* ---------- 7b. the book ---------- */

.book { padding-top: 2rem; }
.book .narrow { max-width: 36rem; }
.book h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.8rem;
}
.book-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(28, 36, 64, 0.1);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.book-link:hover { border-color: var(--gold); transform: translateY(-2px); }
.book-cover {
  flex: 0 0 auto;
  width: 54px;
  height: 72px;
  border-radius: 4px 7px 7px 4px;
  background: linear-gradient(160deg, var(--indigo), var(--deep));
  box-shadow: inset 3px 0 0 rgba(238, 200, 122, 0.5), 0 6px 16px rgba(16, 24, 46, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover span {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}
.book-text { display: flex; flex-direction: column; }
.book-title { font-family: var(--serif); font-size: 1.15rem; }
.book-sub { font-size: 0.82rem; color: rgba(28, 36, 64, 0.6); }

.waitlist {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 36, 64, 0.1);
}
.waitlist h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.waitlist p { font-size: 0.95rem; color: rgba(28, 36, 64, 0.75); }
.insta-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65em 1.3em;
  border-radius: 999px;
  border: 1px solid rgba(36, 53, 94, 0.3);
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.insta-link:hover { border-color: var(--gold); background: rgba(238, 200, 122, 0.12); }
.waitlist-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.waitlist-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.75em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(28, 36, 64, 0.2);
  background: #ffffff;
  color: var(--ink);
}
.waitlist-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.waitlist-form button {
  flex: 0 0 auto;
  padding: 0.75em 1.3em;
  border-radius: 999px;
  background: var(--indigo);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.9rem;
}
.waitlist-form button:disabled { opacity: 0.6; cursor: default; }
.waitlist-note { min-height: 1.5em; margin-top: 0.6rem; font-size: 0.88rem !important; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 8. return ---------- */

#return {
  background: linear-gradient(180deg, var(--cream) 0%, #8ba6cb 12%, var(--deep) 40%, var(--deep) 100%);
  overflow: hidden;
}
.return-art {
  position: absolute;
  left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  width: min(120%, 900px);
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
}
#return > *:not(.return-art) { position: relative; z-index: 1; }
.closing-line {
  font-size: clamp(1.4rem, 3.8vw, 2rem);
  margin-top: calc(var(--orb-size) + 3rem);
  margin-bottom: 2.4rem;
  opacity: 0;
}
.quiet-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.92rem;
}
.quiet-links a {
  color: var(--milk-dim);
  text-decoration-color: rgba(238, 200, 122, 0.5);
  text-underline-offset: 4px;
  transition: color 0.25s ease;
}
.quiet-links a:hover { color: var(--gold-soft); }
.ghost-btn {
  margin-top: 2.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--milk-dim);
  border: 1px solid rgba(242, 236, 223, 0.25);
  border-radius: 999px;
  padding: 0.7em 1.6em;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.ghost-btn:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ---------- Mode B: the living compass ---------- */

#compass[hidden] { display: none; }
#compass {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(120% 100% at 50% 40%, #1d2c54 0%, var(--deep) 60%, #0b1122 100%);
  display: flex;
  flex-direction: column;
}
#compass { overflow: hidden; }
.compass-art {
  position: absolute;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 70%;
  object-fit: cover;
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
}
#compass .stage { position: relative; flex: 1; height: auto; }
.compass-welcome {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  color: var(--milk);
  padding: 4.2rem 1.5rem 0;
  margin-bottom: -2.5rem;
  position: relative;
  z-index: 2;
}
.compass-orb {
  position: absolute;
  top: 0; left: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  z-index: 5;
}
.compass-orb:active { cursor: grabbing; }
.compass-orb:focus-visible { outline: 2px solid var(--gold); outline-offset: 8px; border-radius: 50%; }
#compass .node { opacity: 1; }
.compass-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--milk-dim);
  padding: 0 1.5rem 0.8rem;
}
.compass-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 1.5rem 1.6rem;
}
.compass-links button {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--milk-dim);
  text-decoration: underline;
  text-decoration-color: rgba(238, 200, 122, 0.4);
  text-underline-offset: 4px;
}
.compass-links button:hover { color: var(--gold-soft); }

body.compass-open { overflow: hidden; }
body.compass-open .corner-link,
body.compass-open .orb:not(.compass-orb) { display: none; }

/* ---------- corner links ---------- */

.corner-link {
  position: fixed;
  bottom: 1rem;
  z-index: 45;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--milk-dim);
  text-decoration: none;
  padding: 0.45em 0.9em;
  border-radius: 999px;
  background: rgba(16, 24, 46, 0.55);
  backdrop-filter: blur(6px);
  transition: color 0.25s ease;
}
.corner-link:hover { color: var(--gold-soft); }
.corner-link.right { right: 1rem; }
.corner-link.left { left: 1rem; }

/* ============================================================
   Reduced motion / no-JS fallback
   The .rm class is set by main.js when prefers-reduced-motion
   is on, or when GSAP fails to load. Everything stays readable
   and reachable, motion becomes simple fades.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb-core { animation: none; }
  .cue-line { animation: none; }
}

html.rm .orb { display: none; }
html.rm .orb-static { display: block; }
html.rm .hook { margin-top: 0; }
html.rm .closing-line { margin-top: 0; }
html.rm .field-section { height: auto; }
html.rm .stage { position: relative; height: 100vh; height: 100svh; }
html.rm .field-orb { display: block; }
html.rm .noise-sky { display: none; }
html.rm #noise { min-height: 100vh; justify-content: center; }
html.rm .noise-lines { gap: 3.5rem; padding: 0; }
html.rm .beats {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 30em);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
html.rm .beat { position: static; transform: none; width: auto; font-size: 1rem; }
html.rm .wander-hint { bottom: 22%; }
html.rm .compass-orb { cursor: default; }

/* fade-in states shared by both modes */
html.rm .fade-item { opacity: 0; transition: opacity 0.8s ease; }
html.rm .fade-item.in { opacity: 1; }

/* keyboard-visible focus for links */
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 560px) {
  .wordmark { font-size: 0.66rem; }
  .msg { max-width: 94%; }
  .compass-links { gap: 1.2rem; flex-wrap: wrap; }
  .waitlist-form { flex-direction: column; }
  .ai-tab { padding: 0.55em 1em; font-size: 0.85rem; }
  .corner-link { font-size: 0.68rem; }
}
