:root {
  --lime: #E8FF3C;
  --off: #F5F5F2;
  --black: #050505;
  --pad-x: clamp(20px, 4vw, 56px);
  --pad-y: clamp(96px, 12vw, 160px);
  --gap-lg: clamp(40px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hero-size: clamp(56px, 13vw, 190px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--black);
  color: var(--off);
  font-family: 'Instrument Sans', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }

a { color: var(--off); text-decoration: none; transition: color .3s; }
a:hover { color: var(--lime); }
::selection { background: var(--lime); color: #000; }

h1, h2, p { margin: 0; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.muted { color: rgba(245, 245, 242, .6); }

.page { position: relative; overflow: hidden; background: var(--black); min-height: 100vh; }

/* ---------- Mark (the W zigzag) ---------- */
.mark {
  --h: 16px;
  display: block;
  flex: none;
  width: calc(var(--h) * 1.4);
  height: var(--h);
  margin: 0 calc(var(--h) * .24) 0 calc(var(--h) * -.1);
  position: relative;
  top: calc(var(--h) * -.06);
  overflow: visible;
  color: var(--lime);
}
.mark-nav    { --h: 16.5px; }
.mark-hero   { --h: calc(var(--hero-size) * .95); }
.mark-footer { --h: calc(var(--hero-size) * .285); }
.mark-studio { --h: clamp(24px, 8vw, 96px); color: #000; margin: 0; top: 0; }

.mark-nav use            { stroke-width: 9; }
.mark-hero use           { stroke-width: 5.5; }
.mark-footer use         { stroke-width: 7; }
.mark-studio use         { stroke-width: 5.5; }
@media (min-width: 1200px) { .mark-footer use { stroke-width: 5.5; } }

.mark-hero use {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: lwDrawMark 1.1s .3s cubic-bezier(.6, 0, .2, 1) forwards;
}

/* ---------- Ambient ---------- */
.ambient {
  position: absolute;
  top: -10vw; left: 55%;
  width: 50vw; height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214, 255, 0, .07), transparent 60%);
  animation: lwBreathe 9s ease-in-out infinite;
  filter: blur(20px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 2.4vw, 28px) var(--pad-x);
  background: rgba(5, 5, 5, .7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 245, 242, .08);
}
.nav-logo {
  display: flex; align-items: center;
  font-family: Urbanist, sans-serif; font-weight: 400;
  font-size: 17px; letter-spacing: .42em; color: var(--off);
}
.nav-logo:hover { color: var(--off); }
.nav-links {
  display: none;
  gap: clamp(20px, 3vw, 44px);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
}
@media (min-width: 760px) { .nav-links { display: flex; } }
.nav-cta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  border: 1px solid rgba(245, 245, 242, .2);
  padding: 9px 14px;
  transition: border-color .3s, color .3s;
}
.nav-cta:hover { color: var(--lime); border-color: var(--lime); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--lime);
  display: inline-block; animation: lwBlink 2.4s ease-in-out infinite;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 160px) var(--pad-x) 0;
  display: flex; flex-direction: column; gap: clamp(36px, 5vw, 72px);
}
.hero-top { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 56px); }
.wordmark {
  display: flex; align-items: center;
  font-family: Urbanist, sans-serif; font-weight: 400;
  font-size: var(--hero-size); line-height: 1; letter-spacing: .3em; color: var(--off);
}
.wm-a { animation: lwFade 1s .1s var(--ease) both; }
.wm-b { animation: lwFade 1s .5s var(--ease) both; }
.hero-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  animation: lwFade 1.2s .9s var(--ease) both;
}
.hero-row h1 {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 600;
  font-variation-settings: 'opsz' 48;
  font-size: clamp(24px, 2.8vw, 40px);
  letter-spacing: -.02em; line-height: 1.1; text-wrap: pretty;
}
.hero-row p { max-width: 400px; font-size: 14px; line-height: 1.6; color: rgba(245, 245, 242, .6); }

.cursor-wire {
  width: 100%; height: 60px; display: block; overflow: visible;
  animation: lwFade 1s 1.1s both;
}
#wire-dot { filter: drop-shadow(0 0 6px #D6FF00); }

.eyebrow-row {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  animation: lwFade 1.4s 1.2s var(--ease) both;
}
.eyebrow-row .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

.trailer {
  position: relative; aspect-ratio: 16 / 9;
  border: 1px solid rgba(245, 245, 242, .1);
  overflow: hidden; background: #0b0b0b;
  animation: lwFade 1.4s 1.2s var(--ease) both;
}
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #0b0b0b; }

/* ---------- Sections ---------- */
.section {
  padding: var(--pad-y) var(--pad-x);
  display: flex; flex-direction: column; gap: var(--gap-lg);
}
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

.rule {
  display: flex; align-items: center; gap: 20px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(245, 245, 242, .55);
}
.rule .num { color: var(--lime); }
.rule .line { position: relative; flex: 1; height: 1px; background: rgba(245, 245, 242, .12); }
.pulse {
  position: absolute; top: -2px; left: 0;
  width: 5px; height: 5px; margin-left: -2px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 8px var(--lime);
  animation: lwTravel var(--dur, 7s) var(--delay, 0s) cubic-bezier(.4, 0, .2, 1) infinite;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(28px, 4vw, 64px);
}
.grid-2.align-end { align-items: end; }

.section h2 {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 600;
  font-variation-settings: 'opsz' 96;
  font-size: clamp(40px, 6.2vw, 100px); line-height: .98;
  letter-spacing: -.025em; text-wrap: balance;
}
#games h2 { font-size: clamp(44px, 7.2vw, 116px); line-height: .94; }
.h2-xl { font-size: clamp(48px, 8vw, 128px) !important; line-height: .94 !important; }

.copy { display: flex; flex-direction: column; gap: 22px; max-width: 440px; }
.copy.justify-end { justify-content: flex-end; gap: 18px; max-width: 420px; }
.copy .lead { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; font-weight: 500; }
.copy p { font-size: 14px; line-height: 1.65; }
.copy p.lead { font-size: clamp(17px, 1.4vw, 21px); }

.btn {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  padding: 16px 22px;
  transition: gap .3s, background .3s, border-color .3s, color .3s;
}
.btn:hover { gap: 22px; }
.btn-lime { background: var(--lime); color: #000; }
.btn-lime:hover { background: var(--off); color: #000; }
.btn-ghost { border: 1px solid rgba(245, 245, 242, .3); color: var(--off); }
.btn-ghost:hover { color: var(--lime); border-color: var(--lime); }

.shot {
  position: relative; display: block; aspect-ratio: 21 / 9; overflow: hidden;
  border: 1px solid rgba(245, 245, 242, .1); background: #0b0b0b;
}
.shot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.2s var(--ease);
}
.shot:hover img { transform: scale(1.03); }

.specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px;
  border-top: 1px solid rgba(245, 245, 242, .1); padding-top: 24px;
}
.specs > * { display: flex; flex-direction: column; gap: 8px; color: var(--off); }
.specs a:hover { color: var(--lime); }
.specs .k { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(245, 245, 242, .45); }
.specs .v { font-size: 15px; }

/* Studio (light) */
.section-light { background: var(--off); color: #000; }
.section-light .rule { color: rgba(0, 0, 0, .5); }
.section-light .rule .line { background: rgba(0, 0, 0, .15); }
.section-light .pulse { background: #000; box-shadow: 0 0 8px #000; }
.section-light .copy p { font-size: 15px; color: rgba(0, 0, 0, .7); }
.link-dash {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #000;
  transition: gap .3s;
}
.link-dash:hover { color: #000; gap: 20px; }
.link-dash .dash { width: 28px; height: 1px; background: #000; display: inline-block; }
.studio-mark { display: flex; justify-content: flex-end; padding-top: 24px; border-top: 1px solid rgba(0, 0, 0, .12); }

/* Contact (lime) */
.section-lime { background: var(--lime); color: #000; }
.section-lime .rule { color: rgba(0, 0, 0, .55); }
.section-lime .rule .num { color: #000; }
.section-lime .rule .line { background: rgba(0, 0, 0, .2); }
.section-lime .pulse { background: #000; box-shadow: none; }
.section-lime .muted { color: rgba(0, 0, 0, .65); }
.section-lime .email { color: #000; border-bottom-color: rgba(0, 0, 0, .35); }
.section-lime .email:hover { color: #000; border-bottom-color: #000; }
.section-lime ::selection { background: #000; color: var(--lime); }

.contact-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-end; }
.contact-row .copy { gap: 16px; max-width: 460px; }
.email {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 500;
  font-size: clamp(22px, 3vw, 44px); letter-spacing: -.01em;
  border-bottom: 1px solid rgba(245, 245, 242, .3); padding-bottom: 6px; align-self: flex-start;
  transition: color .3s, border-color .3s;
  word-break: break-all;
}
.email:hover { color: var(--lime); border-bottom-color: var(--lime); }

/* ---------- Footer ---------- */
.footer { padding: clamp(40px, 5vw, 72px) var(--pad-x) clamp(32px, 4vw, 56px); display: flex; flex-direction: column; gap: var(--gap-lg); }
.footer-wire { width: 100%; height: 40px; display: block; overflow: visible; }
.footer-zig { stroke-dasharray: 120; stroke-dashoffset: 120; animation: lwDraw 2s 0s ease-in-out infinite alternate; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.wordmark-footer { font-size: clamp(28px, 4vw, 56px); letter-spacing: .4em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 32px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(245, 245, 242, .5); }
.footer-links a { color: rgba(245, 245, 242, .5); }
.footer-links a:hover { color: var(--lime); }

/* ---------- Keyframes ---------- */
@keyframes lwDraw { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
@keyframes lwDrawMark { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@keyframes lwFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lwTravel { 0% { left: 0; opacity: 0; } 5% { opacity: 1; } 95% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes lwBreathe { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .7; transform: scale(1.15); } }
@keyframes lwBlink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ---------- Calm mode (reduced motion) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient, .pulse { display: none; }
  .live-dot, .footer-zig { animation: none; }
  .footer-zig { stroke-dashoffset: 0; }
  .mark-hero use { animation: none; stroke-dashoffset: 0; }
  .wm-a, .wm-b, .hero-row, .cursor-wire, .eyebrow-row, .trailer { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
