/* factcat.fyi — brand tokens + site components.
   Tokens mirror docs/brand.md + config/config.py BRAND_* and the design
   system custom properties (overlay-studio/_ds/.../tokens/colors.css).
   A palette change lands there AND here. */

:root {
  --fc-orange: #F07A2B;
  --fc-navy: #33415E;
  --fc-ink: #1B2333;
  --fc-teal: #1E6A80;
  --fc-cream: #FBEFDF;
  --fc-red: #E8493A;
  --fc-muted: #B0BBCD;
  --font-brand: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 20px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--fc-ink);          /* page = case-file ink */
  color: var(--fc-cream);
  font: 17px/1.65 var(--font-brand);
  font-weight: 400;
  min-height: 100vh;
}

a { color: var(--fc-orange); }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.1rem; }

/* ---------- header / nav (identical on every page) ---------- */

.site-header {
  border-bottom: 2px solid var(--fc-navy);
  padding: 0.9rem 0;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
}
.wordmark {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; margin-right: auto;
}
.wordmark img { height: 34px; width: auto; display: block; }
.wordmark span {
  font-weight: 800; font-size: 1.35rem; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--fc-cream);
}
.wordmark span b { color: var(--fc-orange); font-weight: 800; }
.site-nav { display: flex; gap: 0.35rem; }
.site-nav a {
  color: var(--fc-cream); text-decoration: none; font-weight: 600;
  font-size: 0.9rem; padding: 0.35rem 0.85rem; border-radius: 999px;
  background: var(--fc-navy);
}
.site-nav a:hover { background: var(--fc-orange); color: var(--fc-ink); }

main { padding: 1.8rem 0 3rem; }

/* ---------- kicker pill: THE one loud orange element per screen ---------- */

.kicker {
  display: inline-block; background: var(--fc-orange); color: var(--fc-ink);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 0.3rem 0.9rem; border-radius: 999px;
}

/* ---------- HookText headline: two-tone, EB uppercase, ink stroke ---------- */

/* No text-stroke here: -webkit-text-stroke traces the glyphs' overlapping
   inner contours in Montserrat and litters the headline with artifacts. The
   ink stroke is invisible on the ink background anyway. */
.hook-title {
  font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  line-height: 0.98; letter-spacing: 0.005em;
  margin: 0.8rem 0 1rem;
  color: #fff;
}
.hook-title .tone { color: var(--fc-orange); }

/* ---------- verified stamp: the one sanctioned teal ---------- */

.stamp {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 2px solid var(--fc-teal); color: var(--fc-teal);
  border-radius: 10px; padding: 0.3rem 0.7rem;
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; transform: rotate(-2deg);
  margin-bottom: 1.2rem;
}
.stamp::before { content: "\2713"; font-weight: 800; }

/* ---------- cards ---------- */

.card {
  background: var(--fc-navy); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; margin: 1.3rem 0;
}

.video-embed {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--fc-navy);
  /* portrait shorts stay narrow; long-form goes 16:9 via .wide */
  aspect-ratio: 9 / 16; max-width: 24rem; margin: 0 auto;
}
.video-embed.wide { aspect-ratio: 16 / 9; max-width: none; margin: 0; }
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.watch-link { text-align: center; margin: 0.8rem 0 1.6rem; }
.watch-link a {
  display: inline-block; background: var(--fc-navy); color: var(--fc-cream);
  text-decoration: none; font-weight: 600; padding: 0.5rem 1.2rem;
  border-radius: 999px;
}
.watch-link a:hover { background: var(--fc-orange); color: var(--fc-ink); }

/* ---------- article body ---------- */

.article-body p { margin: 0 0 1rem; }
.article-body h2 {
  font-weight: 800; text-transform: uppercase; font-size: 1.15rem;
  letter-spacing: 0.03em; color: var(--fc-cream);
  margin: 2rem 0 0.8rem; padding-left: 0.7rem;
  border-left: 4px solid var(--fc-orange);
}

/* ---------- photo cards: the studio's white-bordered evidence card ---------- */

.photo-card {
  background: #fff; border-radius: 14px; padding: 10px 10px 8px;
  margin: 1.5rem auto; max-width: 34rem;
  box-shadow: 0 6px 18px rgba(27, 35, 51, 0.55);
}
.photo-card:nth-of-type(odd) { transform: rotate(-1.2deg); }
.photo-card:nth-of-type(even) { transform: rotate(1.1deg); }
/* width/height attributes give the browser the aspect ratio, so a lazy image
   holds its box instead of collapsing the card to a caption strip. The tint
   is what fills that box until the bytes land. */
.photo-card img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  background: #E4E0D8;
}
.photo-card figcaption {
  color: var(--fc-ink); font-size: 0.78rem; line-height: 1.45;
  padding: 0.5rem 0.3rem 0.2rem;
}
.photo-card figcaption .credit { color: #5A6478; }
.photo-card figcaption a { color: var(--fc-teal); }

/* ---------- "The numbers" box ---------- */

.numbers-box h3, .sources-box h3, .credits-box h3, .related h3 {
  font-weight: 800; text-transform: uppercase; font-size: 0.95rem;
  letter-spacing: 0.07em; margin-bottom: 0.8rem; color: var(--fc-cream);
}
.numbers-box table { width: 100%; border-collapse: collapse; }
.numbers-box td {
  padding: 0.45rem 0.6rem 0.45rem 0; vertical-align: top;
  border-bottom: 1px solid rgba(251, 239, 223, 0.12);
  font-size: 0.92rem;
}
.numbers-box tr:last-child td { border-bottom: 0; }
.numbers-box .value { font-weight: 800; color: var(--fc-orange); white-space: nowrap; }
.numbers-box .src { font-size: 0.78rem; }

/* ---------- source + credits ---------- */

.sources-box { font-size: 0.86rem; }
.sources-box ul { list-style: none; }
.sources-box li { margin: 0.4rem 0; }
.sources-box a { text-decoration: underline; overflow-wrap: anywhere; }
.source-line { font-size: 0.88rem; color: var(--fc-muted); margin: 1.6rem 0; }
.credits-box { font-size: 0.82rem; color: var(--fc-muted); }
.credits-box ul { list-style: none; }
.credits-box li { margin: 0.35rem 0; }
.credits-box a { color: var(--fc-muted); text-decoration: underline; }

/* ---------- home grid ---------- */

.home-hero { margin-bottom: 2rem; }
.home-hero p { color: var(--fc-muted); max-width: 34rem; margin-top: 0.6rem; }
.cta-row { margin-top: 1.1rem; }
.cta-row a {
  display: inline-block; background: var(--fc-orange); color: var(--fc-ink);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 0.85rem; text-decoration: none; padding: 0.6rem 1.3rem;
  border-radius: 999px;
}
.article-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.1rem; list-style: none;
}
@media (min-width: 640px) {
  .article-grid { grid-template-columns: 1fr 1fr; }
}
.article-card {
  background: var(--fc-navy); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.article-card a { text-decoration: none; color: var(--fc-cream); display: block; }
.article-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.article-card .pad { padding: 1rem 1.1rem 1.2rem; }
.article-card .tag {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--fc-orange);
}
.article-card h2 {
  font-weight: 800; text-transform: uppercase; font-size: 1.02rem;
  line-height: 1.15; margin: 0.35rem 0 0.4rem;
}
.article-card p { font-size: 0.85rem; color: var(--fc-muted); }

/* ---------- related ---------- */

.related ul { list-style: none; }
.related li { margin: 0.5rem 0; }
.related a { font-weight: 600; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* ---------- about mascot: floats right, text wraps around it ---------- */

.about-mascot {
  float: right; width: min(42%, 250px);
  margin: 0.3rem 0 0.8rem 1.5rem;
}
.about-mascot img { width: 100%; height: auto; display: block; }
@media (max-width: 540px) {
  .about-mascot { float: none; width: 60%; margin: 1rem auto; }
}
.prose::after { content: ""; display: block; clear: both; }

/* ---------- prose pages (about/bot/privacy/legal) ---------- */

.prose h1 {
  font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.5rem, 5vw, 2.1rem); margin-bottom: 1rem;
}
.prose h1 .tone { color: var(--fc-orange); }
.prose h2 {
  font-weight: 800; text-transform: uppercase; font-size: 1.05rem;
  color: var(--fc-orange); margin: 1.8rem 0 0.5rem;
}
.prose p, .prose li { margin: 0.6rem 0; }
.prose ul { padding-left: 1.4rem; }
.prose code {
  background: var(--fc-navy); padding: 0.15rem 0.45rem; border-radius: 6px;
  font-size: 0.9em; word-break: break-all;
}

/* ---------- ads (emitted only when SITE.ads_enabled) ---------- */

.ad-slot { margin: 1.6rem 0; text-align: center; }

/* ---------- case closed: the sleeping cat sign-off ---------- */

.case-closed { text-align: center; margin: 2.5rem 0 0.5rem; }
.case-closed img { width: min(260px, 60%); height: auto; }
.case-closed p {
  color: var(--fc-muted); font-size: 0.85rem; margin-top: 0.4rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 2px solid var(--fc-navy); padding: 1.4rem 0 2.2rem;
  font-size: 0.82rem; color: var(--fc-muted);
}
.site-footer a { color: var(--fc-muted); }
.site-footer .row { margin: 0.3rem 0; }
