/* Memory Mill — shared design language
   Palette and motifs lifted from the app's own onboarding scenes
   (paper-theater world: hard offset shadows, no blur, rounded cutouts). */

:root {
  --paper: #fdf4e7;
  --paper-deep: #f3ece0;
  --cream: #fffdf8;
  --ink: #13405f;
  --ink-soft: #4e6272;
  --ink-faint: #6c7a86;
  --ink-mute: #8fb6d2;
  --sky: #d9edf9;
  --sky-deep: #bcdcab;
  --sun: #fce9a8;
  --hill-1: #79bd73;
  --hill-2: #6fb56c;
  --hill-3: #63ab63;
  --hill-4: #5aa35c;
  --hill-dark: #2f9557;
  --hill-deep: #1d7a45;
  --blue: #1f88e6;
  --blue-deep: #14619f;
  --orange: #f2701c;
  --orange-deep: #c2500e;
  --pink: #f386ac;
  --pink-deep: #d15b86;
  --butter: #f7c134;
  --butter-deep: #d99f22;

  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.measure {
  max-width: 640px;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 26px 0 18px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.wordmark svg { width: 28px; height: 28px; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.site-nav a { color: var(--ink-faint); }
.site-nav a:hover, .site-nav a.current { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:active { transform: translateY(3px); }

.btn-blue {
  background: var(--blue);
  color: var(--cream);
  box-shadow: 0 5px 0 var(--blue-deep);
}
.btn-blue:hover { background: #1b7cd4; color: var(--cream); }
.btn-blue:active { box-shadow: 0 2px 0 var(--blue-deep); }

.btn-orange {
  background: var(--orange);
  color: var(--cream);
  box-shadow: 0 5px 0 var(--orange-deep);
}
.btn-orange:hover { background: #e6660f; color: var(--cream); }
.btn-orange:active { box-shadow: 0 2px 0 var(--orange-deep); }

.btn-pink {
  background: var(--pink);
  color: var(--cream);
  box-shadow: 0 5px 0 var(--pink-deep);
}
.btn-pink:hover { background: #e97ba3; color: var(--cream); }
.btn-pink:active { box-shadow: 0 2px 0 var(--pink-deep); }

.btn-ghost {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(19, 64, 95, 0.15);
  font-size: 15px;
  padding: 12px 22px;
}
.btn-ghost:hover { color: var(--ink); background: #fff; }
.btn-ghost:active { box-shadow: 0 2px 0 rgba(19, 64, 95, 0.15); }

.btn[disabled], .btn.btn-soon {
  background: var(--paper-deep);
  color: var(--ink-faint);
  box-shadow: 0 4px 0 rgba(19, 64, 95, 0.1);
  cursor: default;
}
.btn.btn-soon:hover { background: var(--paper-deep); color: var(--ink-faint); }
.btn.btn-soon:active { transform: none; box-shadow: 0 4px 0 rgba(19, 64, 95, 0.1); }

/* ---------- hero scene ---------- */

.hero-scene {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: 0 10px 0 rgba(19, 64, 95, 0.1);
}

.hero-scene svg { width: 100%; height: auto; display: block; }

@keyframes mmspin { to { transform: rotate(360deg); } }
@keyframes mmdrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(18px); } }
@keyframes mmbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.blades { transform-origin: 500px 330px; animation: mmspin 10s linear infinite; }
.cloud-a { animation: mmdrift 16s ease-in-out infinite; }
.cloud-b { animation: mmdrift 13s ease-in-out infinite reverse; }
.sun-ring { animation: mmbob 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .blades, .cloud-a, .cloud-b, .sun-ring { animation: none; }
}

/* ---------- hero copy ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0 44px;
}

.kicker {
  font-family: var(--body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5.6vw, 56px);
  line-height: 1.05;
  font-weight: 800;
}

h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.15;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

p { line-height: 1.6; color: var(--ink-soft); }

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

/* ---------- section ---------- */

.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

/* ---------- guide cards (home) ---------- */

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--cream);
  border-radius: 24px;
  padding: 26px 26px 28px;
  box-shadow: 0 6px 0 rgba(19, 64, 95, 0.12);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(19, 64, 95, 0.12);
}

.guide-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.guide-icon svg { width: 28px; height: 28px; }

.guide-card h3 { color: var(--ink); }
.guide-card p { margin: 0; font-size: 15px; }

.guide-card .go {
  margin-top: auto;
  font-family: var(--body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- steps strip ---------- */

.step-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 5px 0 rgba(19, 64, 95, 0.1);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step p { font-size: 14.5px; margin: 0; }

/* ---------- outcomes ---------- */

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.outcome {
  padding: 20px;
  border-radius: 18px;
  background: var(--paper-deep);
}

.outcome .tag {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--hill-dark);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.outcome h3 { font-size: 17px; }
.outcome p { font-size: 14px; margin: 8px 0 0; }

/* ---------- sound grid (major system guide) ---------- */

.sound-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.sound-card {
  background: var(--cream);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 4px 0 rgba(19, 64, 95, 0.12);
}

.sound-card .digit {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  color: var(--ink);
  line-height: 1;
}

.sound-card .letters {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--orange);
  font-size: 13px;
  margin-top: 4px;
}

.sound-card .why {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 6px;
  line-height: 1.35;
}

/* ---------- worked example (theater card) ---------- */

.theater {
  position: relative;
  border-radius: 24px;
  background: #0f3a5a;
  padding: 30px 24px;
  overflow: hidden;
}

.theater::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  pointer-events: none;
}

.theater-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tile {
  width: 74px;
  height: 92px;
  border-radius: 14px;
  background: var(--cream);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 48px;
  color: var(--ink);
}

.tile.a { transform: rotate(-7deg); }
.tile.b { transform: rotate(5deg) translateY(-10px); }

.sound-chip {
  background: var(--blue);
  color: var(--cream);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

.arrow { color: var(--ink-mute); font-family: var(--display); font-weight: 700; font-size: 22px; }

.word-chip {
  background: var(--butter);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

.theater-caption {
  position: relative;
  text-align: center;
  color: var(--cream);
  font-weight: 700;
  font-size: 14px;
  margin-top: 20px;
  opacity: 0.85;
}

/* ---------- route diagram (memory palace guide) ---------- */

.route-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border-radius: 16px;
  padding: 13px 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.room .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.room .swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: none;
}

.room .desc { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.room .desc strong { font-weight: 800; }

/* ---------- quiz ---------- */

.quiz {
  background: var(--cream);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 6px 0 rgba(19, 64, 95, 0.12);
}

.quiz-prompt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  color: var(--ink);
  text-align: center;
}

.quiz-title { text-align: center; margin: 6px 0 18px; }

.quiz-opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quiz-opt {
  font-family: var(--body);
  font-weight: 800;
  font-size: 15px;
  padding: 13px;
  border-radius: 12px;
  background: var(--paper);
  border: 2px solid var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.quiz-opt:hover { background: #fff; }
.quiz-opt.correct { background: #e4f4ea; border-color: var(--hill-dark); color: var(--hill-deep); }
.quiz-opt.wrong { background: #fde6dd; border-color: var(--orange); color: var(--orange-deep); }

.quiz-feedback {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-faint);
  margin-top: 16px;
  min-height: 20px;
}

/* ---------- guide banner (major-system / memory-palace pages) ---------- */

.guide-banner {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky), var(--sky-deep));
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-banner .mini-mill { position: absolute; right: 30px; bottom: -6px; width: 90px; opacity: 0.9; }
.guide-banner .eyebrow-icon { width: 20px; height: 20px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid rgba(19, 64, 95, 0.1);
  padding: 40px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note {
  font-size: 13px;
  color: var(--ink-faint);
}

.footer-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-faint);
}

/* ---------- cross-link banner ---------- */

.next-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--cream);
  border-radius: 20px;
  padding: 22px 26px;
  box-shadow: 0 5px 0 rgba(19, 64, 95, 0.1);
  flex-wrap: wrap;
}

.next-guide .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .guide-grid, .step-strip, .outcome-grid { grid-template-columns: 1fr; }
  .sound-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-opts { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .next-guide { flex-direction: column; align-items: flex-start; }
  .guide-banner .mini-mill { display: none; }
}
