/**
 * fact-page.css
 * Shared stylesheet for the pre-rendered per-fact static pages under /facts/*.
 * Mirrors the SPA's visual language (Nunito + Fredoka One, warm amber palette,
 * rounded cards) without pulling in the full Tailwind bundle.
 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 16px/1.55 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #fffbf0;
  background-image: url('https://res.cloudinary.com/dqmjgnijf/image/upload/q_auto,f_auto/Gemini_Generated_Image_psr0hxpsr0hxpsr0_dhqumq.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: #374151;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Site header ─────────────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 4px solid #fbbf24;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  margin-bottom: 24px;
}
.site-header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  color: #d97706;
  text-decoration: none;
  line-height: 1;
}
.site-logo span { font-size: 14px; color: #fbbf24; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  border: 2px solid #fde68a;
  padding: 5px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s ease;
  white-space: nowrap;
}
.site-nav a:hover { background: #fde68a; color: #92400e; }

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 2px solid #fde68a;
  margin-top: 48px;
}
.site-footer-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.site-footer .brand { font-family: 'Fredoka One', cursive; font-size: 18px; color: #d97706; }
.site-footer .brand span { font-size: 13px; color: #fbbf24; }
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.site-footer-nav a { font-size: 13px; font-weight: 700; color: #92400e; text-decoration: none; }
.site-footer-nav a:hover { color: #b45309; text-decoration: underline; }
.site-footer .copy { font-size: 12px; color: #9ca3af; font-weight: 600; }

.font-display {
  font-family: 'Fredoka One', cursive;
  font-weight: normal;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.crumb {
  font-size: 14px;
  color: #92400e;
  margin: 0 0 18px;
  font-weight: 600;
}
.crumb a {
  color: #92400e;
  text-decoration: none;
}
.crumb a:hover { color: #b45309; text-decoration: underline; }
.crumb .sep {
  margin: 0 8px;
  color: #f59e0b;
  font-weight: 400;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 2px solid #fde68a;
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .08), 0 8px 10px -6px rgba(0, 0, 0, .04);
  overflow: hidden;
}

/* Gradient header — inline `style=` on the element sets the actual gradient per state. */
.hero {
  padding: 20px;
  color: #fff;
  position: relative;
}
.hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.emoji {
  font-size: 40px;
  line-height: 1;
  flex: 0 0 auto;
}
.hero .state-name {
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}
.hero .state-sub {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
  margin-top: 2px;
}

/* ── Optional hero image (Cloudinary when wired up) ─────────── */
.image {
  aspect-ratio: 1200 / 630;
  width: 100%;
  background: #fef3c7;
  display: block;
}
.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Hero video ─────────────────────────────────────────────── */
.video-wrap {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #111;
  display: block;
  overflow: hidden;
}
.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Body ───────────────────────────────────────────────────── */
.body {
  padding: 20px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #f59e0b;
  background: #fffbeb;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 12px;
}
h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 26px;
  line-height: 1.2;
  color: #374151;
  margin: 0 0 12px;
  font-weight: normal;
}
.fact {
  font-size: 16px;
  line-height: 1.65;
  color: #4b5563;
  margin: 0 0 14px;
}

/* ── Citation ───────────────────────────────────────────────── */
.cite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  text-decoration: none;
}
.cite:hover { color: #b45309; text-decoration: underline; }
.cite svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* ── Tags ───────────────────────────────────────────────────── */
.tags {
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #fef3c7;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease;
}
.tag:hover { background: #fde68a; }

/* ── CTA ────────────────────────────────────────────────────── */
.cta-row {
  padding: 0 20px 20px;
}
.cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 20px;
  border-radius: 16px;
  background: #fbbf24;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  transition: background .15s ease;
}
.cta:hover { background: #f59e0b; color: #fff; }

/* ── Share buttons ──────────────────────────────────────────── */
.share-row {
  padding: 0 20px 20px;
}
.share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 10px;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s ease;
  color: #fff;
}
.share-btn:hover { opacity: .85; color: #fff; }
.share-native { background: #fbbf24; border: none; cursor: pointer; font-family: inherit; font-size: 13px; }
.share-native:hover { background: #f59e0b; }

/* ── Footer ─────────────────────────────────────────────────── */
.foot {
  margin-top: 36px;
  font-size: 13px;
  color: #92400e;
  font-weight: 600;
  text-align: center;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.foot a { color: #92400e; text-decoration: none; }
.foot a:hover { color: #b45309; text-decoration: underline; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .wrap { padding: 18px 14px 56px; }
  h1 { font-size: 22px; }
  .hero .state-name { font-size: 19px; }
  .emoji { font-size: 34px; }
}
