/* ============================================================
   Frederick Fairytale — Zines
   Central stylesheet for landing page + zine viewers
   ============================================================ */

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

:root {
  --bg: #0d0b07;
  --bg-soft: #151107;
  --gold: #c8a050;
  --cream: #e8d9b0;
  --text: #d8cdb2;
  --muted: rgba(216,205,178,0.5);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  min-height: 100vh;
  font-family: "Courier Prime", monospace;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* warm vignette shared across all pages */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(200,160,80,0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.hero {
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 24px 32px;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 22px;
  padding-left: 0.4em;
}
.wordmark {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--cream);
  text-transform: uppercase;
  padding-left: 0.28em;
}

.rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 5px auto;
}

.zines {
  width: 100%;
  max-width: 940px;
  padding: 25px 24px 0;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 44px;
}
.card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-8px); }
.card-img {
  aspect-ratio: 2/3;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.75);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: saturate(1.02);
}
.card:hover .card-img img { transform: scale(1.05); }
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,11,7,0.4), transparent 55%);
  transition: opacity 0.4s ease;
}
.card:hover .card-img::after { opacity: 0.4; }
.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 5px;
}
.card-meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

footer {
  width: 100%;
  margin-top: 90px;
  padding: 48px 24px 40px;
  border-top: 1px solid rgba(200,160,80,0.12);
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-quote {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.9;
  max-width: 520px;
  margin: 0 auto 28px;
}
.footer-links {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.footer-links a {
  color: var(--gold);
  text-decoration: none;
  opacity: 0.7;
  margin: 0 12px;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; }
.copyright {
  margin-top: 24px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
}

/* ============================================================
   ZINE VIEWER
   ============================================================ */

.viewer-body {
  justify-content: center;
  padding: 28px 16px;
}

.topbar { text-align: center; margin-bottom: 22px; z-index: 1; }
.home-link {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); opacity: 0.6; text-decoration: none;
  display: inline-block; margin-bottom: 14px; transition: opacity 0.2s;
}
.home-link:hover { opacity: 1; }
.viewer-wordmark {
  font-size: 15px; font-weight: 700; letter-spacing: 0.26em;
  color: var(--cream); text-transform: uppercase; padding-left: 0.26em; margin-bottom: 5px;
}
.zine-title {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); opacity: 0.75; padding-left: 0.28em;
}

.viewer { width: min(720px, 96vw); z-index: 1; }

.stage-double {
  display: none; width: 100%; aspect-ratio: 1500/1166;
  position: relative; overflow: hidden;
  box-shadow: 0 14px 50px rgba(0,0,0,0.85);
}
.stage-double.active { display: flex; }
.half { flex: 1; overflow: hidden; position: relative; }
.half img { width: 100%; height: 100%; object-fit: cover; display: block; }

.spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; transform: translateX(-50%); z-index: 10; pointer-events: none; }
.spine::before { content: none; }

.stage-double::before, .stage-double::after { content: ''; position: absolute; top: 0; bottom: 0; width: 12px; z-index: 10; pointer-events: none; }
.stage-double::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.5), transparent); }
.stage-double::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.5), transparent); }

.stage-single {
  display: none; width: calc(50% - 2px); margin: 0 auto; aspect-ratio: 750/1166;
  position: relative; overflow: hidden; box-shadow: 0 14px 50px rgba(0,0,0,0.85);
}
.stage-single.active { display: block; }
.stage-single img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-single::before, .stage-single::after { content: ''; position: absolute; top: 0; bottom: 0; width: 10px; z-index: 10; pointer-events: none; }
.stage-single::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.5), transparent); }
.stage-single::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.5), transparent); }

.controls { display: flex; align-items: center; margin-top: 22px; gap: 14px; }
.nav {
  background: none; border: 1px solid rgba(200,160,80,0.35); color: var(--gold);
  font-size: 16px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s; flex-shrink: 0; user-select: none;
}
.nav:hover { background: rgba(200,160,80,0.1); border-color: var(--gold); }
.nav:disabled { opacity: 0.18; cursor: default; background: none; }
.info { flex: 1; text-align: center; }
.page-label { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 9px; }
.dots { display: flex; gap: 7px; justify-content: center; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(200,160,80,0.2); cursor: pointer; transition: background 0.2s, transform 0.2s; }
.dot.active { background: var(--gold); transform: scale(1.4); }
.hint { margin-top: 16px; font-size: 10px; letter-spacing: 0.1em; color: var(--muted); text-align: center; }
.brand { margin-top: 26px; font-size: 10px; letter-spacing: 0.22em; color: rgba(200,160,80,0.4); text-transform: uppercase; z-index: 1; }
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { color: var(--gold); }
