/* Almas geheimer Atlas – Stylesheet
   Farben und Schriften nach ergebnisse/04_aussehen_und_bildwelt.md (Abschnitte 2 und 3).
   Schriften liegen in schriften/ (SIL Open Font License), keine Verbindung zu Google.
   Mobil zuerst: Grundregeln gelten fürs Handy, Erweiterungen ab 40em und 64em. */

@font-face {
  font-family: "EB Garamond";
  src: url("schriften/eb-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("schriften/eb-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("schriften/eb-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("schriften/caveat-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --papier: #F7F3EA;        /* Papierweiß */
  --papier-hell: #FCFAF5;   /* Briefbogen */
  --graphit: #3A3A3A;       /* Fließtext */
  --graphit-hell: #6B665E;  /* Nebentext, 5,1 : 1 auf Papier */
  --gold: #D8B169;          /* Antik-Gold: Linien; Schrift nur auf dunklem Grund */
  --gold-dunkel: #8A6A2B;   /* Gold für kleine Schrift auf Papier, 4,6 : 1 */
  --weiss: #FFFFFF;
  --nacht: #0B1139;
  --nacht-tief: #060A24;

  --hamburg: #0B1139;
  --berlin: #3B0718;
  --dresden: #15221A;
  --hannover: #26102B;
  --weihnachten: #2A0F22;

  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", var(--serif);

  --spalte: 36rem;
  --breit: 62rem;
  --rand: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--papier);
  color: var(--graphit);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.inhalt { width: 100%; max-width: var(--spalte); margin: 0 auto; padding: 0 var(--rand); }
.inhalt--breit { max-width: var(--breit); }

/* Gesperrte Versalien wie auf den Covern („EIN RÄTSELABENTEUER“) */
.versal {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.5;
}
.goldlinie { width: 4rem; height: 1px; background: var(--gold); border: 0; margin: 1.5rem auto; }

/* Kompassrose als Zierelement */
.kompass { width: 2.25rem; height: 2.25rem; display: block; margin: 0 auto 1rem; color: var(--gold); }

.abschnitt { padding: 4.5rem 0; }
.abschnitt-kopf { text-align: center; margin-bottom: 2.5rem; }
.abschnitt-kopf .versal { color: var(--gold-dunkel); display: block; margin-bottom: 0.75rem; }
.abschnitt-kopf h2 { font-size: clamp(2rem, 7vw, 2.75rem); }
.abschnitt-kopf p { color: var(--graphit-hell); margin: 1rem auto 0; max-width: 30rem; }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.5rem 1.5rem;
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.knopf--gold { background: var(--gold); color: #1B1406; }
.knopf--gold:hover { background: #E6C687; }
.knopf--hell { border-color: rgba(255,255,255,0.55); color: var(--weiss); }
.knopf--hell:hover { border-color: var(--gold); color: var(--gold); }
.knopf--rand { border-color: var(--graphit); color: var(--graphit); text-transform: none; letter-spacing: 0.02em; font-size: 1.0625rem; }
.knopf--rand:hover { background: var(--graphit); color: var(--papier); }

/* ---------- Titel (Kopfbereich) ---------- */

.titel {
  position: relative;
  color: var(--weiss);
  text-align: center;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(58, 78, 160, 0.35), transparent 70%),
    linear-gradient(180deg, var(--nacht) 0%, var(--nacht-tief) 100%);
  padding: 2.25rem 0 0;
}
.titel .signatur { width: min(58%, 15rem); margin: 0 auto 0.5rem; opacity: 0.95; }
.titel h1 {
  font-size: clamp(2.75rem, 12vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
}
.titel .versal { color: var(--gold); max-width: 24rem; margin-left: auto; margin-right: auto; text-wrap: balance; }
.titel .einleitung {
  max-width: 30rem;
  margin: 1.5rem auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.125rem;
}
.titel .knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

/* Hinweis auf die Weihnachtsedition im Kopf */
.neu-hinweis {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
  padding: 0.375rem 1rem 0.375rem 0.375rem;
  border: 1px solid rgba(216, 177, 105, 0.6);
  border-radius: 2rem;
  color: var(--weiss);
  text-decoration: none;
  font-size: 1rem;
  background: rgba(216, 177, 105, 0.08);
  transition: background-color 0.2s ease;
}
.neu-hinweis .versal {
  background: var(--gold);
  color: #1B1406;
  border-radius: 2rem;
  padding: 0.125rem 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}
.neu-hinweis:hover { background: rgba(216, 177, 105, 0.2); }

/* Aufgefächerte Cover, ragen in den nächsten Abschnitt */
.faecher {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 2.75rem var(--rand) 0;
  margin: 0 auto -4.5rem;
  max-width: 44rem;
  position: relative;
  z-index: 2;
}
.faecher a { display: block; position: relative; width: 21%; margin: 0 -1.8%; transition: transform 0.25s ease; }
@media (min-width: 40em) { .faecher a { width: 23%; margin: 0 -2.4%; } }
.faecher img {
  width: 100%;
  aspect-ratio: 7 / 10;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 18px 30px -12px rgba(0,0,0,0.6);
}
.faecher a:nth-child(1) { transform: rotate(-9deg) translateY(1.6rem); }
.faecher a:nth-child(2) { transform: rotate(-4.5deg) translateY(0.4rem); z-index: 1; }
.faecher a:nth-child(3) { transform: rotate(0deg); z-index: 2; }
.faecher a:nth-child(4) { transform: rotate(4.5deg) translateY(0.4rem); z-index: 1; }
.faecher a:nth-child(5) { transform: rotate(9deg) translateY(1.6rem); }
.faecher-neu::after {      /* kleines goldenes Siegel auf der Weihnachtsedition */
  content: "Neu";
  position: absolute;
  top: -0.7rem; right: 0.2rem;
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #1B1406;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .faecher a:hover { transform: translateY(-0.6rem) rotate(0deg); z-index: 3; }
}

/* ---------- Wer ist Alma (Erzählung) ---------- */

.geschichte-abschnitt { padding-top: 7.5rem; }
.geschichte { max-width: 54rem; margin: 0 auto; }

.kapitel { margin-bottom: 2.25rem; }
.kapitel-text { max-width: 36rem; }
.kapitel h3 {
  font-style: italic;
  font-size: 1.625rem;
  line-height: 1.2;
  margin-bottom: 0.875rem;
  color: var(--graphit);
}
.kapitel h3::before {          /* feine Goldlinie vor jeder Kapitelüberschrift */
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
  margin-bottom: 1rem;
}
.kapitel p { line-height: 1.7; }

.lead { font-size: 1.3125rem; line-height: 1.6; }
.lead::first-letter {          /* Initiale wie in alten Atlanten */
  float: left;
  font-size: 4.1em;
  line-height: 0.82;
  padding: 0.06em 0.1em 0 0;
  color: var(--gold-dunkel);
}

/* Randnotiz in Almas Handschrift */
.randnotiz {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  color: #2E3A55;
  margin: 1.25rem 0 0 0.25rem;
  padding-left: 0.875rem;
  border-left: 2px solid var(--gold);
  transform: rotate(-1.5deg);
  transform-origin: left top;
}

.geschichte .signatur { width: 10rem; margin: 1.25rem 0 0 -0.5rem; }

.hinweis-figur {
  max-width: 36rem;
  margin: 1.75rem auto 0;
  text-align: center;
  font-size: 1rem;
  color: var(--graphit-hell);
}
.hinweis-figur strong { color: var(--graphit); font-weight: 600; }

/* ---------- Alma auf einen Blick ---------- */

.blick { padding-top: 1rem; }
.steckbrief-karte {
  background: var(--papier-hell);
  padding: 2.25rem 1.5rem 1.75rem;
  border-top: 2px solid var(--gold);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 22px 40px -26px rgba(40, 30, 10, 0.4);
}
.steckbrief-karte .abschnitt-kopf { margin-bottom: 1.75rem; }

.steckbrief { margin: 0; }
.steckbrief div {
  display: grid;
  gap: 0.125rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(216, 177, 105, 0.55);
}
.steckbrief div:first-child { border-top: 1px solid rgba(216, 177, 105, 0.55); }
.steckbrief div:last-child { border-bottom: 0; }
.steckbrief dt { color: var(--gold-dunkel); }
.steckbrief dd { margin: 0; }

/* ---------- Atlanten ---------- */

.atlanten-kopf { padding-bottom: 3.5rem; }
.raetselarten { color: var(--gold-dunkel); text-align: center; margin-top: 1.5rem; }

.stadt {
  --stadt: var(--nacht);
  background: var(--stadt);
  color: var(--weiss);
  padding-bottom: 4rem;
}
.stadt--hamburg { --stadt: var(--hamburg); }
.stadt--berlin { --stadt: var(--berlin); }
.stadt--dresden { --stadt: var(--dresden); }
.stadt--hannover { --stadt: var(--hannover); }
.stadt--weihnachten {
  --stadt: var(--weihnachten);
  background: linear-gradient(180deg, #09112B 0%, var(--weihnachten) 100%);
}

.panorama { position: relative; margin: 0; }
.panorama img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 70%;
}
.panorama::after {     /* Bild läuft in die Stadtfarbe aus */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--stadt) 100%);
  pointer-events: none;
}
.stadt--weihnachten .panorama::after { background: linear-gradient(180deg, transparent 50%, #1d0e25 100%); }

.stadt-inhalt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  margin-top: -5.5rem;
}
.stadt-cover { grid-row: span 2; align-self: start; }
.stadt-cover img {
  width: 100%;
  aspect-ratio: 7 / 10;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), 0 16px 28px -10px rgba(0,0,0,0.7);
}
.stadt--weihnachten .stadt-cover img { aspect-ratio: 1750 / 2562; }
.stadt-kopf { align-self: end; padding-bottom: 0.25rem; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }
.stadt-kopf .versal { color: rgba(255,255,255,0.72); display: block; }
.stadt-kopf h3 {
  font-weight: 600;
  font-size: clamp(1.3rem, 5.6vw, 2.5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.1;
  margin-top: 0.25rem;
}
.stadt-kopf .reihentitel { font-style: italic; color: rgba(255,255,255,0.8); font-size: 1rem; margin-top: 0.25rem; }

.stadt-text { grid-column: 1 / -1; margin-top: 1.75rem; }
.stadt-text p { color: rgba(255,255,255,0.92); }
.stadt-text .erster { font-size: 1.3125rem; line-height: 1.5; color: var(--weiss); }

.fundort {
  margin: 1.5rem 0;
  padding: 0.875rem 1.125rem;
  border: 1px solid rgba(216, 177, 105, 0.45);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
}
.fundort .versal { color: var(--gold); display: block; margin-bottom: 0.125rem; }
.fundort p { font-family: var(--hand); font-weight: 500; font-size: 1.5rem; line-height: 1.25; color: var(--weiss); }

.stadt-fakten {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
}
.stadt-fakten li::before { content: "◆"; color: var(--gold); font-size: 0.6em; margin-right: 0.5rem; vertical-align: 0.2em; }

.bald {
  display: inline-block;
  border: 1px dashed rgba(216, 177, 105, 0.7);
  color: var(--gold);
  padding: 0.625rem 1.25rem;
  border-radius: 2px;
}

/* ---------- Für wen ---------- */

.fuer-wen { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.fuer-wen li {
  background: var(--papier-hell);
  padding: 1.5rem 1.375rem;
  border-top: 2px solid var(--gold);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.fuer-wen h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }

/* ---------- Instagram ---------- */

.instagram { text-align: center; padding-top: 1rem; }
.instagram p { max-width: 30rem; margin: 0 auto 1.75rem; }

/* ---------- Fuß ---------- */

.fuss {
  background: linear-gradient(180deg, var(--nacht) 0%, var(--nacht-tief) 100%);
  color: rgba(255,255,255,0.86);
  text-align: center;
  padding: 3rem 0 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.fuss .signatur { width: min(50%, 11rem); margin: 0 auto 1.5rem; }
.fuss p { margin: 0 0 0.5rem; }
.fuss .rechtliches { margin-top: 1.5rem; }
.fuss .rechtliches a { color: var(--gold); text-decoration: none; padding: 0.5rem 0.5rem; }
.fuss .rechtliches a:hover { text-decoration: underline; }

/* ---------- Rechtstexte ---------- */

.seitenkopf { background: var(--nacht); padding: 1.25rem 0; text-align: center; }
.seitenkopf a { display: inline-block; }
.seitenkopf img { width: 9rem; }
.rechtstext { padding-top: 2rem; padding-bottom: 3rem; font-size: 1.0625rem; }
.rechtstext h1 { font-size: 2.25rem; margin: 0.75rem 0 1.25rem; }
.rechtstext h2 { font-weight: 600; font-size: 1.1875rem; margin: 2rem 0 0.5rem; }
.rechtstext ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.zurueck { color: var(--gold-dunkel); text-decoration: none; display: inline-block; padding: 0.5rem 0; }
.zurueck:hover { text-decoration: underline; }

/* Lücken, die David noch füllen muss (Liste in OFFEN.md) */
.luecke {
  background: #FFE58A;
  color: #3A2E00;
  padding: 0 0.25em;
  border-radius: 2px;
  font-family: Arial, sans-serif;
  font-size: 0.85em;
}
.entwurf-hinweis {
  border: 1px dashed #B08A00;
  background: #FFF6CC;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* ---------- Ab Tablet ---------- */

@media (min-width: 40em) {
  body { font-size: 1.25rem; }
  .titel { padding-top: 3rem; }
  .steckbrief-karte { padding: 2.75rem 3rem 2.25rem; }
  .steckbrief div { grid-template-columns: 9rem 1fr; gap: 1rem; align-items: baseline; }
  .fuer-wen { grid-template-columns: 1fr 1fr; }
  .panorama img { aspect-ratio: 16 / 9; }
  .stadt-inhalt { grid-template-columns: 11rem minmax(0, 1fr); gap: 0 2rem; margin-top: -8rem; }
  .stadt-kopf h3 { letter-spacing: 0.14em; }
}

/* ---------- Ab Desktop ---------- */

@media (min-width: 64em) {
  .faecher { max-width: 50rem; }
  .kapitel { display: grid; grid-template-columns: minmax(0, 36rem) 14rem; gap: 0 3.5rem; align-items: start; }
  .randnotiz { margin-top: 3.25rem; font-size: 1.625rem; }
  .kapitel:nth-child(odd) .randnotiz { transform: rotate(2deg); }
  .panorama img { aspect-ratio: 21 / 8; object-position: 50% 65%; }
  .panorama::after { background: linear-gradient(180deg, transparent 30%, var(--stadt) 96%); }
  .stadt--weihnachten .panorama::after {
    background: linear-gradient(180deg, transparent 15%, rgba(29, 14, 37, 0.8) 62%, #1d0e25 92%);
  }
  .stadt-inhalt {
    max-width: 54rem;
    grid-template-columns: 15rem 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 3.5rem;
    margin-top: -10rem;
  }
  .stadt-cover { grid-row: 1 / span 2; }
  .stadt-text { grid-column: 2; margin-top: 1.5rem; }
  /* jeder zweite Band spiegelverkehrt: Cover rechts */
  .stadt:nth-of-type(even) .stadt-inhalt { grid-template-columns: 1fr 15rem; }
  .stadt:nth-of-type(even) .stadt-cover { grid-column: 2; grid-row: 1 / span 2; }
  .stadt:nth-of-type(even) .stadt-kopf,
  .stadt:nth-of-type(even) .stadt-text { grid-column: 1; grid-row: auto; }
  .fuer-wen { grid-template-columns: repeat(4, 1fr); }
  .fuer-wen-wrap { max-width: var(--breit); }
}
