:root {
  color-scheme: dark;
  font-family: Inter, Arial, sans-serif;
  background: #111;
  color: #fff;
  --ink: #111;
  --text: #fff;
  --gold: #f4cc8f;
  --muted: #b2b2b2;
  --panel: #1a1a1a;
  --line: #343434;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, select, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #f4c982; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1320px, calc(100% - 100px)); margin: auto; padding-bottom: 64px; }
.shell.advent-page {
  --advent-gutter: max(50px, (100% - 1320px) / 2);
  width: 100%;
}
.advent-page > .masthead,
.advent-page > .calendar { margin-inline: var(--advent-gutter); }
.advent-page > .hero {
  border-inline: 0;
  padding-inline: calc(var(--advent-gutter) + clamp(32px, 6vw, 76px) + 1px);
}
.advent-page .hero-finale { right: calc(var(--advent-gutter) + 29px); }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; }
.masthead img { display: block; width: 36px; height: auto; }
.advent-menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 8px 16px; }
.advent-menu form { margin: 0; }
.advent-menu a, .advent-menu button {
  color: var(--gold); font: inherit; font-size: .875rem;
  text-decoration: underline; text-underline-offset: .2em;
}
.advent-menu button { background: none; border: 0; padding: 0; cursor: pointer; }
.advent-menu a { border: 0; text-decoration: none; }
.advent-menu a:hover, .advent-menu button:hover { color: var(--text); }
.edition, .eyebrow, .hero-finale span {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .19em;
}
.edition { color: var(--muted); }
.eyebrow { color: var(--gold); margin: 0 0 10px; }
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(490px, 66svh, 660px);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 76px);
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #111111f5, #111111c9 30%, #11111115 75%),
    linear-gradient(0deg, #111, transparent 43%),
    #1a1a1a url("./los-santos-snow.jpg") center 53% / cover;
}
.holiday-lights {
  position: absolute;
  inset: 0 0 auto;
  height: 13px;
  pointer-events: none;
  background:
    radial-gradient(circle at 10px 5px, #ffe1ac 1px, #f4b45c55 3px, transparent 6px),
    radial-gradient(circle at 33px 7px, #f0a2a0 1px, #d86a6a55 3px, transparent 6px),
    radial-gradient(circle at 56px 5px, #c0decf 1px, #77ad9255 3px, transparent 6px);
  background-size: 69px 13px;
  background-repeat: repeat-x;
}
.hero-copy { position: relative; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(3rem, 9vw, 8rem); line-height: .88; letter-spacing: -.035em; margin: 20px 0 26px; }
.hero-copy > p:not(.eyebrow) { color: #e0e0e0; max-width: 29ch; line-height: 1.5; margin-bottom: 23px; }
.primary {
  min-height: 47px;
  background: var(--text);
  color: var(--ink);
  border: 1px solid transparent;
  padding: 11px 15px;
  font-weight: 700;
  transition: background .2s, transform .2s;
}
.primary:hover { background: #eee; transform: translateY(-2px); }
.primary span { margin-left: 14px; }
.primary.discord-sign-in { background: #5865f2; color: #fff; }
.primary.discord-sign-in:hover { background: #4752c4; }
.terms-link { display: block; width: fit-content; margin-top: 14px; color: var(--gold); text-underline-offset: .2em; }
.terms-link:hover { color: var(--text); }
.terms { max-width: 720px; border: 1px solid var(--line); background: var(--panel); padding: clamp(20px, 5vw, 48px); }
.terms h1 { font-size: clamp(2.25rem, 7vw, 4rem); line-height: 1; }
.terms li { margin-bottom: 12px; color: var(--muted); line-height: 1.6; }
.terms ul { padding-left: 1.25rem; }
.hero-finale {
  position: absolute;
  bottom: 26px;
  right: 28px;
  display: grid;
  gap: 3px;
  padding: 12px 16px;
  border: 1px solid #ffffff55;
  background: #161616e8;
}
.hero-finale span { color: #f4c982; }
.hero-finale strong { font-size: 2rem; font-weight: 800; }
.snow, .snow i { position: absolute; inset: 0; pointer-events: none; }
.snow i {
  inset: -110px 0 0;
  background-image: radial-gradient(circle, #fff 1px, transparent 2px), radial-gradient(circle, #dbeaff 1px, transparent 2px);
  background-position: 0 0, 42px 26px;
  background-size: 108px 108px;
  opacity: .26;
  animation: snowfall 13s linear infinite;
}
.snow i:nth-child(2) { transform: scaleX(-1); opacity: .16; animation-duration: 19s; }
.snow i:nth-child(3) { margin-left: 51px; opacity: .12; animation-duration: 26s; }
@keyframes snowfall { to { background-position: 45px 108px, 87px 134px; } }

.calendar { padding-top: 40px; }
.calendar-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
h2 { font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.045em; margin-bottom: 8px; }
#progress { margin: 0; }
#progress, .demo, #gift-description, .expiry { color: var(--muted); font-size: .88rem; }
.demo { display: grid; gap: 5px; }
.demo select { background: var(--panel); color: var(--text); border: 1px solid var(--line);padding: 5px 8px; }
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.day {
  display: grid;
  grid-template: auto 1fr auto / 1fr auto;
  gap: 9px 4px;
  align-items: start;
  min-height: 109px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, background .2s;
}
.day:hover { transform: translateY(-3px); border-color: var(--gold); }
.day[data-state="today"] { background: linear-gradient(145deg, #322719, var(--panel)); border-color: var(--gold); }

.day.finale { background: linear-gradient(145deg, #361d1d, #1f1616); border-color: #b98661; }
.day-number { font-size: 2rem; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.day-status { grid-column: 1 / -1; grid-row: 3; font-size: .73rem; color: #c6c6c6; }
.finale .day-status { color: #f8cf9f; }
.parcel {
  display: block;
  width: 19px;
  height: 16px;
  margin-top: 6px;
  position: relative;
  color: var(--gold);
  border: 1px solid currentColor;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 44%, currentColor 45% 55%, transparent 56%);
}
.parcel::before {
  position: absolute;
  content: "∞";
  left: 50%;
  top: -.91em;
  transform: translateX(-50%);
  font: 16px/1 Georgia, serif;
}
.parcel::after { position: absolute; content: ""; inset: 3px -2px auto; border-top: 1px solid currentColor; }
.finale .parcel { color: #f8cf9f; }

.day[data-state="opened"] {
  background: linear-gradient(145deg, #21392e, #17251f);
  border-color: #466c57;
}
.day[data-state="opened"]:hover,
.day[data-state="opened"]:focus-visible { border-color: #90d3ad; }
.day[data-state="opened"] .day-status,
.day[data-state="opened"] .parcel { color: #a4debc; }
.day[data-state="opened"] .parcel {
  height: 12px;
  margin-top: 10px;
  border-radius: 0 0 2px 2px;
}
.day[data-state="opened"] .parcel::before {
  content: "";
  inset: -8px -2px auto;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 1px;
  transform: rotate(-20deg);
}
.day[data-state="opened"] .parcel::after { content: none; }
.day[data-state="locked"] .day-status { font-variant-numeric: tabular-nums; }
.day[data-state="missed"] { background: #171717; border-color: #303030; color: #999; }
.day[data-state="missed"] .parcel { color: #858585; }
.day[data-state="missed"] .day-status { color: #aaa; }

dialog {
  width: min(440px, calc(100% - 30px));
  padding: 36px 24px 27px;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at top, #31251b, var(--panel) 68%);
  color: var(--text);
  text-align: center;
}
dialog[open] { animation: enter .24s ease-out both; }
dialog::backdrop { background: #080808e0; }
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #555;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  width: 36px;
  height: 36px;
  font-size: 1.35rem;
}
.reveal-mark { margin: 9px auto 24px; width: 46px; height: 37px; display: grid; place-items: center; }
.reveal-mark .parcel { transform: scale(2); }
.revealing .reveal-mark { animation: unwrap .65s ease-in-out both; }
.revealed #voucher { animation: enter .32s ease-out both; }
#voucher { text-align: left; }
#voucher label { display: block; font-size: .8rem; margin-bottom: 5px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { min-width: 0; flex: 1; color: var(--gold); background: #111; border: 1px dashed #777;padding: 9px; font-family: monospace; }
.expiry { margin: 12px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@keyframes enter { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes unwrap {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2) rotate(-12deg); }
  50% { transform: scale(1.35) rotate(13deg); }
  75% { transform: scale(.9) rotate(-7deg); }
}

@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .shell.advent-page { --advent-gutter: 24px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .shell.advent-page { --advent-gutter: 16px; }
  .advent-page > .hero { padding-inline: calc(var(--advent-gutter) + 23px); }
  .advent-page .hero-finale { right: calc(var(--advent-gutter) + 16px); }
  .masthead { min-height: 64px; }
  .hero { min-height: 420px; padding: 28px 22px 105px; }
  .hero-art { background-position: center, center, 70% center; }
  .hero-finale { right: 15px; bottom: 15px; }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
}
@media (max-width: 430px) {
  h1 { font-size: clamp(2.15rem, 10.5vw, 3rem); }
  h2 { font-size: 1.85rem; }
  .calendar-header { align-items: start; flex-direction: column; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day { min-height: 95px; padding: 9px; }
}
/* BROFX motion */
@media (prefers-reduced-motion: no-preference) {
  :is(.hero-copy, .advent-intro) > *, .hero-finale {
    animation: brofx-enter .9s cubic-bezier(.22, 1, .36, 1) both;
  }
  :is(.hero-copy, .advent-intro) > h1 { animation-name: brofx-title; animation-delay: .09s; }
  .hero-copy > p:not(.eyebrow), .advent-intro > ul { animation-delay: .19s; }
  .hero-copy > .primary, .advent-intro > :is(form, .terms-link) { animation-delay: .27s; }
  .hero-finale, .account-panel { animation: brofx-enter .9s cubic-bezier(.22, 1, .36, 1) .36s both; }
  .hero-art { animation: brofx-art 1.8s cubic-bezier(.22, 1, .36, 1) both; }

  [data-motion-seen] {
    transition: opacity .7s cubic-bezier(.22, 1, .36, 1),
                translate .85s cubic-bezier(.22, 1, .36, 1);
  }
  [data-motion-seen]:is(.calendar-header > :nth-child(2),
    #days > :nth-child(3n + 2)) { transition-delay: 65ms; }
  [data-motion-seen]:is(#days > :nth-child(3n)) { transition-delay: 130ms; }
  [data-motion-pending] { opacity: 0; translate: 0 24px; transition: none; }
  [data-motion-pending]:focus-within { opacity: 1; translate: none; }
}
@keyframes brofx-enter {
  from { opacity: 0; translate: 0 18px; }
}
@keyframes brofx-title {
  from { opacity: 0; translate: 0 24px; clip-path: inset(100% -4px -14px); }
  to { clip-path: inset(-14px -4px); }
}
@keyframes brofx-art {
  from { scale: 1.045; opacity: .65; }
}

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