:root {
  --pine: #0f2a22;
  --pine-2: #163a2f;
  --pine-3: #21503f;
  --paper: #f5eedf;
  --paper-2: #ece2cc;
  --ink: #221d17;
  --ink-soft: #5b5145;
  --cranberry: #8e1b2c;
  --cranberry-2: #b0283d;
  --gold: #c9a24a;
  --gold-soft: #e3cc8f;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
  --label: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--pine); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(201, 162, 74, 0.14), transparent 70%),
    radial-gradient(900px 500px at 100% 110%, rgba(142, 27, 44, 0.18), transparent 70%),
    var(--pine);
}

a { color: inherit; }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }

/* ---------- masthead ---------- */
.masthead { text-align: center; padding: 48px 24px 8px; }
.wordmark { text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.wordmark-small {
  font-family: var(--label); font-size: 12px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--gold);
}
.wordmark-big {
  font-family: var(--display); font-weight: 600; font-size: clamp(44px, 7vw, 76px); line-height: 1;
  letter-spacing: 0.01em;
}
.wordmark-big::after {
  content: ""; display: block; margin: 14px auto 0; width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  max-width: 1120px; margin: 0 auto; padding: 28px 24px 40px;
  border-top: 1px solid rgba(201, 162, 74, 0.25);
  font-family: var(--label); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245, 238, 223, 0.55);
}

/* ---------- calendar ---------- */
.intro { max-width: 720px; margin: 20px auto 36px; text-align: center; }
.lede { font-size: 21px; color: rgba(245, 238, 223, 0.86); margin: 0; }
.lede em { color: var(--gold-soft); }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cal-head {
  font-family: var(--label); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  text-align: center; color: var(--gold); padding-bottom: 4px;
}

.door, .door-blank { aspect-ratio: 4 / 5; border-radius: 6px; }
.door-blank { border: 1px dashed rgba(201, 162, 74, 0.18); }

.door {
  position: relative; display: flex; flex-direction: column; padding: 14px 14px 16px;
  text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.door::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201, 162, 74, 0.55);
  border-radius: 3px; pointer-events: none;
}
a.door:hover, a.door:focus-visible {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 14px 28px rgba(0, 0, 0, 0.45);
  outline: none;
}
.door-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 0.9;
  color: var(--cranberry);
  font-variant-numeric: lining-nums;
}
.door-wd {
  font-family: var(--label); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 6px;
}
.door-spirit {
  margin-top: auto; font-family: var(--label); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8a6a1f; line-height: 1.3;
}
.door-name {
  font-family: var(--display); font-weight: 600; font-size: clamp(17px, 1.9vw, 22px); line-height: 1.1;
  margin-top: 4px;
}

.door-xmas { background: linear-gradient(160deg, var(--cranberry-2), var(--cranberry) 60%, #6c1221); color: var(--paper); }
.door-xmas::before { border-color: var(--gold); }
.door-xmas .door-num { color: var(--gold-soft); }
.door-xmas .door-wd { color: rgba(245, 238, 223, 0.75); }
.door-xmas .door-spirit { color: var(--gold-soft); }

.door-locked { filter: saturate(0.4) brightness(0.8); cursor: not-allowed; }

@media (max-width: 760px) {
  .cal { grid-template-columns: repeat(2, 1fr); }
  .cal-head, .door-blank { display: none; }
  .door { aspect-ratio: auto; min-height: 150px; }
}

/* ---------- day view ---------- */
.daynav {
  display: flex; justify-content: space-between; align-items: center; margin: 12px 0 8px;
  font-family: var(--label); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.daynav a { text-decoration: none; color: var(--gold-soft); }
.daynav a:hover { color: var(--paper); }
.daynav-step { display: flex; gap: 20px; }

.day-hero { text-align: center; padding: 20px 0 36px; }
.eyebrow {
  margin: 0; font-family: var(--label); font-size: 16px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold);
}
.day-hero h1 {
  margin: 10px 0 6px; font-family: var(--display); font-weight: 600;
  font-size: clamp(48px, 8vw, 92px); line-height: 1; letter-spacing: 0.005em;
}
.tagline { margin: 0 auto; max-width: 640px; font-style: italic; font-size: 22px; color: rgba(245, 238, 223, 0.8); }
.spirit-badge {
  display: inline-block; margin: 18px 0 0; padding: 6px 16px; border: 1px solid rgba(201, 162, 74, 0.6);
  border-radius: 999px; font-family: var(--label); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-soft);
}
.spirit-badge strong { color: var(--paper); font-weight: 600; }

.day-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .day-grid { grid-template-columns: 1fr; } }

.day-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 860px) { .day-side { position: static; } }

.photo { margin: 0; padding: 10px; background: var(--paper); border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.photo img { display: block; width: 100%; height: auto; border-radius: 2px; }

.card { background: rgba(245, 238, 223, 0.06); border: 1px solid rgba(201, 162, 74, 0.3); border-radius: 6px; padding: 18px 22px; }
.recipe ul { margin: 0 0 12px; padding-left: 18px; }
.recipe li { margin: 2px 0; }
.recipe li::marker { color: var(--gold); }
.recipe p { margin: 0; font-size: 17px; color: rgba(245, 238, 223, 0.78); }

.day-main h2, .card h2 {
  margin: 0 0 10px; font-family: var(--label); font-weight: 600; font-size: 12px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--gold);
}
.block { padding: 0 0 26px; margin: 0 0 26px; border-bottom: 1px solid rgba(201, 162, 74, 0.2); }
.block p { margin: 0; }

.history .year { margin-left: 8px; padding: 2px 8px; background: var(--cranberry); color: var(--paper); border-radius: 3px; letter-spacing: 0.12em; }
.history h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.15; }

.limerick blockquote {
  margin: 0; padding: 18px 26px; border-left: 3px solid var(--cranberry-2);
  background: rgba(245, 238, 223, 0.05);
  font-family: var(--display); font-style: italic; font-weight: 500; font-size: 24px; line-height: 1.45;
}
.limerick blockquote span { display: block; }
.limerick blockquote .indent { padding-left: 1.6em; }
.limerick .credit { margin-top: 10px; font-size: 15px; color: rgba(245, 238, 223, 0.6); }

.joke { border-bottom: none; }
.joke p { font-size: 21px; }

/* story: a paper page */
.story {
  margin: 48px auto 0; max-width: 760px; padding: 48px clamp(24px, 6vw, 64px) 40px;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  color: var(--ink); border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}
.story::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201, 162, 74, 0.6); pointer-events: none;
}
.story-series {
  margin: 0; text-align: center; font-family: var(--label); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cranberry);
}
.story h2 {
  margin: 8px 0 28px; text-align: center; font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1.1;
}
.story-body p { margin: 0 0 1em; font-size: 20px; }
.story-body p:first-child::first-letter {
  float: left; font-family: var(--display); font-weight: 700; font-size: 4.2em; line-height: 0.8;
  padding: 6px 10px 0 0; color: var(--cranberry);
}
.story-next { margin: 24px 0 0; text-align: right; font-family: var(--label); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.story-next a { color: var(--cranberry); text-decoration: none; }
.story-next.fin { text-align: center; color: var(--cranberry); }

.day-xmas .day-hero h1 { color: var(--gold-soft); }

/* ---------- view switcher ---------- */
.viewnav {
  display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px;
  font-family: var(--label); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
}
.viewnav a { text-decoration: none; color: rgba(245, 238, 223, 0.6); padding-bottom: 3px; border-bottom: 1px solid transparent; }
.viewnav a:hover { color: var(--paper); }
.viewnav a[aria-current="page"] { color: var(--gold-soft); border-bottom-color: var(--gold); }
.viewnav span { color: var(--gold); font-size: 10px; }

/* ---------- tree view ---------- */
.tree {
  --bw: clamp(58px, 15.5vw, 150px);   /* bottle width */
  --gap: clamp(6px, 1.4vw, 16px);
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 0;
}
.tree-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(var(--gap) * 0.6); padding: 18px 0 22px; }
.tree-body::before {   /* soft fir silhouette behind the bottles */
  content: ""; position: absolute; z-index: 0; left: 50%; top: 0; bottom: 0;
  width: calc(var(--bw) * 7.6 + var(--gap) * 6); transform: translateX(-50%);
  background: linear-gradient(180deg, #2a6a50, #21573f 55%, #1a4634);
  clip-path: polygon(50% 0, 66% 30%, 60% 30%, 80% 62%, 73% 62%, 96% 100%, 4% 100%, 27% 62%, 20% 62%, 40% 30%, 34% 30%);
}
.tree-row { position: relative; z-index: 1; display: flex; justify-content: center; gap: var(--gap); }

.tree-trunk {
  width: calc(var(--bw) * 0.9); height: calc(var(--bw) * 0.45);
  background: linear-gradient(90deg, #3d2a1c, #5a3e2a 50%, #3d2a1c);
  border-radius: 0 0 4px 4px;
}

.bottle {
  width: var(--bw); display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--ink);
  transition: transform 0.18s ease, filter 0.18s ease;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
a.bottle:hover, a.bottle:focus-visible { transform: translateY(-5px) rotate(-1.5deg); outline: none; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.55)); }
.bottle-cap { width: 30%; height: calc(var(--bw) * 0.12); border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, var(--gold-soft), var(--gold) 60%, #a07f2f); }
.cap-red .bottle-cap { background: linear-gradient(180deg, #c84a5c, var(--cranberry) 60%, #6c1221); }
.bottle-neck {
  width: 24%; height: calc(var(--bw) * 0.16);
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(201,162,74,0.28) 40%, rgba(255,255,255,0.10));
  border-left: 1px solid rgba(227, 204, 143, 0.4); border-right: 1px solid rgba(227, 204, 143, 0.4);
}
.bottle-body {
  width: 100%; padding: 7% 7% 9%;
  border-radius: 22% 22% 10px 10px / 14% 14% 10px 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22), transparent 18%, transparent 80%, rgba(255,255,255,0.10)),
    linear-gradient(180deg, rgba(201,162,74,0.55), rgba(142,92,30,0.75));
  border: 1px solid rgba(227, 204, 143, 0.55);
}
.bottle-label {
  display: flex; flex-direction: column; min-height: calc(var(--bw) * 0.92);
  padding: 8% 8% 9%; border-radius: 3px;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.7), inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(201, 162, 74, 0.35);
}
.bottle .door-num { font-size: calc(var(--bw) * 0.26); }
.bottle .door-wd { font-size: calc(var(--bw) * 0.066); margin-top: 5px; }
.bottle .door-spirit { font-size: calc(var(--bw) * 0.064); }
.bottle .door-name { font-size: calc(var(--bw) * 0.115); }
.bottle-locked { filter: saturate(0.4) brightness(0.8); cursor: not-allowed; }

.star {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: var(--paper); margin-bottom: 4px; text-align: center;
  transition: transform 0.2s ease;
}
a.star:hover, a.star:focus-visible { transform: scale(1.04); outline: none; }
.star-shape { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: calc(var(--bw) * 1.05); height: auto; fill: var(--gold); filter: drop-shadow(0 0 18px rgba(227, 204, 143, 0.55)); }
.star-num {
  position: relative; width: calc(var(--bw) * 1.05); height: calc(var(--bw) * 1.0); text-align: center; padding-top: calc(var(--bw) * 0.34);
  font-family: var(--display); font-weight: 700; font-size: calc(var(--bw) * 0.3); color: var(--cranberry); line-height: 1;
  font-variant-numeric: lining-nums;
}
.star-text { display: flex; flex-direction: column; align-items: center; }
.star .door-wd { color: rgba(245, 238, 223, 0.75); }
.star .door-spirit { margin-top: 2px; color: var(--gold-soft); }
.star .door-name { color: var(--paper); font-size: clamp(18px, 2.2vw, 24px); }
.star-locked { filter: saturate(0.4) brightness(0.8); }

@media (max-width: 600px) {
  .bottle .door-wd, .bottle .door-spirit { display: none; }
  .bottle .door-name { font-size: 9px; margin-top: auto; }
  .bottle-label { min-height: calc(var(--bw) * 1.1); }
}

/* ---------- who's who ---------- */
.story-cast { margin: 6px 0 0; text-align: center; font-family: var(--label); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.story-cast a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid rgba(142, 27, 44, 0.4); padding-bottom: 1px; }
.story-cast a:hover { color: var(--cranberry); border-bottom-color: var(--cranberry); }

.cast { margin-top: 12px; }
.cast-note { margin: -14px 0 28px; text-align: center; font-style: italic; font-size: 17px; color: var(--ink-soft); }
.cast-list { margin: 0; }
.cast-item { padding: 18px 0; border-top: 1px solid rgba(201, 162, 74, 0.45); }
.cast-item:first-child { border-top: none; padding-top: 0; }
.cast-item dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 6px; }
.cast-name { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--ink); }
.cast-role { font-family: var(--label); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cranberry); }
.cast-item dd { margin: 0; }
.cast-item dd p { margin: 0; font-size: 19px; }
.cast-item .cast-first { margin-top: 6px; font-family: var(--label); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.cast-first a { color: var(--cranberry); text-decoration: none; }
.cast-note strong { color: var(--cranberry); font-style: normal; }
.cast-note a { color: var(--cranberry); }
.cast-notes { margin: 10px 0 0; padding-left: 18px; }
.cast-notes li { font-size: 17px; line-height: 1.5; margin: 4px 0; color: var(--ink-soft); }
.cast-notes li::marker { color: var(--cranberry); }

/* ---------- locked door ---------- */
.locked { text-align: center; padding: 60px 0 80px; }
.locked h1 { margin: 10px 0 10px; font-family: var(--display); font-weight: 600; font-size: clamp(56px, 9vw, 96px); line-height: 1; }
.locked-quip { margin-top: 28px; font-family: var(--display); font-style: italic; font-size: 22px; color: var(--gold-soft); }
