/* Ashen Tide – Download-Seite. Farben und Schrift wie im Launcher (launcher/src/ui/ui.css), Titel wie im Spiel (game/ui). */

/* Cinzel selbst gehostet (SIL OFL 1.1, Dateien aus @fontsource/cinzel, nur latin) */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/cinzel-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/cinzel-latin-700-normal.woff2') format('woff2'); }

:root {
  --ash: #15100f;          /* Grund: kalte Asche */
  --soot: #221a18;         /* Flächen */
  --bone: #e9dfd1;         /* Text */
  --bone-dim: #a89a8e;     /* Nebentext */
  --ember: #d9562a;        /* der eine Akzent */
  --ember-hot: #ffb070;    /* Glut im Kern */
  --title: #ffb066;        /* Spieltitel */
  --gold: #e9b866;         /* Untertitel im Spiel */
  --line: rgba(233, 223, 209, 0.12);
  --display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  /* Abstands-Skala (--s0 = Halbstufe) */
  --s0: 4px; --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px;
  --gutter: max(var(--s2), env(safe-area-inset-left), env(safe-area-inset-right));
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ash); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ash);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { overflow-wrap: break-word; }

:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 3px; border-radius: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Ebenen: Key-Art (0) < Asche-Treiben (1) < Inhalt (2) */
#ash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-inner, .page, .foot { position: relative; z-index: 2; }

/* ---------- Kopf mit Key-Art ---------- */
.hero {
  position: relative;
  min-height: clamp(520px, 72vh, 860px);
  display: flex; align-items: center;
  padding: max(var(--s4), env(safe-area-inset-top)) var(--gutter) var(--s5);
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Überlagerung wie im Titelbild des Spiels: Abdunklung hinter dem Titel, oben/unten in die Fläche */
  background:
    linear-gradient(180deg, rgba(21, 16, 15, 0.78) 0%, rgba(21, 16, 15, 0) 24%, rgba(21, 16, 15, 0) 58%, rgba(21, 16, 15, 0.82) 86%, var(--ash) 100%),
    radial-gradient(ellipse at 50% 34%, rgba(10, 4, 4, 0.62), rgba(10, 4, 4, 0.15) 45%, transparent 60%),
    url('assets/keyart.webp') 62% 60% / cover no-repeat,
    var(--ash);
}
.hero-inner { width: 100%; max-width: 880px; margin: 0 auto; }

.studio { margin: 0 0 var(--s3); display: flex; justify-content: center; }
.studio-logo { height: 24px; width: auto; opacity: 0.9; }

.title {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 10vw, 104px);
  line-height: 1.05; letter-spacing: 0.03em;
  color: var(--title);
  text-shadow: 0 0 18px rgba(255, 110, 30, 0.9), 0 0 60px rgba(255, 70, 20, 0.6), 0 6px 0 #3a0e05, 0 10px 30px #000;
}
.sub {
  margin: var(--s2) 0 0;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(14px, 2.6vw, 20px);
  letter-spacing: 0.32em; text-transform: uppercase;
  padding-left: 0.32em; /* Sperrung optisch mittig */
  color: var(--gold);
  text-shadow: 0 2px 12px #000;
}
.tagline {
  margin: var(--s3) auto 0; max-width: 32em;
  font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45;
  color: var(--bone);
  text-shadow: 0 1px 2px #000, 0 2px 18px rgba(0, 0, 0, 0.9);
}

/* ---------- Download-Kasten (im Kopf) ---------- */
.download {
  margin: var(--s4) auto 0;
  max-width: 460px;
  padding: var(--s3) var(--s3) var(--s2);
  text-align: center;
  background: rgba(21, 16, 15, 0.66);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255, 176, 112, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
.dl-for { margin: 0 0 var(--s2); color: var(--bone-dim); font-size: 15px; }

.btn-main {
  display: flex; flex-direction: column; align-items: center; gap: var(--s0);
  width: 100%;
  padding: var(--s2) var(--s2);
  font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 0.08em; line-height: 1.3;
  color: #fff6ec; text-decoration: none;
  background: var(--ember);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 112, 0.35), 0 8px 30px rgba(217, 86, 42, 0.3);
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.08s;
}
.btn-main:not(.is-disabled):hover {
  background: #e8652f;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 112, 0.6), 0 10px 36px rgba(217, 86, 42, 0.45);
  transform: translateY(-1px);
}
.btn-main:not(.is-disabled):focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 3px; }
.btn-main:not(.is-disabled):active { transform: translateY(1px); }
.btn-meta { font-family: var(--body); font-weight: 400; font-size: 13px; letter-spacing: 0; opacity: 0.88; }
.btn-meta:empty { display: none; }
.btn-main.is-disabled {
  background: rgba(58, 44, 40, 0.85); color: var(--bone); cursor: default;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 17px; letter-spacing: 0.04em;
}
.btn-main.is-disabled .btn-meta { color: var(--bone-dim); opacity: 1; }

.version { margin: var(--s1) 0 0; font-size: 13px; color: var(--bone-dim); }

.dl-others {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: var(--s0) var(--s2);
  margin-top: var(--s2); padding-top: var(--s2);
  border-top: 1px solid var(--line);
  font-size: 15px; color: var(--bone-dim);
}
.dl-others ul { display: contents; list-style: none; }
.dl-others li { display: inline; }
.dl-others a { color: var(--bone); text-decoration: underline; text-decoration-color: rgba(233, 223, 209, 0.3); text-underline-offset: 3px; }
.dl-others a:hover, .dl-others a:focus-visible { color: var(--ember-hot); text-decoration-color: currentColor; }
.dl-others .off { color: var(--bone-dim); }
.dl-note { margin: var(--s1) 0 0; font-size: 13px; color: var(--bone-dim); }

/* ---------- Inhalt ---------- */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--s3) var(--gutter) 0;
}
.page h2 {
  margin: 0 0 var(--s2);
  font-family: var(--display); font-weight: 600;
  font-size: clamp(22px, 3vw, 28px); letter-spacing: 0.06em; line-height: 1.25;
  text-align: center; color: var(--bone);
}
.lead { margin: 0 auto var(--s4); max-width: 38em; text-align: center; color: var(--bone); opacity: 0.88; }

/* Galerie */
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.shots figure { margin: 0; }
.shots a {
  display: block; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 1280 / 651;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.shots img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.shots a:hover, .shots a:focus-visible { border-color: rgba(255, 176, 112, 0.5); box-shadow: 0 8px 30px rgba(217, 86, 42, 0.18); }
.shots a:hover img { transform: scale(1.02); }
.shots figcaption { margin-top: var(--s1); font-size: 15px; line-height: 1.5; color: var(--bone-dim); }
.shots figcaption strong { display: block; color: var(--bone); font-weight: 600; font-size: 16px; margin-bottom: var(--s0); }

/* So funktioniert's */
.how { margin: var(--s5) auto 0; max-width: 760px; }
.how h2 { margin-bottom: var(--s3); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.steps li {
  display: flex; gap: var(--s2); align-items: flex-start;
  padding: var(--s3) var(--s3) var(--s2);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(21, 16, 15, 0.72);
}
.steps .n {
  flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  color: var(--ember-hot);
  border: 1px solid rgba(217, 86, 42, 0.5);
}
.steps h3 { margin: var(--s0) 0 var(--s1); font-size: 16px; font-weight: 600; line-height: 1.3; }
.steps p { margin: 0; font-size: 15px; color: var(--bone); opacity: 0.84; }
.steps strong { color: var(--bone); font-weight: 600; }

/* ---------- Fuß ---------- */
.foot {
  margin-top: var(--s5);
  padding: var(--s3) var(--gutter) max(var(--s3), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--bone-dim);
}
.foot-inner { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s3); }
.foot-brand { margin: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.foot-logo { height: 22px; width: auto; opacity: 0.6; }
.foot a { color: var(--bone-dim); text-decoration: none; padding: var(--s0) 0; }
.foot a:hover, .foot a:focus-visible { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Fehlerseite (404.html) ---------- */
.lost {
  position: relative; z-index: 2;
  min-height: 60vh; max-width: 560px; margin: 0 auto;
  padding: max(var(--s5), env(safe-area-inset-top)) var(--gutter) 0;
  text-align: center;
}
.lost-code { margin: var(--s3) 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(56px, 14vw, 96px); line-height: 1; color: var(--title); text-shadow: 0 0 18px rgba(255, 110, 30, 0.6), 0 6px 0 #3a0e05; }
.lost-title { margin: var(--s2) 0 var(--s1); font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3vw, 28px); letter-spacing: 0.06em; line-height: 1.25; }
.lost-text { margin: 0 0 var(--s4); color: var(--bone-dim); }
.lost-btn { display: inline-flex; width: auto; padding: var(--s2) var(--s4); }

/* ---------- Schmal ---------- */
@media (max-width: 720px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .hero { min-height: 0; padding-top: max(var(--s5), env(safe-area-inset-top)); padding-bottom: var(--s4); }
  .download { padding: var(--s2) var(--s2) var(--s2); margin-top: var(--s3); }
  .btn-main { font-size: 18px; letter-spacing: 0.05em; }
  .btn-main.is-disabled { font-size: 15px; letter-spacing: 0.03em; }
  .steps li { padding: var(--s2); }
  .foot-inner { flex-direction: column; text-align: center; }
  .foot-brand { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn-main:not(.is-disabled):hover, .shots a:hover img { transform: none; }
}
