:root {
  --bg: #ffffff;
  --snow: #f4f8fb;
  --ice: #e6eef5;
  --line: rgba(20, 38, 30, 0.10);
  --ink: #14261e;
  --muted: #5d6e68;
  --red: #b81f2a;
  --red-hi: #cf2a35;
  --pine: #1f5240;
  --gold: #b0893a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; margin: 0; }
em { font-style: italic; color: var(--red); }

#snow {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 15;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 28px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 4px;
  text-decoration: none;
  font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
}
.brand-star { color: var(--red); font-size: 14px; }
.nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(184, 31, 42, .6); }
.btn-red:hover { background: var(--red-hi); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: rgba(20, 38, 30, .2); color: var(--ink); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { border-color: rgba(20, 38, 30, .45); }
.btn-ghost-dark { border-color: rgba(20, 38, 30, .2); color: var(--ink); background: transparent; }
.btn-ghost-dark:hover { border-color: rgba(20, 38, 30, .45); }
.x-icon { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* ---------- Snowy hero scene ---------- */
.scene {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #c9dcec 0%, #dde9f3 38%, #eef4f9 70%, #ffffff 100%);
  padding-bottom: 60px;
}
.mountains {
  position: absolute; left: 0; right: 0; bottom: 40px;
  width: 100%; height: 46%;
  z-index: 0;
}
.drift {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 150px;
  z-index: 3;
}
.scene-lights { position: absolute; top: 0; left: 0; width: 100%; height: 60px; z-index: 4; overflow: visible; }

.hero {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px;
  padding: 90px 28px 40px;
  min-height: min(820px, 92vh);
}
.hero-copy { position: relative; z-index: 4; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pine);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px rgba(184, 31, 42, .18);
  animation: beacon 2s ease-in-out infinite;
}
@keyframes beacon { 50% { box-shadow: 0 0 0 8px rgba(184, 31, 42, 0); } }
.hero h1.hero-name {
  font-size: clamp(96px, 14vw, 184px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.lede {
  margin: 26px 0 34px;
  max-width: 440px;
  font-size: 19px; color: #3f514a;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.hero-stats {
  display: flex; gap: 40px;
  margin: 48px 0 0; padding-top: 24px;
  border-top: 1px solid rgba(20, 38, 30, .14);
}
.hero-stats div { margin: 0; }
.hero-stats dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; }

/* Chris, faded softly into the landscape (no frame) */
.chris {
  position: relative; z-index: 1;
  align-self: end;
  justify-self: center;
  width: min(620px, 112%);
  margin-bottom: -90px;
}
.chris img {
  width: 100%; height: auto;
  -webkit-mask-image: radial-gradient(ellipse 50% 52% at 50% 46%, #000 58%, rgba(0, 0, 0, .6) 70%, transparent 84%);
          mask-image: radial-gradient(ellipse 50% 52% at 50% 46%, #000 58%, rgba(0, 0, 0, .6) 70%, transparent 84%);
}

/* ---------- Lights ---------- */
.wire { fill: none; stroke: #49604f; stroke-width: 1.6; opacity: .7; }
.bulb circle.glow { filter: blur(5px); }
.bulb { animation: twinkle var(--d, 2.4s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  45%, 55% { opacity: .25; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
  background: #fff;
}
.marquee-track {
  display: flex; align-items: center; gap: 36px; width: max-content;
  font-family: var(--serif); font-style: italic; font-size: 26px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
}
.marquee-track i { font-style: normal; color: var(--red); font-size: 16px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 120px 28px; }
.kicker {
  margin: 0 0 18px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
}
.section h2 { font-size: clamp(38px, 5vw, 64px); line-height: 1.04; }
.sub { color: var(--muted); font-size: 18px; max-width: 520px; margin: 20px 0 0; }
.section-head { margin-bottom: 56px; }

/* Story */
.story { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: start; }
.story-head { position: sticky; top: 120px; }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li {
  display: grid; grid-template-columns: 64px 1fr; column-gap: 8px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.chapters li:last-child { border-bottom: 1px solid var(--line); }
.chapters .num { grid-row: span 2; font-family: var(--serif); font-size: 18px; color: var(--red); padding-top: 6px; }
.chapters h3 { font-size: 30px; margin-bottom: 10px; }
.chapters p { margin: 0; color: var(--muted); font-size: 17px; }

/* Countdown band */
.countdown-band {
  position: relative;
  color: #fff;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(255, 220, 150, .16), transparent 70%),
    linear-gradient(180deg, #a31a24, #7a121b);
  overflow: hidden;
}
.band-lights { position: absolute; top: 0; left: 0; width: 100%; height: 60px; overflow: visible; }
.countdown-band .wire { stroke: #2d0a0e; }
.countdown { text-align: center; padding-block: 130px 110px; }
.kicker.light { color: rgba(255, 255, 255, .8); }
.cd { display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 3vw, 36px); }
.cd > div:not(.sep) { min-width: 1.6em; }
.cd span {
  display: block;
  font-family: var(--serif); font-size: clamp(56px, 10vw, 132px); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd small { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.cd .sep { font-family: var(--serif); font-size: clamp(40px, 7vw, 96px); line-height: 1.1; color: rgba(255, 255, 255, .35); }
.cd-note { margin: 36px 0 0; font-family: var(--serif); font-style: italic; font-size: 20px; color: rgba(255, 255, 255, .9); }

/* Advent */
.advent { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.door {
  position: relative;
  aspect-ratio: 1 / 1.1;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--snow);
  color: var(--ink);
  font: inherit; text-align: left;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
  overflow: hidden;
}
.door:hover:not(.locked):not(.open) { border-color: rgba(184, 31, 42, .5); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(20, 38, 30, .4); }
.door .d-num { font-family: var(--serif); font-size: 34px; line-height: 1; }
.door .d-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.door .d-text { font-size: 13.5px; line-height: 1.45; color: var(--ink); display: none; }
.door.locked { cursor: not-allowed; opacity: .5; }
.door.today { background: #fff; border-color: var(--red); box-shadow: 0 0 0 4px rgba(184, 31, 42, .1); }
.door.today .d-label { color: var(--red); }
.door.open { background: #fff; border-color: rgba(31, 82, 64, .35); cursor: default; }
.door.open .d-num { font-size: 18px; color: var(--pine); }
.door.open .d-label { display: none; }
.door.open .d-text { display: block; }
.door.nudge { animation: nudge .35s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Studio */
.studio {
  display: grid; grid-template-columns: 1.1fr 1fr;
  border-radius: 24px; overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -50px rgba(20, 38, 30, .45);
}
.studio-preview { background: var(--snow); padding: 28px; }
#memeCanvas { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 20px 40px -24px rgba(20, 38, 30, .5); }
.studio-controls { padding: 44px; display: flex; flex-direction: column; }
.studio-controls label, .studio-controls .label {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.studio-controls input {
  padding: 14px 16px; margin-bottom: 24px;
  border-radius: 12px; border: 1px solid rgba(20, 38, 30, .18);
  background: #fff; color: var(--ink);
  font: 500 16px var(--sans);
}
.studio-controls input:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.styles { display: flex; gap: 8px; margin-bottom: 32px; }
.style-pick {
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(20, 38, 30, .18); background: transparent; color: var(--ink);
  font: 500 14px var(--sans);
}
.style-pick.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.studio-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.hint { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

/* Join */
.join-wrap { background: linear-gradient(180deg, #fff, var(--snow)); }
.join { text-align: center; padding-bottom: 140px; }
.join-flake { font-size: 44px; color: #9fb8cf; margin-bottom: 18px; animation: spin 14s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.join .sub { margin: 20px auto 36px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--snow); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--muted);
}
.footer-inner .brand { color: var(--ink); font-size: 20px; }
.footer-x {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid rgba(20, 38, 30, .18); color: var(--ink);
}
.footer-x:hover { border-color: rgba(20, 38, 30, .45); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; gap: 0; padding-top: 70px; text-align: center; min-height: 0; }
  .lede { margin-inline: auto; }
  .actions, .hero-stats { justify-content: center; }
  .chris { width: min(460px, 100%); margin-bottom: -60px; }
  .mountains { height: 45%; }
  .story { grid-template-columns: 1fr; gap: 40px; }
  .story-head { position: static; }
  .advent { grid-template-columns: repeat(4, 1fr); }
  .studio { grid-template-columns: 1fr; }
  .section { padding-block: 88px; }
}
@media (max-width: 560px) {
  .nav-inner, .section, .hero { padding-inline: 20px; }
  .hero-stats { gap: 24px; }
  .hero-stats dd { font-size: 24px; }
  .advent { grid-template-columns: repeat(3, 1fr); }
  .door .d-text { font-size: 12px; }
  .studio-controls { padding: 28px; }
  .studio-preview { padding: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .marquee-track { font-size: 20px; }
  .drift { height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
