/*
Theme Name: Festina Lente
Description: Ruhiges One-Page-Theme für Websites, IT-Hilfe und digitale Grundbildung. Startseite mit Motto, Über mich, Leistungen, Referenzen und Kontaktformular. Lädt keine externen Schriften oder Skripte.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: festina-lente
*/

/* Farben: Tafelgrün, Kreideweiß, Messing (wie die Schnalle am Foto) */
:root {
  --tafel: #1f3a33;
  --tafel-hell: #2c4f46;
  --papier: #f6f7f4;
  --salbei: #dfe7e1;
  --tinte: #1c2422;
  --grau: #56625e;
  --messing: #a8812a;
  --linie: #c9d3cd;
  --feld: #ffffff;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --breite: 68rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #141c1a;
    --salbei: #1d2926;
    --tinte: #e6ebe8;
    --grau: #a3b0ab;
    --messing: #d1aa52;
    --linie: #33433e;
    --feld: #1b2421;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--messing); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--messing); outline-offset: 3px; }

.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 1.5rem; }

/* Kopfzeile */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linie);
}
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.marke { font-size: 1.25rem; text-decoration: none; letter-spacing: .01em; }
.marke small { display: block; font-family: var(--sans); font-size: .75rem; color: var(--grau); letter-spacing: .02em; }
.nav { display: flex; gap: 1.5rem; font-family: var(--sans); font-size: .95rem; }
.nav a { text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--messing); }
.menue-knopf { display: none; }

@media (max-width: 760px) {
  .menue-knopf {
    display: inline-flex; font: inherit; font-family: var(--sans); font-size: .95rem;
    background: none; border: 1px solid var(--linie); color: var(--tinte);
    border-radius: 6px; padding: .4rem .8rem; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--papier);
    border-bottom: 1px solid var(--linie); padding: .5rem 1.5rem 1rem;
  }
  .nav.offen { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--linie); }
}

/* Start: das Motto ist das Bild */
.start { padding: 6rem 0 5.5rem; }
.motto {
  font-size: clamp(3.5rem, 13vw, 10.5rem);
  line-height: .9; font-weight: 400; font-style: italic;
  margin: 0 0 3rem; letter-spacing: -.02em; color: var(--tafel);
}
@media (prefers-color-scheme: dark) { .motto { color: var(--tinte); } }
.start-unten {
  display: grid; grid-template-columns: 1fr 2fr; gap: 3rem;
  border-top: 2px solid var(--messing); padding-top: 1.75rem;
}
.motto-uebersetzung { font-size: 1.15rem; font-style: italic; color: var(--grau); margin: 0; max-width: 16em; }
.einleitung { font-size: 1.35rem; line-height: 1.55; max-width: 30em; margin: 0 0 2.25rem; }
.knopf {
  display: inline-block; font-family: var(--sans); font-size: 1rem; font-weight: 600;
  background: var(--tafel); color: #f3f6f4; text-decoration: none;
  padding: .9rem 1.5rem; border-radius: 4px; border: 0; cursor: pointer;
}
.knopf:hover { background: var(--tafel-hell); }
@media (prefers-color-scheme: dark) { .knopf { background: var(--messing); color: #141c1a; } .knopf:hover { background: #e0bd6a; } }
.knopf-leise { margin-left: 1.25rem; font-family: var(--sans); font-size: 1rem; }

@media (max-width: 760px) {
  .start { padding: 3.5rem 0 4rem; }
  .motto { margin-bottom: 2rem; }
  .start-unten { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Abschnitte */
.abschnitt { padding: 5rem 0; border-top: 1px solid var(--linie); }
.abschnitt h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 400; line-height: 1.15; margin: 0 0 1.5rem; }
.spalten { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
.spalten > h2:first-child { position: sticky; top: 6rem; align-self: start; margin: 0; }
@media (max-width: 760px) { .spalten { grid-template-columns: 1fr; gap: 0; } .spalten > h2:first-child { position: static; margin-bottom: 1.5rem; } }
.text p { max-width: 36em; margin: 0 0 1.1em; }

/* Über mich: die drei Fächer als Tafel */
.tafel {
  background: var(--tafel); color: #eef2ef; border-radius: 3px;
  padding: 1.75rem 2rem; margin: 2rem 0 0; max-width: 36em;
}
.tafel p { margin: 0 0 .75rem; font-family: var(--sans); font-size: .95rem; color: #b9c9c2; }
.tafel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: 1.4rem; font-style: italic; }

/* Leistungen */
.leistungen { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; }
.leistung { border-top: 2px solid var(--messing); padding-top: 1rem; }
.leistung h3 { font-size: 1.35rem; font-weight: 400; margin: 0 0 .4rem; }
.leistung p { margin: 0 0 .6em; color: var(--grau); font-size: 1.05rem; }
@media (max-width: 600px) { .leistungen { grid-template-columns: 1fr; } }

/* Referenzen */
.referenz { padding: 1.5rem 0; border-bottom: 1px solid var(--linie); display: grid; grid-template-columns: 1fr auto; gap: .25rem 2rem; }
.referenz:first-child { padding-top: 0; }
.referenz h3 { font-size: 1.35rem; font-weight: 400; margin: 0; }
.referenz p { grid-column: 1 / -1; margin: 0; color: var(--grau); max-width: 36em; }
.referenz p.adresse { grid-column: auto; grid-row: 1; grid-column-start: 2; font-family: var(--sans); font-size: .9rem; color: var(--tinte); align-self: center; }
@media (max-width: 600px) { .referenz { grid-template-columns: 1fr; } .referenz p.adresse { grid-row: auto; grid-column-start: auto; } }

/* Kontakt */
.kontakt { background: var(--salbei); }
.formular { display: grid; gap: 1.1rem; max-width: 34rem; }
.feld label { display: block; font-family: var(--sans); font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.feld input, .feld textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--tinte);
  background: var(--feld); border: 1px solid var(--linie); border-radius: 4px; padding: .7rem .85rem;
}
.feld textarea { min-height: 9rem; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: 2px solid var(--messing); outline-offset: 1px; border-color: transparent; }
.einwilligung { display: flex; gap: .6rem; align-items: flex-start; font-family: var(--sans); font-size: .9rem; color: var(--grau); }
.einwilligung input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--tafel); }
.honig { position: absolute; left: -9999px; }
.direkt { font-family: var(--sans); font-size: 1rem; margin-top: 2rem; color: var(--grau); }
.direkt a { color: var(--tinte); }
.meldung { font-family: var(--sans); padding: .9rem 1.1rem; border-radius: 4px; margin-bottom: 1.5rem; max-width: 34rem; }
.meldung.ok { background: var(--tafel); color: #eef2ef; }
.meldung.fehler { background: #f6e3df; color: #6b2416; }
.meldung[hidden] { display: none; }

/* Fuß */
.fuss { padding: 2.5rem 0; font-family: var(--sans); font-size: .9rem; color: var(--grau); }
.fuss .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.fuss nav { display: flex; gap: 1.5rem; }

/* Rechtstexte */
.recht { padding: 4rem 0 5rem; }
.recht .wrap { max-width: 46rem; }
.recht h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 400; margin: 0 0 2rem; }
.recht h2 { font-size: 1.4rem; font-weight: 400; margin: 2.25rem 0 .5rem; }
.recht p, .recht li { max-width: 38em; }
.platzhalter { background: color-mix(in srgb, var(--messing) 22%, transparent); padding: 0 .2em; border-radius: 2px; }

/* WordPress-Ergänzungen */
.admin-bar .kopf { top: 32px; }
@media (max-width: 782px) { .admin-bar .kopf { top: 46px; } }
@media (max-width: 600px) { .admin-bar .kopf { top: 0; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.nav ul, .fuss ul { list-style: none; margin: 0; padding: 0; display: contents; }
.recht .wp-block-heading { font-weight: 400; }
.ueber-tafel { margin-top: 2rem; }
.kopf-zurueck { font-family: var(--sans); font-size: .95rem; }
.nav li, .fuss li { list-style: none; display: contents; }

/* Startseite aus Gutenberg-Blöcken */
.startseite > * { margin-top: 0; margin-bottom: 0; }
.startseite .wrap > * { margin-top: 0; }
.start-text > .einleitung { margin-bottom: 2.25rem; }
.kontakt-inhalt > * + * { margin-top: 1.1em; }
.text > p:last-child { margin-bottom: 0; }
.tafel > p { margin-top: 0; }
.tafel .faecher { margin: 0; }
.startseite .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.startseite .wp-block-button__link {
  display: inline-block; font-family: var(--sans); font-size: 1rem; font-weight: 600;
  background: var(--tafel); color: #f3f6f4; text-decoration: none;
  padding: .9rem 1.5rem; border-radius: 4px; border: 0;
}
.startseite .wp-block-button__link:hover { background: var(--tafel-hell); }
@media (prefers-color-scheme: dark) {
  .startseite .wp-block-button__link { background: var(--messing); color: #141c1a; }
  .startseite .wp-block-button__link:hover { background: #e0bd6a; }
}
.startseite .is-style-outline .wp-block-button__link,
.startseite .is-style-outline .wp-block-button__link:hover {
  background: none; color: var(--tinte); border: 0; padding: .25rem 0; font-weight: 400;
  text-decoration: underline; text-decoration-color: var(--messing); text-underline-offset: .2em;
}
.leistung > * { margin-top: 0; }
