/* =========================================================
   Soulcraft Studios
   Palette + type pulled from the studio's own game, "Left for Loot":
   plum-dark rift, teal rift-glow, warm loot-gold, cream village light.
   ========================================================= */

:root {
  /* Color — sampled from the game */
  --bg: #0f0a15;         /* plum-black (the Rift) */
  --bg-2: #150e1e;
  --panel: #1b1428;
  --panel-2: #221a31;
  --teal: #35d0c0;       /* rift glow / HP bar */
  --teal-hot: #74f2e4;
  --teal-deep: #1c8479;
  --gold: #f2b64c;       /* loot / coins */
  --gold-hot: #ffd486;
  --magenta: #e0559b;    /* rift danger */
  --cream: #f2ede2;      /* village light / text */
  --muted: #a99fb6;
  --muted-2: #6f6680;
  --line: rgba(242, 237, 226, 0.09);
  --line-teal: rgba(53, 208, 192, 0.22);

  /* Type */
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 60px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }

::selection { background: rgba(53, 208, 192, 0.3); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(70px, 10vw, 130px); }

/* pixel-HUD eyebrow */
.eyebrow {
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 8px;
  background:
    linear-gradient(var(--teal), var(--teal)) left / 4px 100% no-repeat,
    linear-gradient(var(--teal), var(--teal)) 8px 0 / 4px 100% no-repeat,
    linear-gradient(var(--teal), var(--teal)) 16px 0 / 4px 100% no-repeat;
  opacity: 0.8;
}

.section-head { max-width: 660px; margin-bottom: clamp(38px, 6vw, 60px); }
.section-head h2 { font-size: clamp(2rem, 5.2vw, 3.4rem); margin-top: 16px; }
.section-head p { color: var(--muted); margin-top: 18px; font-size: 1.06rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary {
  background: var(--teal);
  color: #06201d;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 4px 4px 0 0 var(--teal-deep);
}
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 6px 6px 0 0 var(--teal-deep); }
.btn-primary:active { transform: translate(2px,2px); box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 1px 1px 0 0 var(--teal-deep); }

.btn-gold { background: var(--gold); color: #2a1a04; box-shadow: 4px 4px 0 0 #a9781f; }
.btn-gold:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 0 #a9781f; }

.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-teal); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-hot); transform: translate(-2px,-2px); box-shadow: 4px 4px 0 0 rgba(53,208,192,.25); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled { background: rgba(15,10,21,.86); backdrop-filter: blur(12px); border-bottom-color: var(--line); padding-block: 11px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.18rem; font-weight: 700; }
.brand-mark { width: 34px; height: 34px; flex: none; image-rendering: pixelated; }
.brand small { display: block; font-family: var(--pixel); font-size: 8px; letter-spacing: 0.12em; color: var(--muted-2); text-transform: uppercase; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 30px; font-family: var(--pixel); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links a.link { color: var(--muted); }
.nav-links a.link:hover { color: var(--teal); }
.nav-cta { padding: 11px 18px; }

.nav-toggle { display: none; background: none; border: 2px solid var(--line-teal); border-radius: 3px; color: var(--cream); width: 44px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero (flow-based, no overlap) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px 0 40px;
  overflow: hidden;
}
.hero::before { /* ambient rift glow */
  content: ""; position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  top: -18%; right: -14%;
  background: radial-gradient(circle, rgba(53,208,192,.14), transparent 62%);
  pointer-events: none;
}
.hero::after { /* pixel-dot field */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(242,237,226,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { font-size: clamp(2.7rem, 7vw, 5rem); margin-top: 22px; }
.hero h1 .glow { color: var(--teal); text-shadow: 0 0 34px rgba(53,208,192,.5); }
.hero p.lead { margin-top: 22px; font-size: clamp(1.02rem, 2.1vw, 1.22rem); color: var(--muted); max-width: 520px; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* framed game screenshot in hero */
.hero-shot {
  position: relative;
  border: 2px solid var(--line-teal);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.03) inset;
  background: var(--panel);
  animation: float 7s ease-in-out infinite;
}
.hero-shot img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.hero-shot .hud {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--pixel); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream); background: rgba(15,10,21,.72); padding: 5px 9px; border-radius: 3px;
  border: 1px solid var(--line-teal);
}
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }

.hero-meta {
  position: relative; z-index: 2;
  margin-top: clamp(40px, 6vw, 64px);
  display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px);
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hero-meta span { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.hero-meta span strong { display: block; color: var(--cream); font-size: 15px; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin-top: 6px; }

/* ---------- About ---------- */
.about { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-grid h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.about-copy p { color: var(--muted); margin-top: 20px; font-size: 1.06rem; }
.about-copy .eyebrow { margin-bottom: 16px; }
.about-shot { border: 2px solid var(--line-teal); border-radius: 6px; overflow: hidden; box-shadow: 0 24px 60px -28px rgba(0,0,0,.75); }
.about-shot img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 30px 26px 34px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: var(--line-teal); }
.card .idx { font-family: var(--pixel); font-size: 11px; color: var(--muted-2); letter-spacing: 0.06em; }
.card .glyph { font-size: 28px; margin: 16px 0 18px; }
.card h3 { font-size: 1.32rem; }
.card p { color: var(--muted); margin-top: 12px; font-size: 0.96rem; }
.card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.card:hover::after { transform: scaleX(1); }

/* ---------- Extraction loop (signature) ---------- */
.loop { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.loop-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 24px 22px 26px;
  background: var(--panel);
  overflow: hidden;
}
.step .num { font-family: var(--pixel); font-size: 12px; color: var(--teal); letter-spacing: 0.06em; }
.step h3 { font-size: 1.2rem; margin-top: 14px; }
.step p { color: var(--muted); margin-top: 10px; font-size: 0.92rem; }
.step .tick { color: var(--gold); }
.step.danger { border-color: rgba(224,85,155,.28); }
.step.danger .num { color: var(--magenta); }
.step::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--teal); opacity: .5; }
.step.danger::before { background: var(--magenta); }

/* ---------- Featured game ---------- */
.featured { background: var(--bg); }
.game-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 52px); align-items: center; margin-bottom: 26px; }
.game-shot-main { position: relative; border: 2px solid var(--line-teal); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.game-shot-main img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.game-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--pixel); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-hot); background: rgba(15,10,21,.82); border: 1px solid rgba(242,182,76,.4);
  padding: 6px 10px; border-radius: 3px;
}

.game-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); }
.tag.t1 { color: var(--teal); border-color: var(--teal-deep); }
.tag.t2 { color: var(--gold); border-color: #8f6a1e; }
.tag.t3 { color: var(--magenta); border-color: rgba(224,85,155,.4); }

.game-info h3 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.game-info p { color: var(--muted); margin-top: 16px; }
.game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; border-block: 1px solid var(--line); padding-block: 20px; }
.game-stats .k { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.game-stats .v { font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-top: 8px; color: var(--cream); }
.game-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.gallery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 22px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--panel); }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.gallery figcaption { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; }

.upcoming { margin-top: 22px; display: flex; align-items: center; gap: 14px; padding: 18px 22px; border: 1px dashed var(--line-teal); border-radius: 5px; color: var(--muted); font-family: var(--pixel); font-size: 10px; letter-spacing: 0.03em; }
.upcoming b { color: var(--cream); }
.upcoming .dot { width: 9px; height: 9px; background: var(--teal); flex: none; box-shadow: 0 0 12px 2px rgba(53,208,192,.6); animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:.4;} 50%{opacity:1;} }

/* ---------- Marching horde band (pixel zombies from the game splash) ---------- */
.horde {
  position: relative;
  height: clamp(150px, 22vw, 230px);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2) 0%, #0b0712 68%, #080510 100%);
  border-block: 1px solid var(--line);
}
.horde::after { /* teal rift-glow along the ground */
  content: ""; position: absolute; inset: auto 0 0 0; height: 62%;
  background: radial-gradient(120% 100% at 50% 130%, rgba(53,208,192,.16), transparent 70%);
  pointer-events: none;
}
.horde-track {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.horde-label {
  position: absolute; left: var(--gutter); bottom: 12px; z-index: 2;
  font-family: var(--pixel); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-2);
}
.z {
  position: absolute; top: var(--y);
  width: 96px; height: 96px;
  background: url("assets/zombie-sprite.png") 0 0 / 768px 96px no-repeat;
  image-rendering: pixelated;
  filter: saturate(0.5) contrast(1.2) brightness(0.8);
  will-change: left, right;
}
.z.back  { opacity: 0.4;  --spd: 46s; filter: saturate(0.3) contrast(1.1) brightness(0.55); }
.z.front { opacity: 0.78; --spd: 30s; }

.walk-right { left: -180px;  animation: z-walk 1.2s steps(8) infinite, z-right var(--spd) linear infinite; animation-delay: var(--d), var(--d); }
.walk-left  { right: -180px; animation: z-walk 1.2s steps(8) infinite, z-left  var(--spd) linear infinite; animation-delay: var(--d), var(--d); }
.front.walk-right { transform: scale(2.3); }
.front.walk-left  { transform: scale(2.3) scaleX(-1); }
.back.walk-right  { transform: scale(1.5); }
.back.walk-left   { transform: scale(1.5) scaleX(-1); }

@keyframes z-walk  { to { background-position: -768px 0; } }
@keyframes z-right { from { left: -180px;  } to { left: calc(100vw + 180px);  } }
@keyframes z-left  { from { right: -180px; } to { right: calc(100vw + 180px); } }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--bg), #100a17); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 68px); }
.contact-grid h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.contact-copy p { color: var(--muted); margin-top: 18px; font-size: 1.06rem; }
.contact-details { margin-top: 30px; display: grid; gap: 2px; }
.detail { display: flex; align-items: center; gap: 15px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 5px; transition: border-color 0.2s var(--ease); }
.detail:hover { border-color: var(--line-teal); }
.detail .ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 4px; background: rgba(53,208,192,.1); color: var(--teal); }
.detail .ico svg { width: 18px; height: 18px; }
.detail .k { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.detail .v { color: var(--cream); font-size: 0.97rem; margin-top: 3px; }
.detail .v:hover { color: var(--teal); }

.form { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 6px; padding: clamp(24px, 4vw, 36px); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  color: var(--cream); font-family: var(--body); font-size: 0.97rem; padding: 13px 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 118px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53,208,192,.16); }
.form .btn { width: 100%; justify-content: center; }
.form-note { margin-top: 13px; font-family: var(--pixel); font-size: 9px; letter-spacing: 0.03em; color: var(--muted-2); text-align: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 52px 32px; background: var(--bg); }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer-tag { color: var(--muted); max-width: 300px; margin-top: 14px; font-size: 0.94rem; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-col { display: grid; gap: 12px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--teal); }
.footer-col .head { color: var(--muted-2); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--pixel); font-size: 9px; letter-spacing: 0.04em; color: var(--muted-2); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal { padding-top: 130px; padding-bottom: 90px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.legal .updated { font-family: var(--pixel); font-size: 10px; color: var(--muted-2); letter-spacing: 0.04em; margin-top: 14px; text-transform: uppercase; }
.legal h2 { font-size: 1.35rem; margin-top: 42px; color: var(--cream); }
.legal p, .legal li { color: var(--muted); margin-top: 14px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--teal); }
.legal a:hover { color: var(--teal-hot); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px var(--gutter) 28px; background: rgba(15,10,21,.98);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
  }
  .hero-grid, .about-grid, .game-hero, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { max-width: 560px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .loop-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .game-stats { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .loop-steps { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; justify-content: center; }
  .nav-cta { width: auto; }
}
@media (max-width: 560px) {
  .front.walk-right { transform: scale(1.8); }
  .front.walk-left  { transform: scale(1.8) scaleX(-1); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .horde-track { display: none; } /* no frozen off-screen sprites */
}
