/* =====================================================================
   Seer Frights — site styles
   A Goosebumps-style middle-grade horror series by B. Carter.
   Brand: black night, slime-green, bone-cream. Loud, fun, a little gross.
   Tagline: "You should be scared."
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka:wght@400;500;600;700&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400;1,700&display=swap');

:root {
  --slime:      #7cff3f;   /* the drip green */
  --slime-deep: #4faf1f;
  --bog:        #0d1f12;   /* deep swamp black-green */
  --night:      #07100b;   /* page background */
  --panel:      #11241a;   /* card background */
  --panel-2:    #16301f;
  --bone:       #f3ecd6;   /* cream text */
  --bone-mute:  #b9c4ad;
  --blood:      #ff3b30;   /* danger accents, sparingly */
  --purple:     #9b5cff;
  --line:       rgba(124,255,63,0.22);
  --line-soft:  rgba(243,236,214,0.10);
  --shadow:     0 18px 50px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(124,255,63,0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(155,92,255,0.10), transparent 60%),
    var(--night);
  color: var(--bone);
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--slime); text-decoration: none; }
a:hover { color: #a6ff79; text-decoration: underline; }

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Display type ─────────────────────────────────────────────── */
.display {
  font-family: "Bangers", "Fredoka", cursive;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

/* The drippy slime title treatment */
.slime-text {
  color: var(--slime);
  text-shadow:
    0 1px 0 var(--slime-deep),
    0 2px 0 var(--slime-deep),
    0 3px 0 #2f6f12,
    0 4px 0 #2f6f12,
    0 6px 14px rgba(0,0,0,0.6);
}

/* ── Header / nav ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,16,11,0.82);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.site-header-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.site-title {
  font-family: "Bangers", cursive;
  font-size: 1.85rem;
  letter-spacing: 0.04em;
  color: var(--slime);
  text-shadow: 0 2px 0 #2f6f12, 0 3px 8px rgba(0,0,0,0.6);
}
.site-title:hover { text-decoration: none; color: #a6ff79; }
.site-nav { list-style: none; display: flex; gap: 1.15rem; margin: 0 0 0 auto; padding: 0; flex-wrap: wrap; }
.site-nav a {
  font-family: "Fredoka", sans-serif; font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--bone); padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { color: var(--slime); border-bottom-color: var(--slime); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* atmospheric backdrop: swamp glow + drifting fog */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto;
  width: 70%; height: 120%;
  background:
    radial-gradient(50% 50% at 75% 30%, rgba(124,255,63,0.18), transparent 70%),
    radial-gradient(60% 60% at 60% 80%, rgba(155,92,255,0.14), transparent 70%);
  filter: blur(10px);
  animation: glow-pulse 9s ease-in-out infinite;
}
.fog {
  position: absolute; left: -10%; width: 120%; height: 60%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(124,255,63,0.07), transparent 70%);
  filter: blur(20px);
}
.fog-1 { bottom: -10%; animation: fog-drift 26s linear infinite; }
.fog-2 { bottom: 18%; opacity: 0.6; animation: fog-drift 38s linear infinite reverse; }

@keyframes fog-drift {
  0%   { transform: translateX(-6%) translateY(0); }
  50%  { transform: translateX(6%) translateY(-1.5%); }
  100% { transform: translateX(-6%) translateY(0); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}
@keyframes cover-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(-2deg); }
}

.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  gap: 3rem; align-items: center;
}
.hero-copy { text-align: left; }
.hero .eyebrow {
  font-family: "Fredoka", sans-serif; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--purple); font-size: 0.85rem; margin: 0 0 1rem;
}
.hero h1 {
  font-family: "Bangers", cursive;
  font-size: clamp(3rem, 9vw, 6.5rem);
  margin: 0;
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.hero .tagline {
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--blood); text-transform: uppercase; letter-spacing: 0.12em;
  margin: 1rem 0 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.hero .lede {
  max-width: 560px; margin: 1.5rem 0 0;
  font-size: 1.18rem; color: var(--bone-mute);
}
.cta-row { display: flex; gap: 0.85rem; justify-content: flex-start; flex-wrap: wrap; margin-top: 2.25rem; }

/* floating Book 1 cover */
.hero-cover {
  position: relative; display: block; justify-self: center;
  border-radius: 12px;
  animation: cover-float 7s ease-in-out infinite;
  transition: transform 200ms ease;
}
.hero-cover img {
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.65),
    0 0 0 1px rgba(0,0,0,0.4),
    0 0 40px rgba(124,255,63,0.18);
}
.hero-cover:hover { animation-play-state: paused; transform: translateY(-6px) rotate(-2deg) scale(1.02); text-decoration: none; }
.hero-cover-badge {
  position: absolute; top: -0.7rem; left: -0.7rem; z-index: 2;
  font-family: "Bangers", cursive; font-size: 1.1rem; letter-spacing: 0.04em;
  color: #06210a; background: var(--slime);
  padding: 0.2rem 0.75rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(124,255,63,0.35);
  transform: rotate(-6deg);
}

/* ── Hero: commissioned-art mode ──────────────────────────────────
   Inactive until <section class="hero has-art"> is set AND the image
   files exist (see HERO-ART-BRIEF.md). Until then these layers are
   hidden and the CSS-fog fallback above is what renders. ------------- */
.hero-art { display: none; }                 /* hidden in fallback mode */
.hero.has-art .hero-bg,
.hero.has-art .hero-cover { display: none; } /* swap out the fallback   */
.hero.has-art .hero-art   { display: block; }

.hero-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* full-bleed atmosphere */
.hero-art-bg {
  position: absolute; inset: 0;
  background: var(--night) center / cover no-repeat;
  background-image: url('/images/hero-bg.webp');
}
/* left-side scrim so headline text stays readable over the art */
.hero-art-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7,16,11,0.92) 0%,
    rgba(7,16,11,0.70) 32%,
    rgba(7,16,11,0.10) 60%,
    rgba(7,16,11,0) 100%);
}
/* transparent book stack — right side, gentle float */
.hero-art-books {
  position: absolute; right: 5%; bottom: 6%;
  width: min(42%, 480px); height: auto;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.6));
  animation: cover-float 7s ease-in-out infinite;
}
/* transparent logo lockup — floats above & overlapping the books, as in the composite */
.hero-art-logo {
  position: absolute; right: 11%; top: 6%;
  width: min(30%, 330px); height: auto;
  filter: drop-shadow(0 6px 20px rgba(124,255,63,0.35));
  animation: cover-float 8s ease-in-out infinite;
}

@media (max-width: 820px) {
  /* on phones the art stacks: scene as backdrop, books/logo centered & smaller */
  .hero.has-art .hero-art-scrim {
    background: linear-gradient(180deg, rgba(7,16,11,0.55) 0%, rgba(7,16,11,0.88) 100%);
  }
  .hero-art-books { right: 50%; transform: translateX(50%); bottom: 6%; width: min(58%, 280px); }
  .hero-art-logo  { right: 50%; transform: translateX(50%); top: 6%;  width: min(64%, 300px); }
}

/* ── Hero: atmosphere-only mode (interior pages) ──────────────────
   A lighter banner for /books/, /about/, and book-detail pages:
   the swamp background art behind the title, no books/logo layers,
   with a top-down scrim so the cream headline stays readable. ----- */
.hero.has-bg { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero.has-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--night) center / cover no-repeat;
  background-image: url('/images/hero-bg.webp');
  opacity: 0.55;
}
.hero.has-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,16,11,0.55) 0%, rgba(7,16,11,0.72) 55%, rgba(7,16,11,0.92) 100%);
}
.hero.has-bg > .wrap { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .fog-1, .fog-2, .hero-cover,
  .hero-art-books, .hero-art-logo { animation: none; }
  .hero-cover { transform: rotate(-2deg); }
}

.btn {
  display: inline-block;
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: 1rem; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--slime); color: #06210a; box-shadow: 0 8px 22px rgba(124,255,63,0.30); }
.btn-primary:hover { background: #a6ff79; color: #06210a; }
.btn-ghost { background: transparent; color: var(--slime); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--slime); color: #a6ff79; }
.btn-blood { background: var(--blood); color: #fff; box-shadow: 0 8px 22px rgba(255,59,48,0.30); }
.btn-blood:hover { background: #ff5b52; color: #fff; }

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 3.5rem 0; border-top: 1px solid var(--line-soft); }
.section.alt { background: linear-gradient(180deg, rgba(17,36,26,0.55), rgba(7,16,11,0)); }
.section-head { margin-bottom: 2rem; }
.section-head h2 {
  font-family: "Bangers", cursive; font-size: clamp(2rem, 5vw, 3rem);
  margin: 0; letter-spacing: 0.02em; color: var(--bone);
}
.section-head .lede { color: var(--bone-mute); max-width: 680px; margin: 0.6rem 0 0; font-size: 1.1rem; }

/* ── How it works strip ───────────────────────────────────────── */
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rule {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.5rem;
}
.rule .num {
  font-family: "Bangers", cursive; font-size: 2.2rem; color: var(--slime);
  line-height: 1; display: block; margin-bottom: 0.4rem;
}
.rule h3 { font-family: "Fredoka", sans-serif; font-weight: 700; margin: 0 0 0.4rem; font-size: 1.2rem; }
.rule p { margin: 0; color: var(--bone-mute); font-size: 1rem; }

/* ── Featured book ────────────────────────────────────────────── */
.featured {
  display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 2.5rem; align-items: center;
}
.featured .cover img { border-radius: 10px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.4); }
.featured .meta-tag {
  font-family: "Fredoka", sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; color: var(--purple);
}
.featured h3 { font-family: "Bangers", cursive; font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0.5rem 0 0; letter-spacing: 0.02em; }
.featured .blurb { font-size: 1.12rem; margin: 1rem 0 1.5rem; }

/* ── Books grid ───────────────────────────────────────────────── */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 240px)); gap: 1.5rem; justify-content: center; }
.book-card {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  color: var(--bone);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--slime); text-decoration: none; color: var(--bone); }
.book-card .cover-wrap { display: block; aspect-ratio: 1600 / 2560; background: #000; overflow: hidden; flex: 0 0 auto; }
.book-card .cover-wrap img { width: 100%; height: 100%; object-fit: contain; }
.book-card .card-body { display: block; padding: 0.85rem 0.9rem 1.05rem; flex: 1 0 auto; }
.book-card .num {
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple);
}
.book-card h4 { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.02rem; margin: 0.25rem 0 0; line-height: 1.2; }
.book-card .status {
  display: inline-block; margin-top: 0.55rem; font-family: "Fredoka", sans-serif; font-weight: 600;
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.18rem 0.5rem; border-radius: 999px;
}
.status.out { background: rgba(124,255,63,0.16); color: var(--slime); }
.status.soon { background: rgba(155,92,255,0.16); color: var(--purple); }

/* ── At a glance / aside cards ────────────────────────────────── */
.glance {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.5rem 1.6rem;
}
.glance h4 { font-family: "Fredoka", sans-serif; font-weight: 700; margin: 0 0 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; color: var(--slime); }
.glance ul { list-style: none; margin: 0; padding: 0; }
.glance li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px dashed var(--line-soft); font-size: 0.98rem; }
.glance li:last-child { border-bottom: 0; }
.glance .k { color: var(--bone-mute); }
.glance .v { color: var(--bone); font-weight: 700; text-align: right; }

/* ── Book detail page ─────────────────────────────────────────── */
.book-detail { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 3rem; align-items: start; padding: 3rem 0; }
.book-detail .cover img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; }
.book-detail .scare-tag {
  font-family: "Fredoka", sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.8rem; color: var(--blood);
}
.book-detail h1 { font-family: "Bangers", cursive; font-size: clamp(2.4rem, 7vw, 4rem); margin: 0.4rem 0 0.2rem; letter-spacing: 0.02em; }
.book-detail .sub { color: var(--purple); font-family: "Fredoka", sans-serif; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.9rem; }
.prose p { font-size: 1.1rem; }
.prose .pull { font-size: 1.35rem; font-weight: 700; color: var(--slime); font-style: italic; margin: 1.5rem 0; }
.crumbs { font-family: "Fredoka", sans-serif; font-size: 0.85rem; color: var(--bone-mute); letter-spacing: 0.05em; text-transform: uppercase; margin: 0 0 0.5rem; }
.crumbs a { color: var(--bone-mute); }

/* ── Callout band ─────────────────────────────────────────────── */
.band {
  text-align: center; padding: 3rem 1.25rem;
  background: linear-gradient(180deg, rgba(124,255,63,0.08), rgba(7,16,11,0));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.band h2 { font-family: "Bangers", cursive; font-size: clamp(2rem, 6vw, 3.5rem); margin: 0 0 0.5rem; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer { border-top: 2px solid var(--line); margin-top: 3rem; padding: 2.5rem 0 3rem; }
.site-footer-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h5 { font-family: "Fredoka", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.85rem; color: var(--slime); margin: 0 0 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--bone-mute); font-size: 0.95rem; }
.site-footer a:hover { color: var(--slime); }
.site-footer .brand { font-family: "Bangers", cursive; font-size: 1.6rem; color: var(--slime); letter-spacing: 0.04em; }
.site-footer .tag { color: var(--bone-mute); font-size: 0.92rem; max-width: 320px; }
.site-footer .imprint { color: var(--bone-mute); font-size: 0.82rem; margin-top: 0.6rem; }
.site-footer-meta { max-width: 1080px; margin: 2rem auto 0; padding: 1.25rem 1.25rem 0; border-top: 1px solid var(--line-soft); color: var(--bone-mute); font-size: 0.82rem; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .hero-copy { text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-cover { order: -1; max-width: 230px; }
  .featured { grid-template-columns: 1fr; }
  .featured .cover { max-width: 260px; margin: 0 auto; }
  .book-detail { grid-template-columns: 1fr; }
  .book-detail .cover { max-width: 300px; margin: 0 auto; }
  .rules-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .with-aside { grid-template-columns: 1fr !important; }
}

/* layout helper: content + aside */
.with-aside { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
