/* ============ Spectac ============ */
:root {
  --night: #000000;
  --deep: #111111;
  --panel: #1a1a1a;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #ffffff;
  --muted: #a3a3a3;
  --accent: #4fd8ff;
  --accent-hot: #b5f0ff;
  --accent-ink: #02202d;
  --accent-deep: #1590bd;
  --violet: #7d8bff;

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Onest", system-ui, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.15; text-align: center; }
h2 em, h3 em { font-style: normal; color: var(--accent); }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--night);
  transition: opacity .7s ease, visibility .7s;
}
.intro.done { opacity: 0; visibility: hidden; }
.intro-logo { width: 120px; opacity: 0; transform: translate(-40px, 40px) scale(.7); animation: introLogo 1s .15s cubic-bezier(.2,.9,.2,1.2) forwards; }
.intro-line { margin: 0; font-family: var(--display); font-size: 1rem; color: var(--muted); opacity: 0; animation: fadeIn .6s .7s forwards; }
@keyframes introLogo { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; z-index: 50;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 8px 16px;
  background: rgba(26, 26, 26, .6);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav-logo img { height: 30px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a {
  text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 7px 12px; border-radius: 999px; color: var(--ink);
  transition: background .2s;
}
.nav nav a:hover { background: rgba(255,255,255,.08); }
.nav nav a.icon { padding: 7px; display: grid; place-items: center; }
.nav nav a.icon svg { width: 18px; height: 18px; }

.demo-banner {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--accent); color: var(--accent-ink);
  font-size: .85rem; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: calc(100% - 24px); text-align: center;
}

/* ---------- hero ---------- */
.hero { position: relative; height: 175vh; --p: 0; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.wall {
  position: absolute; inset: -30% -20%;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  transform: rotate(-9deg) scale(calc(1.18 - var(--p) * .14));
  filter: blur(calc((1 - var(--p)) * 7px)) saturate(calc(.8 + var(--p) * .3));
  will-change: transform, filter;
}
.wall-row { display: flex; gap: 22px; width: max-content; animation: marquee var(--dur, 90s) linear infinite; }
.wall-row.rev { animation-direction: reverse; }
.wall .game-card { width: clamp(220px, 24vw, 360px); flex: none; pointer-events: none; }
.wall .gc-meta { display: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(0,0,0,.88), rgba(0,0,0,.25) 70%),
    linear-gradient(to bottom, rgba(0,0,0,.5), transparent 25%, transparent 70%, var(--night));
  opacity: calc(1 - var(--p) * .55);
}

.trajectory {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
  opacity: calc(1 - var(--p) * 1.8);
}
.trajectory .trail { fill: none; stroke: url(#trailGrad); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.trajectory .head { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.launched .trajectory .trail { animation: draw 1.3s cubic-bezier(.6,0,.2,1) forwards; }
.launched .trajectory .head { animation: headIn .35s 1.15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes headIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

.hero-copy {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; text-align: center;
  padding: 0 20px;
  opacity: calc(1 - var(--p) * 1.7);
  transform: translateY(calc(var(--p) * -90px));
}
.wordmark {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .18em;
  font-size: clamp(2.6rem, 9vw, 6.6rem); font-weight: 700; line-height: 1;
}
.wm-a { text-shadow: 0 6px 40px rgba(0,0,0,.8); }
.wm-b {
  background: linear-gradient(160deg, var(--accent-hot), var(--accent) 55%, #22b4ec);
  color: var(--accent-ink);
  padding: .08em .28em .14em;
  border-radius: .18em;
  transform: rotate(-3deg);
  box-shadow: 0 .08em 0 var(--accent-deep), 0 18px 50px rgba(79,216,255,.35);
}
.wordmark > span { opacity: 0; transform: translateY(30px); }
.launched .wordmark > span { animation: rise .8s cubic-bezier(.2,.8,.2,1) forwards; }
.launched .wordmark .wm-b { animation: riseTilt .8s .15s cubic-bezier(.2,.8,.2,1.3) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes riseTilt { to { opacity: 1; transform: rotate(-3deg); } }

.tagline {
  margin: 1.3em 0 0; font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--ink);
  opacity: 0;
}
.launched .tagline { animation: fadeIn .8s .45s forwards; }
.rotator {
  display: inline-grid; vertical-align: bottom; overflow: hidden;
  height: 1.55em; color: var(--accent); font-weight: 600; min-width: 5.5em;
}
.rot-word { grid-area: 1 / 1; transition: transform .45s cubic-bezier(.6,0,.2,1), opacity .45s; }
.rot-word.out { transform: translateY(-100%); opacity: 0; }
.rot-word.in { transform: translateY(100%); opacity: 0; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.4); border-radius: 12px;
  opacity: calc(1 - var(--p) * 4);
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--accent); border-radius: 2px; animation: cue 1.6s infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- sections ---------- */
.block { position: relative; padding: clamp(70px, 10vw, 130px) 20px; }
.inner { max-width: var(--wrap); margin: 0 auto; }

/* stats */
.stat-panel {
  max-width: 860px; margin: 44px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.stat { padding: 34px 16px 30px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat svg { display: block; width: 30px; height: 30px; color: var(--accent); margin: 0 auto 12px; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.stat.hidden { display: none; }
.live-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3dff8b; box-shadow: 0 0 0 0 rgba(61,255,139,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61,255,139,0); } 100% { box-shadow: 0 0 0 0 rgba(61,255,139,0); } }

/* record */
.record { text-align: center; overflow: hidden; }
.fireworks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.record .inner { position: relative; }
.record-icon { width: 44px; height: 44px; color: var(--accent); margin: 34px auto 6px; }
.record-icon svg { width: 100%; height: 100%; }
.record-num {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 10vw, 6.5rem); line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, var(--accent-hot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.record p { color: var(--muted); margin: 10px 0 0; }

/* game cards */
.game-card {
  position: relative; display: block; text-decoration: none;
  aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.gc-art { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
a.game-card:hover .gc-art { transform: scale(1.05); }
.gc-art.demo {
  display: grid; place-items: center; padding: 12%;
  background:
    radial-gradient(circle at 25% 20%, hsl(var(--h) 95% 65% / .9), transparent 55%),
    radial-gradient(circle at 85% 90%, hsl(calc(var(--h) + 70) 90% 55% / .8), transparent 50%),
    linear-gradient(135deg, hsl(var(--h) 70% 30%), hsl(calc(var(--h) + 40) 75% 18%));
}
.demo-title {
  font-family: var(--display); font-weight: 800; text-align: center;
  font-size: clamp(1rem, 2.2vw, 1.6rem); line-height: 1.05; color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.35); transform: rotate(-4deg);
}
.gc-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.92), transparent);
  font-size: .84rem; font-weight: 600;
}
.gc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.gc-stat svg { width: 14px; height: 14px; }

/* carousel */
.carousel { position: relative; max-width: var(--wrap); margin: 44px auto 0; }
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px 2px 18px;
}
.track::-webkit-scrollbar { display: none; }
.track .game-card { scroll-snap-align: start; }
.car-btn {
  position: absolute; top: calc(50% - 9px); transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(26,26,26,.85); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(8px);
}
.car-btn:hover { background: var(--panel); }
.car-btn.prev { left: -22px; }
.car-btn.next { right: -22px; }
.car-btn svg { width: 20px; height: 20px; }
.center { text-align: center; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 12px;
  box-shadow: 0 4px 0 var(--accent-deep);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { box-shadow: 0 6px 0 var(--accent-deep), 0 10px 30px rgba(79,216,255,.35); }
.btn:active { box-shadow: 0 1px 0 var(--accent-deep); }

/* services */
.service-grid { max-width: 980px; margin: 44px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service {
  padding: 30px 26px; border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.service-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(79,216,255,.12); color: var(--accent); margin-bottom: 18px;
}
.service-icon svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.1rem; margin-bottom: 8px; }
.service p { margin: 0; color: var(--muted); font-size: .96rem; }

/* contact */
.contact-stack { max-width: 560px; margin: 44px auto 0; display: grid; gap: 18px; }
.contact-card {
  text-align: center; padding: 34px 28px; border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.contact-card > [data-icon] svg { display: block; width: 40px; height: 40px; color: var(--accent); margin: 0 auto 10px; }
.discord-name { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.contact-card p { color: var(--muted); margin: 6px 0 18px; }
.contact-card h3 { font-size: 1.25rem; }
.scout-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.scout-form input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--night); color: var(--ink);
}
.scout-form input::placeholder { color: #6b6b6b; }
.scout-result { margin: 14px 0 0 !important; font-weight: 600; min-height: 1.5em; }
.scout-result.ok { color: #3dff8b !important; }
.scout-result.bad { color: #ff7a7a !important; }

/* footer */
.footer {
  border-top: 1px solid var(--line); padding: 34px 20px; color: var(--muted); font-size: .88rem;
}
.footer .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer img { height: 26px; width: auto; }

/* ---------- games page ---------- */
.page-head { padding: 140px 20px 10px; text-align: center; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head h1 em { font-style: normal; color: var(--accent); }
.page-sub { color: var(--muted); margin: 12px 0 0; }
.games-grid {
  max-width: 1280px; margin: 40px auto 0; padding: 0 20px 100px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }


/* ---------- scout checker page ---------- */
.scout-wrap { padding: 30px 20px 110px; }
.scout-panel {
  max-width: 520px; margin: 0 auto; padding: 30px 28px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.scout-title { text-align: left; font-size: 1.35rem; }
.scout-help { color: var(--muted); margin: 8px 0 20px; font-size: .95rem; }
#check-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
#check-form input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--night); color: var(--ink);
}
#check-form input::placeholder { color: #6b6b6b; }
#check-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,216,255,.2); }
.btn-wide { width: 100%; justify-content: center; margin-top: 12px; }
.btn:disabled { opacity: .7; cursor: progress; }

.result { margin-top: 22px; padding: 26px 22px; border-radius: 16px; text-align: center; }
.result.ok { background: rgba(61,255,139,.06); border: 1px solid rgba(61,255,139,.35); }
.result.bad { background: rgba(255,77,94,.07); border: 1px solid rgba(255,77,94,.4); }
.avatar-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 14px; }
.scout-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid #3dff8b; box-shadow: 0 0 30px rgba(61,255,139,.35);
}
.scout-avatar.letter {
  display: grid; place-items: center; background: var(--deep);
  font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--accent);
}
.badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #3dff8b; color: #002b12; border: 3px solid var(--panel);
}
.badge svg { width: 16px; height: 16px; }
.bad-icon { width: 54px; height: 54px; margin: 0 auto 10px; color: #ff4d5e; }
.bad-icon svg { width: 100%; height: 100%; }
.result-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 0 0 8px; }
.result.ok .result-title { color: #3dff8b; }
.result.bad .result-title { color: #ff4d5e; }
.result-name { margin: 0 0 4px; }
.result-id { color: var(--muted); font-size: .9rem; }
.result-text { margin: 0; color: var(--ink); font-size: .95rem; }
.result.bad .result-text { color: var(--muted); }
.result-note { margin: 14px 0 0; color: var(--muted); font-size: .84rem; }
.result-note strong { color: var(--accent); }

/* ---------- responsive ---------- */
/* ---------- fluid layer (js/fluid.js) ---------- */
html.fluid { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.nav.tucked { transform: translate(-50%, -160%); }

.wall-move { position: absolute; inset: 0; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .1em; margin-bottom: -.1em; }
.w > span { display: inline-block; will-change: transform; }

.wipe {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent-hot), var(--accent) 45%, var(--accent-deep));
}
.wipe img { width: 90px; filter: drop-shadow(0 6px 20px rgba(2,32,45,.4)); }

.tilt { transform-style: preserve-3d; will-change: transform; }
.service, .contact-card { position: relative; overflow: hidden; }
.tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(181,240,255,.22), transparent 55%);
  opacity: 0; transition: opacity .35s;
}
.tilt.lit::after { opacity: 1; }
.service.tilt.lit, .contact-card.tilt.lit { border-color: rgba(79,216,255,.4); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--accent); opacity: 0;
  transition: width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), margin .3s cubic-bezier(.2,.8,.2,1), background .3s, opacity .3s, border-radius .3s;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgba(79,216,255,.14); border: 1.5px solid var(--accent); }
.cursor.text { width: 3px; height: 26px; margin: -13px 0 0 -1px; border-radius: 2px; }

.track { cursor: grab; }
.track.dragging { cursor: grabbing; scroll-snap-type: none; }
.track.dragging .game-card { pointer-events: none; }

@media (max-width: 820px) {
  .track { grid-auto-columns: 78%; }
  .car-btn { display: none; }
  .service-grid { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 600px) {
  .stat-panel { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .scout-form { flex-direction: column; }
  .nav nav a { padding: 7px 9px; }
  .hero { height: 150vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wall-row { animation: none; }
  html { scroll-behavior: auto; }
}
.role-pill { display: inline-block; margin: 2px 0 10px; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: .78rem; }

[hidden] { display: none !important; }
