/* Baneborn landing page: dark pixel-art theme. Placeholder visuals; colours live in :root. */

@font-face {
  font-family: 'Press Start 2P';
  src: url('../assets/fonts/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0d0b12;
  --bg-2: #15111d;
  --panel: #1c1626;
  --line: #3a2d4a;
  --text: #d9d2e3;
  --dim: #8f84a0;
  --amber: #ffb000;
  --ember: #e2572b;
  --blood: #8c1d2a;
  --px: 4px; /* one "art pixel" */
  --pixel-font: 'Press Start 2P', ui-monospace, monospace;
  --body-font: system-ui, -apple-system, 'Segoe UI', Ubuntu, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body-font);
  -webkit-font-smoothing: antialiased;
}

img { image-rendering: pixelated; max-width: 100%; }

a { color: var(--amber); }

h1, h2, h3, .nav, .pixel-btn, .tagline, .section-title { font-family: var(--pixel-font); font-weight: normal; }

/* ---- nav ---------------------------------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; font-size: 12px;
  background: linear-gradient(var(--bg) 40%, transparent);
}
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--amber); }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 22px; }

/* ---- hero --------------------------------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 90px 16px 80px;
  background: radial-gradient(ellipse at 50% 120%, #3a1420 0%, var(--bg-2) 45%, var(--bg) 80%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.layer { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; min-height: 30%; object-fit: cover;
         object-position: bottom; }
.layer-far { opacity: .55; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; width: 100%; }
.logo { width: min(640px, 92vw); height: auto; filter: drop-shadow(0 0 18px rgba(226, 87, 43, .35)); }
.tagline { margin: 18px 0 44px; color: var(--dim); font-size: clamp(10px, 1.6vw, 14px); letter-spacing: 1px; }

.scroll-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2;
  color: var(--dim); text-decoration: none; font-size: 18px;
  animation: bob 1.6s steps(2) infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---- pixel button / frame (stepped corners with box-shadow) ------------------------------------------------- */
.pixel-btn {
  --c: var(--amber);
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 26px; min-width: 240px;
  color: var(--bg); background: var(--c); text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--c), 0 var(--px) 0 0 var(--c),
    calc(-1 * var(--px)) 0 0 0 var(--c), var(--px) 0 0 0 var(--c),
    0 calc(2 * var(--px)) 0 var(--px) rgba(0, 0, 0, .55);
  transition: transform .08s steps(1), filter .08s;
}
.pixel-btn:hover { filter: brightness(1.12); transform: translateY(calc(-1 * var(--px))); }
.pixel-btn:active { transform: translateY(var(--px)); }
.pixel-btn:focus-visible { outline: var(--px) solid #fff; outline-offset: calc(3 * var(--px)); }

.pixel-frame {
  background: var(--panel);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line), var(--px) 0 0 0 var(--line);
}

/* ---- download ----------------------------------------------------------------------------------------------- */
.dl-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px; }
.dl-btn { --c: var(--line); color: var(--text); }
.dl-btn.is-ready { --c: #6b5a2a; color: #fff3d6; }
.dl-btn.is-ready.is-mine { --c: var(--amber); color: var(--bg); }
.dl-btn.is-disabled { cursor: not-allowed; filter: grayscale(.4); }
.dl-btn.is-disabled:hover { transform: none; filter: grayscale(.4); }
.dl-icon { font-size: 22px; line-height: 1; font-family: var(--body-font); }
.dl-label { font-size: 18px; }
.dl-meta { font-size: 9px; opacity: .8; }

.dl-info { margin: 30px 0 4px; color: var(--dim); font-size: 14px; }
.dl-note { margin: 4px 0; color: var(--amber); font-size: 14px; }
.link-btn {
  background: none; border: 0; padding: 4px; color: var(--dim); font: inherit; font-size: 13px;
  text-decoration: underline dotted; cursor: pointer;
}
.link-btn:hover { color: var(--text); }
.sha-list {
  margin: 8px auto 0; max-width: 720px; text-align: left; font: 12px/1.5 ui-monospace, monospace; color: var(--dim);
  word-break: break-all;
}
.sha-list dt { color: var(--text); margin-top: 6px; }
.sha-list dd { margin: 0; }

/* ---- sections ----------------------------------------------------------------------------------------------- */
.section { max-width: 980px; margin: 0 auto; padding: 90px 20px 30px; }
.section-title {
  text-align: center; font-size: clamp(16px, 3vw, 24px); color: var(--amber); margin: 0 0 40px;
  text-shadow: var(--px) var(--px) 0 var(--blood);
}

.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.video-frame iframe, .yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-facade { padding: 0; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; opacity: .8; }
.yt-facade:hover img { opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 96px; height: 64px; transform: translate(-50%, -50%);
  background: var(--ember);
  box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--ember), 0 var(--px) 0 0 var(--ember),
              calc(-1 * var(--px)) 0 0 0 var(--ember), var(--px) 0 0 0 var(--ember);
}
.yt-play::after { /* stepped triangle */
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.yt-facade:hover .yt-play { filter: brightness(1.15); }

.about-text { max-width: 720px; margin: 0 auto 50px; font-size: 18px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.feature { padding: 26px 22px; text-align: center; }
.feature h3 { font-size: 13px; color: var(--amber); margin: 16px 0 10px; }
.feature p { margin: 0; color: var(--dim); font-size: 15px; }

/* ---- footer ------------------------------------------------------------------------------------------------- */
.footer {
  margin-top: 90px; padding: 34px 20px; text-align: center; color: var(--dim); font-size: 13px;
  border-top: var(--px) solid var(--panel);
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 10px; }
.footer a { color: var(--dim); }
.footer a:hover { color: var(--amber); }

/* ---- 404 ---------------------------------------------------------------------------------------------------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 28px; text-align: center; padding: 20px; }
.notfound h1 { color: var(--ember); font-size: clamp(28px, 8vw, 64px); margin: 0;
               text-shadow: var(--px) var(--px) 0 var(--blood); }

/* ---- small screens / motion -------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 9px; }
  .nav-logo { font-size: 10px; }
  .pixel-btn { min-width: 200px; }
  .dl-buttons { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint { animation: none; }
  .embers { display: none; }
}
