/* ============== FONTS ============== */
@font-face {
  font-family: "PP Migra";
  src: url("assets/fonts/PPMigra-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Migra";
  src: url("assets/fonts/PPMigra-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PP Migra";
  src: url("assets/fonts/PPMigra-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Migra";
  src: url("assets/fonts/PPMigra-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neco";
  src: url("assets/fonts/Neco-BlackItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ============== TOKENS ============== */
:root {
  --ink: #0a1a55;
  --ink-2: #1a2c66;
  --bg: #F5F5F5;
  --bg-2: #ebebeb;
  --rule: rgba(10, 26, 85, 0.18);
  --muted: rgba(10, 26, 85, 0.5);
  --accent: #1a2cd6;
  --line: var(--ink);
  --book-bg: #1a2cd6;
  --book-bg-light: var(--bg-2);
  --paper: var(--bg);
  --serif: "PP Migra", "Times New Roman", Times, serif;
  --sans: "Epilogue", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans-body: "Neco", "Epilogue", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1280px;
  --pad-x: clamp(20px, 5vw, 80px);
}
[data-theme="dark"] {
  --ink: #f0ebe3;
  --ink-2: #d8d2c5;
  --bg: #000000;
  --bg-2: #0a0a0a;
  --rule: rgba(240, 235, 227, 0.14);
  --muted: rgba(240, 235, 227, 0.45);
  --accent: #1a2cd6;
  --line: var(--ink);
  --book-bg: #1a2cd6;
  --paper: #000000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  transition: background .5s ease, color .5s ease;
}
body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

.frame {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============== NAV ============== */
.nav {
  padding: 26px 0 0;
  animation: navFadeIn 0.9s cubic-bezier(.2,.7,.2,1) both;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) 0.1s forwards;
}
.nav__links {
  display: flex;
  gap: 22px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav__links a {
  position: relative;
  display: inline-block;
  transition: color 0.35s ease, transform 0.35s cubic-bezier(.2,.7,.2,1);
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(.2,.7,.2,1) forwards;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover { color: var(--ink); transform: translateY(-1px); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a:nth-child(1) { animation-delay: 0.18s; }
.nav__links a:nth-child(2) { animation-delay: 0.26s; }
.nav__links a:nth-child(3) { animation-delay: 0.34s; }
.nav__links a:nth-child(4) { animation-delay: 0.42s; }
.nav__links a:nth-child(5) { animation-delay: 0.50s; }

@keyframes navFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__art-img { animation: none !important; }
}

@media (max-width: 720px) { .nav__links { display: none; } }

/* ============== HERO ============== */
.hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 720px) {
  .hero__grid { grid-template-columns: 1fr; align-items: stretch; }
}

.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--accent);
}
.hero__title .lead {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: leadReveal 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero__title .lead:nth-child(1) { animation-delay: 0.75s; }
.hero__title .lead:nth-child(2) { animation-delay: 0.88s; }
.hero__title .lead:nth-child(3) { animation-delay: 1.01s; }
@keyframes leadReveal {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__sub {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
  max-width: 28ch;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(.2,.7,.2,1) 1.25s forwards;
}
.hero__sub em {
  color: var(--accent);
  font-style: italic;
}

.hero__eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 clamp(28px, 4vw, 44px);
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) 0.6s forwards;
}
.hero__eyebrow .sep { color: var(--rule); margin: 0 .35em; }

.hero__byline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: clamp(20px, 2.5vw, 28px) 0 0;
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) 1.4s forwards;
}
.hero__byline .sep { color: var(--rule); margin: 0 .35em; }

.hero__cta {
  display: flex;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 44px);
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(.2,.7,.2,1) 1.55s forwards;
}
.btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .35s cubic-bezier(.2,.7,.2,1),
              color .35s cubic-bezier(.2,.7,.2,1),
              transform .35s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s cubic-bezier(.2,.7,.2,1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.btn:hover { background: var(--accent); color: var(--bg); transform: translateY(-1px); }
.btn .arr { display: inline-block; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.btn:hover .arr { transform: translateX(4px); }

/* hero illustration (static; theme swaps source) */
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: artEnter 1.6s cubic-bezier(.2,.7,.2,1) 0.6s forwards;
}
@keyframes artEnter {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.hero__art-img {
  position: absolute;
  inset: -14% -14% -14% -14%;
  width: 128%;
  height: 128%;
  object-fit: contain;
  display: block;
  transform: translate(100px, 40px) scale(1.44);
  transform-origin: center center;
  animation: artFloat 9s ease-in-out 1.6s infinite;
}
@keyframes artFloat {
  0%, 100% { transform: translate(100px, 40px) scale(1.44); }
  50%      { transform: translate(100px, 30px) scale(1.44); }
}

:root[data-theme="light"] .hero__art-img--dark  { display: none; }
:root[data-theme="dark"]  .hero__art-img--light { display: none; }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1),
              transform 0.9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-stagger="2"] { transition-delay: 0.08s; }
.reveal[data-stagger="3"] { transition-delay: 0.16s; }
.reveal[data-stagger="4"] { transition-delay: 0.24s; }
.reveal[data-stagger="5"] { transition-delay: 0.32s; }

/* ============== DIVIDER ============== */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.eyebrow {
  display: block;
  font-family: var(--sans-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
}

/* ============== TWO-COL TEXT ============== */
.section { padding: clamp(48px, 6vw, 80px) 0; }
.tcol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
@media (max-width: 800px) { .tcol { grid-template-columns: 1fr; gap: 32px; } }

.disp-md {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.disp-md--lg { font-size: clamp(32px, 4.4vw, 55px); }
.disp-md em {
  font-style: italic;
  color: var(--accent);
}
.body {
  font-family: var(--sans-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.65;
  color: var(--accent);
  max-width: 52ch;
}
[data-theme="dark"] .body { color: var(--ink); }
.body p + p { margin-top: 1em; }
.body em { color: var(--accent); font-style: italic; }

.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--accent);
  margin: 0 0 28px;
  max-width: 36ch;
  letter-spacing: -0.005em;
}
.pullquote::before { content: "\201C"; }
.pullquote::after  { content: "\201D"; }

/* ============== PHASES + DATES ============== */
.phases__head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 72px);
}
@media (max-width: 800px) {
  .phases__head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}
.phases__caption {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  max-width: 32ch;
  transform: translateY(-60px);
}
.phases__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(48px, 6vw, 72px);
  color: var(--ink);
}
.phases__title em { font-style: italic; }
.phases__title-accent { color: rgb(48, 77, 176); }

.dates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 4vw, 56px);
}
@media (max-width: 720px) { .dates { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }

.date {
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1),
              opacity 0.9s cubic-bezier(.2,.7,.2,1);
}
.date:hover { transform: translateY(-4px); }
.date:hover .date__year { color: var(--accent); }
.date__year {
  transition: color 0.4s ease;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.date__label {
  margin: 10px 0 16px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.date__body {
  font-family: var(--sans-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.55;
  color: var(--accent);
  max-width: 28ch;
}
[data-theme="dark"] .date__body { color: var(--ink); }

/* ============== THE TRAP ============== */
.trap__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--ink);
}
.warning {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--accent);
}

/* ============== AUTHOR ============== */
.author__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.005em;
  margin: 0 0 22px;
  color: var(--ink);
}
.author__body em { color: var(--accent); font-style: italic; }

/* ============== BOOK CTA ============== */
.book {
  padding: clamp(56px, 7vw, 96px) 0;
}
.book__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: stretch;
}
@media (max-width: 800px) { .book__grid { grid-template-columns: 1fr; } }

.book__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0;
}
.book__avail {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  color: var(--accent);
  margin: 0;
}
.book__avail em { font-style: italic; }
.book__avail .small { display: block; font-style: normal; font-size: 0.7em; color: var(--ink); }
.book__notes {
  font-family: var(--sans-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.55;
  color: var(--accent);
  max-width: 32ch;
}
[data-theme="dark"] .book__notes { color: var(--ink); }

.book__panel {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.book__cover-img {
  width: min(420px, 92%);
  height: auto;
  display: block;
}

.book__stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 0;
  border-top: 1px solid var(--rule);
}
.book__store {
  padding: 28px 8px;
  text-align: center;
  border-right: 1px solid var(--rule);
  transition: background .25s ease, color .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent);
}
.book__store-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.book__store-sub {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .25s ease;
}
.book__store:last-child { border-right: 0; }
.book__store:hover { background: var(--accent); }
.book__store:hover .book__store-name,
.book__store:hover .book__store-sub { color: var(--bg); }

/* ============== FOOT ============== */
.foot {
  padding: 36px 0 40px;
  border-top: 1px solid var(--rule);
}
.foot__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot__brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1;
}
.foot__right {
  font-family: var(--sans);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============== THEME TOGGLE ============== */
.theme-toggle {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 100;
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 4px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
[data-theme="dark"] .theme-toggle {
  background: var(--bg-2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.theme-toggle button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: background .3s ease, color .3s ease;
}
.theme-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}
