@font-face { font-family: "Tiny5"; src: url("fonts/tiny5.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 500; src: url("fonts/barlow-500.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 600; src: url("fonts/barlow-600.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; src: url("fonts/barlow-condensed-700.woff") format("woff"); font-display: swap; }

:root {
  --bg: #0a0809;
  --bg-2: #120d0f;
  --glass: rgba(22, 16, 18, 0.74);
  --slate: #221d22;
  --ink: #f2f0e5;
  --muted: #b5aca8;
  --dim: #7e7573;
  --line: rgba(242, 240, 229, 0.09);
  --blood: #d6403a;
  --crimson: #b45252;
  --crimson-deep: #74242a;
  --gold: #ecc15f;
  --gold-line: rgba(236, 193, 95, 0.42);
  --common: #b8b5b9;
  --legendary: #d3a068;
  --gutter: 16px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 17px/1.6 "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #f4d98f; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- type ---------- */
.title {
  font-family: "Tiny5", monospace;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  font-size: 32px;
  margin: 0 0 20px;
}
@media (min-width: 900px) { .title { font-size: 48px; } }
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 14px/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}
.lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0 0 28px; }
.caps { font-family: "Barlow Condensed", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.blood { color: var(--blood); }
.gold { color: var(--gold); }

/* ---------- corner brackets (thin L corners, no box border) ---------- */
.corners {
  --c: var(--gold-line);
  --k: 14px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--k) no-repeat;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 30px;
  font: 700 17px/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
.btn:hover { color: var(--ink); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #c24a42 0%, #962f30 55%, #7a2429 100%);
  box-shadow:
    inset 0 0 0 1px var(--gold-line),
    inset 0 0 0 4px rgba(10, 8, 9, 0.35),
    inset 0 0 0 5px rgba(236, 193, 95, 0.18),
    0 10px 30px rgba(150, 40, 40, 0.28);
}
.btn-primary::before, .btn-primary::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.btn-primary::before { left: -3.5px; }
.btn-primary::after { right: -3.5px; }
.btn-ghost {
  background: rgba(34, 29, 34, 0.82);
  box-shadow: inset 0 0 0 1px rgba(242, 240, 229, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-small { min-height: 40px; padding: 10px 18px; font-size: 14px; }
.btn[disabled] { filter: grayscale(0.6) brightness(0.8); cursor: progress; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.25s, box-shadow 0.25s;
}
.nav.scrolled {
  background: rgba(10, 8, 9, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-logo { display: block; width: 123px; height: 15px; }
.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font: 700 14px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 900px) { .nav-links { display: flex; } .nav-logo { width: 164px; height: 20px; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 104px 0 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% 55%;
  z-index: -3;
}
.hero-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 8, 9, 0.55) 0%, rgba(10, 8, 9, 0) 28%, rgba(10, 8, 9, 0) 46%, rgba(10, 8, 9, 0.82) 74%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 45%, rgba(10, 8, 9, 0) 40%, rgba(10, 8, 9, 0.6) 100%);
}
.hero-top { text-align: center; }
.hero-logo { margin: 0 auto; width: 287px; height: 35px; }
@media (min-width: 420px) { .hero-logo { width: 328px; height: 40px; } }
@media (min-width: 720px) { .hero-logo { width: 492px; height: 60px; } }
@media (min-width: 1100px) { .hero-logo { width: 656px; height: 80px; } }
.hero-sub {
  margin: 18px 0 0;
  font: 700 15px/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold);
}
@media (min-width: 720px) { .hero-sub { font-size: 20px; margin-top: 24px; } }
.hero-bottom { text-align: center; }
.hero-lead { margin: 0 auto 28px; max-width: 34ch; font-size: 19px; color: var(--ink); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9); }
@media (min-width: 720px) { .hero-lead { font-size: 22px; max-width: 40ch; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-cta .btn { min-width: 220px; }
.platforms { margin: 18px 0 0; color: var(--dim); font: 700 13px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; }

/* ---------- sections ---------- */
.section { position: relative; padding: 96px 0; }
@media (min-width: 900px) { .section { padding: 140px 0; } }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto; max-width: 420px; opacity: 0.5; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(242, 240, 229, 0.5)); }
.divider::after { background: linear-gradient(270deg, transparent, rgba(242, 240, 229, 0.5)); }
.divider span { width: 7px; height: 7px; background: rgba(242, 240, 229, 0.8); transform: rotate(45deg); }

/* ---------- the game (phone + features) ---------- */
.game-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .game-grid { grid-template-columns: 1fr 1.1fr; gap: 72px; } }
.phone-loop { position: relative; aspect-ratio: 696 / 648; width: 100%; max-width: 560px; margin: 0 auto; }
.phone-loop video, .phone-loop img { width: 100%; height: 100%; object-fit: cover; }
.phone-loop {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 64%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 64%, transparent 100%);
}
.features { display: grid; gap: 28px 36px; margin-top: 8px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature h3 { margin: 0 0 6px; font: 700 18px/1.2 "Barlow Condensed", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.feature h3::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 12px 3px 0; background: var(--blood); transform: rotate(45deg); }

/* ---------- swords ladder ---------- */
.ladder-head { max-width: 760px; }
.ladder {
  --s: 2;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  margin-top: 48px;
  padding: 24px var(--gutter) 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 240, 229, 0.2) transparent;
}
@media (min-width: 1100px) { .ladder { justify-content: center; gap: 30px; overflow: visible; } }
.blade { flex: none; display: flex; flex-direction: column; align-items: center; scroll-snap-align: center; }
.blade img { width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.7)); transition: transform 0.25s; }
.blade:hover img { transform: translateY(-6px); }
.blade .arc { width: 46px; height: 3px; margin-top: 18px; background: var(--common); opacity: 0.8; }
.blade.legendary .arc { background: var(--legendary); box-shadow: 0 0 14px rgba(211, 160, 104, 0.7); }
.blade .name { margin-top: 12px; min-height: 2.4em; font: 700 13px/1.2 "Barlow Condensed", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: center; max-width: 96px; }
.blade:not(.legendary)::after { content: ""; display: block; height: 15px; }
.blade.legendary .name { color: var(--legendary); }
.blade .tag { margin-top: 4px; font: 700 11px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.18em; color: var(--dim); }
.blade.legendary .tag { color: var(--legendary); opacity: 0.8; }
.ladder-floor { height: 1px; margin: 0 auto; max-width: var(--maxw); background: linear-gradient(90deg, transparent, rgba(242, 240, 229, 0.18), transparent); }

/* ---------- runes ---------- */
.runes-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .runes-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.runes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (min-width: 560px) { .runes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rune { display: flex; flex-direction: column; align-items: center; padding: 22px 8px 18px; background: var(--glass); }
.rune img { width: 80px; height: 128px; }
.rune .name { margin-top: 14px; font: 700 14px/1.2 "Barlow Condensed", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }
.rune .note { margin-top: 4px; color: var(--dim); font-size: 13px; text-align: center; line-height: 1.35; }

/* ---------- gallery ---------- */
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.gallery-nav { display: none; gap: 10px; }
@media (min-width: 720px) { .gallery-nav { display: flex; } }
.gallery-nav button { width: 48px; height: 48px; padding: 0; font-size: 20px; }
.gallery {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  padding: 0 var(--gutter) 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 240, 229, 0.2) transparent;
}
@media (min-width: 1224px) { .gallery { padding-left: calc((100vw - var(--maxw)) / 2 + var(--gutter)); scroll-padding-left: calc((100vw - var(--maxw)) / 2 + var(--gutter)); } }
.shot { flex: none; width: min(72vw, 300px); scroll-snap-align: start; margin: 0; }
.shot img { width: 100%; height: auto; aspect-ratio: 645 / 1398; background: var(--bg-2); }
.shot figcaption { margin-top: 10px; color: var(--dim); font-size: 14px; line-height: 1.4; }

/* ---------- trailer ---------- */
.trailer-box { position: relative; margin-top: 40px; aspect-ratio: 16 / 9; background: #000; }
.trailer-box video { width: 100%; height: 100%; }
.credits { margin: 14px 0 0; color: var(--dim); font-size: 13px; line-height: 1.5; }
.credits summary { cursor: pointer; width: max-content; font: 700 12px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.credits summary:hover { color: var(--muted); }
.credits p { margin: 10px 0 0; }
.credits a { color: var(--muted); }

/* ---------- beta ---------- */
.beta { overflow: hidden; isolation: isolate; }
.beta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; opacity: 0.34; }
.beta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 8, 9, 0.55) 30%, rgba(10, 8, 9, 0.7) 70%, var(--bg) 100%); }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--glass); margin-bottom: 10px; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  position: relative;
  font: 700 18px/1.3 "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px; height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 22px 22px; color: var(--muted); }

/* ---------- footer ---------- */
.footer { padding: 64px 0 48px; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; }
.footer-logo { width: 164px; height: 20px; opacity: 0.85; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.footer nav a { color: var(--muted); text-decoration: none; font: 700 13px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; }
.footer nav a:hover { color: var(--ink); }
.footer small { color: var(--dim); font-size: 13px; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .blade img { transition: none; }
}

/* ---------- legal pages ---------- */
.legal { padding: 120px 0 80px; }
.legal .wrap { max-width: 860px; }
.legal h1 { font-family: "Tiny5", monospace; font-weight: 400; text-transform: uppercase; font-size: 32px; line-height: 1.15; margin: 0 0 8px; }
@media (min-width: 720px) { .legal h1 { font-size: 40px; } }
.legal h2 { font: 700 20px/1.3 "Barlow Condensed", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin: 6px 0; }
.legal .meta { color: var(--dim); margin: 0 0 28px; }
.legal .box { padding: 20px 22px; background: var(--glass); margin: 24px 0; }
.legal .box p { margin: 0; color: var(--ink); }

/* Google Play badge (the official artwork, served from /img/; the PNG carries its own clear space) */
.store-badge { display: inline-flex; align-items: center; }
.store-badge img { display: block; height: 76px; width: auto; margin: -12px -10px; }
.hero-cta .store-badge { min-width: 0; }
.play-box { text-align: center; display: flex; flex-direction: column; align-items: center; }
.play-box .kicker { justify-content: center; }
.play-box .lead { max-width: 46ch; margin-left: auto; margin-right: auto; }
.play-box .store-badge { margin-top: 18px; }
