/* kessaria.app — eine Seite, kein Skript. Farben und Schriften aus dem Spiel (src/ui/ui_kit.gd). */

@font-face {
  font-family: "Plex Condensed";
  src: url("fonts/IBMPlexSansCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex";
  src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex";
  src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #14120f;
  --soil: #201e1c;
  --line: rgba(239, 237, 233, 0.12);
  --bone: #efede9;
  --dim: rgba(242, 235, 214, 0.64);
  --ember: #ff7a33;
  --cash: #f2c94c;
  --vantage: #db2e21;
  --head: "Plex Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bone); text-decoration-color: var(--ember); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Kopfzeile */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  font: 700 14px/1 var(--head); letter-spacing: 0.18em; text-transform: uppercase;
}
.top a { text-decoration: none; color: var(--dim); }
.top a:hover { color: var(--bone); }
.top nav { display: flex; gap: 22px; }
.brand { color: var(--bone) !important; }

/* Schlüsselbild */
.hero {
  position: relative;
  display: grid; align-items: start;
  padding: 92px 0 56px;
  background:
    radial-gradient(120% 70% at 75% 30%, rgba(196, 128, 94, 0.18), transparent 60%),
    var(--ink);
}
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; width: 100%; }
/* Auf dem Handy zuerst Schriftzug und Satz, das Bild darunter; ab 880 px nebeneinander. */
.hero-art { margin: 0; position: relative; order: 2; }
.hero-art img {
  width: min(340px, 78vw); margin: 0 auto;
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
}
.eyebrow {
  margin: 0 0 14px;
  font: 700 13px/1 var(--head); letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--cash);
}

/* Schriftzug wie im Spiel, Fassung „Tief geschnitten" (Designdurchgang 0.6b, Julian 03.10.): Das Wort
   steht über der Glutlinie, die Füße liegen eine Fuge tiefer und gedämpft — hinter der Linie, im Graben.
   Bis dahin lag der Schnitt bei 54 %, mitten im Band, in das die Schrift ihre Durchstreichung legt, und
   eine Testerin fragte: „Warum ist HOLDOUTS durchgestrichen?" */
.wordmark {
  --size: clamp(64px, 13vw, 128px);
  position: relative; margin: 0;
  font: 700 var(--size)/1 var(--head); letter-spacing: 0.05em;
  height: 1em;
  width: max-content; max-width: 100%;
}
.wordmark span {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  text-shadow: 0.02em 0.03em 0 rgba(5, 4, 3, 0.55);
}
/* Zeilenhöhe 1: Grundlinie bei 0,875 em, Versalhöhe 0,698 em → Versalien von 0,18 bis 0,875 em.
   Der Schnitt liegt wie im Spiel bei 80 % der Versalhöhe, also bei 0,735 em; die Fuge ist 0,094 em
   (6 von 64 pt), die Linie liegt darin bei 0,756 em und ist 0,058 em dick (Fuge × 0,62). Ohne Seitversatz
   steht sie links und rechts gleich weit über (die 0,05 em Buchstabenabstand nach dem S gleichen aus, dass
   das S enger an seiner Kante sitzt als das H). */
.wordmark .wm-top { clip-path: inset(0 0 0.265em 0); }
.wordmark .wm-bot { clip-path: inset(0.735em 0 0 0); transform: translateY(0.094em); opacity: 0.55; }
.wordmark .wm-sizer { position: static; visibility: hidden; }
.wordmark .wm-cut {
  position: absolute; left: -0.1em; right: -0.1em; top: 0.756em; height: 0.058em;
  background: var(--ember);
  text-shadow: none;
}

.lede {
  margin: 28px 0 10px; max-width: 30ch;
  font: 700 clamp(24px, 3.2vw, 34px)/1.15 var(--head);
}
.pitch { margin: 0 0 22px; max-width: 46ch; color: var(--dim); }
.soon {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; padding: 12px 18px; border-radius: 14px;
  background: var(--ember); color: var(--ink);
  font: 700 17px/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 6px 0 #b4501d;
}
.soon small { font: 600 13px/1 var(--body); letter-spacing: 0; text-transform: none; opacity: 0.8; }

@media (min-width: 880px) {
  .hero { min-height: 100svh; align-items: center; padding-top: 88px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .hero-art img { width: min(420px, 100%); }
}

/* Abschnitte */
section { padding: clamp(56px, 9vw, 104px) 0; }
h2 {
  margin: 0 0 12px;
  font: 700 clamp(30px, 4.2vw, 46px)/1.05 var(--head); letter-spacing: 0.01em;
}
.sub { margin: 0 0 36px; max-width: 52ch; color: var(--dim); }
.label {
  margin: 0 0 10px;
  font: 700 13px/1 var(--head); letter-spacing: 0.28em; text-transform: uppercase; color: var(--cash);
}

/* Drei Telefone */
.phones {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.phone { margin: 0; }
.phone img {
  width: 100%; max-width: 300px; margin: 0 auto;
  border-radius: 28px; border: 6px solid #0b0a08;
  box-shadow: 0 0 0 1px var(--line), 0 20px 50px rgba(0, 0, 0, 0.5);
}
.phone figcaption { max-width: 300px; margin: 16px auto 0; }
.phone strong { display: block; font: 700 21px/1.15 var(--head); }
.phone span { color: var(--dim); font-size: 15px; }

/* Fair */
/* Geschichte: Text, kein Bild — das Bild liefern Titel und Kapitel */
.story .sub { font-size: clamp(17px, 1.9vw, 20px); margin-bottom: 16px; }
.story .sub:last-child { margin-bottom: 0; color: var(--bone); }

.fair { background: var(--soil); border-block: 1px solid var(--line); }
.fair ul, .points ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px 40px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.fair li, .points li { padding-left: 22px; position: relative; }
.fair li::before, .points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 3px; background: var(--ember);
}
.fair li strong, .points li strong { font: 700 21px/1.2 var(--head); display: block; }
.fair li span, .points li span { color: var(--dim); font-size: 15px; }

/* Kapitel */
.chapters {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 260px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  scrollbar-color: var(--ember) transparent;
}
.chapter { margin: 0; scroll-snap-align: start; }
.chapter img { border-radius: 18px; box-shadow: 0 0 0 1px var(--line); aspect-ratio: 400 / 860; object-fit: cover; }
.chapter figcaption { margin-top: 10px; font: 700 18px/1.2 var(--head); }
.chapter figcaption small {
  display: block; margin-bottom: 4px;
  font: 700 12px/1 var(--head); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cash);
}

/* Support */
.support-box {
  display: grid; gap: 8px; padding: 28px; border-radius: 18px;
  background: var(--soil); box-shadow: 0 0 0 1px var(--line); max-width: 640px;
}
.support-box a { font: 700 22px/1.2 var(--head); }

/* Fuß */
footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
footer a { color: var(--dim); }

/* Rechtstexte */
.legal { padding: 120px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font: 700 clamp(34px, 5vw, 48px)/1.05 var(--head); margin: 0 0 8px; }
.legal h2 { font-size: 26px; margin: 40px 0 10px; }
.legal h3 { font: 700 19px/1.2 var(--head); margin: 26px 0 6px; }
.legal p, .legal li { color: rgba(239, 237, 233, 0.86); }
.legal .stand { color: var(--dim); margin: 0 0 32px; }
.legal address { font-style: normal; }
.todo { background: rgba(242, 201, 76, 0.16); color: var(--cash); padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
