/*
Theme Name: Blaues Haus
Author: Andreas Cordes für das Blaue Haus, Buchloe
Description: Block-Theme für das Ferien- und Seminarhaus „Blaues Haus“ in Buchloe. Übernimmt die Gestaltung des statischen Entwurfs (prototyp/stil.css) in der Farbfassung Nussbaum für Kopf und Fuß. Alle Schriften liegen im Theme – keine externen Schriften oder Skripte.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blaues-haus
Tags: block-theme, full-site-editing
*/

/* ==========================================================================
   Farbbrücke. Die Farbwerte stehen ausschließlich in theme.json; hier hängen
   nur die kurzen Namen des Entwurfs daran. Wer eine Farbe ändert, ändert sie
   in theme.json – nirgends sonst.
   ========================================================================== */

:root {
  --stahlblau: var(--wp--preset--color--stahlblau);
  --tiefblau:  var(--wp--preset--color--tiefblau);
  --lichtblau: var(--wp--preset--color--lichtblau);
  --sand:      var(--wp--preset--color--sand);
  --nussbaum:  var(--wp--preset--color--nussbaum);
  --beton:     var(--wp--preset--color--beton);
  --gruen:     var(--wp--preset--color--gruen);
  --weiss:     var(--wp--preset--color--weiss);
  --text:      var(--wp--preset--color--text);
  --leise:     var(--wp--preset--color--leise);
  --linie:     var(--wp--preset--color--linie);
  --dunst:     var(--wp--preset--color--dunst);
  --nebel:     var(--wp--preset--color--nebel);

  --f-display: var(--wp--preset--font-family--display);
  --f-marke:   var(--wp--preset--font-family--marke);
  --f-text:    var(--wp--preset--font-family--text);
  --f-daten:   var(--wp--preset--font-family--daten);

  --radius: 8px;
  --radius-klein: 6px;
  --breit: 68rem;
  --spalte: 40rem;
  /* Seitenrand, der den Inhalt wie .mitte im Entwurf auf 68rem begrenzt,
     ohne ihn zu zentrieren – Absätze bleiben linksbündig in der Spalte. */
  --rand: max(1.5rem, calc((100% - var(--breit)) / 2 + 1.5rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 3px solid var(--stahlblau); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

/* ── Schrift ── */
h1, h2, h3 { font-variation-settings: 'SOFT' 30, 'opsz' 40; margin: 0; }
h2 { margin: 0 0 1rem; }
h3 { margin: 2rem 0 .5rem; }
p { margin: 0 0 1.05rem; max-width: var(--spalte); }
a { text-underline-offset: 3px; }
strong { font-weight: 600; }
.leise { color: var(--leise); }
.klein { font-size: .9rem; }
.daten { font-family: var(--f-daten); font-variant-numeric: tabular-nums;
         letter-spacing: -.02em; font-size: .94em; }
p.daten { line-height: 1.9; }

/* ==========================================================================
   Kopf – Farbfassung Nussbaum (entschieden 08.10.2026)
   Kontraste aus dem Entwurf: Sand auf Nussbaum 6,58 : 1 · Weiß 12,66 : 1
   ========================================================================== */

.wp-site-blocks > header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 10; }

.kopfleiste { background: var(--nussbaum); padding: 1rem var(--rand); gap: .75rem 2rem; }
.kopfleiste .marke { display: block; }
.kopfleiste .wp-block-site-title { font-family: var(--f-marke); font-size: 1.75rem; font-weight: 400;
  line-height: 1.1; letter-spacing: .01em; margin: 0; max-width: none; }
/* Kaushan Script hat nur einen Schnitt – font-weight bleibt 400. */
.kopfleiste .wp-block-site-title a { color: var(--sand); text-decoration: none; font-weight: 400; }
.kopfleiste .wp-block-site-tagline { font-size: .8rem; margin: .1rem 0 0; max-width: none;
  color: color-mix(in srgb, var(--sand) 82%, transparent); }

.kopfleiste .wp-block-navigation { font-size: .94rem; color: var(--weiss); }
.kopfleiste .wp-block-navigation .wp-block-navigation__container { gap: .35rem 1.35rem; }
.kopfleiste .wp-block-navigation .wp-block-navigation-item__content {
  padding: 0 0 2px; border-bottom: 2px solid transparent; text-decoration: none; }
.kopfleiste .wp-block-navigation .wp-block-navigation-item__content:hover { border-bottom-color: var(--sand); }
.kopfleiste .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.kopfleiste .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
  border-bottom-color: var(--sand); font-weight: 600; }

/* ==========================================================================
   Abschnitte. Jeder Abschnitt ist ein Gruppen-Block über die volle Breite.
   ========================================================================== */

.abschnitt { padding: 3.5rem var(--rand); margin: 0; }
/* Schlusszeilen, die im Entwurf allein in ihrem Abschnitt stehen. */
.abschnitt > p.klein.leise:only-child { margin-bottom: 0; }
.ruhig { background: var(--dunst); }
.warm  { background: var(--sand); }
.tief  { background: var(--tiefblau); color: var(--weiss); }
.tief h2 { color: var(--weiss); }
.tief a:not(.wp-element-button) { color: var(--lichtblau); }
.tief .leise { color: var(--nebel); }
.tief .wp-block-button__link { background: var(--weiss); color: var(--tiefblau); border-color: var(--weiss); }
.wp-block-list { max-width: var(--spalte); }

/* ── Titelbereich ── */
.titel { padding-top: 4rem; padding-bottom: 3rem; }
.vorlauf { font-family: var(--f-daten); font-size: .82rem; letter-spacing: .1em;
           text-transform: uppercase; color: var(--stahlblau); margin: 0 0 .8rem; }
.anriss { font-size: 1.2rem; color: var(--leise); max-width: 38rem; margin-top: 1rem; }

/* ── Zwei Einstiege ── */
.einstiege { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
             margin: 2.5rem 0 0; }
.einstieg { position: relative; background: var(--weiss); border: 1px solid var(--linie);
            border-radius: var(--radius); padding: 1.75rem 1.9rem;
            transition: border-color .15s, transform .15s; }
.einstieg:hover { border-color: var(--stahlblau); transform: translateY(-2px); }
.einstieg .jahreszeit { font-family: var(--f-daten); font-size: .78rem; letter-spacing: .08em;
                        text-transform: uppercase; color: var(--stahlblau); margin: 0 0 .5rem; }
.einstieg h3 { margin: 0 0 .5rem; font-size: 1.4rem; color: var(--tiefblau); }
.einstieg p { margin: 0 0 .9rem; font-size: .98rem; }
.einstieg .weiter { margin: 0; font-weight: 600; font-size: .94rem; }
.einstieg .weiter a { text-decoration: none; }
/* Im Entwurf ist die ganze Karte der Verweis – hier deckt ihn der Verweis ab. */
.einstieg .weiter a::after { content: ""; position: absolute; inset: 0; }

/* ── Knöpfe ── (Grundform steht in theme.json) */
.wp-block-buttons { gap: .75rem; margin: 1.5rem 0 0; }
.wp-block-button__link { text-decoration: none; cursor: pointer; }
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):not(.has-background) {
  background: transparent; color: var(--stahlblau); border: 1px solid var(--stahlblau); padding: .8rem 1.6rem; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--stahlblau); color: var(--weiss); }
/* Knopf im Formular (HTML-Block) */
.knopf { display: inline-block; background: var(--stahlblau); color: var(--weiss);
         padding: .8rem 1.6rem; border-radius: var(--radius-klein); text-decoration: none;
         font-weight: 600; border: 1px solid var(--stahlblau); cursor: pointer;
         font-family: inherit; font-size: 1rem; }
.knopf:hover { background: var(--tiefblau); border-color: var(--tiefblau); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }

/* ── Faktenband ── */
.fakten { font-family: var(--f-daten); font-size: .92rem; line-height: 2;
          color: var(--leise); max-width: none; margin: 0; }
.fakten strong, .fakten b { color: var(--text); font-weight: 400; }

/* ── Datenblock: im Editor eine zweispaltige Tabelle ── */
.wp-block-table.datenblock { margin: 1.25rem 0; max-width: 30rem; overflow: visible; font-family: var(--f-daten); font-size: .94rem; }
.wp-block-table.datenblock table { width: 100%; border-collapse: collapse; }
.wp-block-table.datenblock td { border: 0; border-top: 1px solid var(--linie); padding: .45rem 0; vertical-align: top; }
.wp-block-table.datenblock td:first-child { color: var(--leise); padding-right: 1.5rem; white-space: nowrap; }
.wp-block-table.datenblock td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Bilder ── */
figure { margin: 0; }
.wp-block-image { margin: 0; }
.wp-block-image img { width: 100%; border-radius: var(--radius); background: var(--dunst); }
figcaption, .wp-block-image figcaption, .bildunterschrift {
  font-size: .85rem; color: var(--leise); margin: .5rem 0 0; text-align: left; max-width: none; }
.galerie { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
           margin: 1.5rem 0; align-items: start; }
/* Hochformat (Bad im Erdgeschoss): höhere Kachel über zwei Reihen statt Beschnitt. */
.galerie .hoch { grid-row: span 2; }
@media (max-width: 32rem) { .galerie .hoch { grid-row: auto; } }
.galerie .luecke { margin: 0; min-height: 12rem; display: flex; flex-direction: column; justify-content: center; }
.breitbild { padding-top: 0; padding-bottom: 0; margin: 2rem 0; }
.wp-block-image.schmal { max-width: 34rem; }

/* ── Karten ── */
.karten { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
          margin: 1.5rem 0; }
.karte { background: var(--weiss); border: 1px solid var(--linie);
         border-radius: var(--radius); padding: 1.5rem 1.65rem; }
.karte h3 { margin-top: 0; }
.karte p:last-child { margin-bottom: 0; }

/* ── Terminliste aus dem Entwurf: im Editor eine zweispaltige Tabelle ── */
/* overflow: der Tabellen-Block setzt sonst eine Rollleiste, die die Linie verkürzt. */
.wp-block-table.termine { margin: 1.5rem 0; max-width: 44rem; overflow: visible; }
.wp-block-table.termine table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wp-block-table.termine td { border: 0; border-top: 1px solid var(--linie); padding: .9rem 0; vertical-align: baseline; }
.wp-block-table.termine td:first-child { width: 10.25rem; padding-right: 1.25rem;
  font-family: var(--f-daten); font-size: .9rem; color: var(--stahlblau); }
.wp-block-table.termine td:last-child { font-size: .9rem; color: var(--leise); }
.wp-block-table.termine td:last-child strong { font-size: 1.0625rem; color: var(--text); }

/* ── Lücke: sichtbar, nicht überspielt ── */
.luecke { border: 1px dashed var(--beton); border-radius: var(--radius);
          padding: 1.1rem 1.35rem; margin: 1.25rem 0; max-width: 42rem; background: transparent; }
.luecke .marke-l { font-family: var(--f-daten); font-size: .76rem; letter-spacing: .08em;
                   text-transform: uppercase; color: var(--leise); margin: 0 0 .4rem; }
.luecke > :last-child { margin-bottom: 0; }
.luecke ul { margin: 0; }
.luecke.wichtig { border-color: var(--nussbaum); }
.wp-block-html + .luecke, form + .luecke { margin-top: 2rem; }
.luecke.wichtig .marke-l { color: var(--nussbaum); }

/* ── Zitat ── */
blockquote, .wp-block-quote { margin: 1.5rem 0; padding: 1.2rem 1.5rem; background: var(--dunst);
  border-left: 3px solid var(--sand); border-radius: 0 var(--radius) var(--radius) 0; max-width: 42rem; }
blockquote p { margin: 0 0 .6rem; }
blockquote p:last-of-type { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .7rem; font-style: normal; font-size: .88rem;
                  color: var(--leise); font-family: var(--f-daten); }

/* ── Formular (steht als HTML-Block im Inhalt, verschickt noch nichts) ── */
form { max-width: 34rem; }
.feld { margin-bottom: 1.15rem; }
.feld label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: .35rem; }
.feld .hilfe { display: block; font-weight: 400; font-size: .85rem; color: var(--leise); margin-bottom: .35rem; }
.feld input, .feld textarea, .feld select { width: 100%; font: inherit; color: var(--text);
  background: var(--weiss); border: 1px solid var(--beton); border-radius: var(--radius-klein); padding: .7rem .85rem; }
.feld input:focus, .feld textarea:focus, .feld select:focus { border-color: var(--stahlblau); }
.wahl { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin-top: .2rem; }
.wahl label { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
.wahl input { width: auto; }

/* ── Entwurfsband – wird in functions.php über BH_ENTWURF geschaltet ── */
.entwurf { background: var(--nussbaum); color: var(--weiss); font-size: .85rem; text-align: center;
           padding: .6rem 1.5rem; font-family: var(--f-daten); margin: 0; max-width: none;
           border-bottom: 1px solid color-mix(in srgb, var(--sand) 35%, transparent); }

/* ── Fuß – Farbfassung Nussbaum ── */
.fuss { background: var(--nussbaum); color: var(--sand); padding: 2.5rem var(--rand);
        font-size: .92rem; gap: 1.5rem 3rem; }
.fuss p { margin: 0; max-width: none; }
.fuss ul { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.fuss a { color: var(--sand); }
.fuss a:hover { color: var(--lichtblau); }   /* 8,23 : 1 */

/* ── Beiträge, Archiv, Suche ── */
.eintrag { border-top: 1px solid var(--linie); padding: 1.1rem 0; max-width: 44rem; }
.eintrag h2 { font-size: 1.4rem; margin: 0 0 .3rem; }
.eintrag h2 a { color: var(--tiefblau); text-decoration: none; }
.eintrag .wp-block-post-date { font-family: var(--f-daten); font-size: .85rem; color: var(--stahlblau); }
.wp-block-query-pagination { margin-top: 1.5rem; max-width: 44rem; }
.wp-block-search { max-width: 34rem; }
.wp-block-search__input { font: inherit; border: 1px solid var(--beton); border-radius: var(--radius-klein); padding: .7rem .85rem; }
.beitrag > .wp-block-post-content > * { max-width: var(--spalte); }
.beitrag > .wp-block-post-content > .wp-block-image { max-width: 44rem; margin: 1.5rem 0; }

@media (max-width: 40rem) {
  .abschnitt { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .titel { padding-top: 2.5rem; padding-bottom: 2rem; }
  .breitbild { padding-top: 0; padding-bottom: 0; }
  .wp-site-blocks > header { position: static; }
  .wp-block-table.termine td { display: block; width: auto; padding: 0; border: 0; }
  .wp-block-table.termine td:first-child { width: auto; border-top: 1px solid var(--linie); padding-top: .9rem; }
  .wp-block-table.termine td:last-child { padding: .15rem 0 .9rem; }
}
