/* Vermis site — shared design system across index/support/privacy.
   Palette and button colors are pulled directly from the app's own
   MainMenuView gradient and PixelButtonStyle tints, not invented separately —
   the site should read as an extension of the game, not a generic wrapper
   around it. */

:root {
  color-scheme: dark;

  /* Background gradient — exact values from MainMenuView.swift. */
  --bg-top: #050d1a;
  --bg-bottom: #0d1f1a;

  /* Button tints — exact SwiftUI system colors used in-game
     (.red / .purple / .teal), not approximated. */
  --red: #ff3b30;
  --red-dark: #b8241c;
  --purple: #af52de;
  --purple-dark: #7d3aa0;
  --teal: #30b0c7;
  --teal-dark: #1f7a8c;

  --fg: #f5f7fa;
  --muted: #9aa5b1;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);

  --font-display: "Press Start 2P", monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;

  --radius: 4px;
  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
  color: var(--fg);
  font: 17px/1.6 var(--font-body);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: scanline-drift 8s linear infinite; }
}
@keyframes scanline-drift {
  0% { background-position: 0 0; }
  100% { background-position: 0 300px; }
}

img { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-2) var(--space-5);
}

/* Pixel-font display text — used sparingly (titles/section headers), same
   reasoning the app itself has for reserving the bitmap font for headings
   and using a plain readable font for body copy. */
.pixel-text {
  font-family: var(--font-display);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 56px);
  text-align: center;
  margin: 0;
  text-shadow: var(--shadow-hard);
}

.tagline {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  margin: var(--space-2) 0 0;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: 14px;
  color: var(--muted);
}

h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.4;
  margin: 0 0 var(--space-1);
}

h2.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-transform: uppercase;
  margin: var(--space-5) 0 var(--space-2);
}

p { margin: 0 0 var(--space-2); }

/* Skeuomorphic pixel-art button — hard offset shadow, thick dark border,
   no rounding — mirrors PixelButtonStyle's own bevel chrome exactly. */
.pixel-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
  text-align: center;
  padding: 16px 28px;
  border: 3px solid rgba(0, 0, 0, 0.6);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.05s ease;
}
.pixel-btn:hover { text-decoration: none; filter: brightness(1.08); }
.pixel-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.pixel-btn--red { background: var(--red-dark); }
.pixel-btn--purple { background: var(--purple-dark); }
.pixel-btn--teal { background: var(--teal-dark); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin: var(--space-4) 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}

/* Screenshot gallery — plain device frames, not overwrought skeuomorphic
   chrome; the pixel art inside is the point. */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.gallery figure {
  margin: 0;
  background: #000;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  overflow: hidden;
}
.gallery img {
  image-rendering: pixelated;
  width: 100%;
  display: block;
}
.gallery figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: var(--space-1) 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.features .card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.features .card p { margin: 0; color: var(--muted); font-size: 15px; }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
  text-align: center;
}
.achievements-grid img {
  image-rendering: pixelated;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  margin: 0 auto var(--space-1);
}
.achievements-grid span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

dl.faq dt {
  font-weight: 700;
  margin-top: var(--space-2);
}
dl.faq dt:first-child { margin-top: 0; }
dl.faq dd {
  margin: 4px 0 0;
  color: var(--muted);
}

ol.steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: var(--space-2);
}
ol.steps li:last-child { margin-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  color: #fff;
  background: var(--teal-dark);
  border: 2px solid rgba(0, 0, 0, 0.5);
}

footer {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
footer .links {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.credit {
  color: var(--muted);
  font-size: 13px;
}
