/* ============================================================
   IRMAS FERIENHÄUSL — Rechtsseiten + 404 (recht.css)
   Gilt für impressum.html, datenschutz.html und 404.html.
   Baut auf irmas.css auf: Tokens, Kopf (.ih-header), Fußzeile
   (.ih-footer), Knöpfe (.ih-btn), Kicker (.ih-eyebrow) kommen von dort.

   WICHTIG — auf diesen Seiten läuft KEIN main.js:
   - keine .ih-reveal / html.has-js-Zustände verwenden (bliebe unsichtbar),
   - der Kopf steht fest im hellen Zustand (.ih-header.is-scrolled im Markup),
   - alle Pfade absolut (/css/…, /): Vercel liefert 404.html unter jeder
     falsch getippten Adresse aus (z. B. /en/xyz) — relative Pfade brechen dort.
   Kontraste (WCAG AA, ≥ 4,5 : 1) sind in den Kommentaren notiert.
   ============================================================ */

/* ---------- Kopf ---------- */
/* Marke ohne Link-Unterstrich (wie die Fußzeilen-Marke; irmas.css regelt das inzwischen
   auch selbst — hier doppelt, damit die Rechtsseiten nicht vom Stand der Startseite abhängen) */
.ih-recht-seite .ih-header__brand { text-decoration: none; }
/* „Zur Startseite“-Pille steht direkt in .ih-header__nav (NICHT in __navlinks,
   das irmas.css ≤ 900 px ausblendet) → bleibt auch am Handy sichtbar.
   Weiß auf Salbei-Dunkel 5,5 : 1. */
.ih-recht-seite .ih-header .ih-header__nav a.ih-header__cta { min-height: 40px; }
/* Schmale Handys: Marke und Pille etwas kompakter, damit nichts überläuft */
@media (max-width: 400px) {
  .ih-recht-seite .ih-header { gap: .75rem; }
  .ih-recht-seite .ih-header__brand { --marke-w: 9.75rem; }   /* Logo-Schriftzug etwas schmaler */
  .ih-recht-seite .ih-header .ih-header__nav a.ih-header__cta { padding: 0 .9rem; font-size: .9rem; }
}
/* Unter 350 px (z. B. iPhone SE 1. Gen., 320 px): sichtbar nur „Startseite“,
   Screenreader hören weiter „Zur Startseite“ */
@media (max-width: 349px) {
  .ih-recht-seite .ih-header__kurz {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* ---------- Seitengerüst ---------- */
/* Platz für den festen Kopf (inkl. Notch/Dynamic Island) */
.ih-recht { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
/* Sprungmarken (#kontakt …) UND per Tab angesprungene Links landen nie unter dem festen Kopf.
   recht.css wird nur auf diesen drei Seiten geladen → html-Regel ist hier unbedenklich.
   scroll-margin aus irmas.css ([id]) auf 0, sonst addieren sich beide Abstände. */
html { scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px); }
.ih-recht-seite [id] { scroll-margin-top: 0; }
/* Ruhige Lesespalte, ca. 70 Zeichen */
.ih-recht__spalte { max-width: 44rem; margin-inline: auto; }

/* Seitenkopf als helles Band (wie das Eckdaten-Band der Startseite) */
.ih-recht__kopf {
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-line);
  padding-block: clamp(2.75rem, 7vw, 4.5rem) clamp(2.25rem, 5vw, 3.25rem);
}
/* Kicker Salbei-Dunkel auf dem Band: 4,9 : 1 */
.ih-recht__kopf .ih-eyebrow { margin-bottom: .8rem; }
/* Lange Wörter („Datenschutz­erklärung“) haben im HTML ein weiches Trennzeichen (&shy;),
   sonst würde das Wort am Handy rechts abgeschnitten */
.ih-recht__h1 {
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem); line-height: 1.04; letter-spacing: -.02em; color: var(--c-ink);
  -webkit-hyphens: manual; hyphens: manual; overflow-wrap: break-word;
}
.ih-recht__kopf .ih-lead { margin-top: .9rem; }
/* „Stand …“ und Hinweis für englischsprachige Gäste: gedämpft 5,3 : 1 auf dem Band */
.ih-recht__stand,
.ih-recht__en { margin-top: 1.1rem; font-size: .92rem; color: var(--c-muted); }
.ih-recht__stand + .ih-recht__en { margin-top: .35rem; }

/* ---------- Fließtext ---------- */
.ih-recht__text { padding-block: clamp(2.5rem, 6vw, 4rem) var(--pad-section); }
.ih-recht__text p,
.ih-recht__text li { color: var(--c-ink-soft); line-height: 1.7; }       /* 6,2 : 1 */
.ih-recht__text .ih-eyebrow { color: var(--c-sage-dark); line-height: 1.4; } /* Kicker bleibt grün (5,5 : 1 auf Weiß) */
.ih-recht__text strong { color: var(--c-ink); font-weight: 600; }
.ih-recht__text p + p,
.ih-recht__text p + ul,
.ih-recht__text ul + p { margin-top: .85rem; }
.ih-recht__text ul { padding-left: 1.25rem; }
.ih-recht__text li + li { margin-top: .3rem; }
.ih-recht__text li::marker { color: var(--c-sage-dark); }

/* Überschriften-Hierarchie: h1 (Kopf) → h2 (Abschnitt, mit feiner Linie) → h3 */
.ih-recht__text h2 {
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); line-height: 1.2;
  margin-top: clamp(2.5rem, 5vw, 3.25rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--c-line);
}
.ih-recht__text h3 { font-size: 1.1rem; line-height: 1.3; margin-top: 1.7rem; }
.ih-recht__text h2 + p, .ih-recht__text h2 + ul,
.ih-recht__text h3 + p, .ih-recht__text h3 + ul { margin-top: .7rem; }
/* Nummer vor der Abschnitts-Überschrift (Datenschutz) — Salbei-Dunkel 5,3 : 1 */
.ih-recht__nr { color: var(--c-sage-dark); font-variant-numeric: tabular-nums; margin-right: .1em; }

/* Links im Text: Salbei-Dunkel, dezent unterstrichen (5,3 : 1 auf Warmweiß, 5,5 : 1 auf Weiß) */
.ih-recht a:not(.ih-btn) {
  color: var(--c-sage-dark);
  text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.ih-recht a:not(.ih-btn):hover { text-decoration-thickness: 2px; }
.ih-recht__kopf .ih-recht__en a { color: var(--c-sage-dark); }

/* ---------- Karte (Anbieterdaten, „Kurz gesagt“) ---------- */
.ih-recht__karte {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 30px 60px -45px rgba(46, 58, 51, .5);
}
.ih-recht__text .ih-recht__karte h2 { margin: 0; padding: 0; border: 0; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.4rem); }
/* Direkt nach einer Karte keine Trennlinie über der nächsten Überschrift */
.ih-recht__text .ih-recht__karte + h2 { border-top: 0; padding-top: 0; }

/* Anbieterdaten als Schlüssel/Wert-Liste (wie „Konditionen“ auf der Startseite) */
.ih-recht__daten {
  display: grid; grid-template-columns: minmax(8.5rem, 15rem) minmax(0, 1fr);
  margin-top: 1rem;
}
/* Abstand zwischen den Spalten über padding statt column-gap → die Trennlinie läuft durch */
.ih-recht__daten dt,
.ih-recht__daten dd { margin: 0; padding-block: .8rem; border-bottom: 1px solid var(--c-line); }
.ih-recht__daten dt { padding-right: 1.5rem; color: var(--c-ink-soft); font-size: .95rem; }   /* 6,5 : 1 auf Weiß */
.ih-recht__daten dd { color: var(--c-ink); font-weight: 500; }                  /* 11,9 : 1 */
.ih-recht__daten dt:last-of-type,
.ih-recht__daten dd:last-of-type { border-bottom: 0; padding-bottom: .2rem; }
@media (max-width: 560px) {
  .ih-recht__daten { grid-template-columns: minmax(0, 1fr); }
  .ih-recht__daten dt { padding-right: 0; padding-bottom: 0; border-bottom: 0; font-size: .86rem; }
  .ih-recht__daten dd { padding-top: .15rem; }
}

/* „Kurz gesagt“ oben in der Datenschutzerklärung: Häkchen-Liste */
.ih-recht__kurz { margin-bottom: clamp(2.5rem, 5vw, 3.25rem); }
.ih-recht__kurz .ih-eyebrow { margin-bottom: .9rem; }
.ih-recht__text .ih-recht__kurz ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.ih-recht__text .ih-recht__kurz li { position: relative; padding-left: 1.75rem; margin: 0; color: var(--c-ink); }
.ih-recht__kurz li::before {
  content: ""; position: absolute; left: .32rem; top: .36em;
  width: .42em; height: .8em;
  border: solid var(--c-sage-dark); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Fußzeile: Überschriften als h2 (sauberere Gliederung als h3),
   gleiches Aussehen wie „.ih-footer h3“ in irmas.css ---------- */
.ih-footer h2 {
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; line-height: 1.08;
  color: var(--c-on-video); margin-bottom: 1rem; letter-spacing: .02em;
}
.ih-footer__bottom a { color: inherit; }                                          /* 4,75 : 1 */
.ih-footer__bottom a[aria-current="page"] { text-decoration: none; color: rgba(255, 253, 248, .8); }

/* ---------- Zweiter Knopf-Stil (Umriss) für helle Flächen ---------- */
.ih-btn--linie { background: transparent; color: var(--c-sage-dark); border-color: var(--c-sage-dark); }   /* 5,3 : 1 */
.ih-btn--linie:hover { background: rgba(79, 114, 72, .08); transform: translateY(-2px); }               /* ≥ 4,75 : 1 */

/* ---------- 404 ---------- */
.ih-fehler { display: grid; align-items: center; min-height: 100vh; min-height: 100svh; }
.ih-fehler .ih-container { width: 100%; }
.ih-fehler__box {
  max-width: 36rem; margin-inline: auto; text-align: center;
  padding-block: clamp(2.75rem, 8vw, 5rem);
}
.ih-fehler__icon { width: 64px; height: auto; margin: 0 auto 1.3rem; }
.ih-fehler__icon .haus { fill: var(--c-sage); }                                   /* Deko */
.ih-fehler__icon .dach { fill: none; stroke: var(--c-sage); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.ih-fehler .ih-eyebrow { margin-bottom: .8rem; }
.ih-fehler__titel { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.8rem); line-height: 1.08; color: var(--c-ink); }
.ih-fehler__text { margin: 1rem auto 0; max-width: 34em; color: var(--c-ink-soft); }
.ih-fehler__en { margin-top: 1.9rem; padding-top: 1.6rem; border-top: 1px solid var(--c-line); }
.ih-fehler__en h2 { font-size: 1.15rem; line-height: 1.2; color: var(--c-ink); }
.ih-fehler__en p { margin: .5rem auto 0; max-width: 34em; color: var(--c-ink-soft); }
.ih-fehler__knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem 1rem; margin-top: 2.1rem; }
@media (max-width: 420px) {
  .ih-fehler__knoepfe { flex-direction: column; align-items: stretch; }
  .ih-fehler__knoepfe .ih-btn { justify-content: center; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .ih-recht-seite .ih-btn,
  .ih-recht-seite .ih-header .ih-header__nav a.ih-header__cta { transition: none; }
  .ih-recht-seite .ih-btn:hover,
  .ih-recht-seite .ih-header .ih-header__nav a.ih-header__cta:hover { transform: none; }
}

/* ---------- Druck (Impressum/Datenschutz werden gern ausgedruckt) ---------- */
@media print {
  .ih-recht-seite .ih-skip,
  .ih-recht-seite .ih-header__nav,
  .ih-recht-seite .ih-footer,
  .ih-recht__en { display: none !important; }
  .ih-recht-seite .ih-header {
    position: static; height: auto; padding: 0 0 1rem;
    background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .ih-recht { padding-top: 0; }
  .ih-recht__kopf { background: none; border: 0; padding-block: 0 1.5rem; }
  .ih-recht__karte { box-shadow: none; break-inside: avoid; }
  .ih-recht__text { padding-block: 0; }
  .ih-recht__text h2, .ih-recht__text h3 { break-after: avoid; }
}
