:root {
  --bg: #0e0d0b;
  --bg-2: #161411;
  --line: #2a2620;
  --ink: #f3ede2;
  --ink-dim: #a69e90;
  --sun: #f2c318;
  --sun-deep: #c98f0a;
  --radius: 14px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--sun); color: #111; }

.hl { color: var(--sun); }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgb(14 13 11 / .82);
  backdrop-filter: blur(12px);
  border-color: var(--line);
}
.nav__brand img { width: 112px; height: auto; opacity: 0; transition: opacity .3s; }
.nav.is-scrolled .nav__brand img { opacity: 1; }
.nav__links { display: flex; gap: clamp(14px, 3vw, 34px); }
.nav__links a {
  font: 500 13px/1 var(--mono);
  text-decoration: none;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: color .2s;
}
.nav__links a:hover { color: var(--sun); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px var(--gutter) 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero__rays {
  position: absolute; inset: -40%;
  z-index: -2;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgb(242 195 24 / .07) 0deg 4deg, transparent 4deg 15deg);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 55%);
  animation: spin 120s linear infinite;
}
.hero__beam {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px circle at var(--mx, 50%) var(--my, 40%), rgb(242 195 24 / .14), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgb(201 143 10 / .18), transparent 70%);
  transition: background .1s;
}
.hero::after {
  /* fade the rays into the page instead of a hard edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 35%; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__inner { max-width: 980px; text-align: center; }
.hero__logo {
  width: min(860px, 88vw); height: auto;
  margin: 0 auto clamp(40px, 7vh, 72px);
  filter: drop-shadow(0 0 40px rgb(242 195 24 / .25));
  animation: rise 1s cubic-bezier(.2,.7,.2,1) both;
}
.hero__title { margin: 0; font-size: 0; line-height: 0; }
.hero__cta {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 14px/1 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none;
  padding: 16px 22px;
  border: 1px solid var(--sun);
  color: var(--sun);
  border-radius: 999px;
  transition: background .2s, color .2s;
  animation: rise 1s .25s cubic-bezier(.2,.7,.2,1) both;
}
.hero__cta:hover { background: var(--sun); color: #111; }
.hero__cta svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes bob { 50% { transform: translateY(3px); } }

/* ---------- SECTION HEAD ---------- */
.section-head {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 800; line-height: .85; letter-spacing: -.05em;
  margin: 0;
}

/* ---------- GAMES ---------- */
.games { padding: clamp(60px, 10vw, 120px) 0 40px; }
.game {
  --accent: var(--sun);
  position: relative;
  max-width: var(--max);
  margin: 0 auto clamp(80px, 12vw, 150px);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "art body" "shots shots";
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.game--flip { grid-template-columns: 1fr 1.15fr; grid-template-areas: "body art" "shots shots"; }

.game__art {
  grid-area: art;
  position: relative;
  border-radius: var(--radius);
  transform: rotate(-1.2deg);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.game--flip .game__art { transform: rotate(1.2deg); }
.game__art::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: translate(12px, 12px);
  z-index: -1;
}
.game__art img {
  width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover;
  border-radius: inherit;
}
.game:hover .game__art { transform: rotate(0deg) translateY(-4px); }

.game__body { grid-area: body; }
.game__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status, .badge {
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 10px; border-radius: 999px;
}
.status { border: 1px solid var(--line); color: var(--ink-dim); }
.status time { color: var(--ink); }
.status::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: 1px;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } }
.badge--demo { background: var(--accent); color: var(--accent-ink); }

.game h3 {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  margin: 0 0 14px;
}
.game__lede { font-size: 20px; font-weight: 600; line-height: 1.35; margin: 0 0 12px; color: var(--accent); }
.game__body > p:not(.game__lede) { color: var(--ink-dim); margin: 0 0 20px; }


.game__body > p:last-of-type { margin-bottom: 28px; }
.game__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  padding: 14px 18px; border-radius: 10px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 55%, #000);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.btn--ghost { border: 1.5px solid var(--accent); color: var(--accent); }
.btn--ghost:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.btn--press { padding-inline: 14px; gap: 8px; border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink-dim); }
.btn--press:not([aria-disabled="true"]):hover { border-color: var(--ink); color: var(--ink); }
.btn--press[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.shots {
  grid-area: shots;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.shot {
  all: unset; cursor: zoom-in;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px;
  outline: 1px solid var(--line);
  transition: outline-color .2s, transform .3s;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .3s; filter: saturate(.85); }
.shot:hover, .shot:focus-visible { outline: 2px solid var(--accent); transform: translateY(-3px); }
.shot:hover img { transform: scale(1.06); filter: saturate(1.05); }
.shot--video { position: relative; }
.shot__play {
  position: absolute; inset: 0; margin: auto;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent), 0 8px 24px rgb(0 0 0 / .45);
  transition: transform .25s;
}
.shot__play svg { margin-left: 3px; }
.shot--video:hover .shot__play { transform: scale(1.12); }

/* ---------- CONTACT ---------- */
.contact { padding: 0 var(--gutter) clamp(80px, 10vw, 120px); }
.contact__box {
  max-width: var(--max); margin: 0 auto;
  position: relative; overflow: hidden;
  border-radius: 24px;
  padding: clamp(32px, 6vw, 80px);
  background:
    radial-gradient(700px 400px at 100% 0%, rgb(242 195 24 / .22), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line);
}
.contact__box::after {
  /* dashed light rays, echoing the logo */
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 340px; height: 340px;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgb(242 195 24 / .5) 18px 21px);
  mask-image: radial-gradient(circle at 100% 0%, #000, transparent 70%);
  pointer-events: none;
}
.contact h2 {
  font-size: clamp(30px, 4.6vw, 60px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.02; margin: 0 0 36px;
  position: relative; z-index: 1;
}
.mail {
  position: relative; z-index: 1;
  display: inline-flex; flex-wrap: wrap; align-items: stretch;
  max-width: 100%;
  border: 1.5px solid var(--sun); border-radius: 14px; overflow: hidden;
  margin-bottom: 40px;
}
.mail__addr {
  font: 500 clamp(16px, 2.4vw, 26px)/1 var(--mono);
  text-decoration: none; color: var(--sun);
  padding: 20px 24px;
  overflow-wrap: anywhere;
}
.mail__addr:hover { background: rgb(242 195 24 / .08); }
.mail__copy {
  all: unset; cursor: pointer;
  font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  padding: 0 20px; min-height: 56px;
  display: grid; place-items: center;
  background: var(--sun); color: #14110a;
  transition: background .2s;
}
.mail__copy:hover { background: #ffd84a; }
.mail__copy svg { transition: transform .2s; }
.mail__copy:hover .ico-copy { transform: scale(1.1); }
.mail__copy .ico-check, .mail__copy.is-done .ico-copy { display: none; }
.mail__copy.is-done .ico-check { display: block; }
.mail__copy.is-done { background: #8fd16a; }

.socials {
  position: relative; z-index: 1;
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 28px;
}
.socials a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 4px; text-decoration: none;
  font-weight: 600; font-size: 18px;
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding .2s;
}
.socials li a { border-top: 1px solid var(--line); margin-top: -1px; }
.socials a span { color: var(--ink-dim); transition: transform .2s, color .2s; }
.socials a:hover { color: var(--sun); padding-left: 10px; }
.socials a:hover span { color: var(--sun); transform: translate(3px, -3px); }

/* ---------- FOOTER ---------- */
.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between;
  font: 400 12px/1.5 var(--mono); color: var(--ink-dim);
  border-top: 1px solid var(--line);
}
.footer img { width: 90px; height: auto; }
.footer p { margin: 0; flex: 1 1 260px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--sun); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: min(1400px, 94vw); max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(8 7 6 / .9); backdrop-filter: blur(6px); }
.lightbox img { max-height: 86vh; width: auto; border-radius: 12px; margin: auto; }
.lightbox img[hidden] { display: none; }
.lightbox__video { width: min(1400px, 94vw, calc(86vh * 16 / 9)); aspect-ratio: 16 / 9; }
.lightbox__video[hidden] { display: none; }
.lightbox__video iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.lightbox button {
  all: unset; cursor: pointer;
  position: absolute; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--sun); color: #111; font-size: 22px; font-weight: 800;
}
.lightbox .lightbox__close { top: -14px; right: -14px; font-size: 16px; }
.lightbox .lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 30px; }
.lightbox .lightbox__prev { left: -23px; }
.lightbox .lightbox__next { right: -23px; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .game, .game--flip {
    grid-template-columns: 1fr;
    grid-template-areas: "art" "body" "shots";
  }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .socials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .nav__links a { font-size: 11px; }
  .contact__box { padding: 28px 20px; }
  .mail { display: flex; flex-direction: column; }
  .mail__addr { font-size: 14px; padding: 18px; white-space: nowrap; overflow-wrap: normal; }
  .mail__copy { min-height: 46px; }
  .socials { grid-template-columns: 1fr; }
  .lightbox .lightbox__prev { left: 6px; }
  .lightbox .lightbox__next { right: 6px; }
  .lightbox .lightbox__close { right: 6px; top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
