/* Castello Caputti – Webseite. Farben aus dem Spiel: Nachthimmel, Himmelblau, Wiese, Fluss, Mauerstein, Fahnenrot, Gold,
   Pergament. Keine fremden Schriften oder Skripte. */
:root {
  --nacht: #0c1230;
  --nachtblau: #1b2a66;
  --himmel: #7fb5ea;
  --wiese: #3d9440;
  --wiese-dunkel: #24642c;
  --fluss: #2a93bd;
  --stein: #b9b2a6;
  --rot: #c8281f;
  --rot-dunkel: #8f1712;
  --gold: #f4b730;
  --pergament: #f4e7c5;
  --pergament-dunkel: #e3cf9e;
  --tinte: #46290f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinte);
  background: var(--pergament);
}

/* Zwei Sprachen im selben Dokument: die jeweils andere ausblenden */
html[data-lang="de"] [data-l="en"],
html[data-lang="en"] [data-l="de"] { display: none; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); text-align: center; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

main > section { padding: clamp(2.5rem, 7vw, 5rem) 1.25rem; }

/* ---- Sprachumschalter ---- */
.lang {
  position: absolute; top: 1rem; right: 1rem; z-index: 5;
  display: flex; gap: 0; border: 2px solid var(--gold); border-radius: 999px; overflow: hidden;
  background: rgba(12, 18, 48, 0.6);
}
.lang button {
  font: 700 0.9rem var(--sans); letter-spacing: 0.04em;
  color: #fff; background: transparent; border: 0; padding: 0.4rem 0.9rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--nacht); }
.lang button:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* ---- Kopf: das Tal bei Nacht ---- */
.hero {
  position: relative;
  /* Das Bild beginnt knapp über den Fahnen der Burg und hängt links oben: Bei jedem Format fällt nur rechts oder unten
     etwas weg, nie an der Burg. Die Höhe ergibt sich aus dem Inhalt (Logo, Titel, Knöpfe) – keine Luft darüber. */
  min-height: 30rem;
  display: flex; align-items: flex-end; justify-content: center;
  color: #fff; text-align: center;
  background:
    linear-gradient(to bottom, rgba(12, 18, 48, 0.15) 0%, rgba(12, 18, 48, 0.1) 35%, rgba(12, 18, 48, 0.88) 100%),
    url("img/hero-nacht.jpg") left top / cover no-repeat,
    var(--nacht);
}
.hero-inner { padding: 5rem 1.25rem 3rem; max-width: 46rem; }
.hero .icon {
  width: 7rem; height: 7rem; margin: 0 auto 1rem; border-radius: 22%;
  box-shadow: 0 0.6rem 1.8rem rgba(0, 0, 0, 0.6), 0 0 0 3px var(--gold);
}
/* Schmale Fenster: Das Bild zeigt dort nur den linken Teil mit der Burg – der Text beginnt erst unter ihr */
@media (max-width: 40rem) {
  .hero-inner { padding-top: 11.5rem; }
  .hero .icon { width: 5.5rem; height: 5.5rem; }
  /* Der Sprachumschalter läge sonst auf der Burg: als schmale Leiste über dem Bild */
  .lang { position: static; width: 100%; justify-content: center; border: 0; border-radius: 0; background: var(--nacht); }
  .lang button { padding: 0.5rem 1.4rem; }
}
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5rem); color: var(--gold); margin-bottom: 0.1em;
  text-shadow: 0 0.15rem 0 var(--rot-dunkel), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.7);
}
.tagline { font: italic 600 clamp(1.2rem, 3.4vw, 1.7rem) var(--serif); margin-bottom: 0.8em; text-shadow: 0 2px 8px #000; }
.lead { font-size: 1.15rem; text-shadow: 0 2px 8px #000; }
.platforms { font-size: 0.9rem; opacity: 0.85; margin: 1.2rem 0 0; }

/* Store-Badges: Originaldateien von Apple und Roblox. Beide verlangen sie unverändert – also kein Schatten, keine
   Bewegung beim Überfahren, keine andere Farbe. Höhe 48 px (Apple: mindestens 40), Abstand 16 px (mindestens ein Viertel der Höhe). */
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.badge { display: block; border-radius: 0.5rem; }
.badge img { height: 3rem; width: auto; max-width: none; }
.badge:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* ---- Wimpelkette ----
   Hängt an jedem Übergang zwischen zwei Abschnitten. Der Streifen trägt die Farbe des Abschnitts darunter (Vorgabe:
   Pergament; sonst .auf-himmel, .auf-nacht, .auf-wiese). Vor dem großen Talbild hängt sie über dem Bild (.auf-bild).
   Der dünne braune Rand hält jedes Fähnchen sichtbar, auch das grüne auf der Wiese und das blaue vor dem Himmel. */
.bunting {
  height: 2.6rem;
  background-color: var(--pergament);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='42' viewBox='0 0 160 42'%3E%3Crect width='160' height='5' fill='%2346290f'/%3E%3Cg stroke='%2346290f' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M2 5h36L20 40z' fill='%23c8281f'/%3E%3Cpath d='M42 5h36L60 40z' fill='%23f4b730'/%3E%3Cpath d='M82 5h36L100 40z' fill='%232a93bd'/%3E%3Cpath d='M122 5h36L140 40z' fill='%233d9440'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center top;
}

.bunting.auf-himmel { background-color: var(--himmel); }
.bunting.auf-nacht { background-color: var(--nacht); }
.bunting.auf-wiese { background-color: var(--wiese); }
.bunting.auf-bild { background-color: transparent; margin-bottom: -2.6rem; position: relative; z-index: 1; pointer-events: none; }

/* ---- Sage auf Pergament ---- */
.saga { background: var(--pergament); }
.parchment {
  max-width: 44rem; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem);
  background:
    radial-gradient(ellipse at 20% 15%, rgba(139, 97, 46, 0.1), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(139, 97, 46, 0.14), transparent 50%),
    linear-gradient(135deg, #f7ecd0, var(--pergament-dunkel));
  border: 1px solid #c9ae77; border-radius: 0.4rem;
  box-shadow: 0 0.8rem 2rem rgba(70, 41, 15, 0.25), inset 0 0 3.5rem rgba(107, 64, 20, 0.22);
  font-family: var(--serif); font-size: 1.15rem;
}
.parchment h2 { font-style: italic; }
.parchment q { font-style: italic; }
.parchment div > p:first-of-type::first-letter {
  float: left; font-size: 3.4em; line-height: 0.85; padding: 0.08em 0.1em 0 0; color: var(--rot); font-weight: 700;
}
.ornament { text-align: center; font-size: 1.8rem; margin: 0.5rem 0 0; opacity: 0.6; }

/* ---- Tag, Nacht, Sieg ---- */
.rounds { background: linear-gradient(to bottom, var(--himmel), #bfe0f7 55%, var(--wiese) 55%, var(--wiese-dunkel)); }
.rounds h2 { color: var(--nacht); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; max-width: 70rem; margin: 2rem auto 0; }
.card { border-radius: 1rem; padding: 1.75rem; color: #fff; box-shadow: 0 0.8rem 1.8rem rgba(12, 18, 48, 0.35); border: 3px solid rgba(255, 255, 255, 0.55); }
.card .emoji { font-size: 2.8rem; line-height: 1; margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }
.card.day { background: linear-gradient(160deg, #2f86d3, #56b0e8 55%, #f0a23a); }
.card.night {
  background:
    radial-gradient(circle at 15% 20%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 70% 12%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 88% 38%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 40% 8%, #fff 0 1px, transparent 2px),
    linear-gradient(160deg, var(--nacht), var(--nachtblau) 70%, #3b2a6e);
}
.card.win { background: linear-gradient(160deg, var(--rot-dunkel), var(--rot) 55%, #e58a1c); }

/* ---- Das Tal bei Tag ---- */
.valley { padding: 0 !important; background: var(--wiese-dunkel); }
.valley figure { margin: 0; position: relative; }
.valley img { width: 100%; max-height: 80vh; object-fit: cover; }
.valley figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.25rem 1.5rem; text-align: center;
  color: #fff; font: italic 600 clamp(1.1rem, 3vw, 1.6rem) var(--serif);
  background: linear-gradient(to top, rgba(12, 18, 48, 0.8), transparent); text-shadow: 0 2px 6px #000;
}

/* ---- Bilder ---- */
.gallery { background: var(--nacht); color: #fff; }
.gallery h2 { color: var(--gold); }
/* Flex statt Raster: Die letzte Zeile (zwei von fünf Bildern) steht so in der Mitte */
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; max-width: 80rem; margin: 2rem auto 0; }
.shots figure { flex: 1 1 19rem; max-width: 25.5rem; margin: 0; background: var(--nachtblau); border-radius: 0.8rem; overflow: hidden; border: 2px solid var(--gold); }
.shots figcaption { padding: 0.7rem 1rem 0.9rem; font-family: var(--serif); font-style: italic; }

/* Umschalter App ↔ Roblox: Zwei unsichtbare Optionsfelder (.pick) stehen vor den Bildersätzen; das gewählte blendet den
   anderen Satz aus und färbt seinen Knopf. Kein JavaScript; mit der Tastatur wie jede Optionsgruppe bedienbar. */
.pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tabs {
  display: flex; width: fit-content; max-width: 100%; margin: 1.5rem auto 0;
  border: 2px solid var(--gold); border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.06);
}
.tabs label { font: 700 0.95rem var(--sans); letter-spacing: 0.03em; padding: 0.5rem 1.2rem; cursor: pointer; }
#shots-app:checked ~ .tabs label[for="shots-app"],
#shots-roblox:checked ~ .tabs label[for="shots-roblox"] { background: var(--gold); color: var(--nacht); }
#shots-app:focus-visible ~ .tabs label[for="shots-app"],
#shots-roblox:focus-visible ~ .tabs label[for="shots-roblox"] { outline: 3px solid #fff; outline-offset: -3px; }
#shots-app:checked ~ [data-s="roblox"],
#shots-roblox:checked ~ [data-s="app"] { display: none; }
/* Über jedem Bildersatz sein Zeichen (App-Icon bzw. Logo der Roblox-Fassung), gerahmt wie das Icon im Kopf */
.set-logo {
  width: 9rem; height: 9rem; margin: 2rem auto 0; border-radius: 22%;
  box-shadow: 0 0.6rem 1.8rem rgba(0, 0, 0, 0.6), 0 0 0 3px var(--gold);
}

/* ---- Was drinsteckt ---- */
.features { background: var(--pergament); }
.features ul { list-style: none; margin: 2rem auto 0; padding: 0; max-width: 70rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.features li {
  flex: 1 1 17rem; max-width: 22.5rem;
  display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 0.8rem;
  background: #fff8e4; border: 2px solid var(--pergament-dunkel); border-left: 0.5rem solid var(--rot);
}
.features li:nth-child(4n+2) { border-left-color: var(--gold); }
.features li:nth-child(4n+3) { border-left-color: var(--fluss); }
.features li:nth-child(4n+4) { border-left-color: var(--wiese); }
.features .emoji { font-size: 1.6rem; line-height: 1.2; }

/* ---- Schluss ---- */
.closing { background: linear-gradient(to bottom, var(--wiese), var(--wiese-dunkel)); color: #fff; text-align: center; }
.motto { font: italic 700 clamp(1.4rem, 4vw, 2.2rem) var(--serif); max-width: 40rem; margin: 0 auto; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }

footer { background: var(--nacht); color: #cfd6f2; text-align: center; padding: 2rem 1.25rem; }
footer a { color: var(--gold); }
footer .small { font-size: 0.85rem; opacity: 0.7; margin: 0; }
footer .legal { font-size: 0.75rem; max-width: 46rem; margin: 1rem auto 0; }

/* ---- Unterseiten (Impressum, Datenschutz) ---- */
.plain { max-width: 44rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; min-height: 60vh; }
.plain h1 { font-size: 2.2rem; color: var(--rot-dunkel); }
.plain .back { display: inline-block; margin-bottom: 2rem; color: var(--rot-dunkel); font-weight: 700; }
.plain h2 { font-size: 1.5rem; text-align: left; color: var(--rot-dunkel); margin: 2.4rem 0 0.5rem; }
.plain h3 { font-size: 1.15rem; margin: 1.5rem 0 0.3rem; }
.plain a { color: var(--rot-dunkel); }
.plain address { font-style: normal; margin: 0 0 1em; }
.plain ul { margin: 0 0 1em; padding-left: 1.3rem; }
.plain li { margin-bottom: 0.3em; }
.plain .summary {
  font: 1.15rem var(--serif); padding: 1rem 1.2rem; border-radius: 0.8rem;
  background: #fff8e4; border: 2px solid var(--pergament-dunkel); border-left: 0.5rem solid var(--gold);
}
.plain .stand { font-size: 0.9rem; opacity: 0.75; margin-top: 2.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
