/* Space Alchemist — design A "Ship Terminal". Colors come from the game's color sets. */

@font-face {
  font-family: "Share Tech Mono";
  src: url("/fonts/ShareTechMono-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --background: #060609;
  --panel: rgba(182, 225, 119, 0.04);
  --line: rgba(182, 225, 119, 0.22);
  --terminal-green: #B6E177;
  --text: #ECE6CB;
  --muted: #A1ACB5;
  --clear-blue: #8DC9DF;
  --red: #BD6568;
  --orange: #C57B47;
}

* { box-sizing: border-box; }
html { background: var(--background); scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font: 16px/1.65 "Share Tech Mono", ui-monospace, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
body::after { /* CRT scanlines */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}
a { color: var(--terminal-green); text-decoration: none; border-bottom: 1px dashed var(--line); }
a:hover { border-bottom-color: var(--terminal-green); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--terminal-green); outline-offset: 3px; }
img { max-width: 100%; }
img.pixel { image-rendering: pixelated; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(6, 6, 9, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); border: 0; letter-spacing: 0.12em; font-size: 13px; white-space: nowrap; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.topbar nav { display: flex; gap: 18px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.topbar nav a { border: 0; color: var(--muted); }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--terminal-green); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .cover { position: absolute; right: 3%; top: -22%; height: 150%; max-width: none; image-rendering: pixelated; opacity: 0.95; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--background) 30%, rgba(6, 6, 9, 0.55) 60%, transparent 85%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 48px; padding-bottom: 48px; }
.kicker { color: var(--terminal-green); font-size: 13px; letter-spacing: 0.14em; }
.hero h1 { margin: 18px 0 26px; }
.hero .title { width: min(560px, 88%); height: auto; display: block; }
.tagline { font-size: clamp(20px, 2.6vw, 28px); margin: 0 0 22px; }
.console { max-width: 560px; min-height: 10.5em; padding: 16px 18px; border: 1px solid var(--line); background: var(--panel); font-size: 15px; }
.console p { margin: 0; }
.console .system { color: var(--terminal-green); }
.cursor { display: inline-block; width: 0.6em; height: 1.05em; margin-left: 1px; background: var(--terminal-green); vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--terminal-green); color: var(--terminal-green); text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; background: rgba(182, 225, 119, 0.06); }
a.button:hover { background: rgba(182, 225, 119, 0.16); }
.button.secondary { border-color: var(--line); color: var(--muted); }
.button.status { cursor: default; }

/* Sections */
section { padding: 84px 0; border-bottom: 1px solid var(--line); }
.section-label { color: var(--terminal-green); font-size: 13px; letter-spacing: 0.14em; margin-bottom: 10px; }
h2 { font-weight: 400; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.3; margin: 0 0 34px; letter-spacing: 0.04em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.module { border: 1px solid var(--line); background: var(--panel); padding: 18px; }
.module .status { color: var(--terminal-green); font-size: 13px; margin-bottom: 12px; }
.module h3 { font-weight: 400; margin: 0 0 8px; font-size: 18px; text-transform: uppercase; letter-spacing: 0.06em; }
.module p { margin: 0; color: var(--muted); font-size: 15px; }
.module img { display: block; width: 100%; height: 120px; object-fit: contain; margin-bottom: 14px; }

.planets { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.planet { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; border: 1px solid var(--line); padding: 18px; }
.planet img { width: 96px; height: 96px; }
.planet .readout { color: var(--clear-blue); font-size: 13px; }
.planet h3 { margin: 2px 0 6px; font-weight: 400; font-size: 17px; }
.planet p { margin: 0; color: var(--muted); font-size: 14px; }
.enemies { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: center; margin-top: 28px; }
.enemies img { width: 150px; opacity: 0.9; }

/* Document pages: privacy, support, legal notice */
.document { padding: 64px 0 84px; }
.document .wrap { max-width: 780px; }
.document h1 { font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.25; margin: 0 0 8px; letter-spacing: 0.04em; }
.document .updated { color: var(--muted); font-size: 13px; margin-bottom: 32px; }
.document .summary { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; margin: 0 0 12px; }
.document .summary p { margin: 0 0 6px; }
.document .summary p:last-child { margin-bottom: 0; }
.document h2 { font-size: 17px; color: var(--terminal-green); letter-spacing: 0.06em; text-transform: uppercase; margin: 44px 0 10px; line-height: 1.4; }
.document h3 { font-weight: 400; font-size: 16px; text-transform: uppercase; letter-spacing: 0.04em; margin: 26px 0 6px; }
.document p, .document li, .document dd { font-size: 15px; }
.document ul { padding-left: 1.2em; }
.document li { margin-bottom: 6px; }
.document li::marker { content: "• "; color: var(--terminal-green); }
.document dl { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 6px 20px; margin: 10px 0 0; }
.document dt { color: var(--muted); font-size: 14px; }
.document dd { margin: 0; }
.document .note { color: var(--muted); font-size: 14px; }
.contact-box { border: 1px solid var(--terminal-green); background: rgba(182, 225, 119, 0.06); padding: 18px; margin: 8px 0 12px; }
.contact-box .address { font-size: clamp(18px, 3vw, 22px); }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "_> "; color: var(--terminal-green); }
.faq details[open] summary { color: var(--terminal-green); }
.faq details > *:not(summary) { margin: 10px 0 0 1.9em; color: var(--text); }
.fill { background: rgba(189, 101, 104, 0.25); outline: 1px dashed var(--red); padding: 0 4px; }

footer { padding: 36px 0 56px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 720px) {
  .topbar nav a:not(.language) { display: none; }
  .hero { min-height: auto; align-items: flex-end; }
  .hero .cover { right: -18%; top: 0; height: auto; width: 115%; opacity: 0.55; }
  .hero::before { background: linear-gradient(180deg, rgba(6, 6, 9, 0) 0%, rgba(6, 6, 9, 0.55) 30%, var(--background) 55%); }
  .hero .wrap { padding-top: 240px; padding-bottom: 56px; }
  section { padding: 60px 0; }
  .enemies img { width: 110px; }
  .document { padding: 44px 0 60px; }
  .document dl { grid-template-columns: 1fr; gap: 2px; }
  .document dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
