/*
Theme Name: Rejeanna Roast
Description: A 21st birthday roast-and-memories theme. 21 years of receipts, lovingly weaponized by Mom.
Version: 1.1.0
Author: Mom (obviously)
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: rejeanna-roast
*/

:root {
  --ink: #000000;
  --gold: #ffc15e;
  --gold-deep: #f7b05b;
  --red: #d7263d;
  --mint: #b8f2e6;
  /* role aliases */
  --lime: var(--gold);       /* accent text on black, light buttons */
  --teal: var(--gold-deep);  /* warm section/card fills */
  --paper: var(--mint);      /* page background */
  --white: #fffdf7;
  --display: "Bowlby One", "Arial Black", Impact, sans-serif;
  --body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --hand: "Permanent Marker", "Comic Sans MS", cursive;
  --border: 4px solid var(--ink);
  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 5px 5px 0 var(--ink);
  --radius: 14px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; z-index: 999; top: 8px; left: 8px;
  background: var(--ink); color: var(--lime); padding: 10px 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: var(--lime);
  border-bottom: var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px;
}
.brand {
  font-family: var(--display); font-size: clamp(16px, 2.4vw, 22px);
  color: var(--lime); text-decoration: none; letter-spacing: .5px;
}
.brand span { color: var(--red); }
.brand:hover { color: var(--mint); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  color: var(--lime); text-decoration: none; font-weight: 700; font-size: 15px;
  border: 2px solid transparent;
}
.nav a:hover, .nav .current-menu-item a { border-color: var(--lime); color: var(--lime); }

/* ---------- Buttons & stickers ---------- */
.btn {
  display: inline-block; font-family: var(--display); font-size: 18px;
  padding: 14px 26px; border: var(--border); border-radius: 999px;
  background: var(--red); color: var(--white); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); color: var(--white); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn.alt { background: var(--lime); color: var(--ink); }
.btn.alt:hover { color: var(--ink); }

.sticker {
  display: inline-block; font-family: var(--display); text-transform: uppercase;
  border: var(--border); padding: 8px 14px; background: var(--white);
  box-shadow: var(--shadow-sm); transform: rotate(-4deg); line-height: 1.1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--gold); border-bottom: var(--border);
  padding: clamp(48px, 9vw, 110px) 0 clamp(60px, 10vw, 120px); overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--ink) 1.6px, transparent 1.6px);
  background-size: 22px 22px; opacity: .14; pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 40px; align-items: center; }
.hero-kicker {
  display: inline-block; background: var(--ink); color: var(--lime);
  font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 15px;
  letter-spacing: 1px; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 8.4vw, 112px); line-height: .92; margin: 18px 0 18px;
  color: var(--white); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink);
}
.hero h1 .strike { position: relative; color: var(--mint); }
.hero h1 .strike::after {
  content: ""; position: absolute; left: -4%; right: -4%; top: 52%;
  height: .14em; background: var(--red); transform: rotate(-6deg);
  border: 3px solid var(--ink);
}
.hero-sub { font-size: clamp(18px, 2.2vw, 23px); max-width: 34ch; font-weight: 500; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  position: relative; background: var(--white); border: var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 18px;
  transform: rotate(3deg);
}
.hero-card .photo {
  aspect-ratio: 4/5; border: var(--border); border-radius: 8px; overflow: hidden;
  background: var(--ink); display: grid; place-items: center; color: var(--gold);
  font-family: var(--hand); font-size: 26px; text-align: center; padding: 20px;
}
.hero-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-card .caption { font-family: var(--hand); font-size: 22px; text-align: center; margin-top: 12px; }
.hero-card .sticker { position: absolute; top: -22px; right: -18px; background: var(--red); color: var(--white); transform: rotate(9deg); font-size: 15px; }
.hero-card .sticker.left { top: auto; right: auto; bottom: -20px; left: -22px; background: var(--mint); color: var(--ink); transform: rotate(-8deg); }

.countdown { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.countdown .unit {
  background: var(--ink); color: var(--lime); border-radius: 10px; padding: 10px 14px;
  min-width: 78px; text-align: center;
}
.countdown .num { font-family: var(--display); font-size: 30px; line-height: 1; display: block; }
.countdown .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.countdown-done { font-family: var(--display); font-size: 24px; background: var(--red); color: var(--white); border: var(--border); padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--red); color: var(--white); border-bottom: var(--border);
  overflow: hidden; white-space: nowrap; padding: 14px 0;
  font-family: var(--display); font-size: clamp(18px, 2.4vw, 26px);
}
.marquee-track { display: inline-flex; gap: 40px; animation: marquee 40s linear infinite; padding-left: 40px; }
.marquee-track span::after { content: "✶"; margin-left: 40px; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 110px) 0; border-bottom: var(--border); }
.section.dark { background: var(--ink); color: var(--lime); }
.section.blue { background: var(--red); color: var(--white); }
.section.teal { background: var(--teal); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head .eyebrow {
  font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 14px;
  color: var(--red);
}
.section.dark .eyebrow, .section.blue .eyebrow { color: var(--lime); }
.section-head h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5.6vw, 68px);
  line-height: .98; margin: 8px 0 14px;
}
.section-head p { font-size: 20px; margin: 0; }

/* ---------- Case file stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--white); color: var(--ink); border: var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.stat:nth-child(2) { background: var(--teal); }
.stat:nth-child(3) { background: var(--mint); }
.stat:nth-child(4) { background: var(--red); color: var(--white); }
.stat .big { font-family: var(--display); font-size: clamp(34px, 4.4vw, 52px); line-height: 1; display: block; }
.stat .what { font-weight: 700; display: block; margin-top: 8px; }
.stat .fine { font-size: 14px; opacity: .8; display: block; margin-top: 6px; }

/* ---------- Era timeline ---------- */
.era { position: relative; padding: 0 0 70px 0; }
.era:last-child { padding-bottom: 0; }
.era-head {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-bottom: 26px;
}
.era-badge {
  font-family: var(--display); font-size: 22px; background: var(--ink); color: var(--lime);
  border-radius: 999px; padding: 10px 18px; white-space: nowrap; border: var(--border);
}
.era:nth-of-type(3n+2) .era-badge { background: var(--red); color: var(--white); }
.era:nth-of-type(3n+3) .era-badge { background: var(--gold-deep); color: var(--ink); }
.era-head h3 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.8vw, 44px); margin: 0; line-height: 1; }
.era-head p { margin: 8px 0 0; font-size: 19px; max-width: 60ch; }

.memory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
.memory {
  position: relative; background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 12px 12px 16px; box-shadow: var(--shadow-sm); cursor: pointer; text-align: left;
  font: inherit; color: inherit; width: 100%;
  transition: transform .15s, box-shadow .15s;
}
.memory:nth-child(odd) { transform: rotate(-1.6deg); }
.memory:nth-child(even) { transform: rotate(1.4deg); }
.memory:hover, .memory:focus-visible { transform: rotate(0) translate(-3px, -3px) scale(1.02); box-shadow: var(--shadow); outline: none; z-index: 2; }
.memory .thumb {
  aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden;
  background: var(--teal); display: grid; place-items: center;
}
.memory .thumb img { width: 100%; height: 100%; object-fit: cover; }
.memory .thumb .ph { font-family: var(--hand); font-size: 20px; text-align: center; padding: 16px; color: var(--ink); }
.memory .play {
  position: absolute; top: 24px; right: 24px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--ink); display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--ink);
}
.memory .play::before { content: ""; border-left: 18px solid var(--white); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.memory .m-title { font-family: var(--hand); font-size: 22px; line-height: 1.15; margin: 12px 4px 4px; display: block; }
.memory .m-roast { font-size: 15px; margin: 0 4px; display: block; opacity: .85; }
.memory .tape {
  position: absolute; top: -14px; left: 50%; width: 92px; height: 26px; margin-left: -46px;
  background: rgba(255, 193, 94, .85); border: 2px solid rgba(0,0,0,.25); transform: rotate(-4deg);
}
.memory:nth-child(3n) .tape { background: rgba(215, 38, 61, .7); }
.memory:nth-child(3n+1) .tape { background: rgba(184, 242, 230, .9); }

.empty-note {
  border: 4px dashed var(--ink); border-radius: var(--radius); padding: 22px; font-size: 17px;
  background: rgba(255,255,255,.5);
}

/* ---------- Quote wall ---------- */
.quotes { columns: 3 280px; column-gap: 22px; }
.quote {
  break-inside: avoid; margin: 0 0 22px; background: var(--white); color: var(--ink);
  border: var(--border); border-radius: 22px 22px 22px 4px; padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.quote:nth-child(3n+2) { background: var(--teal); border-radius: 22px 22px 4px 22px; }
.quote:nth-child(3n) { background: var(--lime); }
.quote p { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.quote cite { font-style: normal; font-size: 14px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .75; }

/* ---------- Roast book (comments) ---------- */
.roastbook { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.comment-list .children { list-style: none; padding-left: 26px; margin-top: 14px; display: grid; gap: 14px; }
.comment-body {
  background: var(--white); color: var(--ink); border: var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.comment-author { font-family: var(--display); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; border: 3px solid var(--ink); }
.comment-author .says { display: none; }
.comment-metadata { font-size: 13px; margin: 4px 0 8px; }
.comment-metadata a { color: inherit; }
.comment-content p { margin: 0 0 8px; }
.reply a { font-weight: 700; font-size: 14px; }
.comment-respond {
  background: var(--mint); color: var(--ink); border: var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.comment-reply-title { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 10px; }
.comment-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 10px; background: var(--white);
}
.comment-form textarea { min-height: 140px; }
.comment-form p { margin: 0 0 16px; }
.comment-form .submit {
  font-family: var(--display); font-size: 18px; padding: 14px 26px; border: var(--border); border-radius: 999px;
  background: var(--red); color: var(--white); box-shadow: var(--shadow-sm); cursor: pointer;
}
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: start; font-size: 14px; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  position: relative; background: var(--white); border: var(--border); border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--red); width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: 18px;
}
.lightbox-media img, .lightbox-media video, .lightbox-media iframe { width: 100%; border-radius: 8px; border: 3px solid var(--ink); }
.lightbox-media img { max-height: 70vh; object-fit: contain; background: var(--ink); }
.lightbox-media iframe { aspect-ratio: 16/9; height: auto; }
.lightbox-media .wp-block-embed__wrapper, .lightbox-media figure { margin: 0 0 12px; }
.lightbox h4 { font-family: var(--hand); font-size: 30px; font-weight: 400; margin: 14px 0 6px; }
.lightbox .lb-roast { font-size: 18px; margin: 0; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--red); color: var(--white); font-size: 26px; line-height: 1;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.lightbox-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.lightbox-nav button {
  font-family: var(--display); font-size: 15px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--lime); padding: 8px 16px; cursor: pointer;
}

/* ---------- Generic content ---------- */
.page-wrap { padding: 60px 0 90px; }
.entry {
  background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 48px); max-width: 860px; margin-inline: auto;
}
.entry h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 58px); line-height: 1; margin-top: 0; }
.entry .meta { font-weight: 700; color: var(--red); }
.entry .wp-post-image { border: var(--border); border-radius: 10px; margin-bottom: 24px; width: 100%; }
.post-list { display: grid; gap: 22px; max-width: 860px; margin-inline: auto; }
.post-list article { background: var(--white); border: var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.post-list h2 { font-family: var(--display); font-weight: 400; margin: 0 0 8px; }
.post-list h2 a { color: var(--ink); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--lime); padding: 50px 0; text-align: center; }
.site-footer .big { font-family: var(--display); font-size: clamp(26px, 4vw, 44px); line-height: 1.05; margin: 0 0 12px; }
.site-footer .big span { color: var(--red); }
.site-footer p { margin: 6px 0; }
.site-footer .fine { font-size: 13px; opacity: .7; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 2000; pointer-events: none; border: 2px solid var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-card { max-width: 360px; margin: 10px auto 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .roastbook { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .site-header { position: relative; }
  html { scroll-padding-top: 0; }
  .hero h1 { -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--ink); }
  .stats { grid-template-columns: 1fr; }
  .era-head { grid-template-columns: 1fr; gap: 10px; }
  .era-badge { justify-self: start; }
  .memory-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .memory .m-title { font-size: 18px; }
  .memory .m-roast { display: none; }
  .memory .play { width: 40px; height: 40px; top: 18px; right: 18px; }
  .nav a { padding: 4px 9px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .memory, .btn { transition: none; }
}
