/* ---------------------------------------------------------------------------
   Parasite landing page — eerie zombie palette, no JS, no external resources.
   Mobile-first; single-column reads fine all the way up to 880px max-width.
   --------------------------------------------------------------------------- */

:root {
  --bg:           #0a0d0a;
  --bg-deeper:    #050706;
  --bg-card:      #10130f;
  --blood:        #5e2a2a;
  --blood-bright: #8a3b3b;
  --blood-glow:   rgba(138, 59, 59, 0.35);
  --moss:         #3a4a32;
  --fg:           #d8d6c8;
  --fg-dim:       #8a8878;
  --fg-mute:      #5d5b51;
  --rule:         #1c211c;
  --rule-bright:  #2a3128;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Subtle scanline overlay — no JS, no extra requests, just a tiled gradient. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(transparent 95%, rgba(120, 30, 30, 0.04) 95%);
  background-size: 100% 4px;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* ---- typography --------------------------------------------------------- */

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 11vw, 5.5rem);
  font-weight: bold;
  letter-spacing: 0.12em;
  margin: 0 0 0.25rem 0;
  color: var(--fg);
  text-align: center;
  line-height: 1;
  text-shadow:
    0 0 4px  rgba(94, 42, 42, 0.6),
    0 0 18px rgba(94, 42, 42, 0.35),
    2px 2px 0 var(--bg-deeper);
}

h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--fg);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h2 { font-size: 1.7rem; letter-spacing: 0.04em; }
h3 { font-size: 1.05rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* Section heading gets a blood-drip border via inline SVG data URI — no extra request. */
.section-heading {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  position: relative;
}

.section-heading::after {
  content: "";
  display: block;
  height: 12px;
  margin-top: 2px;
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: 80px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 12'><path d='M0 0 H80 V2 H0 Z M6 2 q1 6 2 8 q1 -2 2 -8 Z M22 2 q1 4 1.5 6 q0.5 -2 1 -6 Z M40 2 q1.5 8 3 10 q1.5 -2 3 -10 Z M58 2 q1 5 2 7 q1 -2 2 -7 Z M70 2 q0.5 3 1 4 q0.5 -1 1 -4 Z' fill='%235e2a2a'/></svg>");
}

p { margin: 0 0 1rem 0; }

a {
  color: var(--blood-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(138, 59, 59, 0.5);
}

a:hover, a:focus {
  color: var(--fg);
  text-decoration-color: var(--blood-bright);
}

strong { color: var(--fg); }

code, pre, kbd {
  font-family: "DejaVu Sans Mono", "Courier New", monospace;
  font-size: 0.9em;
}

code {
  background: var(--bg-deeper);
  color: var(--fg);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  border: 1px solid var(--rule);
}

pre {
  background: var(--bg-deeper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blood);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.45;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

kbd {
  background: var(--bg-deeper);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
}

.note {
  color: var(--fg-dim);
  font-style: italic;
  font-size: 0.95em;
}

/* ---- hero --------------------------------------------------------------- */

.hero {
  padding: 3rem 0 1.5rem 0;
  text-align: center;
}

.tagline {
  font-style: italic;
  color: var(--fg-dim);
  font-size: 1.15rem;
  margin: 0 0 1.75rem 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
}

/* Pixel-perfect framed hero screenshot — the title screen IS the title art. */
.hero-shot {
  margin: 0 auto 1.75rem auto;
  max-width: 720px;
  position: relative;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border: 1px solid var(--rule-bright);
  box-shadow:
    0 0 0 1px var(--bg-deeper),
    0 8px 28px rgba(0, 0, 0, 0.55),
    0 0 36px var(--blood-glow);
}

.hero-shot figcaption {
  text-align: center;
  font-style: italic;
  color: var(--fg-dim);
  font-size: 0.9em;
  margin-top: 0.6rem;
}

/* Title-screen variant: smaller max-width preserves the chunky pixel look. */
.hero-title {
  max-width: 600px;
}

/* Visually hide the H1 — the title-screen.png is the actual logotype. The
   text remains in the DOM for search engines and screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--blood-bright);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--blood);
  color: var(--fg);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--blood-bright);
  color: var(--fg);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
}

.btn-secondary:hover, .btn-secondary:focus {
  background: var(--bg-deeper);
  color: var(--fg);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---- screenshot gallery ------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem 0;
}

.gallery figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 0.5rem;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border: 1px solid var(--bg-deeper);
}

.gallery figcaption {
  color: var(--fg-dim);
  font-size: 0.85em;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  font-style: italic;
}

/* ---- feature cards ------------------------------------------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem 0;
  padding: 0;
  list-style: none;
}

.features li {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blood);
  padding: 0.85rem 1rem;
  margin: 0;
}

.features li strong {
  display: block;
  color: var(--fg);
  margin-bottom: 0.25rem;
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.features li span {
  display: block;
  color: var(--fg-dim);
  font-size: 0.92em;
  line-height: 1.5;
}

/* ---- tables ------------------------------------------------------------- */

table.controls {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem 0;
}

table.controls th,
table.controls td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

table.controls th {
  color: var(--fg-dim);
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 0.08em;
  font-weight: normal;
}

table.controls td:first-child {
  white-space: nowrap;
  width: 38%;
}

/* ---- lists -------------------------------------------------------------- */

ul, ol {
  padding-left: 1.5rem;
}

ul li, ol li {
  margin-bottom: 0.5rem;
}

ol li code {
  word-break: break-all;
}

/* ---- footer ------------------------------------------------------------- */

footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem 0;
  border-top: 1px solid var(--rule);
  color: var(--fg-dim);
  font-size: 0.9em;
  text-align: center;
}

/* ---- accessibility: respect reduced-motion preference ------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .btn:focus { transform: none; }
}
