@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/barlow-condensed-900-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "DM Sans", system-ui, sans-serif;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --base: #100e0c;
  --ink: #fff1d9;
  --muted: #c3b6a5;
  --amber: #ff9e3e;
  --line: #6e5031;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 0% 44%, #271a10 0, transparent 32%),
    radial-gradient(ellipse at 100% 96%, #291a0d 0, transparent 32%),
    var(--base);
  min-height: 100vh;
}
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #ffe5b8; outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; pointer-events: none; }
.shell { width: min(77rem, calc(100% - 3rem)); margin-inline: auto; }
.topbar {
  background: #100e0ce8;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 7%, #704221 30%, #dc9757 50%, #704221 70%, transparent 93%) 1;
}
.topbar-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand, .login-group, .login { display: flex; align-items: center; }
.brand { gap: .8rem; font: italic 900 2rem/.9 var(--display); }
.brand img { border-radius: 50%; }
.brand span { padding-left: .8rem; border-left: 1px solid #735539; }
.brand b { color: #ffac61; }
.login-group { gap: .75rem; }
.login {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem;
  padding: .55rem .85rem;
  min-height: 2.65rem;
  border: 1px solid #61554c;
  border-radius: .45rem;
  background: linear-gradient(160deg, #25201b, #110e0c);
  box-shadow: inset 0 1px #ffffff12;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  transition: border-color 160ms, box-shadow 160ms;
}
.login svg { width: 1.1rem; height: 1.1rem; fill: var(--provider); }
.login:hover, .login:focus-visible {
  border-color: var(--provider);
  box-shadow: inset 0 1px #ffffff19, 0 0 .85rem color-mix(in srgb, var(--provider), transparent 84%);
}
.kick { --provider: #69f633; }
.twitch { --provider: #aa78ff; }

.hero {
  isolation: isolate;
  position: relative;
  min-height: 23rem;
  margin-top: 1.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid #584434;
  border-radius: .95rem;
  box-shadow: inset 0 1px #ffe0b719, 0 1rem 2.7rem #0004;
  background:
    linear-gradient(121deg, transparent 44%, #8f4a1a3b 53%, #ff9a3e72 54%, #bb612a28 56%, transparent 65%),
    radial-gradient(ellipse at 74% 88%, #9d4514 0, #4b2618 29%, transparent 63%),
    linear-gradient(102deg, #15110e 31%, #24150e 68%, #17110d);
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .6;
  background:
    repeating-linear-gradient(121deg, transparent 0 94px, #ffab5a21 95px, transparent 97px 146px),
    radial-gradient(ellipse at 93% 110%, #ff9d4c, transparent 49%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 72%);
}
.snow {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16% 24%, #ffebd5 0 1px, transparent 1.8px),
    radial-gradient(circle at 34% 82%, #ffe4c1 0 1.3px, transparent 2.6px),
    radial-gradient(circle at 78% 73%, #fff1da 0 1.5px, transparent 3px),
    radial-gradient(circle at 65% 42%, #ffcb90 0 1px, transparent 1.8px),
    radial-gradient(circle at 91% 12%, #ffeece 0 1px, transparent 2px);
  background-size: 233px 174px, 350px 145px, 433px 239px, 211px 137px, 181px 173px;
  opacity: .43;
}
.portrait {
  position: absolute;
  z-index: -1;
  width: min(49%, 32rem);
  height: auto;
  top: 0;
  right: 1.9%;
  filter: drop-shadow(7px 3px 15px #ff87444d);
}
.hero-copy {
  padding: 2.5rem clamp(1.4rem, 4.8vw, 4.35rem);
  text-shadow: 0 3px 22px #110b07;
}
.hero h1 {
  font: italic 900 clamp(4rem, 8.3vw, 7.65rem)/.79 var(--display);
  text-transform: uppercase;
  letter-spacing: -.023em;
}
.hero h1 span { display: block; color: var(--amber); }
.hero p {
  font-size: clamp(.98rem, 1.7vw, 1.5rem);
  font-weight: 700;
  font-style: italic;
  margin-top: 1.15rem;
}
.season {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: .62rem;
  color: #e5caa8;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .27em;
  text-transform: uppercase;
}
.season svg, .door svg, .reward-card svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}
.season svg { width: 1.05rem; height: 1.05rem; color: var(--amber); }

.calendar { margin-top: 1.65rem; }
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.05rem;
}
.calendar h2, dialog h2 {
  font: italic 900 clamp(2rem, 3.5vw, 2.85rem)/1 var(--display);
  text-transform: uppercase;
}
.calendar-heading p { color: var(--muted); white-space: nowrap; font-size: .93rem; }
.calendar-heading strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.calendar-progress { text-align: right; }
.progress-track {
  height: .27rem;
  width: 7.5rem;
  margin-top: .4rem;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 24 - 1px), var(--base) calc(100% / 24 - 1px) calc(100% / 24)),
    linear-gradient(90deg, #ffc278, #ff8d38) 0 / var(--opened, 0%) 100% no-repeat,
    #48382a;
  transition: background-size 240ms ease-out;
}
.doors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; }
.door {
  position: relative;
  isolation: isolate;
  min-height: 5.75rem;
  padding: 0;
  text-align: left;
  perspective: 700px;
  border: 1px solid #4d3825;
  border-radius: .6rem;
  background: #140f0b;
  box-shadow: 0 .3rem .65rem #0003;
  transition: border-color 180ms, box-shadow 180ms;
}
.door-front, .door-inside {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.door-front {
  display: flex;
  align-items: center;
  padding: 0 1.15rem .25rem;
  background: linear-gradient(150deg, var(--door-color, #30251c), #1c1612 83%);
  box-shadow: inset 0 1px #ffe3b818, inset 0 -2px #100b0870;
  transform-origin: left;
  backface-visibility: hidden;
  transition: color 160ms, transform 210ms ease-out;
}
.door:nth-child(3n+2) { --door-color: #35271b; }
.door:nth-child(3n) { --door-color: #27201b; }
.door[data-day="1"], .door[data-day="24"] {
  border-color: #ff9b42;
  box-shadow: 0 0 0 1px #ff9b4260;
}
.door[data-day="24"] { --door-color: #633915; }
.door-front::after {
  position: absolute;
  inset: .3rem;
  border: 1px dashed #a17c4f;
  border-radius: .37rem;
  pointer-events: none;
  content: "";
}
.door-front::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 87% 0%, #ffc58b44, transparent 70%);
  opacity: 0;
  transition: opacity 180ms;
  pointer-events: none;
  content: "";
}
.door-number { font: italic 900 3.45rem/.85 var(--display); }
.door-icon { position: absolute; bottom: .78rem; right: .82rem; width: 1.32rem; height: 1.32rem; color: #e7b678; }
.door-inside {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #8b471a, #2e1a10 68%, #110b07);
  color: #ffcf93;
}
.door-inside svg { width: 2.45rem; height: 2.45rem; filter: drop-shadow(0 0 10px #ff9b48); }
.door:focus-visible { border-color: #ffa851; }
.door:focus-visible .door-front::before { opacity: 1; }
@media (hover: hover) {
  .door:hover {
    border-color: #ffa851;
    box-shadow: 0 .15rem 1rem #ff953027;
  }
  .door:hover .door-front::before { opacity: 1; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .door:not(.is-open):hover .door-front { transform: rotateY(-4deg); }
}
.door.is-opening .door-front { animation: swing-open 540ms cubic-bezier(.2, .65, .2, 1) both; }
.door.is-open .door-front { background: linear-gradient(140deg, #39291c, #1d1712); color: #edbf8a; }
.door.is-open .door-front::after { border-style: solid; border-color: #64472d; }
@keyframes swing-open {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(-105deg); }
}

footer { padding: 1.5rem 0 1.9rem; text-align: center; color: var(--muted); font-size: .82rem; }

dialog {
  position: fixed;
  margin: auto;
  width: min(26rem, calc(100% - 2rem));
  padding: 2.35rem 1.5rem 1.5rem;
  text-align: center;
  border: 1px solid #9b663e;
  border-radius: .9rem;
  background: radial-gradient(ellipse at 50% 0, #452718, #1b1511 68%);
  color: var(--ink);
  box-shadow: 0 1rem 5rem #000b;
}
dialog[open] { animation: reveal 240ms ease-out both; }
dialog::backdrop { background: #070503c9; backdrop-filter: blur(4px); }
dialog h2 { margin-block: .75rem .45rem; }
dialog p { color: var(--muted); line-height: 1.5; }
.dialog-label { font-size: .8rem; letter-spacing: .19em; text-transform: uppercase; }
.close {
  position: absolute;
  top: .55rem;
  right: .65rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: .3rem;
  background: #ffffff12;
  font-size: 1.4rem;
  line-height: 1;
}
.dialog-action {
  margin-top: 1.25rem;
  border: 0;
  border-radius: .35rem;
  background: var(--amber);
  color: #221307;
  padding: .7rem 1.2rem;
  font-weight: 700;
}
.dialog-action:hover { background: #ffbc7b; }
.reward-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  text-align: left;
  width: min(100%, 15rem);
  aspect-ratio: 1.65;
  margin: 1.2rem auto;
  padding: .9rem 1rem;
  border: 1px solid #ffffff73;
  border-radius: .65rem;
  color: #fff;
  background:
    repeating-linear-gradient(126deg, transparent 0 12px, #ffffff0a 13px, transparent 14px 19px),
    radial-gradient(ellipse at 100% 0, #ffffff32, transparent 55%),
    linear-gradient(142deg, var(--card-color), #100d18);
  box-shadow: inset 0 1px #ffffff45, 0 .65rem 1.4rem #0008;
  transform: rotate(-3deg);
  font-weight: 700;
}
.reward-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: translateX(110%);
  background: linear-gradient(112deg, transparent 31%, #fff4de45 47%, #fff9 50%, transparent 62%);
  pointer-events: none;
  content: "";
}
#reward-dialog[open] .reward-card::after { animation: card-shine 670ms 130ms ease-out both; }
@keyframes card-shine { from { transform: translateX(-110%); } }
.reward-card svg { width: 1.5rem; height: 1.5rem; }
.reward-card strong { font: italic 900 2.7rem/.9 var(--display); }
.reward-card[data-brand="psn"] { --card-color: #285cc7; }
.reward-card[data-brand="netflix"] { --card-color: #c52631; }
.reward-card[data-brand="paysafecard"] { --card-color: #254c80; }
.reward-card[data-brand="steam"] { --card-color: #287997; }
.reward-card[data-brand="spotify"] { --card-color: #267750; }
.reward-card[data-brand="xbox"] { --card-color: #38842d; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 850px) {
  .hero { min-height: 20rem; }
  .portrait { width: 52%; right: 0; }
  .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 1.5rem); }
  .topbar-inner { min-height: 3.85rem; gap: .45rem; }
  .brand { font-size: 1.25rem; gap: .35rem; }
  .brand img { width: 1.75rem; height: 1.75rem; }
  .brand span { padding-left: .35rem; }
  .login-group { gap: .35rem; }
  .login { font-size: .7rem; gap: .24rem; padding: .42rem; min-height: 2.4rem; }
  .login svg { width: .8rem; height: .8rem; }
  .hero {
    display: block;
    min-height: clamp(27rem, 113vw, 33rem);
    margin-top: .8rem;
    background:
      radial-gradient(ellipse at 70% 86%, #823b16, transparent 58%),
      linear-gradient(132deg, #17110d 30%, #372016 70%, #1a120f);
  }
  .hero-copy { padding: 1.3rem 1.05rem; }
  .hero h1 { font-size: clamp(3.05rem, 12vw, 5rem); }
  .hero p { margin-top: .68rem; }
  .season { margin-top: .65rem; letter-spacing: .16em; }
  .portrait { width: min(92%, 27rem); top: auto; right: 0; bottom: -21%; }
  .calendar { margin-top: 1.15rem; }
  .calendar-heading { margin-bottom: .7rem; }
  .calendar h2 { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  .calendar-heading p { font-size: .78rem; }
  .progress-track { width: 5rem; }
  .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .door { min-height: 4.5rem; }
  .door-front { padding: 0 .67rem .18rem; }
  .door-number { font-size: 2.6rem; }
  .door-icon { right: .58rem; bottom: .61rem; width: 1.05rem; height: 1.05rem; }
  footer { padding-block: 1.2rem; }
}
@media (max-width: 350px) {
  .brand img { display: none; }
  .brand span { border: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
