.split,
.text-page-section,
.forms-overview,
.form-document-section,
.document-actions {
  padding: clamp(46px, 6vw, 76px) var(--page-x);
}

.split {
  display: grid;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(260px, .88fr) minmax(280px, .72fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.forms-section-head h1 {
  margin: 0;
}

.forms-section-head p:last-child {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.7;
}

.forms-section-head {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin-bottom: clamp(24px, 4vw, 42px);
}

/* 404: Die Knoepfe uebernehmen den unteren Abstand des Kopfbereichs. */
/* Fehlerseiten (404 im Template error, 403.html und 500.html statisch):
   oben ein Bild wie der Blick durch die Kamera, darunter Text und Knoepfe. */
.error-page {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: clamp(40px, 7vw, 88px) var(--page-x) clamp(48px, 6vw, 76px);
  text-align: center;
}

/* Statische Seiten ohne Header: Inhalt mittig im Fenster. */
.error-page--standalone {
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
}

/* Namenszug oben auf den statischen Seiten, kleiner als auf "Ueber mich". */
.error-page .error-brand {
  align-items: center;
  margin-bottom: 32px;
  color: var(--ink);
  text-decoration: none;
}

.error-page .error-brand .about-name-first {
  font-size: 1.9rem;
}

.error-page .error-brand .about-name-last {
  font-size: 1.7rem;
}

.error-title {
  margin: 8px 0 0;
  font-size: var(--title-size);
  line-height: 1.05;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

/* Kameraansicht: Drittel-Raster, Sucherecken, Fokusfeld und Belichtungszeile.
   Die Ecken sind acht schmale Verlaeufe, je zwei pro Ecke. */
.error-shot {
  --shot-bg: var(--soft);
  --shot-ink: var(--ink);
  --shot-grid: var(--line);

  position: relative;
  display: grid;
  place-items: center;
  width: min(560px, 100%);
  aspect-ratio: 3 / 2;
  margin-bottom: 40px;
  overflow: hidden;
  background:
    linear-gradient(var(--shot-grid), var(--shot-grid)) 33.333% 0 / 1px 100% no-repeat,
    linear-gradient(var(--shot-grid), var(--shot-grid)) 66.666% 0 / 1px 100% no-repeat,
    linear-gradient(var(--shot-grid), var(--shot-grid)) 0 33.333% / 100% 1px no-repeat,
    linear-gradient(var(--shot-grid), var(--shot-grid)) 0 66.666% / 100% 1px no-repeat,
    var(--shot-bg);
}

.error-shot::before {
  content: '';
  position: absolute;
  inset: 16px;
  background:
    linear-gradient(var(--shot-ink), var(--shot-ink)) top left / 28px 2px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) top left / 2px 28px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) top right / 28px 2px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) top right / 2px 28px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) bottom left / 28px 2px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) bottom left / 2px 28px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) bottom right / 28px 2px no-repeat,
    linear-gradient(var(--shot-ink), var(--shot-ink)) bottom right / 2px 28px no-repeat;
}

.error-shot__code {
  color: var(--shot-ink);
  font-family: var(--display);
  font-size: clamp(4.5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
}

.error-shot__focus {
  position: absolute;
  top: 26%;
  left: 64%;
  width: 48px;
  height: 36px;
  border: 2px solid var(--logo-red);
}

.error-shot__readout {
  position: absolute;
  right: 0;
  bottom: 22px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--shot-ink);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking);
  opacity: .7;
}

/* 404: Der Fokus sucht, findet die Zahl fast und verliert sie wieder. */
.error-shot--viewfinder .error-shot__code {
  filter: blur(4px);
  animation: error-focus 4.5s ease-in-out infinite;
}

@keyframes error-focus {
  0%,
  100% {
    filter: blur(4px);
  }

  45%,
  55% {
    filter: blur(.6px);
  }
}

/* 500: ueberbelichtet, mit den Zebrastreifen, die Kameras bei
   ausgefressenen Lichtern zeigen. */
.error-shot--overexposed {
  --shot-bg: var(--bg);
  --shot-ink: var(--muted);
}

/* Breiter als das Bild und per transform verschoben, damit beim Wandern
   keine Kante der Streifen sichtbar wird. 39.6px ist eine Streifenperiode. */
.error-shot--overexposed::after {
  content: '';
  position: absolute;
  inset: 0 0 0 -39.6px;
  background: repeating-linear-gradient(-45deg, var(--line) 0 6px, transparent 6px 14px);
  opacity: .6;
  animation: error-zebra 6s linear infinite;
}

.error-shot--overexposed .error-shot__code {
  position: relative;
  z-index: 1;
  color: var(--line);
}

.error-shot--overexposed .error-shot__focus {
  display: none;
}

@keyframes error-zebra {
  to {
    transform: translateX(39.6px);
  }
}

/* 403: Dunkelkammer, nur das rote Schutzlicht brennt. */
.error-shot--darkroom {
  --shot-bg: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--logo-red) 45%, transparent), transparent 62%), var(--ink);
  --shot-ink: color-mix(in srgb, var(--logo-red) 70%, var(--bg));
  --shot-grid: color-mix(in srgb, var(--logo-red) 18%, transparent);
}

.error-shot--darkroom .error-shot__focus {
  display: none;
}

.lead {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

/* Schlanker Dokumentenkopf fuer reine Rechtstextseiten (Impressum, Datenschutz,
   AGB) - ohne die grosse Hero-Umrandung, da hier nur eine Ueberschrift und
   ggf. ein Stand-Datum noetig sind. */
.document-header {
  padding: clamp(46px, 6vw, 76px) var(--page-x) 0;
}

.document-header h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  line-height: 1.08;
}

.document-header .lead {
  max-width: none;
  margin: 16px 0 0;
}

.lead--narrow-only {
  display: none;
}

@media (max-width: 760px) {
  .lead--wide-only {
    display: none;
  }

  .lead--narrow-only {
    display: block;
    max-width: none;
    margin: 0;
  }
}

.section-inner {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.section-inner--text {
  max-width: var(--text-max);
}

/* Kontakt: bewusst mutiger Farbmoment (Signalgelb, grosse Display-Headline,
   schraeg gerahmtes Foto) - der einzige Ort neben dem Scroll-Balken, an dem
   die Akzentfarbe flaechig statt nur als Hover/Fokus-Detail auftritt. Das
   Formular darunter bleibt bewusst ruhig/neutral, damit Eingabe vertrauenswuerdig
   und nicht wie dekoriert wirkt. */
/* Farbe waehlt Karen im Panel (heroColor); contact.php setzt Hintergrund und
   die passende helle oder dunkle Schrift als Variablen. Ohne Wert gelten
   Signalgelb und --ink wie bisher. */
.contact-hero {
  padding: clamp(48px, 8vw, 96px) var(--page-x);
  background: var(--contact-hero-bg, var(--signal));
  color: var(--contact-hero-ink, var(--ink));
  overflow: hidden;
}

/* Haelt die zwei Spalten bei breiten Bildschirmen so schmal wie den Rest der
   Seite - sonst rutscht das Foto ganz an den Rand und in der Mitte bleibt
   eine leere Gelb-Flaeche. */
.contact-hero .section-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(220px, .85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.contact-hero-title {
  margin: 0;
  color: var(--contact-hero-ink, var(--ink));
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: .92;
}

.contact-hero-lead {
  margin: 24px 0 0;
  max-width: 42ch;
  color: var(--contact-hero-ink, var(--ink));
  font-size: 1.05rem;
  line-height: 1.7;
}

.contact-hero-portrait {
  margin: 0;
  transform: rotate(2.2deg);
  justify-self: center;
}

/* Portraits wie ein Abzug: weisser Rand, weicher Schatten. */
.contact-hero-portrait img,
.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 10px solid var(--bg);
  box-shadow: var(--shadow-photo);
  object-fit: cover;
}

.contact-hero-portrait img {
  max-width: 340px;
}

@media (max-width: 760px) {
  .contact-hero .section-inner {
    grid-template-columns: 1fr;
  }

  .contact-hero-portrait {
    order: -1;
    max-width: 220px;
    margin-inline: auto;
  }
}

/* Über mich: eigenstaendige, editorielle Komposition statt der generischen
   Hero-Vorlage. Schraeg liegender Abzug, zweigeteilter Namenszug wie im Logo,
   Fliesstext mit Initial. */
/* Das Portraet waechst bis 720 px (scharf bis Retina mit der 1400er-Datei)
   und bleibt im ersten Bildschirm, breite Monitore zentrieren das Paar. */
.about-hero {
  display: grid;
  grid-template-columns: minmax(280px, min(44%, 720px, 66svh)) minmax(0, var(--text-max));
  justify-content: center;
  align-items: start;
  gap: clamp(36px, 6vw, 80px);
  padding-inline: var(--page-x);
  background: var(--soft);
  overflow: hidden;
}

.about-portrait {
  margin: 0;
  transform: rotate(-1.4deg);
}

/* Abstand zu Header und Rand, sonst schneiden beide den gedrehten Abzug an. */
.about-hero .about-portrait {
  margin-block: clamp(40px, 6vw, 80px);
}

.about-hero-content {
  container-type: inline-size;
  padding-block: clamp(48px, 8vw, 96px);
}

/* Der Nachname richtet sich nach der Spaltenbreite statt nach dem Fenster.
   Mit vw lief "STEINEBRONN" zwischen Tablet und kleinem Desktop rechts aus
   der Spalte. 12cqi passt fuer elf Grossbuchstaben in Sora. */
.about-hero .about-name-last {
  font-size: clamp(2.2rem, 12cqi, 6rem);
}

.about-name {
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: .88;
}

.about-name-first {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 400;
  font-style: italic;
}

.about-name-last {
  font-family: var(--display);
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 700;
  text-transform: uppercase;
}

.about-lead {
  max-width: 460px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-cta {
  margin: 32px 0 0;
}

.about-text-wrap {
  position: relative;
}

/* Der Server liefert den Zusatztext sichtbar, damit Leseansichten und
   KI-Abrufer ihn finden; ohne JavaScript steht er einfach darunter. Mit
   JavaScript (Klasse js aus reveal.js) bleibt er zu, bis script.js das
   Aufklappen uebernimmt. */
html.js .about-text-wrap:not([data-about-ready]) [data-about-long] {
  display: none;
}

/* "Entwickeln"-Uebergang: der Zusatztext schaerft sich unter dem kurzen Text
   im Wisch von oben nach unten ein wie ein Foto in der Dunkelkammer. Das
   Korn-Overlay (::after) blitzt dabei kurz auf, wie ein Print, der aus der
   Entwicklerschale gezogen wird. */
.about-text {
  margin-top: 32px;
  opacity: 1;
  filter: blur(0);
  clip-path: inset(0 0 0% 0);
  transition: opacity .4s ease, filter .4s ease, clip-path .5s ease;
}

/* Zusatz liest sich als Fortsetzung: Abstand wie zwischen zwei Absaetzen. */
.about-text[data-about-long] {
  margin-top: 1em;
}

.about-text--fading,
.about-text--entering {
  opacity: 0;
  filter: blur(6px);
  clip-path: inset(0 0 100% 0);
}

.about-text-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.about-text-wrap.is-developing::after {
  opacity: .3;
}

.about-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.about-more-btn::after {
  content: "→";
}

.about-more-btn[aria-expanded="true"]::after {
  content: "↑";
}

@media (max-width: 760px) {
  .about-hero {
    grid-template-columns: 1fr;
    padding: 0 var(--page-x);
  }

  .about-hero .about-portrait {
    margin-block: clamp(28px, 6vw, 44px) 0;
  }

  .about-hero-content {
    padding-block: 28px clamp(36px, 8vw, 56px);
  }
}

.prose {
  max-width: var(--text-max);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.72;
}

.prose h2 {
  margin: 2.35rem 0 .65rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose> :first-child {
  margin-top: 0;
}

.prose> :last-child {
  margin-bottom: 0;
}

.forms-overview {
  padding-top: clamp(44px, 6vw, 64px);
  padding-bottom: clamp(56px, 7vw, 80px);
}

.forms-overview .section-inner {
  max-width: 1000px;
}

.document-actions {
  padding-top: 0;
}

.whitewall-item {
  box-shadow: none;
  text-decoration: none;
}

.whitewall-rich-text p {
  color: inherit;
  line-height: inherit;
}

/* Whitewall-Textstile an die Website angeglichen; nur was vom Plugin abweicht.
   Groessen bleiben beim Plugin, weil sie mit der Wand skalieren (mobileLayout
   scale). heading wie die Seitenueberschriften, label wie die Menuepunkte,
   quote wie die Bodoni-Zitate, body wie der Fliesstext. */
.whitewall-item--text.whitewall-text-style--heading>.whitewall-rich-text {
  line-height: 1.08;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.whitewall-item--text.whitewall-text-style--label>.whitewall-rich-text {
  font-family: var(--sans);
  font-weight: 500;
}

.whitewall-item--text.whitewall-text-style--quote>.whitewall-rich-text {
  line-height: 1.35;
}

.whitewall-item--text.whitewall-text-style--body>.whitewall-rich-text {
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
  align-content: start;
}

.contact-grid p:last-child {
  margin: 0;
}

/* E-Mail und Telefon: 44 px hohe Tippflaeche, Optik und Abstaende bleiben. */
.contact-grid .text-link {
  display: inline-block;
  margin-block: -13px;
  padding-block: 13px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(320px, .58fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: start;
}

@media (max-width: 760px) {
  .split,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  /* Auf dem Handy zuerst die Handlung (Formular), Kontaktdaten als
     Alternative danach - sonst muss man erst an E-Mail/Telefon/Social
     vorbeiscrollen, bevor das eigentliche Formular kommt. */
  .contact-form {
    order: -1;
  }
}
