/* ==========================================================================
   true-magic.de – Stylesheet
   Look der bisherigen Seite (Hero-Foto, Menü oben drauf, Inhalt rechts),
   aber ohne Tabellen und Grafik-Buttons; ab 900 px Breite: Hero oben, Inhalt darunter.
   Alle Schriften liegen lokal in /assets/fonts (keine externen Anfragen).
   ========================================================================== */

/* ---------- Schriften (lokal) ---------- */
@font-face {
  font-family: "Pagella";
  src: url("fonts/pagella-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pagella";
  src: url("fonts/pagella-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Quattrocento Sans";
  src: url("fonts/quattrocento-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Quattrocento Sans";
  src: url("fonts/quattrocento-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Quattrocento Sans";
  src: url("fonts/quattrocento-sans-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Farben & Maße (zentral änderbar) ---------- */
:root {
  --wall:   #033B4A;   /* Tapetenfarbe hinter dem Bild */
  --cyan:   #26BED4;   /* Menüleiste, Buchungsleiste */
  --panel:  #0D8FA2;   /* Textkasten */
  --deep:   #035A77;   /* Menü-Text, Unterpunkte */
  --ink:    #05607D;   /* Telefonnummer in der Buchungsleiste */
  --white:  #FFFFFF;

  --serif: "Pagella", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans:  "Quattrocento Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --card-w:  1024px;
  --panel-w: 369px;    /* je Seite überschreibbar */
  --top-offset: 97px;  /* Abstand Textkasten von oben (Desktop) */
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--wall);
  color: var(--white);
  font: 400 16px/1.45 var(--sans);
  overflow-x: hidden;
}
/* Tapete: füllt immer den ganzen Bildschirm, scrollt nicht mit */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: var(--wall) url("../pix/bgd/tapete.webp") center / cover no-repeat;
}
img { max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.topbar :focus-visible, .call:focus-visible { outline-color: var(--deep); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--deep); padding: 10px 16px; font-weight: 700;
  border-radius: 0 0 6px 6px; text-decoration: none;
}
.skip:focus { top: 0; }

.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;
}

/* ---------- Karte (die 1024-px-Bühne) ---------- */
.card {
  position: relative;
  max-width: var(--card-w);
  margin: 8px auto 0;
}

/* ---------- Kopfleiste: Sprachwahl links, Menü rechts ---------- */
.topbar {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: none; }          /* nur mobil sichtbar */

.lang {
  display: flex; gap: 9px; align-items: flex-end;
  height: 42px; margin-left: 24px; padding-bottom: 0;
}
.lang a { display: block; line-height: 0; opacity: .72; outline-offset: 2px; }
.lang a[aria-current="true"] { opacity: 1; outline: 2px solid rgba(255, 255, 255, .9); }
.lang a:hover, .lang a:focus-visible { opacity: 1; filter: saturate(1.4) brightness(1.1); }
.lang img { display: block; width: 30px; height: 15px; }

.menu-toggle { display: none; }

.mainnav { margin-left: auto; }
.mainnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  background: var(--cyan);
  height: 42px;
  border-bottom-left-radius: 11px;
}
.mainnav a {
  display: block;
  height: 42px; line-height: 42px;
  padding: 0 15px;
  font: 400 18px/42px var(--serif);
  color: var(--deep);
  text-decoration: none;
  white-space: nowrap;
}
.mainnav li:first-child a { border-bottom-left-radius: 11px; padding-left: 17px; }
.mainnav a:hover, .mainnav a:focus-visible { background: var(--deep); color: var(--cyan); }
.mainnav a[aria-current="page"] { color: var(--white); }
.mainnav a[aria-current="page"]:hover { color: var(--cyan); }

/* ---------- Bühne: Hero-Foto im Hintergrund, Inhalt rechts darüber ---------- */
/* Ist der Textkasten länger als das Foto, wird das Foto nahtlos in seine Randfarbe verlängert. */
.stage { display: grid; background: var(--hero-end, #000); }
.stage > * { grid-area: 1 / 1; }

/* Bei langen Textkästen bleibt das Foto beim Scrollen stehen (kleben), statt unten schwarz auszulaufen. */
.hero { margin: 0; min-width: 0; align-self: start; position: sticky; top: 0; background: var(--hero-end, #000); }
.hero img {
  display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--hero-fade, 48px)), transparent);
          mask-image: linear-gradient(#000 calc(100% - var(--hero-fade, 48px)), transparent);
}
.hero img.hero-still { display: none; }

.panelwrap {
  z-index: 2;
  align-self: start; justify-self: end;
  display: flex; align-items: flex-start;
  margin: var(--top-offset) 20px 40px 0;
  min-width: 0;
}

/* ---------- Unterpunkte (Pillen links vom Textkasten) ---------- */
.subnav { margin-top: 87px; }
.subnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.subnav a {
  display: flex; align-items: center;
  height: 38px; padding: 0 14px 0 12px;
  background: var(--deep); color: var(--white);
  font: 400 20px/1 var(--serif);
  text-decoration: none; white-space: nowrap;
  border-radius: 8px 0 0 8px;
}
.subnav a:hover, .subnav a:focus-visible { color: var(--cyan); }
.subnav a[aria-current="page"] { background: var(--panel); color: var(--white); }
.subnav svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.subnav a.home { padding: 0 12px 0 13px; }

/* ---------- Textkasten ---------- */
.panel {
  width: var(--panel-w);
  min-height: var(--panel-min, 480px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.panel__title {
  margin: 0; padding: 10px 12px 4px 12px;
  font: 400 32px/1.17 var(--serif);
  letter-spacing: -.003em;
  text-wrap: balance;
}
.panel__body { flex: 1; padding: 12px 12px 24px 12px; font-size: 15.5px; line-height: 1.4; }
.panel__body > :first-child { margin-top: 0; }
.panel__body p { margin: 0 0 .85em; }
.panel__body p:last-child { margin-bottom: 0; }
.panel__body strong { font-weight: 700; }
.panel__body a {
  color: #E8FCFF; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.panel__body a:hover { background: var(--cyan); color: var(--deep); text-decoration-color: transparent; }

.call {
  display: block; height: 38px; padding: 0 6px 0 12px;
  background: var(--cyan); color: var(--ink);
  font: 700 19px/38px var(--serif);
  text-align: right; text-decoration: none; white-space: nowrap;
}
.call:hover { background: #4BCDE0; }

/* ---------- Fußzeile ---------- */
.foot {
  max-width: var(--card-w); margin: 0 auto;
  padding: 26px 24px 70px;
  text-align: right;
  font: italic 700 14px/1.7 var(--sans);
}
.foot a { color: var(--cyan); text-decoration: none; margin-left: 14px; }
.foot-btn {
  appearance: none; background: none; border: 0; padding: 0; margin-left: 14px; cursor: pointer;
  font: inherit; color: var(--cyan);
}
.foot-btn:hover, .foot-btn:focus-visible { color: var(--white); text-decoration: underline; }
.foot a:hover, .foot a:focus-visible { color: var(--white); text-decoration: underline; }


/* ---------- Referenzen: Aufklapp-Bereiche (ohne JavaScript) ---------- */
.acc-list { margin: 4px 0 0; }
.acc { border-top: 1px solid rgba(255, 255, 255, .3); }
.acc:last-child { border-bottom: 1px solid rgba(255, 255, 255, .3); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 2px; cursor: pointer; list-style: none; font-weight: 700;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid var(--white); border-bottom: 2px solid var(--white);
  transform: rotate(-45deg); transition: transform .2s ease;
}
.acc[open] summary::after { transform: rotate(45deg); }
.acc summary:hover { color: #E8FCFF; text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.acc ul { margin: 0; padding: 0 2px 14px 14px; list-style: none; font-style: italic; }
.acc li { margin: 0 0 .35em; }

/* ---------- Danksagungen ---------- */
.quote { margin: 0 0 1.15em; }
.quote p { margin: 0 0 .3em; }
.quote footer { font-style: italic; }

/* ---------- Philosophie: Zitat + Signatur ---------- */
.qmark { float: left; width: 54px; height: 46px; margin: 3px 12px 0 0; color: var(--white); }
.sig { text-align: right; font-style: italic; margin-top: .4em; }

/* ---------- Philosophie: Bildkacheln, die sich abwechseln ---------- */
.mosaic {
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-self: stretch; align-content: start; min-width: 0; background: #0a0605;
}
.tile {
  position: relative; overflow: hidden; aspect-ratio: 256 / 148;
  grid-column: var(--c); grid-row: var(--r);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .o { opacity: 0; animation: tile-fade var(--dur, 44s) ease-in-out var(--delay, 0s) infinite; }
.tile.m-only { display: none; }
/* langes Stehen auf dem Originalbild, dann ca. 2 s Überblendung, ca. 7 s Zweitbild – wie bisher, aber ohne JavaScript */
@keyframes tile-fade {
  0%, 30% { opacity: 0; }
  34%, 54% { opacity: 1; }
  58%, 100% { opacity: 0; }
}

/* Bildwechsel angehalten (Knopf in der Fußzeile): alle Kacheln zeigen ihr Ausgangsbild */
.mosaic.is-paused .tile .o { animation: none !important; opacity: 0 !important; }

/* ---------- Video ---------- */
.player { margin: 14px 0 12px; }
.player video { display: block; width: 100%; height: auto; aspect-ratio: 460 / 252; background: #000; border-radius: 6px; }
.player video::-webkit-media-controls-fullscreen-button { display: none; }
.player p { margin: 8px 0; }
.panel__body .note { font-size: 14px; font-style: italic; }

/* ---------- Formulare ---------- */
.contact { margin: 0 0 6px; }
.contact address { font-style: normal; margin: 0 0 16px; }
.panel__body .contact-phone { margin: 0 0 12px; }
.panel__body .contact-phone a {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 23px/1.1 var(--serif); text-decoration: none; color: var(--white);
}
.contact-phone svg { flex: none; width: 36px; height: auto; color: var(--white); }
.panel__body .contact-phone a:hover { background: none; color: var(--white); }
.panel__body .contact-phone a:hover span { text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.contact-mail { display: flex; align-items: center; gap: 12px; margin: 0; }
.contact-mail svg { flex: none; width: 24px; height: 24px; margin: 0 6px; fill: var(--white); }
.panel__body .contact-mail { margin-bottom: 0; }

.tm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; margin: 16px 0 0; }
/* justify-content: flex-end -> Beschriftung + Feld sitzen unten in der Zelle; bricht eine Beschriftung um, stehen die Felder trotzdem auf einer Linie */
.tm-form .f { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; min-width: 0; }
.tm-form .f--full { grid-column: 1 / -1; }
.tm-form label { line-height: 1.25; }
.tm-form input, .tm-form textarea {
  width: 100%; margin: 0; padding: 9px 11px;
  font: 400 16px/1.35 var(--sans); color: var(--white);
  background: var(--deep); border: 2px solid var(--cyan); border-radius: 7px;
  box-shadow: 2px 2px 5px #020202;
}
.tm-form textarea { resize: vertical; min-height: 130px; }
.tm-form input:focus-visible, .tm-form textarea:focus-visible { outline: 3px solid var(--white); outline-offset: 1px; }
.tm-form [aria-invalid="true"] { background: #7f2530; border-color: #ffb4a8; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.4; }
.form-error {
  grid-column: 1 / -1; margin: 0; padding: 10px 12px;
  background: var(--white); color: #7a0c0c; font-weight: 700; border-radius: 6px;
}
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.btn {
  font: 700 18px/1.2 var(--serif); color: var(--white);
  background: var(--panel); border: 1px solid var(--white);
  padding: 9px 20px; cursor: pointer; border-radius: 0;
}
.btn:hover:not(:disabled) { background: var(--cyan); color: var(--deep); border-color: var(--cyan); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--ghost { background: transparent; }

.tm-dialog {
  width: min(92vw, 440px); padding: 0; margin: auto;
  color: var(--white); background: var(--panel);
  border: 2px solid var(--cyan); border-radius: 10px;
}
.tm-dialog::backdrop { background: rgba(3, 40, 52, .74); }
.tm-dialog .inner { padding: 22px 22px 24px; }
.tm-dialog h2 { margin: 0 0 10px; font: 400 27px/1.15 var(--serif); }
.tm-dialog p { margin: 0 0 14px; }
.tm-dialog label { display: block; margin-bottom: 5px; }
.tm-dialog input {
  width: 100%; padding: 9px 11px; font: 400 16px/1.35 var(--sans); color: var(--white);
  background: var(--deep); border: 2px solid var(--cyan); border-radius: 7px;
}
.tm-dialog input:focus-visible { outline: 3px solid var(--white); outline-offset: 1px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dialog-msg { margin: 8px 0 0; min-height: 1.3em; font-weight: 700; }

/* ---------- Überschriften, Listen und Hinweise im Textkasten (Region-Seite, Impressum, Datenschutz) ---------- */
.panel__body h2 { margin: 1.35em 0 .45em; font: 400 23px/1.2 var(--serif); }
.panel__body h2:first-child { margin-top: 0; }
.panel__body ul { margin: 0 0 1em; padding-left: 1.2em; }
.panel__body li { margin-bottom: .35em; }
.legal-meta { font-style: italic; font-size: 14px; }
.todo { background: #FFE066; color: #3a2f00; padding: 0 4px; border-radius: 3px; font-weight: 700; }

/* ==========================================================================
   Handy & schmale Fenster: Hero über die volle Breite, Inhalt darunter
   ========================================================================== */
@media (max-width: 900px) {
  .card { margin: 0; max-width: none; }

  .topbar {
    position: relative; flex-wrap: wrap; align-items: center;
    background: var(--cyan);
    padding: 0 6px 0 16px; min-height: 54px;
  }
  .brand {
    display: block; margin-right: auto;
    font: 400 22px/1 var(--serif); color: var(--deep); text-decoration: none;
    padding: 14px 0;
  }
  .lang { height: auto; margin: 0 12px 0 0; padding: 0; align-items: center; }
  .lang a[aria-current="true"] { outline-color: var(--deep); }

  html:not(.js) .menu-toggle { display: none; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 12px; margin: 5px 0;
    background: transparent; border: 0; cursor: pointer;
    font: 400 19px/1 var(--serif); color: var(--deep);
  }
  .menu-toggle .bars { position: relative; width: 22px; height: 2px; background: currentColor; }
  .menu-toggle .bars::before, .menu-toggle .bars::after {
    content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor;
    transition: transform .2s ease;
  }
  .menu-toggle .bars::before { top: -7px; }
  .menu-toggle .bars::after  { top: 7px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after  { transform: translateY(-7px) rotate(-45deg); }

  .mainnav { flex-basis: 100%; margin-left: 0; }
  .mainnav ul {
    display: block; height: auto; border-radius: 0;
    margin: 0 -6px 0 -16px; background: var(--cyan);
    border-top: 1px solid rgba(3, 90, 119, .28);
  }
  .js .mainnav ul { display: none; }
  .js .mainnav ul.open { display: block; }
  .mainnav li + li { border-top: 1px solid rgba(3, 90, 119, .28); }
  .mainnav a, .mainnav li:first-child a {
    height: auto; line-height: 1.2; padding: 15px 16px; font-size: 21px; border-radius: 0;
  }
  .mainnav a[aria-current="page"] { background: var(--deep); color: var(--white); }

  .stage { display: block; background: transparent; }
  .hero { position: static; background: transparent; }
  .hero img { -webkit-mask-image: none; mask-image: none; }

  .panelwrap {
    display: flex; flex-direction: column;
    max-width: 700px; margin: 0 auto; padding: 14px 12px 34px;
  }
  .subnav { order: -1; margin: 0 0 12px; }
  .subnav ul { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 6px; }
  .subnav a { height: 44px; border-radius: 8px; padding: 0 16px; font-size: 20px; }
  .subnav a.home { padding: 0 14px; }
  .subnav a[aria-current="page"] { background: var(--cyan); color: var(--deep); }

  .panel { width: auto; min-height: 0; }
  .panel__title { font-size: 30px; padding: 12px 14px 4px; }
  .panel__body { padding: 14px 14px 30px; font-size: 17.5px; line-height: 1.5; }
  .panel__body p { margin-bottom: 1em; }
  .call { height: 46px; line-height: 46px; padding: 0 14px; text-align: center; font-size: 20px; }


  /* Philosophie: Kacheln als kompakter 4×4-Streifen über dem Textkasten */
  .tile { grid-column: auto; grid-row: auto; }
  .tile.m-only { display: block; }
  .qmark { width: 46px; height: 39px; }
  .tile.d-only { display: none; }

  /* Formulare */
  .tm-form { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; padding: 13px 20px; font-size: 20px; }
  .dialog-actions .btn { flex: 1 1 100%; padding: 12px 16px; font-size: 19px; }
  .acc summary { padding: 14px 2px; }

  .foot { text-align: center; padding: 6px 12px 44px; }
  .foot a, .foot-btn { display: inline-block; margin: 0; padding: 10px 12px; }
}

@media (max-width: 380px) {
  .panel__title { font-size: 27px; }
  .brand { font-size: 20px; }
}

/* ==========================================================================
   BEWEGUNG REDUZIEREN (prefers-reduced-motion) – derzeit AUSKOMMENTIERT, also ausgeschaltet,
   damit alle Effekte beim Testen immer zu sehen sind.
   ZUM SCHARFSTELLEN beim Livegang: beim jeweiligen Block in der Zeile "START" das Kommentar-Anfangszeichen
   (Schrägstrich + Stern) und in der Zeile "ENDE" das Kommentar-Endezeichen (Stern + Schrägstrich) löschen.
   Die drei Blöcke sind unabhängig voneinander:
     A  Drehbewegungen aus (Menü-Symbol wird zum X, Aufklapp-Pfeile)
     B  TV-Rauschen ("Flimmerkasten") als Standbild statt Flimmern
     C  Kachelwechsel (Philosophie) anhalten – nur aktivieren, wenn gewünscht. Empfehlung: ausgeschaltet
        lassen, denn es ist nur eine langsame Überblendung; anhalten kann man sie per Knopf in der Fußzeile.
   ========================================================================== */

/* A – START
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
A – ENDE */

/* B – START
@media (prefers-reduced-motion: reduce) {
  .hero img.hero-anim { display: none; }
  .hero img.hero-still { display: block; }
}
B – ENDE */

/* C – START
@media (prefers-reduced-motion: reduce) {
  .tile .o { animation: none !important; opacity: 0; }
}
C – ENDE */


