/* ============================================================
   Bixie — landing / marketing page styles.
   Built on the in-game pixel design tokens (ui_theme.css) so the
   site feels like the game: chunky 8-bit bevels, cool slate body,
   warm gold accent. Adds playful motion the HUD doesn't need.
   ============================================================ */

/* Friendly rounded display + body font; the chunky pixel font is reserved
   for small brand accents (logo, kickers, tags) so the page stays light. */
:root {
  --font-display: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ui-bg-deep);
  color: var(--ui-text);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.pixel { font-family: var(--ui-font-pixel); }

/* Landing buttons read in the rounded font (the in-game pixel .ui-btn font is
   too heavy at CTA size). style.css loads after ui_theme.css so this wins. */
.ui-btn { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; text-shadow: none; }

a { color: var(--ui-accent); text-decoration: none; }
img { image-rendering: pixelated; display: block; }

.wrap { width: min(1140px, 92vw); margin: 0 auto; }

/* ---- chunky pixel text shadow helper ---- */
.tshadow { text-shadow: 3px 3px 0 var(--ui-text-shadow); }

/* ============================================================
   Top nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ui-bg-deep) 88%, transparent);
  backdrop-filter: blur(4px);
  border-bottom: var(--pixel) solid var(--ui-divider);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--ui-font-pixel); font-size: 18px; color: var(--ui-accent); }
.brand .logo-cube { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.nav .links a { color: var(--ui-text-dim); font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.nav .links a:hover { color: var(--ui-accent-hi); }
@media (max-width: 680px) { .nav .links a.hide-sm { display: none; } }

/* ============================================================
   Buttons (reuse .ui-btn from theme, add a big CTA size)
   ============================================================ */
.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 17px; padding: 16px 28px;
  text-decoration: none;
}
.btn-cta.primary::before {
  content: ""; width: 0; height: 0;
  border-left: 10px solid currentColor;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  display: inline-block; margin-right: 2px;
}
.btn-cta .blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex; align-items: center;
  padding: 64px 0 48px;
  overflow: hidden;
  /* layered pixel sky as a fallback; a staged game screenshot can sit on top
     via .hero-shot when available. */
  background:
    linear-gradient(180deg, #2b3f6b 0%, #3c5a86 30%, #6f86a8 62%, #b9c2cc 100%);
}
/* far parallax mountains drawn with stacked clip-path blocks */
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 42%;
  background:
    radial-gradient(120% 90% at 20% 100%, #38507a 0 40%, transparent 41%),
    radial-gradient(120% 80% at 70% 100%, #2f4straße 0 0, #33486e 0 38%, transparent 39%),
    linear-gradient(180deg, transparent, #243css 0);
  opacity: 0.0; /* placeholder; real scenery layered via .hero-shot */
}
.hero-shot {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 60%;
  image-rendering: pixelated;
}
.hero-shot::after {           /* darken bottom + left for text legibility */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,21,28,.72) 0%, rgba(20,21,28,.30) 42%, rgba(20,21,28,0) 70%),
    linear-gradient(180deg, rgba(20,21,28,.30) 0%, rgba(20,21,28,0) 30%, rgba(20,21,28,.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-tag {
  display: inline-block; margin-bottom: 18px;
  font-family: var(--ui-font-pixel); font-size: 10px; letter-spacing: .12em;
  color: var(--ui-bg-deep); background: var(--ui-accent);
  padding: 7px 12px;
  box-shadow: inset 2px 2px 0 var(--ui-accent-hi), inset -2px -2px 0 var(--ui-accent-deep);
}
.hero h1 {
  margin: 0 0 14px; line-height: 1.06;
  font-size: clamp(40px, 9vw, 96px);
  color: #fff;
  text-shadow: 0 3px 0 rgba(10,11,18,.55), 0 0 28px rgba(240,192,96,.22);
}
.hero h1 .gold { color: var(--ui-accent-hi); }
.hero p.lead {
  max-width: 560px; margin: 0 0 28px;
  font-size: 18px; line-height: 1.6; color: #eef1f6;
  text-shadow: 2px 2px 0 rgba(10,11,18,.7);
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .meta { margin-top: 22px; display: flex; gap: 22px; flex-wrap: wrap; color: #dfe5ee; font-size: 13px; }
.hero .meta b { color: var(--ui-accent-hi); font-family: var(--font-display); font-weight: 700; font-size: 24px; display: block; }

/* floating creature cutouts in the hero */
.hero-floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floater { position: absolute; width: 120px; filter: drop-shadow(0 10px 0 rgba(10,11,18,.18)); animation: bob 5s ease-in-out infinite; }
.floater.f1 { top: 16%; right: 8%;  width: 150px; animation-delay: -.5s; }
.floater.f2 { top: 52%; right: 22%; width: 96px;  animation-delay: -1.6s; }
.floater.f3 { top: 30%; right: 30%; width: 78px;  animation-delay: -2.7s; }
@media (max-width: 820px){ .hero-floaters{ opacity:.5 } .floater.f3{ display:none } }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-16px) } }

/* live (real-time 3D) creatures */
.live-creature { display: block; }
.live-creature canvas { display: block; width: 100%; height: 100%; }
.floater.f1.live-creature { width: 240px; height: 260px; filter: drop-shadow(0 12px 0 rgba(10,11,18,.18)); }
.boss-band .portrait .live-creature { width: min(430px, 92%); height: 460px; filter: drop-shadow(0 16px 0 rgba(0,0,0,.3)); }
@media (max-width: 820px){ .floater.f1.live-creature{ width: 150px; height: 170px } }

/* ============================================================
   Section scaffolding
   ============================================================ */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .kicker { font-family: var(--ui-font-pixel); font-size: 11px; letter-spacing:.12em; color: var(--ui-accent); }
.section-head h2 { font-size: clamp(26px, 4.5vw, 40px); margin: 12px 0 8px; color: #fff; }
.section-head p { color: var(--ui-text-dim); max-width: 620px; margin: 0 auto; font-size: 16px; line-height: 1.6; }

.alt { background: var(--ui-bg-mid); border-top: var(--pixel) solid var(--ui-divider); border-bottom: var(--pixel) solid var(--ui-divider); }

/* ---- feature grid ---- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 18px; }
.feature {
  padding: 22px; background: var(--ui-bg-up);
  box-shadow: inset 2px 2px 0 var(--ui-bevel-light), inset -2px -2px 0 var(--ui-bevel-dark);
}
.feature .ico { display: block; width: 30px; height: 6px; margin-bottom: 16px;
  background: var(--ui-accent);
  box-shadow: 8px 0 0 var(--ui-accent-deep); }
.feature h3 { margin: 0 0 8px; font-size: 14px; color: var(--ui-accent-hi); }
.feature p { margin: 0; color: var(--ui-text-dim); font-size: 14px; line-height: 1.6; }

/* ============================================================
   Bestiary (mob wiki)
   ============================================================ */
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.filters .ui-btn { font-size: 11px; padding: 8px 14px; }
.filters .ui-btn.active { background: var(--ui-accent-deep); color: var(--ui-accent-hi); }

.bestiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mob-card {
  position: relative; padding: 14px; text-align: center;
  background: var(--ui-bg-up);
  box-shadow: inset 2px 2px 0 var(--ui-bevel-light), inset -2px -2px 0 var(--ui-bevel-dark);
  transition: transform .12s steps(2);
}
.mob-card:hover { transform: translateY(-4px); }
.mob-card .pic {
  height: 150px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(60% 50% at 50% 70%, rgba(10,11,18,.35), transparent 70%),
    var(--ui-bg-deep);
  box-shadow: inset 2px 2px 0 var(--ui-bevel-dark), inset -2px -2px 0 var(--ui-bevel-light);
  margin-bottom: 12px; overflow: hidden;
}
.mob-card .pic img { width: 86%; max-height: 138px; object-fit: contain; animation: bob 6s ease-in-out infinite; }
.mob-card h3 { margin: 4px 0 6px; font-size: 14px; color: #fff; }
.mob-card p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ui-text-dim); min-height: 60px; }
.mob-card .tags { display: flex; gap: 6px; justify-content: center; margin: 8px 0 2px; flex-wrap: wrap; }
.tag {
  font-family: var(--ui-font-pixel); font-size: 8px; letter-spacing:.06em;
  padding: 4px 7px; color: var(--ui-bg-deep);
}
.tag.passive { background: var(--ui-success); }
.tag.hostile { background: var(--ui-danger); color: #fff; }
.tag.boss    { background: var(--ui-accent); }
.tag.rare    { background: var(--ui-info); }
.tag.biome   { background: var(--ui-bg-mid); color: var(--ui-text-dim); box-shadow: inset 1px 1px 0 var(--ui-bevel-light), inset -1px -1px 0 var(--ui-bevel-dark); }
.mob-card.is-hidden { display: none; }

/* ============================================================
   Biomes strip
   ============================================================ */
.biomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.biome {
  padding: 30px 16px; text-align: center; min-height: 104px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.14), inset -2px -2px 0 rgba(0,0,0,.35);
}
.biome b { display:block; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-top: 8px; color:#fff; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.biome small { color: rgba(255,255,255,.82); font-size: 12px; }
.b-autumn  { background: linear-gradient(180deg,#d98a3d,#9c4a25); }
.b-crystal { background: linear-gradient(180deg,#6fe6d2,#2f8fae); }
.b-glow    { background: linear-gradient(180deg,#2a7d6e,#0e3b3f); }
.b-ember   { background: linear-gradient(180deg,#7a2d22,#2a1414); }
.b-cherry  { background: linear-gradient(180deg,#f0a8c8,#c2657f); }
.b-arctic  { background: linear-gradient(180deg,#9fc6e6,#5d7fa6); }
.b-glow b, .b-ember b { color:#fff; }

/* ============================================================
   Final CTA + footer
   ============================================================ */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(28px,5vw,48px); color:#fff; margin: 0 0 10px; }
.cta-final p { color: var(--ui-text-dim); margin: 0 0 26px; font-size: 16px; }

footer { padding: 36px 0; border-top: var(--pixel) solid var(--ui-divider); color: var(--ui-text-dim); }
footer .wrap { display:flex; gap: 16px; align-items:center; flex-wrap: wrap; justify-content: space-between; }
footer .links { display:flex; gap:18px; }
footer a { color: var(--ui-text-dim); font-size: 13px; }
footer a:hover { color: var(--ui-accent); }

/* scroll-reveal */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s steps(6); }

/* ============================================================
   Animated pixel divider — a scrolling row of tiny blocks.
   ============================================================ */
.pixel-divider {
  height: 10px; width: 100%;
  background:
    repeating-linear-gradient(90deg,
      var(--ui-accent) 0 8px, var(--ui-accent-deep) 8px 16px,
      var(--ui-bg-up) 16px 24px, var(--ui-bevel-light) 24px 32px);
  background-size: 32px 100%;
  animation: slide-bg 12s linear infinite;
  opacity: .55;
}
@keyframes slide-bg { to { background-position: 256px 0; } }

/* ============================================================
   Creature marquee — an infinite scrolling parade of critters.
   ============================================================ */
.marquee {
  overflow: hidden; padding: 18px 0;
  background: var(--ui-bg-deep);
  border-top: var(--pixel) solid var(--ui-divider);
  border-bottom: var(--pixel) solid var(--ui-divider);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.marquee img:hover { transform: translateY(-6px) scale(1.12); transition: transform .12s steps(2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   Boss showcase band — dramatic full-width feature.
   ============================================================ */
.boss-band {
  position: relative; overflow: hidden;
  border-top: var(--pixel) solid var(--ui-divider);
  border-bottom: var(--pixel) solid var(--ui-divider);
  background: #0e1622;
}
.boss-band .bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .42; filter: saturate(.8) brightness(.8);
}
.boss-band .bg::after { content:""; position:absolute; inset:0;
  background: radial-gradient(80% 120% at 75% 50%, rgba(14,22,34,0) 30%, rgba(14,22,34,.85) 100%),
              linear-gradient(90deg, rgba(14,22,34,.92), rgba(14,22,34,.3)); }
.boss-band .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 20px; padding: 64px 0; }
.boss-band .copy .kicker { font-family: var(--ui-font-pixel); font-size: 11px; letter-spacing:.14em; color: var(--ui-danger); }
.boss-band .copy h2 { font-size: clamp(28px, 5vw, 46px); color:#fff; margin: 12px 0; line-height:1.08; }
.boss-band .copy h2 .ice { color: #bfeaff; text-shadow: 0 0 18px rgba(136,236,255,.4); }
.boss-band .copy p { color:#cdd6e0; font-size:16px; line-height:1.65; max-width: 460px; }
.boss-band .copy .stat-row { display:flex; gap: 22px; margin: 20px 0 4px; flex-wrap: wrap; }
.boss-band .copy .stat-row b { display:block; font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--ui-accent-hi); }
.boss-band .copy .stat-row span { font-size: 12px; color: var(--ui-text-dim); }
.boss-band .portrait { display:flex; justify-content:center; }
.boss-band .portrait img { width: min(360px, 80%); filter: drop-shadow(0 16px 0 rgba(0,0,0,.3)); animation: bob 5s ease-in-out infinite; }
@media (max-width: 760px){ .boss-band .wrap{ grid-template-columns: 1fr; text-align:center } .boss-band .copy p{ margin-inline:auto } .boss-band .copy .stat-row{ justify-content:center } .boss-band .portrait{ order:-1 } }

/* ============================================================
   Screenshots gallery
   ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 16px; }
.shot {
  position: relative; overflow: hidden;
  box-shadow: inset 2px 2px 0 var(--ui-bevel-light), inset -2px -2px 0 var(--ui-bevel-dark);
  background: var(--ui-bg-deep);
}
.shot img { width: 100%; height: 220px; object-fit: cover; display:block; transition: transform .4s steps(8); }
.shot:hover img { transform: scale(1.08); }
.shot figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 10px 12px; font-family: var(--ui-font-pixel); font-size: 10px; color:#fff;
  background: linear-gradient(180deg, transparent, rgba(10,11,18,.85));
  text-shadow: 1px 1px 0 #000;
}
.shot .pin { position:absolute; top:8px; right:8px; font-family:var(--ui-font-pixel); font-size:8px;
  background: var(--ui-accent); color: var(--ui-bg-deep); padding: 4px 7px; }

