@font-face {
  font-family: "m5x7";
  src: url("/fonts/m5x7.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #120d24;
  --bg: #17122a;
  --panel: #251d42;
  --panel-hi: #33295a;
  --text: #f2edff;
  --muted: #a69ecc;
  --gold: #fac759;
  --gold-dark: #b7792c;
  --plum: #8e4a7a;
  --ember: #ff8a3d;
  --good: #73e68c;
  --pixel: "m5x7", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(142, 74, 122, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 40%, rgba(250, 199, 89, 0.08), transparent 70%),
    var(--night);
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

/* A field of pixel stars behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 9%, #fac75999 50%, transparent 51%),
    radial-gradient(2px 2px at 33% 72%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 91% 63%, #fff5 50%, transparent 51%),
    radial-gradient(3px 3px at 58% 33%, #fac75966 50%, transparent 51%),
    radial-gradient(2px 2px at 5% 88%, #fff5 50%, transparent 51%),
    radial-gradient(2px 2px at 66% 92%, #fff4 50%, transparent 51%);
  background-size: 640px 640px;
  animation: twinkle 6s steps(3) infinite alternate;
}
@keyframes twinkle { to { opacity: 0.45; } }

img { max-width: 100%; display: block; image-rendering: pixelated; }
a { color: var(--gold); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Pixel type */
.pixel, h1, h2, h3, .btn, .nav a, .badge {
  font-family: var(--pixel);
  font-weight: normal;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: none;
}
h1 { font-size: clamp(56px, 11vw, 104px); line-height: 0.9; margin: 0; color: var(--gold); text-shadow: 4px 4px 0 var(--plum), 8px 8px 0 #0008; }
h2 { font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 0 0 16px; color: var(--gold); text-shadow: 3px 3px 0 #0009; }
h3 { font-size: 34px; line-height: 1; margin: 0 0 8px; color: var(--text); }
.muted { color: var(--muted); }

/* Stepped gold frame, like the game's panels. */
.frame {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 4px solid var(--gold);
  box-shadow:
    0 0 0 4px var(--night),
    0 0 0 8px var(--gold-dark),
    8px 12px 0 8px #0006;
  border-radius: 2px;
}

/* Header */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; gap: 16px; }
.nav .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); font-size: 30px; }
.nav .brand img { width: 44px; height: 44px; border: 3px solid var(--gold); }
.nav .links { display: flex; gap: 20px; }
.nav .links a { color: var(--muted); text-decoration: none; font-size: 26px; }
.nav .links a:hover { color: var(--gold); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 40px 0 72px; }
.hero p.lead { font-size: 21px; margin: 24px 0 28px; max-width: 32em; }
.badge {
  display: inline-block;
  font-size: 28px;
  padding: 8px 20px 10px;
  color: var(--night);
  background: var(--gold);
  box-shadow: 0 4px 0 var(--gold-dark), 0 4px 0 4px var(--night);
}
.badge small { font-size: 22px; opacity: 0.75; }

.phone {
  position: relative;
  width: min(320px, 78vw);
  margin: 0 auto;
  padding: 14px;
  background: #0b0816;
  border-radius: 40px;
  box-shadow: 0 0 0 4px #3a2f63, 0 30px 80px -10px rgba(142, 74, 122, 0.7);
  transform: rotate(3deg);
}
.phone img { height: auto; border-radius: 28px; image-rendering: auto; }
.phone::after {
  /* spell glow */
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.55), transparent 70%);
  filter: blur(6px);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.25); opacity: 0.6; } }

/* Sections */
section { padding: 56px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.step { padding: 20px; }
.step .num { font-family: var(--pixel); color: var(--ember); font-size: 28px; }
.step img { margin: 16px auto 0; border: 3px solid var(--night); width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: var(--focus, 50% 0%); image-rendering: auto; }
.step p { margin: 4px 0 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.flip > :first-child { order: 2; }
.shots { display: flex; gap: 20px; justify-content: center; }
.shots img { width: min(46%, 230px); height: auto; border: 4px solid var(--gold-dark); box-shadow: 6px 8px 0 #0007; image-rendering: auto; }
.shots img:nth-child(2) { margin-top: 48px; }

ul.runes { list-style: none; padding: 0; margin: 20px 0 0; }
ul.runes li { position: relative; padding-left: 36px; margin: 12px 0; }
ul.runes li::before {
  content: "";
  position: absolute; left: 6px; top: 0.5em;
  width: 12px; height: 12px;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--plum);
  transform: rotate(45deg);
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.stat { text-align: center; padding: 16px 8px; }
.stat b { display: block; font-family: var(--pixel); font-weight: normal; font-size: 56px; line-height: 1; color: var(--gold); }
.stat span { color: var(--muted); font-size: 15px; }

.promises { padding: 32px; text-align: center; }
.promises .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.promises .row div { font-family: var(--pixel); font-size: 30px; line-height: 1.05; }
.promises .price { max-width: 560px; margin: 24px auto 0; color: var(--muted); }
.promises .row div::before { content: "\2726"; display: block; color: var(--ember); font-size: 26px; margin-bottom: 6px; }

/* Long-form pages (privacy, support) */
.doc { max-width: 720px; margin: 0 auto; padding: 32px 28px 40px; }
.doc h1 { font-size: clamp(48px, 9vw, 72px); }
.doc h2 { font-size: 38px; margin-top: 36px; }
.doc .panel { background: var(--night); border-left: 4px solid var(--gold); padding: 12px 20px; margin: 20px 0; }
.doc ul { padding-left: 22px; }
code { background: var(--night); padding: 1px 6px; border-radius: 3px; font-size: 0.9em; }

footer { padding: 48px 0 56px; color: var(--muted); font-size: 15px; text-align: center; }
footer nav { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
footer nav a { font-family: var(--pixel); font-size: 26px; color: var(--gold); text-decoration: none; }

@media (max-width: 800px) {
  .hero, .split { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 16px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .split.flip > :first-child { order: 0; }
  .steps { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .promises .row { grid-template-columns: 1fr; }
  .nav .links a { font-size: 22px; }
  .nav .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body::before, .phone::after { animation: none; }
  html { scroll-behavior: auto; }
}
