:root {
  color-scheme: dark;
  --black: #050505;
  --gold: #e9bd68;
  --gold-light: #ffe8ad;
  --gold-dim: #7a5527;
  --gold-line: rgba(214, 155, 69, 0.48);
  --cyan: #19a5d4;
  --muted: #9a8b70;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--gold-light);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  overflow-x: hidden;
}

body.is-opening { overflow: hidden; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-height: 100svh;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity .85s cubic-bezier(.22, 1, .36, 1), visibility .85s;
}

.opening.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.opening-controls {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  opacity: .35;
  transition: opacity .25s ease;
}

.opening:is(:hover, :focus-within, .is-autoplay-blocked) .opening-controls {
  opacity: 1;
}

.opening-controls button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(225, 174, 94, .5);
  background: rgba(3, 3, 3, .76);
  color: #f0cc88;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.opening-controls button:hover,
.opening-controls button:focus-visible {
  border-color: #ffe0a1;
  color: #fff0c8;
  outline: none;
}

.opening-controls button:focus-visible {
  box-shadow: 0 0 0 2px #050505, 0 0 0 3px #ffe0a1;
}

.event {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(600px, 1.42fr);
  align-items: center;
  gap: clamp(32px, 4.6vw, 84px);
  padding: clamp(36px, 5vw, 88px);
  background:
    radial-gradient(circle at 46% 51%, rgba(119, 65, 14, .18), transparent 36%),
    linear-gradient(117deg, #070707 0%, #030303 51%, #080603 100%);
  overflow: hidden;
}

.event::before,
.event::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: 62vw;
  height: 62vw;
  border-radius: 50%;
  border: 1px solid rgba(240, 166, 58, .22);
  box-shadow:
    0 0 24px rgba(238, 133, 24, .22),
    inset 0 0 38px rgba(238, 133, 24, .12),
    0 0 0 10px rgba(224, 125, 20, .025),
    0 0 0 23px rgba(224, 125, 20, .022),
    0 0 0 45px rgba(224, 125, 20, .018);
  filter: blur(.2px);
}

.event::before { top: -48vw; left: -18vw; }
.event::after { right: -37vw; bottom: -46vw; }

.ambient {
  position: absolute;
  z-index: -1;
  width: 55vw;
  height: 16vw;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .34;
  pointer-events: none;
}

.ambient--gold {
  right: -9vw;
  top: 10vh;
  transform: rotate(41deg);
  border-top: 2px solid #fa7c18;
  box-shadow: 0 -7px 30px rgba(255, 93, 5, .6);
}

.ambient--blue {
  left: -28vw;
  bottom: 7vh;
  transform: rotate(-25deg);
  border-top: 2px solid var(--cyan);
  box-shadow: 0 -7px 28px rgba(0, 166, 222, .6);
}

.intro {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  min-width: 0;
  text-align: center;
}

.wordmark {
  display: block;
  width: min(100%, 510px);
  height: auto;
  margin: clamp(-50px, -4vw, -20px) auto clamp(-36px, -2.5vw, -14px);
  filter: drop-shadow(0 9px 9px rgba(72, 29, 2, .72));
}

.reveal-item { opacity: 1; }

body.is-opening .reveal-item {
  opacity: 0;
  transform: translateY(22px) scale(.985);
}

body.is-content-visible .reveal-item {
  animation: content-reveal .8s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--reveal-order, 0) * 150ms + 100ms);
}

h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .12em;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  height: 30px;
  margin: 12px auto 4px;
}

.rule::before, .rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}

.rule::after { transform: scaleX(-1); }

.rule span {
  width: 7px;
  height: 7px;
  margin: 0 10px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.countdown-title {
  margin: clamp(12px, 2vh, 24px) 0 14px;
  color: #d7b578;
  font-size: clamp(17px, 1.45vw, 23px);
  letter-spacing: .32em;
  text-indent: .32em;
}

.countdown {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: clamp(7px, .8vw, 13px);
}

.time-unit {
  position: relative;
  min-width: 0;
  padding: clamp(15px, 2.4vh, 26px) 6px clamp(11px, 1.8vh, 20px);
  border: 1px solid var(--gold-line);
  background: linear-gradient(145deg, rgba(32, 22, 11, .52), rgba(8, 8, 8, .3));
  box-shadow: inset 0 0 0 3px #050505, inset 0 0 0 4px rgba(187, 119, 38, .16);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}

.time-unit strong {
  display: block;
  min-width: 0;
  color: var(--gold-light);
  font-size: clamp(37px, 4.4vw, 68px);
  font-weight: 400;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
  letter-spacing: -.045em;
  text-shadow: 0 3px 18px rgba(222, 143, 47, .25);
}

.time-unit span {
  display: block;
  margin-top: 11px;
  color: #d8ae62;
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: .16em;
  text-indent: .16em;
}

.started {
  margin: 0;
  padding: 30px 12px;
  border-block: 1px solid var(--gold-line);
  color: var(--gold-light);
  font-size: clamp(32px, 3.8vw, 54px);
  letter-spacing: .3em;
  text-indent: .3em;
}

.event-meta {
  display: grid;
  gap: 7px;
  margin-top: clamp(23px, 3.8vh, 42px);
  color: #d8b675;
  font-size: clamp(16px, 1.45vw, 23px);
  letter-spacing: .08em;
}

.event-meta span { font-size: .87em; letter-spacing: .24em; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: clamp(20px, 3.3vh, 36px) 0 0;
  padding: 10px 18px;
  border: 1px solid rgba(170, 124, 62, .28);
  color: var(--muted);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(236, 181, 88, .8);
  animation: pulse 2s ease-in-out infinite;
}

.poster-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 1020px);
  min-width: 0;
  margin: 0;
  padding: clamp(10px, 1.1vw, 17px);
  border: 1px solid rgba(201, 145, 67, .56);
  background: #030303;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72), 0 0 34px rgba(156, 77, 10, .14);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(133, 87, 34, .3);
  pointer-events: none;
}

.poster-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #020202;
}

.poster-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.corner {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-color: #d5a553;
  pointer-events: none;
}

.corner--tl { top: -5px; left: -5px; border-top: 2px solid; border-left: 2px solid; }
.corner--tr { top: -5px; right: -5px; border-top: 2px solid; border-right: 2px solid; }
.corner--bl { bottom: -5px; left: -5px; border-bottom: 2px solid; border-left: 2px solid; }
.corner--br { bottom: -5px; right: -5px; border-bottom: 2px solid; border-right: 2px solid; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes content-reveal {
  from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes pulse {
  50% { opacity: .42; transform: scale(.78); }
}

@media (max-width: 1050px) {
  .event {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    justify-items: center;
    gap: 42px;
    padding: 54px max(20px, 5vw) 64px;
  }

  .intro { width: min(100%, 660px); }
  .intro, .poster-frame { justify-self: stretch; margin-inline: auto; }
  .wordmark { width: min(100%, 560px); }
  .time-unit strong { font-size: clamp(42px, 9vw, 70px); }
  .poster-frame { order: 2; }
}

@media (max-width: 520px) {
  .event { gap: 30px; padding: 36px 14px 44px; }
  .intro { padding-inline: 4px; }
  .wordmark { margin-bottom: 18px; }
  h1 { font-size: 20px; line-height: 1.45; }
  .countdown { gap: 5px; }
  .time-unit { padding: 15px 2px 12px; }
  .time-unit strong { font-size: clamp(31px, 10.5vw, 46px); }
  .time-unit span { margin-top: 8px; font-size: 13px; }
  .event-meta { margin-top: 24px; font-size: 17px; }
  .status { margin-top: 22px; }
  .poster-frame { padding: 7px; }
  .opening-controls { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); opacity: .88; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .opening { display: none; }
  body.is-opening { overflow: auto; }
  body.is-opening .reveal-item { opacity: 1; transform: none; }
}
