/* ==========================================================
   Chornados – gemeinsame Styles (Startseite, Impressum, Intro)
   ========================================================== */

:root {
  --black: #000;
  --white: #fff;
  --gold: #C88C46;  /* Goldton aus Chornados_Logo-Dunkel_transp.png */
  --red: #BA3229;   /* Rotton aus Chornados_Logo-Dunkel_transp.png */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --small-text: clamp(0.875rem, 0.8rem + 0.25vw, 1.0625rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Seitenraster ---------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Kopfbereich: Stimmen wie | Logo | ein Tornado! ---------- */

.masthead {
  display: flex;
  justify-content: center;
  padding-top: max(clamp(12px, 2vw, 24px), env(safe-area-inset-top));
}

.masthead-link {
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr; /* beide Seiten gleich breit → Logo bleibt exakt mittig */
  align-items: center;
  column-gap: clamp(10px, 2vw, 28px);
  text-decoration: none;
}

.masthead-word:first-child { justify-self: end; }
.masthead-word:last-child { justify-self: start; }

.masthead-logo {
  display: block;
  width: clamp(80px, 18vw, 180px);
  height: auto;
}

.masthead-word {
  color: var(--gold);
  font-weight: 900;
  font-size: clamp(0.95rem, 4vw, 2.5rem);
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .masthead-link { gap: 6px; }
  .masthead-logo { width: 64px; }
  .masthead-word { font-size: 0.8rem; }
}

/* ---------- Aktion oben rechts: „Überspringen“ (Intro) / „Nochmal Orkan von vorn!“ (Startseite) ---------- */

.corner-action {
  position: absolute;
  z-index: 2;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.6em 1em;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: var(--small-text);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.corner-action:hover span,
.corner-action:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Schmale Bildschirme: Link würde den Kopfbereich überdecken → eigene Zeile darüber */
@media (max-width: 700px) {
  .replay {
    position: static;
    align-self: flex-end;
    margin-top: max(8px, env(safe-area-inset-top));
    margin-right: calc(max(8px, env(safe-area-inset-right)) - max(var(--gutter), env(safe-area-inset-right)));
  }
  .replay + .masthead { padding-top: 0; }
}

/* ---------- Inhalt ---------- */

.content {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-block: clamp(32px, 6vw, 88px);
}

.content h1 {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.5rem);
  line-height: 1.15;
  text-wrap: balance;
}

/* ---------- Startseite: Inhalt oben, Kontaktformular unten ---------- */

.home {
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Kontaktformular ---------- */

.contact {
  width: 100%;
  max-width: 40rem;
  margin: auto auto 0;   /* auto oben → Formular sitzt unten über dem Impressum */
  padding-top: clamp(48px, 8vw, 96px);
  text-align: center;
}

.contact h2 {
  margin: 0 0 1em;
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.75rem); /* zwischen H1 und Impressum */
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.contact-textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  padding: 0.75em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1rem;       /* ≥ 16px: kein automatisches Zoomen auf iOS */
  line-height: 1.5;
  resize: vertical;
}
.contact-textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
.contact-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* Datenschutz-Hinweis: gleiche Größe, Schrift und Farbe wie der Platzhaltertext im Feld */
.contact-privacy {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

.contact-button {
  margin-top: 1rem;
  min-height: 44px;
  padding: 0.8em 1.6em;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--black);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.contact-button:hover,
.contact-button:active,
.contact-button:focus-visible,
.contact-button:disabled {
  background: var(--red);
  color: var(--white);
}
.contact-button:disabled { cursor: progress; }

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Danke- und Fehlertext: per JavaScript (Klasse) oder ohne JavaScript (Anker #…) */
.contact-thanks,
.contact-error {
  display: none;
  margin: 0;
}
.contact-thanks {
  padding-block: 2rem;
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.5rem);
  font-weight: 700;
}
.contact-thanks:focus { outline: none; }
.contact-error {
  margin-top: 0.75rem;
  color: var(--white);
}

.contact-form.is-sent .contact-thanks,
.contact-thanks:target { display: block; }

.contact-form.is-sent .contact-fields,
.contact-thanks:target ~ .contact-fields { display: none; }

.contact-form.has-error .contact-error,
.contact-error:target { display: block; }

/* ---------- Fußzeile ---------- */

.site-footer {
  text-align: center;
  padding-top: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Startseite: Hinweissatz links neben dem Link, auf schmalen Bildschirmen untereinander */
.site-footer--split {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 1.25rem;
}

.footer-note {
  margin: 0;
  padding: 0.5em 0;
  font-size: var(--small-text);
  color: rgba(255, 255, 255, 0.6);
}

.footer-link {
  display: inline-block;
  padding: 0.5em 0.75em;
  color: var(--white);
  font-size: var(--small-text);
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- Impressum ---------- */

.legal {
  max-width: 46rem;
}

.legal h1 {
  color: var(--red);
  text-align: left;
  margin-bottom: 0.6em;
}

/* Abschnittsüberschriften „Impressum“ / „Datenschutz“ */
.legal h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.legal-section + .legal-section {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.legal h3 {
  margin: 2em 0 0.4em;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.legal ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal li { margin-bottom: 0.25em; }

.legal p,
.legal address {
  margin: 0 0 1em;
  font-style: normal;
  hyphens: auto;
}
