@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #060608;
  --bg-panel: #0c0c10;
  --fg: #f4f4f6;
  --muted: rgba(244, 244, 246, 0.44);
  --muted-soft: rgba(244, 244, 246, 0.14);
  --hair: rgba(244, 244, 246, 0.10);
  --halo: rgba(150, 175, 255, 0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1.5rem, 5vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--fg); color: var(--bg); }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-drift 6s steps(6) infinite;
}

@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -4%); }
  60%  { transform: translate(-3%, -3%); }
  80%  { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}

.stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--gutter) * 2) var(--gutter);
  text-align: center;
}

.halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(150vmin, 1100px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--halo) 0%, rgba(150, 175, 255, 0.03) 34%, transparent 66%);
  pointer-events: none;
  opacity: 0;
  animation: halo-in 2.4s var(--ease) 0.1s forwards, halo-breathe 11s ease-in-out 2.5s infinite;
}

@keyframes halo-in { to { opacity: 1; } }

@keyframes halo-breathe {
  0%, 100% { opacity: 1;    transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.62; transform: translate(-50%, -50%) scale(0.92); }
}

.logo {
  position: relative;
  margin: 0;
  width: 192px;
  max-width: 62vw;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1.3s var(--ease) 0.15s forwards;
}

.logo img { width: 100%; height: auto; }

.rule {
  position: relative;
  width: 192px;
  max-width: 62vw;
  height: 1px;
  margin: clamp(1.5rem, 4.5vw, 2.25rem) 0 clamp(1.25rem, 4vw, 1.85rem);
  background: linear-gradient(90deg, transparent, var(--muted-soft) 14%, var(--muted-soft) 86%, transparent);
  transform: scaleX(0);
  animation: sweep 1.6s var(--ease) 0.6s forwards;
}

@keyframes sweep { to { transform: scaleX(1); } }

.soon {
  position: relative;
  margin: 0;
  font-size: clamp(0.62rem, 1.4vw, 0.75rem);
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  animation: rise 1.3s var(--ease) 0.95s forwards;
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.legal-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 var(--gutter) clamp(1.5rem, 4vw, 2.5rem);
  opacity: 0;
  animation: rise 1.2s var(--ease) 1.5s forwards;
}

.legal-link {
  font-size: 0.72rem;
  font-weight: 400;
  font-stretch: 108%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0.1rem;
  transition: color 0.4s var(--ease);
}

.legal-link:hover, .legal-link:focus-visible { color: var(--fg); }

.sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 4vw, 2.5rem);
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.lightbox__panel {
  position: relative;
  width: min(100%, 46rem);
  max-height: min(84svh, 46rem);
  display: flex;
  background: var(--bg-panel);
  border: 1px solid var(--hair);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}

.lightbox.is-open .lightbox__backdrop { opacity: 1; }
.lightbox.is-open .lightbox__panel { opacity: 1; transform: none; }

.lightbox__panel::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 4.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 12, 16, 0), var(--bg-panel) 82%);
}

.lightbox__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.25rem);
  scrollbar-width: thin;
  scrollbar-color: var(--muted-soft) transparent;
}

.lightbox__scroll::-webkit-scrollbar { width: 8px; }

.lightbox__scroll::-webkit-scrollbar-thumb {
  background: var(--muted-soft);
  border: 2px solid var(--bg-panel);
  border-radius: 4px;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.lightbox__close:hover, .lightbox__close:focus-visible { color: var(--fg); transform: rotate(90deg); }

.doc {
  max-width: 34rem;
  font-size: 0.875rem;
  line-height: 1.72;
  color: rgba(244, 244, 246, 0.66);
}

.doc h2 {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}

.doc__lead {
  margin: 0.5rem 0 2.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc h3 {
  margin: 2rem 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 244, 246, 0.92);
}

.doc p { margin: 0 0 0.9rem; }

.doc a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted-soft);
  transition: text-decoration-color 0.3s var(--ease);
}

.doc a:hover { text-decoration-color: var(--fg); }

.doc__meta {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.fallback {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3rem, 8vw, 5rem);
  padding: clamp(3rem, 8vw, 5rem) var(--gutter) clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--hair);
}

.fallback .doc { width: 100%; scroll-margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .halo { opacity: 1; animation: none; }
  .logo, .soon, .legal-bar { opacity: 1; transform: none; animation: none; }
  .rule { transform: none; animation: none; }
  .lightbox__panel, .lightbox__backdrop { transition-duration: 0.01ms; }
  .lightbox__close:hover { transform: none; }
}
