/* BitByte.games — site styles */
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin-var.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0d0221;
  --bg-2: #140633;
  --panel: #1a0b38;
  --panel-edge: #3a1f6e;
  --text: #f3eeff;
  --muted: #cfc4ec;
  --cyan: #2de2e6;
  --pink: #ff3cac;
  --orange: #ff8a3d;
  --yellow: #ffd23f;
  --focus: #ffd23f;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --horizon: 60%;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #8ff4f6; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--yellow); color: #1a0020; padding: 10px 14px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- Hero: synthwave sunset ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  /* One unit system for the whole hero: the SMALL viewport height (svh), which does not change
     when a phone's address bar hides or shows. Old browsers fall back to vh everywhere. */
  --vh: 1vh;
  height: calc(100 * var(--vh)); min-height: 600px; max-height: 960px;
  background: var(--bg);
  contain: layout paint;
}
@supports (height: 1svh) { .hero { --vh: 1svh; } }
.sky {
  position: absolute; inset: 0 0 calc(100% - var(--horizon)) 0;
  background: linear-gradient(180deg, #0d0221 0%, #1f0b4a 32%, #4d1275 58%, #a0237f 82%, #ff4f8b 100%);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.sun-glow {
  position: absolute; left: 50%; top: var(--horizon);
  width: min(110vw, 1100px); aspect-ratio: 2 / 1; transform: translate(-50%, -62%);
  background: radial-gradient(closest-side, rgba(255, 94, 160, .55), rgba(255, 60, 172, .18) 55%, transparent 100%);
  pointer-events: none;
}
.sun {
  --size: min(62vw, calc(46 * var(--vh)), 460px);
  position: absolute; left: 50%; top: var(--horizon);
  width: var(--size); height: var(--size); border-radius: 50%;
  transform: translate(-50%, -78%);
  background: linear-gradient(180deg, #ffe45c 0%, #ffb13d 30%, #ff6a4d 58%, #ff2d95 88%);
  -webkit-mask-image: linear-gradient(180deg,
    #000 0 50%, transparent 50% 53%, #000 53% 61%, transparent 61% 65.5%,
    #000 65.5% 72%, transparent 72% 77.5%, #000 77.5% 83%, transparent 83% 90%, #000 90%);
          mask-image: linear-gradient(180deg,
    #000 0 50%, transparent 50% 53%, #000 53% 61%, transparent 61% 65.5%,
    #000 65.5% 72%, transparent 72% 77.5%, #000 77.5% 83%, transparent 83% 90%, #000 90%);
}
.ridge {
  position: absolute; left: 0; width: 100%; height: 7%; min-height: 40px;
  bottom: calc(100% - var(--horizon));
}
.floor {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #3a0a55 0%, #1a0536 40%, #0d0221 100%);
}
.floor::before { /* glowing horizon line */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
  background: #ff7ac6; box-shadow: 0 0 12px 3px rgba(255, 60, 172, .8), 0 0 40px 8px rgba(255, 60, 172, .35);
}
.floor::after { /* sun reflection + haze where the grid meets the horizon */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 24% 42% at 50% 0%, rgba(255, 120, 170, .5), transparent 70%),
    linear-gradient(180deg, rgba(70, 10, 95, 1) 0%, rgba(64, 10, 90, .93) 12%, rgba(50, 8, 80, .5) 24%, transparent 40%);
}
/* The moving grid is drawn by js/site.js onto a canvas the size of the floor box. It projects
   the same plane the old CSS 3D version used (perspective 220px, rotateX 76deg, 90px cells,
   3px lines) without a giant GPU layer, and it stops drawing while the hero is off-screen. */
.grid { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.palm-defs { position: absolute; }
.hero::after { /* melt the floor into the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.palms {
  position: absolute; bottom: 0; height: 100%; width: auto; aspect-ratio: 7 / 10;
  fill: #0a0118; pointer-events: none;
  z-index: 3; /* above the floor's haze and horizon line, so trunks stay solid down to the ground */
}
.palms-left { left: 0; }
.palms-right { right: 0; }

.hero-content {
  position: relative; z-index: 5; text-align: center;
  padding: clamp(56px, calc(11 * var(--vh)), 120px) 16px 0;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.wordmark {
  margin: 0; font-family: var(--pixel); font-weight: 400; line-height: 1.15;
  font-size: clamp(26px, 8.4vw, 78px); letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff6b0 0%, #ffd23f 30%, #ff8a3d 60%, #ff3cac 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, .75)) drop-shadow(0 3px 0 #3b0a5c);
}
.wordmark span {
  font-size: .56em; margin-left: .15em;
  background: linear-gradient(180deg, #d8ffff, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
}
.tagline {
  margin: 0; max-width: 34em; padding: 10px 18px; border-radius: 10px;
  background: rgba(13, 2, 33, .82); border: 1px solid rgba(45, 226, 230, .35);
  color: var(--text); font-size: clamp(1rem, 2.4vw, 1.2rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn-primary {
  background: var(--pink); color: #1a0020;
  box-shadow: 0 0 18px rgba(255, 60, 172, .6);
}
.btn-primary:hover { background: #ff6cc0; color: #1a0020; }
.btn-play { background: var(--cyan); color: #06222a; }
.btn-play:disabled {
  background: #2a1a4d; color: #cfc4ec; border-color: #5b4592; cursor: not-allowed; box-shadow: none;
}
.btn-ghost { background: transparent; color: var(--cyan); border-color: var(--cyan); min-height: 44px; padding: 8px 16px; }
.btn-ghost:hover { background: rgba(45, 226, 230, .12); }

/* ---------- Sections ---------- */
main { background:
  linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%); }
.section { max-width: 1120px; margin: 0 auto; padding: clamp(48px, 8vw, 72px) 16px 8px; }
.neon-heading {
  font-family: var(--pixel); font-weight: 400; text-align: center;
  font-size: clamp(20px, 4vw, 34px); line-height: 1.3; margin: 0 0 40px;
  color: var(--cyan); text-shadow: 0 0 8px rgba(45, 226, 230, .8), 0 0 24px rgba(45, 226, 230, .45);
}
.neon-heading.small { font-size: clamp(16px, 3vw, 22px); text-align: left; margin-bottom: 20px; color: #ff7ac6;
  text-shadow: 0 0 8px rgba(255, 60, 172, .75), 0 0 22px rgba(255, 60, 172, .35); }
.panel {
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 16px;
  padding: clamp(20px, 3.5vw, 32px);
}
.panel p { margin: 0 0 14px; color: var(--text); }
.panel p:last-child { margin-bottom: 0; }
.narrow { max-width: 760px; margin: 0 auto; }
.duo { display: grid; gap: 24px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1.3fr 1fr; align-items: start; } }

/* ---------- Game card ---------- */
.game { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .game { grid-template-columns: 1.15fr 1fr; gap: 40px; }
}
.cabinet {
  position: relative; padding: 16px; border-radius: 22px;
  background: linear-gradient(180deg, #24104a, #150733);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 1px rgba(45, 226, 230, .3), 0 0 22px rgba(45, 226, 230, .55), 0 0 60px rgba(255, 60, 172, .3);
}
.marquee {
  font-family: var(--pixel); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); text-align: center; margin: 0 0 12px;
  text-shadow: 0 0 8px rgba(255, 210, 63, .7);
}
.bezel {
  padding: 12px; border-radius: 16px; background: #07010f;
  box-shadow: inset 0 0 0 2px #2c1656, inset 0 6px 18px rgba(0, 0, 0, .8);
}
.screen {
  position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 16 / 9; background: #f4eee6;
}
.screen img { width: 100%; height: 100%; object-fit: cover; }
.screen::after { /* soft glass glint, keeps the art's own colours */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 38%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .25);
}
.screen-title {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4%; text-align: center; padding: 0 12%;
}
.gm-name {
  font-family: "Fredoka", var(--body); font-weight: 700; color: #4a1f33;
  font-size: clamp(22px, 5.6vw, 44px); line-height: 1;
  text-shadow: 0 2px 0 #fff, 0 0 14px rgba(255, 255, 255, .9);
}
.gm-tag {
  font-family: "Fredoka", var(--body); font-weight: 600; color: #4a1f33;
  font-size: clamp(11px, 1.9vw, 15px); text-shadow: 0 0 8px #fff, 0 0 3px #fff;
}
@media (min-width: 900px) {
  .gm-name { font-size: clamp(28px, 3.1vw, 44px); }
  .gm-tag { font-size: clamp(12px, 1.1vw, 15px); }
}
.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.game-icon { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.game-info h3 {
  margin: 0; font-family: var(--pixel); font-weight: 400; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.35;
  color: var(--yellow); text-shadow: 0 0 10px rgba(255, 210, 63, .45);
}
.game-tagline { margin: 6px 0 0 !important; color: var(--muted) !important; font-style: italic; }
.play-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 18px; }
.soon-tag {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #1a0020; background: var(--yellow); border-radius: 999px; padding: 3px 10px;
}
.stores-note { margin: 0 0 12px !important; color: var(--muted) !important; }
.stores-note .soon-tag { margin-right: 6px; }
.stores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 16px; }
.stores img { height: 46px; width: auto; }
@media (max-width: 420px) { .stores img { height: 42px; } }

/* ---------- Contact ---------- */
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 8px; }
.email { font-size: 1.15rem; font-weight: 700; word-break: break-all; }
.copy-status { color: var(--muted); font-size: .95rem; min-height: 1.4em; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px; padding: 28px 16px 36px; text-align: center;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--pink), var(--cyan), transparent) 1;
  background: #080114; color: var(--muted); font-size: .95rem;
}
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 10px; }
.site-footer nav a { display: inline-block; padding: 6px 2px; }
.site-footer p { margin: 4px auto; max-width: 60em; }
.site-footer .tm { font-size: .78rem; color: #b3a7d6; margin-top: 14px; }

/* ---------- Legal pages ---------- */
.legal-top {
  position: relative; overflow: hidden; padding: 28px 16px 36px; text-align: center;
  background: linear-gradient(180deg, #0d0221 0%, #2a0c55 55%, #7a1a78 100%);
  border-bottom: 2px solid #ff7ac6; box-shadow: 0 6px 30px rgba(255, 60, 172, .35);
}
.legal-top a.home { display: inline-block; text-decoration: none; }
.legal-top .wordmark { font-size: clamp(20px, 5vw, 40px); }
.legal { max-width: 800px; margin: 40px auto 0; padding: 0 16px; }
.legal .panel h1 {
  font-family: var(--pixel); font-weight: 400; font-size: clamp(18px, 3.4vw, 26px); line-height: 1.35;
  color: var(--cyan); margin: 0 0 8px; text-shadow: 0 0 10px rgba(45, 226, 230, .5);
}
.legal .updated { color: var(--muted) !important; margin-bottom: 26px !important; }
.legal h2 { font-size: 1.2rem; margin: 30px 0 10px; color: var(--yellow); }
.legal ul { margin: 0 0 14px; padding-left: 1.3em; }
.legal li { margin-bottom: 8px; }
.back { display: inline-block; margin-top: 26px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 700px) {
  :root { --horizon: 62%; }
  .palms { height: 88%; }
  .palms .far { display: none; }
  /* the middle palm steps back towards the edge so the two crowns never meet in front of the sun */
  .palms .mid { transform: translate(150px, 330px) scale(.56); }
  .palms-left { left: -18%; }
  .palms-right { right: -18%; }
}
@media (max-width: 420px) {
  .palms-left { left: -24%; }
  .palms-right { right: -24%; }
}

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