@font-face { font-family: 'Cinzel'; font-weight: 400 900; font-display: swap; src: url(/fonts/cinzel.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-italic.woff2) format('woff2'); }

:root {
  --night: #070a12;
  --ink: #f4ecdc;
  --muted: #b9b2a3;
  --faint: #857f74;
  --gold: #d9a441;
  --gold-hi: #f3d27c;
  --red: #b3242e;
  --red-deep: #6e1118;
  --pine: #1b6340;
  --panel: rgba(16, 20, 30, .62);
  --line: rgba(217, 164, 65, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 1.15rem/1.55 'Cormorant', Georgia, 'Times New Roman', serif;
  /* lining numerals everywhere: Cormorant's old-style 1 and 0 read as ı and o. Feature settings survive the font shorthand. */
  font-feature-settings: 'lnum' 1;
  background-color: var(--night);
  background-image:
    radial-gradient(120% 60% at 50% 118%, rgba(120, 190, 255, .28) 0, rgba(60, 110, 190, .12) 38%, transparent 62%),
    radial-gradient(60% 40% at 12% 18%, rgba(140, 30, 45, .22), transparent 70%),
    radial-gradient(55% 45% at 90% 30%, rgba(30, 110, 80, .18), transparent 70%),
    linear-gradient(180deg, #05070d 0%, #0a0f1c 55%, #0d1526 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold-hi); }

/* ---------- sky, snow, garland ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url(/stars.svg) 0 0 / 600px 600px repeat;
  opacity: .85;
}
.snow { position: absolute; inset: -400px 0 0; background-repeat: repeat; will-change: transform; }
.snow.far { background-image: url(/snow-far.svg); background-size: 400px 400px; opacity: .55; animation: fall 38s linear infinite; }
.snow.near { background-image: url(/snow-near.svg); background-size: 400px 400px; opacity: .7; animation: fall-sway 22s linear infinite; }
@keyframes fall { to { transform: translate3d(0, 400px, 0); } }
@keyframes fall-sway {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(14px, 200px, 0); }
  100% { transform: translate3d(0, 400px, 0); }
}

.garland {
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 150px;
  z-index: 2;
  pointer-events: none;
  background: url(/garland.svg) center top / 420px 150px repeat-x;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.4rem 16px 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* the ornament hangs on a thread that runs up behind the garland, however much space is above it */
.hang { position: relative; display: flex; justify-content: center; margin-bottom: .4rem; }
.hang::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  width: 1.5px;
  height: 100vh;
  transform: translateX(-50%);
  background: linear-gradient(0deg, #b8893a, rgba(217, 164, 65, .55));
}
.ornament {
  display: block;
  width: 168px;
  height: auto;
  transform-origin: 50% 0;
  animation: swing 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
}
.ornament.small { width: 120px; }
@keyframes swing { 0%, 100% { transform: rotate(-2.4deg); } 50% { transform: rotate(2.4deg); } }

.eyebrow {
  margin: 0 0 .35rem;
  font: 500 .78rem/1.4 'Cinzel', Georgia, serif;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow .dot { margin: 0 .35em; color: var(--faint); }

.title {
  margin: 0;
  font: 700 clamp(2.6rem, 11vw, 5.2rem)/1.02 'Cinzel', Georgia, serif;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #fff6e0 0%, var(--gold-hi) 45%, var(--gold) 80%, #a8761f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(217, 164, 65, .28));
}
.title.sm { font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.15; }

.lede {
  margin: 1rem 0 0;
  max-width: 30rem;
  font-style: italic;
  font-size: clamp(1.3rem, 4.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- countdown ---------- */
.countdown { display: flex; align-items: flex-start; justify-content: center; gap: .55rem; margin: 1.6rem 0 0; }
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.6rem;
  padding: .7rem .5rem .55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(243, 210, 124, .08), 0 10px 24px rgba(0, 0, 0, .35);
}
.cd-num {
  font: 600 2.1rem/1 'Cinzel', Georgia, serif;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--gold-hi);
  text-shadow: 0 0 16px rgba(217, 164, 65, .35);
}
.cd-label { margin-top: .4rem; font: 500 .62rem/1 'Cinzel', Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cd-sep { align-self: center; margin-top: -1.1rem; font: 500 1.5rem/1 'Cinzel', Georgia, serif; font-style: normal; color: var(--gold); opacity: .6; }
.cd-when { margin: .7rem 0 0; font-size: 1rem; font-style: italic; font-variant-numeric: lining-nums; color: var(--muted); }
@media (max-width: 420px) {
  .countdown { gap: .3rem; }
  .cd-unit { min-width: 0; flex: 1; padding: .6rem .2rem .5rem; }
  .cd-num { font-size: 1.65rem; }
  .cd-label { font-size: .55rem; letter-spacing: .14em; }
  .cd-sep { font-size: 1.2rem; }
}

.rule { display: flex; align-items: center; gap: .9rem; width: min(18rem, 80%); margin: 1.7rem 0 1.9rem; color: var(--gold); }
.rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 30%, var(--gold) 100%); }
.rule span:last-child { transform: scaleX(-1); }
.rule i { font-style: normal; font-size: .9rem; }

/* ---------- login button ---------- */
.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3.6rem;
  padding: .9rem 2.1rem;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(243, 210, 124, .75);
  background: linear-gradient(180deg, #c22b36 0%, var(--red) 45%, var(--red-deep) 100%);
  box-shadow:
    0 0 0 4px rgba(217, 164, 65, .12),
    0 12px 32px rgba(179, 36, 46, .38),
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -2px 0 rgba(0, 0, 0, .25);
  color: #fff8ea;
  font: 600 1rem/1.2 'Cinzel', Georgia, serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.login .ico { width: 1.35rem; height: 1.35rem; flex: none; color: var(--gold-hi); }
.login:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 0 0 5px rgba(217, 164, 65, .2), 0 16px 40px rgba(179, 36, 46, .5), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 0 rgba(0, 0, 0, .25); }
.login:active { transform: translateY(1px); }
.login:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }

.fine { margin: 1.1rem 0 0; max-width: 26rem; font-size: 1rem; line-height: 1.45; color: var(--muted); }

.back {
  margin-top: 1.6rem;
  font: 500 .85rem/1 'Cinzel', Georgia, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: .3rem;
}
.hero.short { flex: 1; justify-content: center; padding-top: 6rem; }

/* ---------- signed in ---------- */
.pilot { display: flex; flex-direction: column; align-items: center; }
.portrait {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin-bottom: 1.1rem;
  box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 5px rgba(122, 84, 24, .9), 0 0 0 6px rgba(243, 210, 124, .5), 0 0 30px rgba(243, 210, 124, .3), 0 16px 30px rgba(0, 0, 0, .55);
  background: #13171c;
}
.badge {
  margin: .8rem 0 0;
  padding: .35rem .9rem;
  border: 1px solid rgba(243, 210, 124, .6);
  border-radius: 999px;
  background: rgba(217, 164, 65, .12);
  font: 600 .7rem/1 'Cinzel', Georgia, serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.corp { margin: .5rem 0 0; font-size: 1.2rem; color: var(--muted); }
.out { margin: 0; }
button.back { background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--gold-hi); cursor: pointer; padding: 0 0 .3rem; }
button.back:hover, a.back:hover { color: #fff6e0; }
button.back:focus-visible, a.back:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.landing .hero { flex: 1; justify-content: center; padding-bottom: 4rem; }

/* ---------- steps ---------- */
.steps {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 16px 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
}
.step::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217, 164, 65, .1);
  border-radius: 10px;
  pointer-events: none;
}
.num { display: block; font: 500 .8rem/1 'Cinzel', Georgia, serif; letter-spacing: .25em; color: var(--gold); }
.step h2 { margin: .55rem 0 .45rem; font: 600 1.2rem/1.25 'Cinzel', Georgia, serif; letter-spacing: .06em; color: var(--ink); }
.step p { margin: 0; font-size: 1.08rem; line-height: 1.45; color: var(--muted); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 1.6rem 16px calc(1.8rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .98rem;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(5, 7, 13, .55), rgba(5, 7, 13, .92));
  border-top: 1px solid rgba(217, 164, 65, .14);
}
.foot p { margin: .2rem 0; }
.foot .host { margin-bottom: .55rem; font: 500 .72rem/1.6 'Cinzel', Georgia, serif; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.foot .host-name {
  margin: 0 .2em;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold-hi);
  text-shadow: 0 0 16px rgba(217, 164, 65, .35);
}
.foot .host .tick { letter-spacing: .08em; }
.foot .host-pair { white-space: nowrap; }
.foot .legal { margin-top: .5rem; font-size: .85rem; color: var(--faint); }
.foot strong { color: var(--ink); font-weight: 600; }
.tick { font: 600 .95rem/1 'Cormorant', Georgia, serif; font-variant-numeric: lining-nums; letter-spacing: .08em; color: var(--gold); margin-left: .15em; }

/* ---------- member page: join / registered / match ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero.member { padding-top: 8.5rem; max-width: 46rem; }
.notice {
  margin: 1.4rem 0 0;
  padding: .7rem 1.2rem;
  border: 1px solid rgba(79, 191, 122, .45);
  border-radius: 10px;
  background: rgba(79, 191, 122, .1);
  color: #d9f5e3;
  font-size: 1.08rem;
}
.panel {
  position: relative;
  width: 100%;
  margin: 1.8rem 0 1.6rem;
  padding: 2rem 1.8rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 27, 40, .82), rgba(12, 15, 24, .82));
  /* the tree layer (::after) sits behind the content and is clipped to the card */
  isolation: isolate;
  overflow: hidden;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(243, 210, 124, .1);
}
.panel::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(217, 164, 65, .1); border-radius: 13px; pointer-events: none; }
/* text over the tree's lights: a soft dark halo keeps it crisp */
.panel .panel-copy, .panel .panel-title, .panel .eyebrow, .panel .reg-tier, .panel .cd-when, .panel .fine { text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 0 14px rgba(7, 10, 18, .95); }
/* big warm tree, zoomed in and about half off the right edge, fading out towards the text */
.panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -14%;
  bottom: -16%;
  right: -24%;
  aspect-ratio: 360 / 470;
  background: url(/tree.svg) center / contain no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(to right, transparent 4%, rgba(0, 0, 0, .55) 24%, #000 42%);
  mask-image: linear-gradient(to right, transparent 4%, rgba(0, 0, 0, .55) 24%, #000 42%);
  pointer-events: none;
}
.panel-title { margin: .2rem 0 .5rem; font: 600 clamp(1.5rem, 5vw, 2rem)/1.2 'Cinzel', Georgia, serif; letter-spacing: .03em; color: var(--ink); }
.panel-copy { margin: 0 auto; max-width: 32rem; font-size: 1.15rem; line-height: 1.5; color: var(--muted); }
.panel .fine { margin-left: auto; margin-right: auto; }
.join-form { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }

/* tier cards */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; width: 100%; margin: 0; padding: 0; border: 0; }
.tier { position: relative; display: block; cursor: pointer; }
.tier input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tier-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  height: 100%;
  padding: 1.1rem .8rem 1rem;
  border: 1px solid rgba(217, 164, 65, .25);
  border-radius: 14px;
  background: rgba(10, 13, 21, .6);
  transition: border-color .15s ease, box-shadow .2s ease, background .2s ease, transform .15s ease;
}
.tier:hover .tier-card { border-color: rgba(243, 210, 124, .55); transform: translateY(-1px); }
.tier input:focus-visible + .tier-card { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.tier input:checked + .tier-card {
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, rgba(179, 36, 46, .35), rgba(110, 17, 24, .25));
  box-shadow: 0 0 0 1px var(--gold-hi), 0 0 26px rgba(243, 210, 124, .25);
}
.tier-gifts { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 2.2rem; color: #c22b36; }
.tier-gifts svg { width: 1.5rem; height: 1.5rem; }
.tier-gifts.g2 svg:last-child, .tier-gifts.g3 svg:nth-child(2) { width: 1.9rem; height: 1.9rem; }
.tier-gifts.g3 svg:last-child { width: 1.3rem; height: 1.3rem; }
.tier-name { font: 700 1.05rem/1.2 'Cinzel', Georgia, serif; letter-spacing: .08em; color: var(--gold-hi); }
.tier-range { font-size: 1.02rem; line-height: 1.3; color: var(--ink); font-variant-numeric: lining-nums; }

/* registered */
.registered { display: flex; align-items: center; justify-content: center; gap: .9rem; text-align: left; }
.registered .eyebrow { margin: 0 0 .2rem; color: #7fd6a0; }
.check {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  color: #0b1a10;
  background: linear-gradient(180deg, #8be3ac, #3ea766);
  box-shadow: 0 0 0 3px rgba(79, 191, 122, .25), 0 0 20px rgba(79, 191, 122, .35);
}
.check svg { width: 1.4rem; height: 1.4rem; }
.reg-tier { margin: 0; font: 700 1.25rem/1.2 'Cinzel', Georgia, serif; letter-spacing: .05em; color: var(--gold-hi); font-variant-numeric: lining-nums; }
.reg-tier span { display: block; margin-top: .2rem; font: 400 1.05rem/1.3 'Cormorant', Georgia, serif; font-variant-numeric: lining-nums; letter-spacing: 0; color: var(--ink); }

/* the mystery match */
.match {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.6rem 0 0;
  padding: 1.4rem;
  border-top: 1px solid rgba(217, 164, 65, .15);
  text-align: left;
}
.mystery {
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 5px rgba(122, 84, 24, .9), 0 0 0 6px rgba(243, 210, 124, .5), 0 0 34px rgba(243, 210, 124, .3), 0 16px 30px rgba(0, 0, 0, .55);
}
.match-copy .eyebrow { margin-bottom: 0; }
.match-copy .panel-copy { margin: 0; }
#entry .countdown { margin-top: .6rem; }

/* change tier / leave */
.manage { margin-top: 1.6rem; text-align: left; border-top: 1px solid rgba(217, 164, 65, .15); padding-top: 1rem; }
.manage summary {
  cursor: pointer;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font: 500 .8rem/1.4 'Cinzel', Georgia, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
}
.manage summary::-webkit-details-marker { display: none; }
.manage summary::after { content: ' ▾'; color: var(--gold); }
.manage[open] summary::after { content: ' ▴'; }
.manage summary:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.manage-form { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.1rem; }
.tiers.compact .tier-card { padding: .7rem .5rem; }
.tiers.compact .tier-gifts { display: none; }
.btn-quiet, .btn-leave {
  padding: .6rem 1.4rem;
  border-radius: 999px;
  font: 600 .8rem/1 'Cinzel', Georgia, serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-quiet { border: 1px solid var(--gold); background: rgba(217, 164, 65, .12); color: var(--gold-hi); }
.btn-quiet:hover { background: rgba(217, 164, 65, .22); }
.btn-leave { border: 1px solid rgba(229, 96, 90, .45); background: none; color: #f0a19c; }
.btn-leave:hover { background: rgba(229, 96, 90, .12); }
.btn-quiet:focus-visible, .btn-leave:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

@media (max-width: 600px) {
  .hero.member { padding-top: 7rem; }
  .panel { padding: 1.6rem 1rem 1.4rem; }
  .panel::after { top: auto; bottom: -4%; height: 56%; right: -20%; opacity: .46; }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier-card { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; column-gap: .8rem; padding: .85rem 1rem; text-align: left; }
  .tier-gifts { width: 3.6rem; height: 1.9rem; justify-content: flex-start; }
  .tier-range { flex-basis: 100%; padding-left: 4.4rem; margin-top: -.2rem; }
  .tiers.compact .tier-card { flex-wrap: nowrap; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; }
  .tiers.compact .tier-range { flex-basis: auto; min-width: 0; padding-left: 0; margin-top: 0; font-size: .98rem; text-align: right; }
  .match { flex-direction: column; text-align: center; padding: 1.2rem .2rem 0; }
  .registered { flex-direction: column; text-align: center; }
}

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .steps { grid-template-columns: minmax(0, 1fr); max-width: 26rem; gap: .8rem; }
  .step { padding: 1.3rem 1.2rem 1.2rem; }
}
@media (max-width: 420px) {
  body { font-size: 1.08rem; }
  .garland { height: 112px; background-size: 315px 112px; top: -10px; }
  .hero { padding-top: 2.6rem; }
  .ornament { width: 138px; }
  .eyebrow { letter-spacing: .24em; font-size: .72rem; }
  .login { width: 100%; padding: .9rem 1.2rem; font-size: .92rem; letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  /* .snow.far/.near, not .snow: the layer rules are more specific and would win */
  .snow.far, .snow.near, .ornament { animation: none; }
}
