:root {
  --bg: #09090b;
  --bg-2: #111114;
  --bg-3: #18181c;
  --line: rgba(242, 239, 233, .09);
  --line-2: rgba(242, 239, 233, .2);
  --text: #f2efe9;
  --muted: #8d8b92;
  --accent: #ff5a1f;
  --accent-2: #ffb547;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.is-loading body { overflow: hidden; }
::selection { background: var(--accent); color: #0a0a0a; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
.o { color: rgba(242, 239, 233, .2); }
.grad, .hero__title .row--outline .char, .no-js .hero__title .row--outline {
  color: transparent;
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 70%);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--pad);
  transition: transform 1.1s var(--ease) .15s;
}
.no-js .loader { display: none; }
.is-loaded .loader { transform: translateY(-100%); pointer-events: none; }
.loader__top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.loader__count { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 22vw, 18rem); line-height: .8; letter-spacing: -.05em; }
.loader__bar { height: 2px; background: var(--line); margin-top: 24px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor, .has-cursor .cursor-dot { display: grid; }
.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(242, 239, 233, .45);
  place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), background .4s, border-color .4s, opacity .3s;
}
.cursor__label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #0a0a0a; opacity: 0; transition: opacity .2s; }
.cursor.is-link { width: 64px; height: 64px; border-color: var(--accent); }
.cursor.is-label { width: 96px; height: 96px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor-dot { position: fixed; top: 0; left: 0; z-index: 201; pointer-events: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cursor.is-hidden, .cursor-dot.is-hidden { opacity: 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-radius: 999px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transition: color .4s var(--ease), border-color .4s;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover { color: #0a0a0a; border-color: var(--accent); }
.btn:hover::before { transform: none; }
.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }
.btn--sm { padding: 10px 18px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--pad);
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease), background .3s, border-color .3s;
}
.nav.is-scrolled { background: rgba(9, 9, 11, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.logo svg { width: 26px; height: 26px; fill: var(--accent); transition: transform .6s var(--ease); }
.logo:hover svg { transform: rotate(-12deg) scale(1.1); }
.nav__links { display: flex; gap: 36px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.nav__links a { color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto; gap: 40px;
  padding: 110px var(--pad) 36px; overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, var(--bg) 100%), linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero__content, .hero__bottom { position: relative; z-index: 1; }
.hero__content { align-self: center; pointer-events: none; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 90, 31, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }

.hero__title {
  margin-top: 20px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.6rem, 16vw, 16rem); line-height: .86; letter-spacing: -.045em;
}
.hero__title .row { display: block; overflow: hidden; padding-bottom: .05em; }
.hero__title .row--outline { padding-left: 14vw; }
.char { display: inline-block; }
.js .char { transform: translateY(110%) rotate(6deg); transition: transform 1.3s var(--ease); transition-delay: calc(var(--i) * 45ms + .25s); }
.js.is-loaded .char { transform: none; }

.hero__bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 32px; }
.hero__lede { max-width: 38ch; color: var(--muted); font-size: clamp(15px, 1.2vw, 18px); }
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero__scroll i { position: relative; width: 1px; height: 56px; background: var(--line-2); overflow: hidden; }
.hero__scroll i::after { content: ''; position: absolute; inset: 0; background: var(--accent); animation: drip 2s var(--ease) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }


.js .hero__eyebrow, .js .hero__bottom { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) .9s, transform 1s var(--ease) .9s; }
.js.is-loaded .hero__eyebrow, .js.is-loaded .hero__bottom { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 26px 0; background: var(--bg); }
.marquee__skew { transform: skewX(var(--skew, 0deg)); }
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__group { display: flex; align-items: center; gap: .55em; padding-right: .55em; font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 4rem); text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; }
.marquee__group b { color: var(--accent); font-size: .6em; font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(90px, 12vw, 170px) var(--pad); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 32px; margin-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.section__label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.section__title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.6rem, 7.5vw, 7rem); line-height: .92; letter-spacing: -.04em; }
.section__title sup { font-family: var(--mono); font-weight: 400; font-size: .2em; letter-spacing: 0; color: var(--muted); vertical-align: top; position: relative; top: .6em; }
.section__note { max-width: 34ch; color: var(--muted); }

.js .reveal { opacity: 0; transform: translateY(48px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Game cards ---------- */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.card-wrap--featured { grid-column: 1 / -1; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --c: var(--accent);
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .8s var(--ease), border-color .4s, box-shadow .6s var(--ease);
  will-change: transform;
}
.card.is-tilting { transition: transform .12s linear, border-color .4s, box-shadow .6s var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--c) 45%, transparent); }
.card::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 255, 255, .1), transparent 45%);
}
.card:hover::after { opacity: 1; }

.card__media { position: relative; aspect-ratio: 616 / 353; overflow: hidden; background: var(--bg-3); }
.card__media img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 1.4s var(--ease), opacity .7s; }
.js .card__media img:not(.is-ready) { opacity: 0; }
.card:hover .card__media img, .card:hover .art span { transform: scale(1.08); }
.card__media::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgba(17, 17, 20, .85), transparent 45%); pointer-events: none; }

.art {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(90% 90% at 15% 0%, color-mix(in srgb, var(--c) 60%, transparent), transparent 60%),
    radial-gradient(70% 80% at 100% 100%, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%),
    #0d0d10;
}
.art::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M8 12l14 4-14 4z' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E");
}
.art span { position: relative; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -.05em; color: rgba(255, 255, 255, .16); transition: transform 1.4s var(--ease); }

.card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; color: var(--text); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.pill[data-status="early-access"] i { background: var(--accent-2); }
.pill[data-status="coming-soon"] i { background: #7c9cff; animation: blink 1.4s infinite; }
.pill--accent { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
@keyframes blink { 50% { opacity: .25; } }

.card__body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 24px 26px 26px; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.card__title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.4rem, 2.3vw, 2.1rem); line-height: 1.02; letter-spacing: -.03em; }
.card__tagline { color: var(--muted); max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.card__cta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.card__arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 16px; transition: background .4s var(--ease), border-color .4s, color .4s, transform .6s var(--ease); }
.card:hover .card__arrow { background: var(--c); border-color: var(--c); color: #0a0a0a; transform: rotate(-45deg); }

.card--featured { display: grid; grid-template-columns: 1.45fr 1fr; }
.card--featured .card__media { aspect-ratio: auto; min-height: 420px; }
.card--featured .card__media img { object-position: left center; transform-origin: left center; }
.card--featured .card__media::after { background: none; }
.card--featured .card__body { padding: clamp(28px, 3vw, 44px); gap: 18px; }
.card--featured .card__title { font-size: clamp(2rem, 4vw, 3.6rem); }
.card--featured .card__tagline { font-size: 17px; }

/* ---------- Studio ---------- */
.studio { border-top: 1px solid var(--line); }
.studio__grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: 48px; }
.statement { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 3.4vw, 3.1rem); line-height: 1.18; letter-spacing: -.025em; }
.statement em { font-style: normal; color: var(--accent); }
.js .statement .w { opacity: .14; transition: opacity .5s; }
.js .statement .w.is-lit { opacity: 1; }
.studio__story { margin-top: clamp(32px, 4vw, 48px); max-width: 62ch; font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.fact { padding: 22px 0; border-top: 1px solid var(--line); }
.fact dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin-top: 8px; font-family: var(--display); font-weight: 500; font-size: clamp(1.05rem, 1.7vw, 1.4rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.fact dd a { transition: color .3s; }
.fact dd a:hover { color: var(--accent); }
.timeline { list-style: none; margin-top: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline time { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding-top: 2px; }

/* ---------- Contact ---------- */
.contact { isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); }
.contact__glow {
  position: absolute; z-index: -1; right: -10vw; bottom: -20vw; width: 70vw; height: 70vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, .28), rgba(255, 181, 71, .08) 40%, transparent 68%);
  filter: blur(40px); animation: float 12s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translate(-12vw, -8vw) scale(1.15); } }
.contact__big { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 11vw, 11rem); line-height: .88; letter-spacing: -.05em; }
.contact__mail { position: relative; display: inline-block; margin-top: clamp(40px, 5vw, 64px); font-family: var(--display); font-weight: 500; font-size: clamp(1.15rem, 3vw, 2.4rem); letter-spacing: -.02em; word-break: break-all; }
.contact__mail::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform-origin: right; transform: scaleX(.25); transition: transform .7s var(--ease); }
.contact__mail:hover::after { transform-origin: left; transform: scaleX(1); }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.socials:empty { display: none; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .games { grid-template-columns: 1fr; }
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card__media { min-height: 0; aspect-ratio: 616 / 353; }
  .card--featured .card__media::after { background: linear-gradient(to top, rgba(17, 17, 20, .85), transparent 45%); }
  .studio__grid { grid-template-columns: 1fr; gap: 0; }
  .section__head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .facts { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .footer__mid { display: none; }
  .logo span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
