/* ============================================================
   Chicken Road — independent fan hub (v3)
   Theme: "Morning Edition" — a light editorial magazine.
   Cream paper, ink typography, signal-red accents,
   hairline rules, sharp corners. Calm and readable.
   ============================================================ */

:root {
  /* palette */
  --paper: #f7f3ea;        /* page background — warm cream */
  --paper-2: #fffdf7;      /* card surface */
  --ink: #23252b;          /* main text */
  --ink-soft: #5b5d64;     /* muted text */
  --rule: #ddd5c5;         /* hairline borders */
  --rule-dark: #23252b;    /* strong editorial rules */
  --accent: #d94f30;       /* signal red */
  --accent-tint: #fbe9e3;  /* soft red wash */
  --amber: #f0a71b;        /* crossing-signal amber */
  --amber-tint: #fdf3dd;
  --green: #3e7d5a;        /* success green */
  --green-tint: #e7f1ea;

  /* type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', 'Segoe UI', system-ui, sans-serif;

  /* shape */
  --radius: 2px;
  --maxw: 1120px;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: 0.45em; }
code {
  font-family: 'Consolas', monospace;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  font-size: 0.9em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 68px 0; }
section + section { border-top: 1px solid var(--rule); }

.muted { color: var(--ink-soft); }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 64ch; }

/* editorial kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

.section-head { max-width: 700px; margin-bottom: 42px; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 13px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper-2); }
.btn-red { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-red:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- news ticker ---------- */
.ticker {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--accent);
  position: relative;
  z-index: 5;
}
.ticker-track {
  display: inline-block;
  padding: 9px 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: ticker-move 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { margin-right: 48px; }
@keyframes ticker-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- header / masthead ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--rule-dark);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.logo:hover { text-decoration: none; }
.logo .egg { color: var(--accent); }
.logo .edition { font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.main-nav a.active { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  padding: 7px 13px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: start;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- hero photo ---------- */
figure.photo .hero-img { aspect-ratio: 4 / 3; }
figure.photo.missing .hero-img-box { aspect-ratio: 4 / 3; }

/* ---------- stats counters ---------- */
.stats-band { border-bottom: 1px solid var(--rule); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 0 8px; }
.stat + .stat { border-left: 1px solid var(--rule); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.stat-num .suffix { color: var(--accent); font-size: 0.65em; }
.stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); margin-top: 8px; }

/* ---------- cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--paper-2);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(35, 37, 43, 0.1); }
.card .card-emoji {
  font-size: 1.7rem;
  display: inline-block;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 8px;
}
.card p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }
.card h3 { margin-bottom: 8px; }

/* numbered edition card */
.card-num .card-emoji { border-bottom-color: var(--amber); }
.card-green .card-emoji { border-bottom-color: var(--green); }

/* ---------- difficulty table ---------- */
.table-wrap { overflow-x: auto; border: 2px solid var(--rule-dark); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 660px; background: var(--paper-2); font-size: 0.94rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--rule); }
thead th {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper-2);
  background: var(--ink);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--paper); }
td:first-child { font-weight: 700; white-space: nowrap; }
td .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 9px; }
.dot-easy { background: var(--green); }
.dot-medium { background: var(--amber); }
.dot-hard { background: #c9701e; }
.dot-hardcore { background: var(--accent); }

.note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--amber);
  padding: 12px 18px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ---------- steps / walkthrough ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.step:last-child { border-bottom: none; }
.step-num {
  counter-increment: step;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--paper-2);
  background: var(--ink);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- accordion ---------- */
.accordion { border-top: 2px solid var(--rule-dark); }
.acc-item { border-bottom: 1px solid var(--rule-dark); background: transparent; }
.acc-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  padding: 22px 52px 22px 4px;
  cursor: pointer;
  position: relative;
  line-height: 1.4;
}
.acc-q:hover { color: var(--accent); }
.acc-q::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.acc-item.open .acc-q::after { content: "–"; }
.acc-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-a-inner { padding: 0 44px 24px 4px; color: var(--ink-soft); }
.acc-item.open .acc-a { max-height: 460px; }

/* ---------- quiz ---------- */
.quiz {
  background: var(--paper-2);
  border: 2px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 760px;
}
.quiz-progress { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 10px; }
.quiz-question { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 20px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-tint); }
.quiz-opt.correct { border-color: var(--green); background: var(--green-tint); }
.quiz-opt.wrong { border-color: var(--accent); background: var(--accent-tint); }
.quiz-feedback { margin-top: 16px; font-size: 0.95rem; color: var(--ink-soft); min-height: 24px; }
.quiz-result { text-align: center; }
.quiz-result .big { font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; color: var(--accent); display: block; margin-bottom: 10px; }

/* ---------- checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li {
  background: var(--paper-2);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.checklist li:hover { border-color: var(--accent); }
.checklist li input { accent-color: var(--accent); width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.checklist li.checked { border-color: var(--green); background: var(--green-tint); }
.checklist-status { font-weight: 700; color: var(--ink); min-height: 28px; }

/* ---------- trust badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--paper-2);
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.86rem;
  font-weight: 600;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--paper); margin-bottom: 8px; }
.cta-banner p { margin: 0; color: #b8b4a8; }
.cta-banner .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta-banner .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- glossary ---------- */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
.glossary > div {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.glossary dt { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 20px; max-width: 620px; }
.form-field label { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; color: var(--ink-soft); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--rule-dark);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-field .err { color: var(--accent); font-size: 0.85rem; margin-top: 6px; display: none; }
.form-field.invalid input, .form-field.invalid textarea { border-color: var(--accent); }
.form-field.invalid .err { display: block; }
.form-success {
  display: none;
  background: var(--green-tint);
  border: 1px solid var(--green);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 20px;
}
.form-success.show { display: block; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 3px solid var(--rule-dark);
  padding: 56px 0 32px;
  margin-top: 48px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer-brand p { color: var(--ink-soft); font-size: 0.92rem; max-width: 36ch; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-col a:hover { color: var(--ink); }
.footer-disclaimer { border-top: 1px solid var(--rule); padding-top: 22px; font-size: 0.84rem; color: var(--ink-soft); line-height: 1.65; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 22px;
  left: 22px;
  max-width: 420px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 14px 44px rgba(35, 37, 43, 0.35);
  z-index: 100;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: 0.88rem; color: #d5d1c5; margin-bottom: 14px; }
.cookie-banner a { color: var(--amber); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 9px 18px; font-size: 0.78rem; background: var(--accent); border-color: var(--accent); color: #fff; }
.cookie-actions .btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.cookie-actions .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- page hero ---------- */
.page-hero { padding: 60px 0 46px; border-bottom: 1px solid var(--rule); }
.crumbs { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); }
.page-hero .lead { margin-bottom: 0; }

/* ---------- pull quote ---------- */
.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.45;
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 26px;
  margin: 34px 0;
  max-width: 62ch;
  color: var(--ink);
}

/* ---------- photo band & gallery ---------- */
.photo-band { padding: 52px 0; border-bottom: 1px solid var(--rule); }

figure.photo { margin: 0; }
figure.photo img {
  width: 100%;
  display: block;
  border: 2px solid var(--rule-dark);
  border-radius: var(--radius);
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: var(--paper-2);
}
figure.photo .gallery-img { aspect-ratio: 4 / 3; }

figure.photo figcaption {
  font-size: 0.84rem;
  color: var(--ink-soft);
  padding-top: 10px;
}
figure.photo figcaption code { white-space: nowrap; }

/* state when the image file is not there yet */
figure.photo.missing img { display: none; }
figure.photo .ph-box { display: none; }
figure.photo.missing .ph-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 16 / 7;
  border: 2px dashed var(--rule-dark);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 14px, var(--paper) 14px, var(--paper) 28px);
  text-align: center;
  padding: 20px;
}
figure.photo.missing .gallery-img-box { aspect-ratio: 4 / 3; }
figure.photo .ph-emoji { font-size: 2.6rem; }
figure.photo .ph-file { font-family: 'Consolas', monospace; font-size: 0.88rem; background: var(--paper-2); border: 1px solid var(--rule); padding: 3px 10px; }
figure.photo .ph-hint { font-size: 0.82rem; color: var(--ink-soft); max-width: 40ch; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .stat:nth-child(3) { border-left: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .glossary { grid-template-columns: 1fr; }
  .cookie-banner { right: 22px; }
}

@media (max-width: 680px) {
  section { padding: 50px 0; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper-2);
    border-bottom: 2px solid var(--rule-dark);
    padding: 10px 22px 16px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--rule); }
  .header-inner { position: relative; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .step { grid-template-columns: 52px 1fr; gap: 14px; }
  .step-num { width: 52px; height: 52px; font-size: 1.2rem; }
  .cta-banner { padding: 32px; }
  .cookie-banner { left: 16px; right: 16px; max-width: none; }
}