/* ═══════════════════════════════════════════════════════════
   BOLDEN — 1-YEAR ANNIVERSARY
   Homepage banner, film lightbox, anniversary story post.
   Loaded only where needed by inc/anniversary.php.
   ═══════════════════════════════════════════════════════════ */

/* ─── Homepage banner (top of the page, before the hero) ─── */
.anniv-banner {
  position: relative; z-index: 3;
  /* 100px above and below the card; the top gets 72px more for the fixed header */
  --anniv-gap: 100px;
  padding: calc(72px + var(--anniv-gap)) 0 var(--anniv-gap);
  /* plain page background; the moving connected dots are drawn on a canvas (js/anniversary.js) */
  background: var(--bg);
  border-bottom: 1px solid var(--border-md);
  overflow: hidden;
}
.anniv-banner-dots {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.anniv-banner > .container { position: relative; z-index: 1; width: 100%; }
html.light-theme .anniv-banner-card {
  background: #ffffff;
  border-color: rgba(69,86,157,0.12);
  box-shadow: 0 30px 70px -22px rgba(30,36,90,0.45), 0 6px 18px -8px rgba(30,36,90,0.22);
}
.anniv-banner-card { box-shadow: 0 30px 80px -20px rgba(10,12,40,0.55); }
.anniv-banner-card {
  background: #ffffff;
  border-color: rgba(69,86,157,0.12);
  box-shadow: 0 30px 70px -22px rgba(30,36,90,0.45), 0 6px 18px -8px rgba(30,36,90,0.22);
}
.anniv-banner-card { box-shadow: 0 30px 80px -20px rgba(10,12,40,0.55); }
.anniv-banner-card { background: #ffffff; }
.anniv-banner-card {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 530px;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.anniv-banner-text {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(2rem, 4vw, 3.75rem);
}
.anniv-banner-text p {
  font-size: clamp(1rem, 1.5vw, 1.1875rem); line-height: 1.7;
  color: var(--text-muted); max-width: 520px; margin-bottom: 2rem;
}
.anniv-banner-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.anniv-banner-btns button { cursor: pointer; }
.anniv-banner-media {
  position: relative; display: block; min-height: 260px;
  padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden;
}
.anniv-banner-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.6s var(--ease);
}
.anniv-banner-media:hover img { transform: scale(1.04); }
.anniv-banner-media:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }

/* the hero follows the banner, so it no longer needs to clear the header or fill the screen */
body.has-anniv-banner .hero-v2 { min-height: 0; padding-top: 4.5rem; }

@media (max-width: 900px) {
  .anniv-banner { --anniv-gap: 1.5rem; }   /* tablets and phones: same as the side gutter */
  .anniv-banner-card { grid-template-columns: 1fr; min-height: 0; }
  .anniv-banner-media { order: -1; aspect-ratio: 4 / 3; min-height: 0; }
  body.has-anniv-banner .hero-v2 { padding-top: 3rem; }
}

/* ─── Banner pill: opens the other film ("Bolden turns one") ─── */
.anniv-pill {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.35rem 1rem 0.35rem 0.35rem; margin-bottom: 1.5rem;
  border-radius: 100px;
  border: 1px solid rgba(255,158,92,0.5);
  background: rgba(255,158,92,0.08);
  color: var(--text); font: 600 0.875rem var(--font-head);
  cursor: pointer; text-align: left;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.anniv-pill:hover { background: rgba(255,158,92,0.18); transform: translateY(-1px); }
.anniv-pill:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.anniv-pill-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FF9E5C, #e879a6); color: #1a0d05;
}
.anniv-pill-icon svg { margin-left: 2px; }
.anniv-pill-sub {
  padding-left: 0.65rem; border-left: 1px solid var(--border-hi);
  font-weight: 500; color: var(--text-muted);
}
html.light-theme .anniv-pill { border-color: rgba(212,100,10,0.45); background: rgba(255,158,92,0.12); }


/* ─── Film lightbox ─── */
html.anniv-lock { overflow: hidden; }
.anniv-lightbox {
  position: fixed; inset: 0; z-index: 9995;
  display: grid; place-items: center; padding: 1.5rem;
  background: rgba(3,4,14,0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.25s;
}
.anniv-lightbox[hidden] { display: none; }
.anniv-lightbox.is-open { opacity: 1; }
.anniv-lightbox-box {
  width: min(980px, 100%);
  transform: scale(0.92); transition: transform 0.45s var(--ease-bounce);
}
.anniv-lightbox.is-open .anniv-lightbox-box { transform: none; }
.anniv-lightbox video {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--r-xl);
  border: 1px solid rgba(133,153,212,0.28);
  box-shadow: 0 40px 90px -20px rgba(69,86,157,0.6);
}
.anniv-lightbox-cap {
  margin-top: 1rem; text-align: center;
  color: #c9cfe6; font-size: 0.9375rem;
}
.anniv-lightbox-cap a { color: #FFB87A; font-weight: 600; margin-left: 0.4rem; }
.anniv-lightbox-next {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 1rem auto 0; padding: 0.4rem 1.1rem 0.4rem 0.4rem;
  border-radius: 100px; border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08); color: #fff;
  font: 600 0.875rem var(--font-head); cursor: pointer;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.anniv-lightbox-next:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.anniv-lightbox-next-icon {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FF9E5C, #e879a6); color: #1a0d05;
}
.anniv-lightbox-next-icon svg { margin-left: 2px; }
.anniv-lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.anniv-lightbox-close:hover { background: rgba(255,255,255,0.14); }

.anniv-confetti {
  position: fixed; top: -16px; width: 8px; height: 14px;
  z-index: 9996; pointer-events: none;
  animation: annivFall var(--d) ease-in forwards;
}
@keyframes annivFall {
  to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0.25; }
}

/* ─── Story page: drifting confetti background (canvas, js/anniversary.js) ─── */
.anniv-bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ─── Story page: hero ─── */
.anniv-page { position: relative; }
.anniv-hero { position: relative; z-index: 1; padding: 10rem 0 4rem; }
.anniv-hero-inner {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem; align-items: center;
}
.anniv-eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 1rem;
}
.anniv-title {
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  color: var(--text); margin-bottom: 1.25rem;
}
.anniv-title .anniv-title-word {
  background: linear-gradient(135deg, #FF9E5C, #DDB7E8, #8599d4, #45569D);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic; padding-right: 0.08em;
}
html.light-theme .anniv-title .anniv-title-word {
  background-image: linear-gradient(135deg, #d4640a, #9b51be, #45569D);
}
.anniv-title-end { white-space: nowrap; }
.anniv-title-balloon {
  display: inline-block; width: 0.58em; margin-left: 0.14em;
  vertical-align: -0.12em; color: var(--text-muted);
  transform-origin: 50% 100%;
  animation: annivBob 3.4s ease-in-out infinite;
}
.anniv-title-balloon svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes annivBob {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-9px) rotate(6deg); }
}
.anniv-lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--text-muted); line-height: 1.75;
  max-width: 500px; margin-bottom: 2rem;
}
.anniv-hero-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.anniv-hero-btns button { cursor: pointer; }
.anniv-video-frame {
  aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-lg);
}
.anniv-video-frame video,
.anniv-video-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .anniv-hero { padding: 8rem 0 3rem; }
  .anniv-hero-inner { grid-template-columns: 1fr; gap: 2.25rem; }
}

/* ─── Story page: the story ─── */
.anniv-story { position: relative; z-index: 1; padding: 1rem 1.5rem 6rem; scroll-margin-top: 90px; }
.anniv-story-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 3rem 3.5rem; /* same card size as regular blog posts (single.php) */
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md);
  counter-reset: chapter;
}
.anniv-story-inner > p {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); line-height: 1.85;
  color: var(--text-muted); margin-bottom: 1.5rem;
}
.anniv-story-inner > p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .anniv-story-inner { padding: 2rem 1.5rem; border-radius: var(--r-xl); }
}
/* storybook opening: larger first paragraph with a drop cap */
.anniv-story-inner > p:first-child { color: var(--text); font-size: clamp(1.1875rem, 1.9vw, 1.375rem); line-height: 1.7; }
.anniv-story-inner--one > p:first-child::first-letter {
  float: left; margin: 0.08em 0.12em 0 0;
  font-size: 3.4em; line-height: 0.85; font-weight: 800;
  color: var(--orange);
}
.anniv-story-inner > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.anniv-story-inner h2 {
  counter-increment: chapter;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--text);
  margin: 2.75rem 0 1rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border-md);
}
.anniv-story-inner h2::before {
  content: '0' counter(chapter);
  display: block; margin-bottom: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; color: var(--orange);
}
.anniv-story-inner ol,
.anniv-story-inner ul {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.anniv-story-inner ol { counter-reset: step; }
.anniv-story-inner li {
  padding: 0.45rem 0.9rem; border-radius: 100px;
  border: 1px solid var(--border-md); background: var(--surface-2);
  font-size: 0.875rem; font-weight: 600; color: var(--text);
}
.anniv-story-inner ol li { counter-increment: step; }
.anniv-story-inner ol li::before {
  content: counter(step); margin-right: 0.5rem;
  font-family: var(--font-mono); color: var(--orange);
}
.anniv-story-inner strong { color: var(--text); font-weight: 700; }
.anniv-story-inner a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,158,92,0.4); }
.anniv-story-inner a:hover { text-decoration-color: var(--orange); }
.anniv-story-inner blockquote {
  margin: 2.5rem 0; padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--orange);
}
.anniv-story-inner blockquote p {
  font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 700;
  line-height: 1.3; letter-spacing: -0.02em; color: var(--text); margin: 0;
}
.anniv-story-end {
  max-width: 1100px; margin: 2.5rem auto 0;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center; justify-content: space-between;
}

@media (max-width: 400px) {
  .anniv-banner { --anniv-gap: 1rem; }   /* the site container gutter is 1rem here */
}

@media (prefers-reduced-motion: reduce) {
  .anniv-confetti { display: none; }
  .anniv-lightbox, .anniv-lightbox-box, .anniv-banner-media img { transition: none; }
  .anniv-title-balloon { animation: none; }
}
