/* Utilox Gaming: night arcade. Identity: loud, playful, retro. */
:root {
  /* neutral ramp, hue 285 (arcade night) */
  --n-0: oklch(0.13 0.04 285);
  --n-1: oklch(0.17 0.05 285);
  --n-2: oklch(0.22 0.06 285);
  --n-3: oklch(0.32 0.07 285);
  --n-8: oklch(0.80 0.03 285);
  --n-9: oklch(0.96 0.01 285);
  /* accent ramp, coin yellow */
  --y-5: oklch(0.87 0.17 92);
  --y-7: oklch(0.66 0.14 80);
  --pink: oklch(0.68 0.22 10);

  --bg: var(--n-0);
  --surface: var(--n-1);
  --raised: var(--n-2);
  --line: var(--n-3);
  --text: var(--n-9);
  --muted: var(--n-8);
  --accent: var(--y-5);
  --accent-shade: var(--y-7);
  --on-accent: var(--n-0);
  --star-a: oklch(0.96 0.01 285);
  --star-b: oklch(0.87 0.17 92);
  --star-c: oklch(0.80 0.13 210);

  --f-pixel: "Press Start 2P", ui-monospace, monospace;
  --f-head: "Pixelify Sans", ui-monospace, monospace;
  --f-body: "Space Mono", ui-monospace, Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --px: 4px; /* one "pixel" of the frame */
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html.lenis, html.lenis body { height: auto; }
.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 18px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px dashed var(--accent); outline-offset: 6px; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.lbl { font: 400 12px/1.6 var(--f-pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 12px 16px; font: 700 16px var(--f-head); }
.skip:focus { top: 12px; }

/* The notched pixel frame: four flat shadows leave the corners empty. */
.px { box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc, var(--line)), 0 var(--px) 0 0 var(--fc, var(--line)), calc(-1 * var(--px)) 0 0 0 var(--fc, var(--line)), var(--px) 0 0 0 var(--fc, var(--line)); }

/* Buttons */
.btn {
  --fc: var(--on-accent);
  position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 10px 22px 14px; border: 0; cursor: pointer;
  font: 700 18px/1 var(--f-head); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--on-accent); background: var(--accent);
  box-shadow: inset 0 calc(-1 * var(--px)) 0 0 var(--accent-shade),
    0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc),
    0 calc(3 * var(--px)) 0 0 var(--fc);
  transition-property: transform, box-shadow, filter; transition-duration: 120ms; transition-timing-function: var(--ease-out);
}
.btn:active { transform: translateY(var(--px)) scale(0.96); box-shadow: inset 0 0 0 0 var(--accent-shade),
    0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc); }
.btn .arw { font-size: 0.7em; transition: transform 150ms var(--ease-out); }
.btn-lg { min-height: 60px; padding: 14px 30px 18px; font-size: 22px; }
.btn-sm { min-height: 44px; padding: 8px 16px 12px; font-size: 16px; }
.btn-ghost { --fc: var(--accent); background: var(--bg); color: var(--accent); box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc), 0 calc(3 * var(--px)) 0 0 var(--accent-shade); }
.btn-ink { --fc: var(--n-0); background: var(--n-0); color: var(--accent); box-shadow: inset 0 calc(-1 * var(--px)) 0 0 var(--n-2), 0 calc(3 * var(--px)) 0 0 oklch(0 0 0 / 0.5); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.1); }
  .btn:hover .arw { transform: translateX(4px); }
}

/* Header */
.hdr {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 14px max(20px, (100% - var(--wrap)) / 2);
  background: oklch(0.13 0.04 285 / 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--px) solid var(--n-2);
  transition: transform 300ms var(--ease-out);
}
.hdr.hide { transform: translateY(-110%); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 400 14px/1 var(--f-pixel); letter-spacing: 0.04em; text-transform: uppercase; }
.logo b { color: var(--accent); font-weight: 400; margin-left: 0.6em; }
.logo-mark { width: 32px; height: 32px; }
.nav { display: flex; gap: 28px; margin-left: auto; font: 500 18px var(--f-head); }
.nav a { text-decoration: none; padding: 10px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: var(--px); background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav a:hover::after { transform: scaleX(1); } }
.power { position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--px)); height: var(--px); }
.power i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 16px); transform: scaleX(var(--p, 0)); transform-origin: left; }
@media (max-width: 760px) { .nav { display: none; } .hdr .btn { margin-left: auto; } .logo span { font-size: 12px; } }
@media (max-width: 380px) { .logo b { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 104px) 0 120px; background: radial-gradient(ellipse 70% 60% at 75% 40%, oklch(0.30 0.12 300 / 0.55), transparent 70%), var(--bg); }
.stars { position: absolute; inset: 0; pointer-events: none; opacity: 0.45; }
.stars i { position: absolute; top: 0; left: 0; width: 2px; height: 2px; animation: drift 30s linear infinite; }
.stars i::after { content: ""; position: absolute; top: 1000px; left: 0; width: 2px; height: 2px; box-shadow: inherit; }
.stars .s2 { width: 4px; height: 4px; animation-duration: 22s; }
.stars .s2::after { width: 4px; height: 4px; }
@keyframes drift { to { transform: translateY(-1000px); } }
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-in > * { min-width: 0; }
.hero-lbl { margin-bottom: 24px; color: var(--muted); }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.h1 { font: 400 clamp(34px, 6.4vw, 76px)/1.15 var(--f-pixel); text-transform: uppercase; color: var(--text); text-shadow: var(--px) var(--px) 0 var(--pink), calc(2 * var(--px)) calc(2 * var(--px)) 0 var(--n-0); }
.h1 .ch { display: inline-block; }
.lede { margin-top: 28px; max-width: 34em; font-size: 19px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 24px 28px; margin-top: 40px; }
.press { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); font: 400 12px var(--f-pixel); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 12px; }

/* Arcade cabinet with attract mode */
.cabinet { --fc: var(--n-0); position: relative; padding: 0 22px 22px; background: linear-gradient(180deg, oklch(0.40 0.16 300), oklch(0.27 0.12 295)); box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc), 12px 12px 0 0 oklch(0 0 0 / 0.45); }
.marquee { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 -22px 20px; padding: 14px; background: var(--n-0); font: 400 clamp(16px, 2.2vw, 24px)/1 var(--f-pixel); text-transform: uppercase; color: var(--accent); text-shadow: 0 0 12px oklch(0.87 0.17 92 / 0.6); border-bottom: var(--px) solid var(--accent-shade); }
.coin { width: 28px; height: 28px; animation: spin 1.6s steps(4) infinite; }
@keyframes spin { 50% { transform: scaleX(0.25); } }
.bezel { padding: 14px; background: var(--n-0); }
.crt { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-radius: 6px; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; animation: attract 21s infinite; animation-delay: calc(var(--i) * 3.5s - 21s); }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { position: absolute; left: 12px; bottom: 12px; padding: 8px 10px; background: var(--n-0); font: 400 11px/1.4 var(--f-pixel); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
@keyframes attract { 0% { opacity: 0; } 1.5%, 16.67% { opacity: 1; } 18.17%, 100% { opacity: 0; } }
.crt.paused .slide { animation-play-state: paused; }
.scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, oklch(0 0 0 / 0.22) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 60px oklch(0 0 0 / 0.6); }
.panel { display: flex; align-items: center; gap: 20px; margin-top: 18px; padding: 12px 18px; background: oklch(0.20 0.07 295); }
.stick { position: relative; width: 18px; height: 34px; margin-right: auto; background: var(--n-0); }
.stick::before { content: ""; position: absolute; left: -7px; top: -16px; width: 32px; height: 26px; background: var(--pink); box-shadow: inset -4px -4px 0 oklch(0.50 0.20 10); }
.abtn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer; background: var(--pink); color: var(--n-0); font: 400 12px var(--f-pixel); text-decoration: none; box-shadow: inset 0 -5px 0 oklch(0.50 0.20 10), 0 4px 0 var(--n-0); transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.abtn-b { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 -5px 0 var(--accent-shade), 0 4px 0 var(--n-0); }
.abtn:active { transform: translateY(3px) scale(0.96); box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.3), 0 1px 0 var(--n-0); }
.abtn[aria-pressed="true"] span { font-size: 0; }
.abtn[aria-pressed="true"] span::before { content: "▶"; font-size: 14px; }

/* Sections */
.sect { padding: clamp(72px, 10vw, 128px) 0; }
.sect-tint { background: var(--surface); border-block: var(--px) solid var(--n-2); }
.sect-head { max-width: 46em; margin-bottom: 56px; }
.sect-head h2, .cta h2 { margin: 16px 0 18px; font: 700 clamp(36px, 5vw, 60px)/1.1 var(--f-head); }
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
.w > span { display: inline-block; }

/* Game cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.card { --fc: var(--n-2); position: relative; display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc), 10px 10px 0 0 oklch(0 0 0 / 0.5);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition-property: transform, box-shadow; transition-duration: 200ms; transition-timing-function: var(--ease-out); }
.sect-tint .card { background: var(--raised); --fc: var(--n-3); }
.card .screen { position: relative; overflow: hidden; border-bottom: var(--px) solid var(--c); background: #000; }
.card .screen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; outline: 1px solid oklch(1 0 0 / 0.1); outline-offset: -1px; transition: transform 400ms var(--ease-out), filter 300ms ease; }
.card .screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, oklch(0 0 0 / 0.14) 0 2px, transparent 2px 4px); }
.p1 { position: absolute; top: 12px; right: 12px; z-index: 1; padding: 6px 8px; background: var(--c); color: var(--n-0); font: 400 11px/1.4 var(--f-pixel); }
.card-body { position: relative; display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 28px 28px 32px; }
.num { position: absolute; top: 22px; right: 28px; font: 400 28px/1 var(--f-pixel); color: var(--n-3); }
.card h3 { font: 700 30px/1.1 var(--f-head); padding-right: 3em; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg); font-size: 14px; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.tag i { width: 10px; height: 10px; }
.card-body > p { color: var(--muted); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: auto; padding-top: 12px; }
.hint { font-size: 15px; color: var(--muted); }
.soon-badge { padding: 10px 14px; background: var(--bg); color: var(--accent); font: 400 12px/1.4 var(--f-pixel); text-transform: uppercase; letter-spacing: 0.06em; box-shadow: 0 0 0 var(--px) var(--accent-shade); }
@media (hover: hover) and (pointer: fine) {
  .card .screen img { filter: saturate(0.55) brightness(0.85); }
  .card:hover { --ty: -6px; --fc: var(--c); box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc), 16px 18px 0 0 oklch(0 0 0 / 0.5); }
  .card:hover .screen img { filter: none; transform: scale(1.04); }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { --fc: var(--n-2); padding: 32px 28px; background: var(--surface); box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--fc), 0 var(--px) 0 0 var(--fc), calc(-1 * var(--px)) 0 0 0 var(--fc), var(--px) 0 0 0 var(--fc); }
.step-n { display: block; margin-bottom: 22px; font: 400 22px/1 var(--f-pixel); color: var(--accent); }
.steps h3 { font: 700 26px/1.15 var(--f-head); margin-bottom: 12px; }
.steps p { color: var(--muted); }

/* Closing band */
.cta { padding: clamp(72px, 9vw, 112px) 0; background: var(--accent); color: var(--on-accent); text-align: center; }
.cta-in { display: flex; flex-direction: column; align-items: center; }
.cta p { font-size: 19px; margin-bottom: 40px; }
.heart { display: inline-block; width: 36px; height: 36px; margin: 0 6px; }
.hearts { display: flex; margin-bottom: 8px; }
.cta .heart { animation: beat 1.2s steps(2) infinite; }
.cta .heart:nth-of-type(2) { animation-delay: 0.2s; }
.cta .heart:nth-of-type(3) { animation-delay: 0.4s; }
@keyframes beat { 50% { transform: scale(1.15); } }

/* Footer */
.ftr { position: relative; overflow: hidden; padding: 72px 0 32px; background: var(--n-0); border-top: var(--px) solid var(--n-2); }
.ftr-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.ftr-in > * { min-width: 0; }
.ftr p.muted { margin-top: 18px; max-width: 28em; }
.ftr ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.ftr ul a { display: inline-block; padding: 6px 0; }
.ftr-word { margin: 56px 0 0; text-align: center; font: 400 clamp(40px, 13vw, 180px)/1 var(--f-pixel); color: var(--n-1); white-space: nowrap; user-select: none; }
.legal { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* 404 */
.hero-404 { min-height: 70vh; display: grid; align-items: center; }
.go { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.go .lede { margin-bottom: 8px; }
.go-count { font: 400 14px var(--f-pixel); color: var(--accent); margin: 16px 0 32px; text-transform: uppercase; }

/* Pixel cursor ring with a label (fine pointers only; native cursor stays) */
.cur { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; padding: 8px 10px; background: var(--accent); color: var(--on-accent); font: 400 11px var(--f-pixel); text-transform: uppercase; opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) scale(0.9); transition: opacity 150ms ease, scale 150ms var(--ease-out); }
.cur.on { opacity: 1; scale: 1.11; }

/* Intro: insert-coin boot screen, once per session */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 28px; background: var(--n-0); clip-path: inset(0 0 0 0); transition: clip-path 600ms var(--ease-in-out); }
.boot p { font: 400 clamp(16px, 3vw, 28px)/1.4 var(--f-pixel); text-transform: uppercase; color: var(--accent); text-align: center; }
.boot .bar { width: min(320px, 70vw); height: 20px; padding: 4px; box-shadow: 0 0 0 var(--px) var(--accent); }
.boot .bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 16px); transform-origin: left; animation: load 700ms steps(8) forwards; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.boot.out { clip-path: inset(0 0 100% 0); }

/* Motion states (only with JS, so nothing is hidden without it) */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }
.js .card.rv.in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition-property: opacity, transform, box-shadow; transition-duration: 600ms, 200ms, 200ms; }
.js .rv.in.settled { transition-delay: 0ms; }
.js [data-split] .w > span { transform: translateY(110%); transition: transform 700ms var(--ease-out); transition-delay: calc(var(--wi) * 70ms); }
.js [data-split].in .w > span { transform: none; }
.js .h1 .ch { opacity: 0; transform: translateY(-0.6em); }
.js .h1.in .ch { opacity: 1; transform: none; transition: opacity 300ms var(--ease-out), transform 450ms var(--ease-out); transition-delay: calc(var(--ci) * 45ms); }

/* Layout breakpoints */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; }
  .cabinet { max-width: 560px; }
  .press { display: none; }
  .hero { padding-bottom: 72px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .ftr-in > :first-child { grid-column: 1 / -1; }
  .card-body { padding: 24px 20px 28px; }
  .num { right: 20px; }
  .cabinet { padding: 0 14px 14px; }
  .marquee { margin: 0 -14px 14px; }
}
@media (max-width: 420px) {
  .btn-lg { font-size: 19px; padding-inline: 22px; }
  .cta-row .btn { width: 100%; justify-content: center; }
}

/* Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .stars i, .coin, .blink, .cta .heart { animation: none; }
  .slide { animation: none; }
  .slide:first-child { opacity: 1; }
  .js .rv, .js [data-split] .w > span, .js .h1 .ch { transform: none; transition: opacity 300ms ease; }
  .card, .card:hover, .card .screen img, .hdr { transform: none !important; transition-property: opacity, box-shadow, filter; }
  .boot, .cur { display: none; }
}
@media (prefers-reduced-transparency: reduce) { .hdr { background: var(--n-0); backdrop-filter: none; } }
@media (prefers-contrast: more) { :root { --muted: var(--n-9); --line: var(--n-8); } .scan, .card .screen::after { display: none; } }
@view-transition { navigation: auto; }
