/* OUTPACE — coming soon. Motion-first: nothing fades, everything moves. */

:root {
  --bg: #0d0705;
  --bg-2: #1a100b;
  --ink: #f2ede6;
  --muted: #8a7f74;
  --accent: #d84a1b;
  --line: #2a1c13;
  --font-display: "Archivo", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --snap: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}
.mono { font-family: var(--font-mono); }

/* ---------- shutter preloader (race clock, then the doors split) -------- */
.shutter { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.shutter-half { position: absolute; left: 0; right: 0; height: 50.5%; background: #060302; }
.shutter-top { top: 0; }
.shutter-bottom { bottom: 0; }
.shutter-clock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.clock-cs { color: var(--accent); }
.shutter.slam .shutter-clock { animation: clock-slam 0.18s steps(2) both; }
@keyframes clock-slam {
  0% { transform: scale(1); }
  50% { transform: scale(1.06) translateX(-4px); }
  100% { transform: scale(1); }
}
/* the clock leaves first; only then do the gates split */
.shutter.clock-out .shutter-clock {
  transform: translateY(-130%);
  transition: transform 0.32s cubic-bezier(0.5, 0, 0.9, 0.4);
}
.shutter.open { pointer-events: none; }
.shutter.open .shutter-top { transform: translateY(-101%); transition: transform 0.7s var(--snap); }
.shutter.open .shutter-bottom { transform: translateY(101%); transition: transform 0.7s var(--snap); }
.shutter.done { display: none; }

/* ---------- backdrop ---------------------------------------------------- */
.bg { position: fixed; inset: 0; overflow: hidden; }
.bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 80% at calc(50% + var(--mx, 0px)) calc(30% + var(--my, 0px)), #241209 0%, transparent 60%),
    radial-gradient(80% 60% at 80% 90%, #1c0f08 0%, transparent 55%),
    var(--bg);
}
.bg-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38vw;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 237, 230, 0.07);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: ghost-drift 26s ease-in-out infinite alternate;
}
@keyframes ghost-drift {
  from { transform: translate(-56%, -52%) rotate(-1.2deg); }
  to { transform: translate(-44%, -48%) rotate(1.2deg); }
}
.bg-ridge {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 42vh;
  bottom: -14vh;
  background: #120a06;
  clip-path: polygon(0 68%, 9% 52%, 21% 66%, 33% 40%, 47% 62%, 60% 34%, 74% 58%, 86% 44%, 100% 60%, 100% 100%, 0 100%);
  animation: ridge-sway 18s ease-in-out infinite alternate;
}
.bg-ridge-2 {
  bottom: -20vh;
  height: 36vh;
  background: #0a0503;
  clip-path: polygon(0 55%, 12% 70%, 26% 46%, 41% 68%, 55% 44%, 70% 66%, 83% 50%, 100% 66%, 100% 100%, 0 100%);
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}
@keyframes ridge-sway { from { transform: translateX(-1.5%); } to { transform: translateX(1.5%); } }
.bg-streak {
  position: absolute;
  top: 20%;
  left: -30%;
  width: 26%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216, 74, 27, 0.9), transparent);
  filter: drop-shadow(0 0 6px rgba(216, 74, 27, 0.8));
  transform: rotate(-14deg);
  animation: streak 7.5s cubic-bezier(0.6, 0, 0.4, 1) infinite;
  animation-delay: 2.4s;
}
@keyframes streak {
  0% { transform: translateX(0) rotate(-14deg); }
  12% { transform: translateX(600%) rotate(-14deg); }
  100% { transform: translateX(600%) rotate(-14deg); }
}
.bg-grain {
  position: absolute;
  inset: -60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.07;
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-24px, 14px); }
  66% { transform: translate(18px, -20px); }
  100% { transform: translate(0, 0); }
}

/* ---------- telemetry HUD ---------------------------------------------- */
.hud {
  position: fixed;
  top: 18px;
  z-index: 5;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: pre-line;
  text-transform: uppercase;
}
.hud-tl { left: 22px; }
.hud-tr { right: 22px; text-align: right; }

/* ---------- stage -------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 4;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 0 20px 76px;
  text-align: center;
}

.brand { margin-bottom: 4px; }
/* logo finale: sprints in from the left with speed-skew and echo trails,
   overshoots, snaps straight, then a finish-line flash sweeps across */
.logo { position: relative; }
.logo img { height: 52px; width: auto; display: block; }
.logo .logo-trail { position: absolute; inset: 0; }
.logo-trail-1 { opacity: 0.26; }
.logo-trail-2 { opacity: 0.11; }
.logo-main, .logo-trail { transform: translateX(-120vw) skewX(-22deg) scaleX(1.4); }
body.go .logo-main { animation: logo-sprint 0.85s var(--snap) 1.85s both; }
body.go .logo-trail-1 { animation: logo-sprint 0.85s var(--snap) 1.92s both; }
body.go .logo-trail-2 { animation: logo-sprint 0.85s var(--snap) 1.99s both; }
@keyframes logo-sprint {
  0% { transform: translateX(-120vw) skewX(-22deg) scaleX(1.4); }
  62% { transform: translateX(3%) skewX(6deg) scaleX(0.94); }
  100% { transform: translateX(0) skewX(0) scaleX(1); }
}


/* headline: chars launch from below their line masks, skewed, then snap  */
.head {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 8.4vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 16ch;
}
.head .hl { display: block; overflow: hidden; padding: 0.04em 0; }
.head .ch {
  display: inline-block;
  transform: translateY(120%) skewY(6deg);
  will-change: transform;
}
.head .sp { display: inline-block; width: 0.32em; }
.head .alt { color: transparent; -webkit-text-stroke: 2px var(--ink); }
body.go .head .ch {
  transform: translateY(0) skewY(0);
  transition: transform 0.8s var(--snap);
  transition-delay: var(--d, 0s);
}

/* sub: an accent bar sprints across and drags the text into view          */
.subwrap { position: relative; max-width: 58ch; }
.wipe {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}
body.go .wipe { animation: wipe-run 0.9s var(--snap) 0.75s both; }
@keyframes wipe-run {
  0% { transform: scaleX(0); transform-origin: left center; }
  45% { transform: scaleX(1); transform-origin: left center; }
  55% { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}
.sub {
  color: #cfc5bb;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  clip-path: inset(0 100% 0 0);
}
body.go .sub { animation: sub-reveal 0.5s steps(1) 1.15s both; }
@keyframes sub-reveal { to { clip-path: inset(0 0 0 0); } }

/* join form + socials: rise out of their masks                             */
.join, .socials, .hint { overflow: hidden; }
.join { display: flex; gap: 10px; margin-top: 8px; }
.join input, .join-btn, .socials a, .hint { transform: translateY(140%); }
body.go .join input { transition: transform 0.65s var(--snap) 1.25s; transform: translateY(0); }
body.go .join-btn { transition: transform 0.65s var(--snap) 1.33s; transform: translateY(0); }
body.go .hint { transition: transform 0.65s var(--snap) 1.4s; transform: translateY(0); }
body.go .socials a { transform: translateY(0); }
body.go .socials a:nth-child(1) { transition: transform 0.6s var(--snap) 1.45s; }
body.go .socials a:nth-child(2) { transition: transform 0.6s var(--snap) 1.52s; }
body.go .socials a:nth-child(3) { transition: transform 0.6s var(--snap) 1.59s; }

.join input {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 13px 20px;
  min-width: min(260px, 52vw);
  outline: none;
}
.join input:focus { border-color: var(--accent); }
.join-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 0.15s;
}
.join-btn:hover { transform: translateY(-2px) !important; }
.joined { color: var(--accent); letter-spacing: 0.12em; font-size: 0.8rem; }
.hint { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.22em; }

.socials { display: flex; gap: 8px; margin-top: 6px; }
.socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.socials svg { width: 20px; height: 20px; }

/* ---------- marquee ------------------------------------------------------ */
.marquee {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  border-top: 1px solid var(--line);
  background: rgba(6, 3, 2, 0.72);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transform: translateX(100%);
}
body.go .marquee { transform: translateX(0); transition: transform 0.9s var(--snap) 1.0s; }
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  padding: 13px 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  animation: marquee 26s linear infinite;
}
.marquee-track b { color: var(--accent); font-weight: 900; margin: 0 18px; }
.marquee-track span { margin: 0 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* variant dots — visible on touch screens, swipe or tap to switch copy */
.dots { display: none; gap: 8px; margin-top: 4px; }
.dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--line);
  cursor: pointer;
}
.dots button.on { background: var(--accent); transform: scale(1.35); }

@media (hover: none) and (pointer: coarse) {
  .dots { display: flex; }
}

@media (max-width: 640px) {
  .stage {
    gap: clamp(12px, 2.2vh, 20px);
    padding: 0 18px calc(60px + env(safe-area-inset-bottom));
  }
  .head { font-size: clamp(1.8rem, 10.5vw, 2.6rem); letter-spacing: -0.01em; }
  .subwrap { max-width: 36ch; }
  .sub { font-size: 0.92rem; line-height: 1.5; }
  .logo img { height: 40px; }
  .join { flex-direction: column; width: min(320px, 86vw); gap: 8px; }
  .join input { width: 100%; padding: 12px 18px; min-width: 0; }
  .join-btn { padding: 12px 18px; font-size: 0.78rem; }
  .socials a { width: 42px; height: 42px; }
  .socials svg { width: 18px; height: 18px; }
  .hint { font-size: 0.62rem; letter-spacing: 0.18em; }
  .hud { font-size: 0.58rem; top: 12px; }
  .hud-tl { left: 14px; }
  .hud-tr { display: none; }
  .marquee-track { padding: 10px 0; font-size: 0.72rem; letter-spacing: 0.16em; }
  .marquee-track span, .marquee-track b { margin: 0 12px; }
  /* the ghost word runs vertically along the right edge on phones */
  .bg-ghost {
    left: auto;
    right: -4vh;
    top: 50%;
    font-size: 24vh;
    writing-mode: vertical-rl;
    transform: translateY(-50%);
    animation: ghost-drift-m 22s ease-in-out infinite alternate;
  }
  .bg-streak { top: 14%; }
}
@keyframes ghost-drift-m {
  from { transform: translateY(-54%) rotate(0.6deg); }
  to { transform: translateY(-46%) rotate(-0.6deg); }
}
@media (max-height: 700px) and (max-width: 640px) {
  .brand { display: none; }
  .stage { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .shutter { display: none; }
  .head .ch, .logo-main, .logo-trail, .join input, .join-btn, .socials a, .hint { transform: none !important; }
  .logo-trail { display: none; }
  .sub { clip-path: none; }
  .marquee { transform: none; }
  .bg-grain, .bg-streak, .bg-ghost, .bg-ridge { animation: none; }
}
