/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0a0a0a;
  --dark:    #141414;
  --mid:     #1e1e1e;
  --border:  #2a2a2a;
  --muted:   #666;
  --text:    #e8e8e8;
  --white:   #ffffff;
  --accent:  #e63946;
  --accent2: #ff6b6b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  --radius:  8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Layout ───────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--dark);
}

/* ── Typography ───────────────────────────────────── */
.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--white);
}

.section-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 40px;
}

.accent { color: var(--accent); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #0a0a0a 60%, #1a0000 100%);
  padding: 120px 0 100px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 40px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Story Grid ───────────────────────────────────── */
.story-grid,
.pilot-grid,
.product-grid {
  display: grid;
  gap: 24px;
}

.story-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pilot-grid  { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product-grid{ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── Card Base ────────────────────────────────────── */
.card {
  background: var(--mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-body { padding: 24px; }

.card-genre {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Product Card ─────────────────────────────────── */
.product-card .price {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.product-card .price-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Paywall Banner ───────────────────────────────── */
.paywall-banner {
  background: linear-gradient(180deg, transparent, var(--black) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  margin-top: 24px;
}

.paywall-banner .lock-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.paywall-banner h3 {
  color: var(--white);
  margin-bottom: 8px;
}

.paywall-banner p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ── Shelf Card ───────────────────────────────────── */
.shelf-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.shelf-card .shelf-info { flex: 1; }

.shelf-card .shelf-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.shelf-card .shelf-status {
  font-size: 12px;
  color: var(--muted);
}

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { color: var(--white); }

/* ── Footer ───────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── Story Card Tags (M4: extracted from inline styles in stories.js) ── */
.story-card-tags {
  /* display: flex — horizontal row of tags with wrapping */
  display: flex;
  /* gap: 6px — tight spacing between tags (BENCHMARK: Goodreads genre tags 4-8px gap) */
  gap: 6px;
  /* flex-wrap: wrap — allows tags to flow to next line on narrow cards */
  flex-wrap: wrap;
  /* margin-bottom: 20px — space before CTA button (matches original inline value) */
  margin-bottom: 20px;
}

.story-card-tag {
  /* font-size: 11px — matches .card-genre for tag consistency (BENCHMARK: style.css .card-genre) */
  font-size: 11px;
  /* padding: 3px 10px — compact pill; matches original inline values */
  padding: 3px 10px;
  /* border: 1px solid var(--border) — contained tag matching site border treatment */
  border: 1px solid var(--border);
  /* border-radius: 20px — full pill shape (BENCHMARK: original inline border-radius:20px) */
  border-radius: 20px;
  /* color: var(--muted) — secondary text */
  color: var(--muted);
  /* transition: var(--transition) — smooth hover */
  transition: var(--transition);
}

.story-card-tag:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Story Read Button (M4: extracted from inline styles) ── */
.story-read-btn {
  /* display: block — full-width CTA within card */
  display: block;
  /* text-align: center — centered label */
  text-align: center;
  /* text-decoration: none — no underline on <a> */
  text-decoration: none;
}

/* ── Notify Input ────────────────────────────────────── */
.notify-input {
  /* width: 100% — full-width within card */
  width: 100%;
  /* padding: 10px 14px — comfortable input (BENCHMARK: form inputs 10-14px) */
  padding: 10px 14px;
  /* background: var(--dark) — dark input matching theme */
  background: var(--dark);
  /* border: 1px solid var(--border) — consistent border */
  border: 1px solid var(--border);
  /* border-radius: var(--radius) — 8px site-wide */
  border-radius: var(--radius);
  /* color: var(--white) — readable text on dark bg */
  color: var(--white);
  /* font-size: 14px — readable, slightly smaller than body */
  font-size: 14px;
  /* font-family: var(--font-sans) — UI font */
  font-family: var(--font-sans);
  /* outline: none — custom focus */
  outline: none;
  /* transition: var(--transition) — smooth border change */
  transition: var(--transition);
}

.notify-input:focus {
  border-color: var(--accent);
}

/* ── Utilities ────────────────────────────────────── */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 80px 0 60px; }
  .section { padding: 60px 0; }
  .story-grid, .pilot-grid, .product-grid { grid-template-columns: 1fr; }
  .shelf-card { flex-direction: column; align-items: flex-start; }
}
