:root {
  --bg: #0f1612;
  --bg-deep: #09100d;
  --panel: rgba(16, 27, 22, 0.78);
  --panel-strong: rgba(27, 40, 33, 0.9);
  --line: rgba(194, 164, 104, 0.22);
  --text: #f3ecdc;
  --muted: #c9baa1;
  --accent: #d7a95f;
  --accent-soft: #87b090;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215, 169, 95, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(135, 176, 144, 0.13), transparent 32%),
    linear-gradient(180deg, #162119 0%, var(--bg) 42%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
  pointer-events: none;
  opacity: 0.45;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.forest-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.22;
  z-index: 0;
}

.forest-glow-left {
  top: 10vh;
  left: -100px;
  background: radial-gradient(circle, rgba(215, 169, 95, 0.8), transparent 70%);
}

.forest-glow-right {
  right: -120px;
  bottom: 12vh;
  background: radial-gradient(circle, rgba(114, 156, 122, 0.85), transparent 70%);
}

.hero,
.story-layout {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 48px clamp(24px, 4vw, 56px);
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(25, 37, 31, 0.9), rgba(14, 22, 18, 0.74));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -48% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 169, 95, 0.16), transparent 72%);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: var(--accent-soft);
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.95;
  font-weight: 600;
}

.lead {
  width: min(640px, 100%);
  margin: 18px 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  color: var(--muted);
}

.start-reading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(215, 169, 95, 0.34);
  color: var(--text);
  text-decoration: none;
  background: rgba(215, 169, 95, 0.08);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.start-reading:hover,
.start-reading:focus-visible {
  transform: translateY(-2px);
  background: rgba(215, 169, 95, 0.14);
  border-color: rgba(215, 169, 95, 0.55);
}

.story-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}

.story-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 20, 16, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.story-nav-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.story-nav nav {
  display: grid;
  gap: 10px;
}

.story-link {
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.story-link:hover,
.story-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.story-link.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(215, 169, 95, 0.18), rgba(135, 176, 144, 0.12));
  border-color: rgba(215, 169, 95, 0.28);
}

.story-content {
  display: grid;
  gap: 20px;
}

.story-card {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(26, 38, 32, 0.88), rgba(12, 19, 16, 0.9)),
    var(--panel);
  box-shadow: var(--shadow);
  opacity: 0.72;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.story-card::before {
  content: attr(data-page);
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(215, 169, 95, 0.68);
}

.story-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-card.is-current {
  border-color: rgba(215, 169, 95, 0.34);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.story-card h2 {
  margin: 0 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 600;
}

.story-card p {
  margin: 0 0 18px;
  color: #f4efe3;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.95;
}

.story-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .story-layout {
    grid-template-columns: 1fr;
  }

  .story-nav {
    position: relative;
    top: 0;
  }

  .story-nav nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .hero {
    padding: 30px 20px;
    border-radius: 24px;
  }

  .story-nav {
    padding: 16px;
    border-radius: 20px;
  }

  .story-nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .story-card::before {
    position: static;
    display: block;
    margin-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .story-card {
    opacity: 1;
    transform: none;
  }
}
