/*
  Real or Ridiculous — static landing-page prototype
  Palette and layout are inspired by the editorial pencil-sketch banner.
*/
:root {
  --paper: #f7f1e5;
  --paper-deep: #eadfcf;
  --paper-soft: #fffaf0;
  --ink: #151313;
  --ink-soft: #3a3631;
  --muted: #766f65;
  --line: rgba(21, 19, 19, 0.18);
  --line-strong: rgba(21, 19, 19, 0.34);
  --red: #c61f18;
  --red-dark: #8f1712;
  --green: #1f7a3a;
  --green-dark: #14552a;
  --shadow: 0 24px 70px rgba(29, 24, 18, 0.16);
  --radius: 22px;
  --max: 1180px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --mono: "Courier New", Courier, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(198, 31, 24, 0.09), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(0, 0, 0, 0.06), transparent 24rem),
    repeating-linear-gradient(90deg, rgba(30, 25, 20, 0.028) 0 1px, transparent 1px 84px),
    linear-gradient(180deg, var(--paper-soft), var(--paper) 32%, var(--paper-deep));
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.026) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px;
  mix-blend-mode: multiply;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 229, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.82rem 0;
}

.brand {
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: clamp(1.12rem, 2vw, 1.65rem);
  text-decoration: none;
  white-space: nowrap;
}
.brand .or {
  color: var(--red);
  font-style: italic;
  position: relative;
  display: inline-block;
  margin: 0 0.06em;
}
.brand .or::after {
  content: "";
  position: absolute;
  left: -0.18em;
  right: -0.18em;
  top: 0.1em;
  bottom: 0.04em;
  border: 2px solid rgba(198, 31, 24, 0.74);
  border-radius: 999px;
  transform: rotate(-5deg);
}
.brand .dash, .brand .dot { color: var(--muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.89rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav a {
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.nav a:hover,
.nav a:focus-visible {
  outline: none;
  color: var(--red-dark);
  background: rgba(198, 31, 24, 0.08);
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: clamp(1.4rem, 4vw, 3rem) 0 2rem;
}

.hero-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 250, 240, 0.76);
  padding: clamp(0.45rem, 1vw, 0.7rem);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-frame::before {
  border: 10px solid rgba(255,255,255,0.35);
  border-radius: calc(var(--radius) + 8px);
}
.hero-frame::after {
  background: linear-gradient(180deg, transparent 63%, rgba(247, 241, 229, 0.34));
}
.hero-banner {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f6f0e4;
}
.hero-banner img {
  width: 100%;
  height: auto;
}

.hero-copy {
  width: min(880px, calc(100% - 1rem));
  margin: clamp(1.6rem, 4vw, 2.8rem) auto 0;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  color: var(--red-dark);
  font-weight: 800;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--red);
  transform: rotate(-2deg);
}
h1, h2, h3 {
  font-family: var(--serif);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
h1 {
  max-width: 980px;
  margin: 0 auto 1rem;
  font-size: clamp(3rem, 9vw, 7.5rem);
}
h1 .red,
h2 .red {
  color: var(--red);
  font-style: italic;
}
.hero-copy .dek {
  max-width: 690px;
  margin: 0 auto 1.6rem;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.2rem;
}
.button {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fffaf0;
  border-radius: 999px;
  padding: 0.88rem 1.15rem;
  min-height: 48px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 5px 5px 0 rgba(198, 31, 24, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(198, 31, 24, 0.24);
  outline: none;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(21, 19, 19, 0.08);
}
.button.red {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 5px 5px 0 rgba(21, 19, 19, 0.18);
}
.button.small {
  padding: 0.7rem 0.95rem;
  font-size: 0.83rem;
  min-height: 42px;
}

.ticker {
  margin: 2.8rem 0 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 250, 240, 0.38);
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  padding: 0.68rem 0;
  animation: ticker 24s linear infinite;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(21, 19, 19, 0.62);
}
.ticker span::before { content: "◆"; color: var(--red); margin-right: 1rem; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
  .button { transition: none; }
}

.section {
  padding: clamp(2.3rem, 6vw, 5rem) 0;
}
.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}
.section-kicker {
  font-family: var(--mono);
  color: var(--red-dark);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}
.section-header p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: 1.08fr 0.92fr; align-items: stretch; }

.card {
  position: relative;
  background: rgba(255, 250, 240, 0.74);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  box-shadow: 0 18px 45px rgba(29, 24, 18, 0.08);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.018) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.28;
}
.card > * { position: relative; }
.card-number {
  width: 2.85rem;
  height: 2.85rem;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 1rem;
  transform: rotate(-6deg);
}
.card h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
}
.card p { color: var(--ink-soft); margin: 0; }

.latest-card {
  min-height: 100%;
  padding: clamp(1.35rem, 3.5vw, 2.1rem);
}
.latest-card .date {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 800;
  margin: 0 0 0.75rem;
}
.latest-card h3 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0 1.45rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(21, 19, 19, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  background: rgba(255,255,255,0.32);
  font-size: 0.86rem;
  font-weight: 800;
}

.headline-stack {
  display: grid;
  gap: 0.72rem;
}
.headline-slip {
  border: 1px solid rgba(21, 19, 19, 0.22);
  background: rgba(247, 241, 229, 0.74);
  padding: 0.82rem 0.92rem;
  border-radius: 14px;
  transform: rotate(var(--r, -1deg));
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.1;
}
.headline-slip:nth-child(2) { --r: 1.2deg; }
.headline-slip:nth-child(3) { --r: -0.5deg; }
.headline-slip:nth-child(4) { --r: 1deg; }
.headline-slip .stamp-mini {
  display: inline-block;
  margin-right: 0.4rem;
  font-family: var(--mono);
  color: var(--red);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.archive-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
}
.archive-strip .archive-copy { max-width: 660px; }
.archive-strip p { margin: 0.45rem 0 0; color: var(--muted); }

.about-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-box .lede {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
}
.about-box p:not(.lede) { margin: 0; color: var(--ink-soft); }

.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--red);
  color: var(--red);
  font-family: var(--mono);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem;
  transform: rotate(-4deg);
  background: rgba(255, 250, 240, 0.64);
  box-shadow: 0 8px 0 rgba(198, 31, 24, 0.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.4rem;
  color: var(--muted);
}
.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.footer-links a { text-decoration: none; font-weight: 800; }
.footer-links a:hover { color: var(--red-dark); }

/* Quiz page */
.quiz-page main { padding: clamp(1.2rem, 4vw, 2.6rem) 0 clamp(3rem, 6vw, 5rem); }
.quiz-shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
}
.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.88rem;
}
.progress {
  height: 12px;
  background: rgba(21, 19, 19, 0.10);
  border: 1px solid rgba(21, 19, 19, 0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 220ms ease;
}
.quiz-card {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 5px);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 5vw, 2.7rem);
  min-height: 430px;
  display: grid;
  align-content: center;
}
.quiz-label {
  font-family: var(--mono);
  color: var(--red-dark);
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}
.headline {
  font-family: var(--serif);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-size: clamp(2.15rem, 6vw, 5.35rem);
  margin: 0 0 1.4rem;
}
.answer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}
.answer-button {
  border: 2px solid var(--ink);
  background: transparent;
  border-radius: 18px;
  padding: 1.05rem;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  color: var(--ink);
}
.answer-button:hover,
.answer-button:focus-visible {
  outline: none;
  background: rgba(198, 31, 24, 0.08);
  border-color: var(--red);
  color: var(--red-dark);
}
.answer-button[disabled] { opacity: 0.52; cursor: not-allowed; }
.reveal {
  display: none;
  margin-top: 1.4rem;
  border-top: 1px dashed rgba(21, 19, 19, 0.34);
  padding-top: 1.3rem;
}
.reveal.is-visible { display: block; }
.reveal-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.reveal-badge {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
  color: var(--red);
  border: 3px solid var(--red);
  padding: 0.34rem 0.55rem;
  transform: rotate(-3deg);
}
.correct-line { font-weight: 900; }
.source-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.source-list a {
  color: var(--ink);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(198,31,24,0.5);
}
.quiz-next {
  margin-top: 1.3rem;
}
.results {
  display: none;
}
.results.is-visible { display: block; }
.score {
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 0.92;
  margin: 0;
}
.result-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.result-item {
  border: 1px solid rgba(21,19,19,0.2);
  border-radius: 16px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.3);
}
.result-item strong { color: var(--red-dark); }
.result-headline {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.12;
  margin: 0.25rem 0;
}

@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 0.1rem; }
  .nav a { padding-left: 0.45rem; padding-right: 0.45rem; }
  .hero { padding-top: 1rem; }
  .hero-frame { border-radius: 18px; }
  .hero-banner { border-radius: 14px; }
  .section-header { display: block; }
  .section-header p { margin-top: 0.75rem; }
  .grid.three,
  .grid.two,
  .about-box { grid-template-columns: 1fr; }
  .answer-actions { grid-template-columns: 1fr; }
  .quiz-card { min-height: 0; }
}

@media (max-width: 520px) {
  .container, .quiz-shell, .header-inner, .footer-inner { width: min(100% - 1rem, var(--max)); }
  .brand { font-size: 1.05rem; }
  .hero-copy { width: 100%; }
  .eyebrow::before, .eyebrow::after { width: 1rem; }
  .actions { display: grid; }
  .button { width: 100%; }
  .card { border-radius: 17px; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 1rem; }
}

/* Dynamic template helpers */
.archive-list {
  display: grid;
  gap: 1rem;
}

.loading-state,
.error-state {
  align-self: center;
}

.error-state p,
.loading-state p {
  margin-top: 0.75rem;
}

.answer-button.is-selected {
  background: rgba(21, 19, 19, 0.06);
  border-color: var(--ink);
  color: var(--ink);
}

.answer-button.is-correct {
  background: var(--green);
  border-color: var(--green-dark);
  color: #fff;
}

.answer-button.is-incorrect {
  background: var(--red);
  border-color: var(--red-dark);
  color: #fff;
}

.answer-button[disabled].is-correct,
.answer-button[disabled].is-incorrect {
  opacity: 1;
}

code {
  font-family: var(--mono);
  background: rgba(21, 19, 19, 0.08);
  border-radius: 0.35rem;
  padding: 0.08rem 0.28rem;
}
