:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f8f8fa;
  background: #08090b;
  --page-gutter: clamp(1rem, 3.5vw, 3.75rem);
}

* { box-sizing: border-box; }

body { margin: 0; }

.site {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  padding: var(--page-gutter) var(--page-gutter) 0;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 23rem;
  border: 1px solid #ffffff24;
  background: radial-gradient(ellipse at 50% 110%, #24262c, #0b0c10 72%);
}

.hero-light {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(118deg, transparent 29%, #a5b6d411 29.1%, transparent 31%),
    linear-gradient(118deg, transparent 33%, #bfc7dc38 33.1%, #9099b41c 34%, transparent 56%),
    linear-gradient(118deg, transparent 61%, #adb7d11d 61.1%, transparent 63%),
    linear-gradient(118deg, transparent 65%, #aab3cd12 65.1%, transparent 79%);
  mask-image: radial-gradient(ellipse at 50% 44%, #000, #000a 50%, transparent 88%);
}

.lockup {
  width: min(68%, 48rem);
  margin: 0 0 2.5rem;
  line-height: 1;
  mix-blend-mode: screen;
}

/* Crop the supplied square PNG in the browser and keep its original geometry. */
.mark {
  position: relative;
  display: block;
  aspect-ratio: 736 / 216;
  overflow: hidden;
}

.mark img {
  position: absolute;
  display: block;
  width: 170.38%;
  height: auto;
  top: -234.26%;
  left: -35.6%;
  max-width: none;
  filter: brightness(1.12) contrast(1.24);
}

.club {
  display: block;
  margin-top: clamp(.7rem, 2vw, 1.6rem);
  margin-right: 5%;
  font-size: clamp(.8rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: .55em;
  text-align: right;
  text-transform: uppercase;
}

.status {
  position: absolute;
  inset: auto 1rem clamp(1.65rem, 5vw, 4.5rem);
  margin: 0;
  color: #d5d6df;
  font-size: clamp(.66rem, 1.3vw, .78rem);
  font-weight: 600;
  letter-spacing: .19em;
  text-align: center;
  text-transform: uppercase;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.35rem;
  color: #adb0ba;
}

.footer small,
.replay { font-size: .78rem; }

.replay {
  padding: .7rem .2rem .7rem .55rem;
  border: 0;
  color: inherit;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.replay:hover { color: #fff; }
.replay:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.replay span { margin-right: .35rem; font-size: 1.05rem; vertical-align: -.05em; }

.intro {
  --intro-logo-width: min(32.5vw, 21.5rem);
  --logo-half-height: calc(var(--intro-logo-width) * 108 / 736);
  --seam-top: calc(50% - var(--logo-half-height));
  --seam-bottom: calc(50% + var(--logo-half-height));
  --panel-travel: calc(50vw + min(9vw, 8.5rem) + 2px);
  /* The seam stays vertical outside the logo and follows the R–C gap inside it. */
  --seam:
    50% 0,
    50% var(--seam-top),
    calc(50% - var(--intro-logo-width) * .02) var(--seam-top),
    calc(50% + var(--intro-logo-width) * .033) calc(var(--seam-top) + var(--logo-half-height) * .40),
    calc(50% - var(--intro-logo-width) * .015) calc(var(--seam-top) + var(--logo-half-height) * 1.62),
    calc(50% - var(--intro-logo-width) * .03) var(--seam-bottom),
    50% var(--seam-bottom),
    50% 100%;
  position: fixed;
  z-index: 5;
  inset: 0;
  display: none;
  overflow: hidden;
  isolation: isolate;
}

.intro-active .intro { display: block; }
.intro-active:not(.intro-opening) .intro { background: #000; }

.door {
  position: absolute;
  inset: 0;
  background: #000;
}

.door--left { clip-path: polygon(0 0, var(--seam), 0 100%); }
.door--right { clip-path: polygon(var(--seam), 100% 100%, 100% 0); }

.intro-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: var(--intro-logo-width);
  aspect-ratio: 736 / 216;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.intro-mark .mark { position: absolute; inset: 0; }

/* The angled seam follows the gap between the R and the first C. */
.mark--br { clip-path: polygon(0 0, 48% 0, 53.3% 20%, 48.5% 81%, 47% 100%, 0 100%); }
.mark--cc { clip-path: polygon(48% 0, 100% 0, 100% 100%, 47% 100%, 48.5% 81%, 53.3% 20%); }

.door--left, .mark--br { --travel: calc(-1 * var(--panel-travel)); }
.door--right, .mark--cc { --travel: var(--panel-travel); }

.intro-opening :is(.door, .intro-mark .mark) {
  animation: open 1104.49ms both;
}

/* Split the original easing at 880ms. The last 220ms play at 98% speed. */
@keyframes open {
  from {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(.850267, 0, .418843, .826470);
  }
  79.6748% {
    transform: translateX(calc(var(--travel) * .96925));
    animation-timing-function: cubic-bezier(.272670, .641582, .601067, 1);
  }
  to { transform: translateX(var(--travel)); }
}

@media (max-width: 600px) {
  .lockup { width: 80%; }
  .intro { --intro-logo-width: 36vw; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-active .intro,
  .replay { display: none; }
}
