:root {
  --night-1: #08141b;
  --night-2: #13303a;
  --text: #f4e6c4;
  --muted: #b9ab88;
  --gold: #e2bf74;
  --gold-2: #f7e2a6;
  --serif: "Marcellus", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--text);
  font: 17px/1.6 Georgia, serif;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 45% at 50% 62%, #f3b9541c, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 0%, var(--night-2), var(--night-1) 75%);
  background-color: var(--night-1);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; }

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

.page { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }

/* Header */
header { padding: clamp(36px, 8vh, 80px) 16px 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 14px;
  letter-spacing: .38em; font-size: .74rem; color: var(--muted);
}
.kicker::before, .kicker::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.kicker::after { transform: scaleX(-1); }
h1 {
  font: 400 clamp(2.6rem, 9vw, 5.6rem)/1.02 var(--serif);
  margin: 14px 0 10px;
  letter-spacing: .015em;
  background: linear-gradient(180deg, #fff6dc 10%, var(--gold) 70%, #b98d43);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 22px #e2bf7433);
}
.countdown { margin: 0; color: var(--muted); font-size: clamp(.95rem, 2.4vw, 1.1rem); }
.countdown b { color: var(--gold-2); font-weight: 400; font-family: var(--serif); font-size: 1.25em; }

/* Wreath */
.wreath {
  position: relative;
  width: 100%; max-width: 1000px;
  margin: clamp(40px, 9vh, 90px) auto 0;
  padding: 0 16px;
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
}
.candles {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 8px;
}
.candle {
  --w: clamp(54px, 9vw, 92px);
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  padding-top: 70px;
}
.candle:nth-child(2) { padding-top: 86px; }
.candle:nth-child(3) { padding-top: 58px; }
.candle:nth-child(4) { padding-top: 78px; }

.body {
  position: relative;
  width: var(--w); height: calc(var(--w) * 2.4);
  border-radius: 6px 6px 3px 3px / 4px 4px 3px 3px;
  background: linear-gradient(90deg, var(--c-dark) 0%, var(--c) 30%, var(--c-light) 48%, var(--c) 68%, var(--c-dark) 100%);
  box-shadow: inset 0 -30px 40px -20px #0006, 0 18px 30px -10px #0008;
  display: grid; place-items: center;
  transition: filter .35s;
}
/* top rim + drip */
.body::before {
  content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 14px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, var(--c-dark), var(--c-light) 70%);
}
.body::after {
  content: ""; position: absolute; top: 0; left: 22%; width: 9px; height: 30%;
  border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--c), var(--c-light));
  box-shadow: calc(var(--w) * .42) 0 0 -1px var(--c-light);
  clip-path: inset(0 -60px -0 -60px);
  opacity: .85;
}
.purple { --c: #6a2c84; --c-dark: #3b1450; --c-light: #9a5bb5; }
.pink { --c: #c4668f; --c-dark: #8a3a5f; --c-light: #eaa0c1; }

.num {
  font: 400 calc(var(--w) * .5)/1 var(--serif);
  color: var(--gold-2); opacity: .9;
  text-shadow: 0 1px 0 #0005;
}

.wick {
  position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%);
  width: 3px; height: 12px; border-radius: 2px; background: #2a1d14;
}

/* Flame */
.flame {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  width: calc(var(--w) * .34); height: calc(var(--w) * .74);
  transform: translateX(-50%);
  transform-origin: 50% 90%;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse 50% 70% at 50% 72%, #fff 0 22%, #ffe9a6 38%, #ffb23e 62%, #ff7a1a00 78%);
  animation: flicker 2.6s ease-in-out infinite;
}
.flame::before { /* blue base */
  content: ""; position: absolute; left: 30%; right: 30%; bottom: 6%; height: 22%;
  border-radius: 50%; background: #6aa6ff66; filter: blur(2px);
}
.flame::after { /* halo */
  content: ""; position: absolute; left: 50%; top: 55%;
  width: calc(var(--w) * 4); height: calc(var(--w) * 4);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffc65a55, #ffb34a1c 38%, transparent 66%);
  pointer-events: none;
  animation: halo 2.6s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { transform: translateX(-50%) rotate(-1.5deg) scaleY(1); }
  25% { transform: translateX(-52%) rotate(2deg) scaleY(1.06); }
  50% { transform: translateX(-49%) rotate(-2.5deg) scaleY(.95); }
  75% { transform: translateX(-51%) rotate(1deg) scaleY(1.04); }
}
@keyframes halo { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

/* unlit candle: thin smoke wisp */
.unlit .smoke {
  position: absolute; left: 50%; bottom: calc(100% + 14px);
  width: 2px; height: 34px; transform: translateX(-50%);
  background: linear-gradient(#ffffff00, #ffffff26);
  border-radius: 2px; filter: blur(1.5px);
  animation: smoke 4s ease-in-out infinite;
}
@keyframes smoke {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scaleY(.6); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-30%) translateY(-14px) skewX(-12deg) scaleY(1.1); }
}
.unlit .body { filter: saturate(.75) brightness(.72); }

a.candle:hover .body, a.candle:focus-visible .body { filter: brightness(1.12); }
a.candle:hover .flame::after, a.candle:focus-visible .flame::after { animation: none; opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
a.candle:focus-visible { outline: none; }
a.candle:focus-visible .label h2 { text-decoration: underline; text-underline-offset: 5px; }

/* Garland */
.garland {
  position: relative; z-index: 3;
  height: clamp(70px, 11vw, 120px);
  margin: calc(clamp(70px, 11vw, 120px) * -0.45) -16px 0;
}
.garland svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Labels */
.labels {
  position: relative; z-index: 4;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 6px;
}
.label { text-decoration: none; padding: 6px 2px 0; }
.label h2 {
  font: 400 clamp(1rem, 2.3vw, 1.45rem)/1.2 var(--serif);
  margin: 0 0 4px; color: var(--text);
}
.label p { margin: 0; font-size: clamp(.78rem, 1.6vw, .95rem); color: var(--muted); }
.label .open {
  display: inline-block; margin-top: 12px; padding: 7px 18px;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold-2); font-size: .9rem; letter-spacing: .06em;
  background: #e2bf7414; transition: background .25s, color .25s;
}
a.label:hover .open, a.label:focus-visible .open { background: var(--gold); color: #1b130a; }
.label.soon { opacity: .6; }

footer { position: relative; z-index: 1; padding: 36px 16px 22px; color: #8d8268; font-size: .8rem; letter-spacing: .2em; }

@media (max-width: 560px) {
  .candles { gap: 2px; }
  .labels { grid-template-columns: repeat(2, 1fr); row-gap: 22px; margin-top: 14px; }
  .label .open { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .flame, .flame::after, .unlit .smoke { animation: none; }
}
