/*
Theme Name:   Timo Schäferkordt Fotografie
Theme URI:    https://timoschaeferkordt.de/
Author:       Timo Schäferkordt
Author URI:   https://timoschaeferkordt.de/
Description:  Schlankes One-Pager-Theme für Hochzeits-, Festival- und Eventfotografie mit freien Arbeiten, Galerie-Lightbox und AJAX-Kontaktformular.
Version:      1.2.0
Requires at least: 6.3
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  tsf
*/

/* =========================================================
   Mobile-first · Light Mode · CSS Custom Properties
   Schriften (@font-face) werden in functions.php mit lokalen Dateien aus /fonts/ eingebunden.
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Farben */
  --c-bg: #F8F6F2;
  --c-bg-alt: #F1EDE6;
  --c-paper: #FDFBF7;
  --c-sand: #E6DED1;
  --c-line: #DCD4C7;
  --c-text: #2C2C2C;
  --c-muted: #67615A;
  --c-accent: #B49A76;
  --c-accent-strong: #866A47;
  --c-error: #9B3D2E;
  --c-success: #4F6B48;
  --c-on-image: #FDFBF7;

  /* Typografie */
  --f-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;

  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.9rem, 1.6rem + 6.4vw, 7rem);

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-space: clamp(5rem, 4rem + 6vw, 10rem);
  --header-h: 4.25rem;

  --radius-pill: 999px;
  --radius-sm: 3px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: 200ms;
  --t-med: 450ms;
}

/* ---------- Reset & Basis ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
img.is-missing { visibility: hidden; } /* Platzhalter, solange Bilder fehlen */

figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--c-accent-strong);
  outline-offset: 3px;
}

::selection { background: var(--c-sand); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--c-text);
  color: var(--c-paper);
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 3rem;
  padding: .8rem 1.6rem;
  border: 1px solid var(--c-text);
  border-radius: var(--radius-pill);
  background: var(--c-text);
  color: var(--c-paper);
  font-family: var(--f-sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--c-accent-strong); border-color: var(--c-accent-strong); }

.btn--small { min-height: 2.5rem; padding: .5rem 1.15rem; font-size: .9rem; }

.btn--light {
  background: var(--c-on-image);
  border-color: var(--c-on-image);
  color: var(--c-text);
}
.btn--light:hover { background: var(--c-sand); border-color: var(--c-sand); }

.btn--outline { background: transparent; color: var(--c-text); }
.btn--outline:hover { background: var(--c-text); color: var(--c-paper); border-color: var(--c-text); }

.btn--block { width: 100%; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  cursor: pointer;
}
.link-btn:hover { color: var(--c-accent-strong); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(248, 246, 242, .88);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--c-line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--container) + 2 * var(--gutter));
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  text-decoration: none;
  line-height: 1;
}
.brand__name {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 450;
  letter-spacing: -.01em;
}
.brand__sub {
  font-size: .85rem;
  color: var(--c-muted);
}

/* Logo: Höhe aus dem Customizer, Breite ergibt sich aus dem Seitenverhältnis */
.brand__logo {
  display: block;
  width: auto;
  height: var(--logo-h-mobile, 34px);
  max-width: min(62vw, 18rem);
  object-fit: contain;
  object-position: left center;
}
@media (min-width: 56rem) {
  .brand__logo {
    height: var(--logo-h, 44px);
    max-width: 24rem;
  }
}

.nav-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.6rem;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.4rem;
  height: 1.5px;
  background: var(--c-text);
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile-Menü */
.site-nav {
  position: fixed;
  inset: calc(var(--header-h) + env(safe-area-inset-top, 0px) + var(--wp-admin--admin-bar--height, 0px)) 0 auto 0;
  padding: 1.5rem var(--gutter) 2.5rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  transform: translateY(-.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.site-nav.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.site-nav__link {
  display: block;
  padding: .7rem 0;
  font-family: var(--f-serif);
  font-size: 1.6rem;
  text-decoration: none;
}
.site-nav__list .btn { margin-top: 1rem; align-self: flex-start; }

@media (min-width: 56rem) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    padding: 0;
    background: none;
    border: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  .site-nav__link {
    position: relative;
    padding: .25rem 0;
    font-family: var(--f-sans);
    font-size: .95rem;
  }
  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-med) var(--ease);
  }
  .site-nav__link:hover::after,
  .site-nav__link.is-active::after { transform: scaleX(1); }
  .site-nav__list .btn { margin-top: 0; margin-left: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  min-height: 34rem;
  height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
  max-height: 60rem;
  overflow: hidden;
  background: var(--c-text);
  color: var(--c-on-image);
}

.hero__slides,
.hero__slide {
  position: absolute;
  inset: 0;
}
.hero__slide {
  opacity: 0;
  background: #4a453f;
  transition: opacity 1.4s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 7s linear;
}
.hero__slide.is-active img { transform: scale(1); }

/* Lesbarkeits-Verlauf, nur unten links */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 26, 23, .72) 0%, rgba(28, 26, 23, .25) 45%, rgba(28, 26, 23, 0) 70%),
    linear-gradient(to right, rgba(28, 26, 23, .35) 0%, rgba(28, 26, 23, 0) 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  align-self: end;
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 0 var(--gutter) 7.5rem;
}

.hero__title {
  font-family: var(--f-serif);
  font-size: var(--fs-hero);
  font-weight: 340;
  line-height: .98;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 72;
  margin-bottom: 1.5rem;
}
.hero__title span {
  display: block;
  opacity: 0;
  transform: translateY(.35em);
  animation: hero-line 1.1s var(--ease) forwards;
}
.hero__title span:nth-child(2) { animation-delay: .18s; padding-left: .55em; }
.hero__title span:nth-child(3) { animation-delay: .36s; padding-left: 1.1em; }

@keyframes hero-line {
  to { opacity: 1; transform: none; }
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: rgba(253, 251, 247, .9);
}

.hero__controls {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 1.25rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.hero__caption {
  display: none;
  margin: 0;
  font-size: var(--fs-sm);
  color: rgba(253, 251, 247, .8);
}
.hero__count { font-variant-numeric: tabular-nums; margin-right: .75rem; }

.hero__buttons { display: flex; gap: .5rem; order: 2; }

.hero__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(253, 251, 247, .45);
  border-radius: 50%;
  background: rgba(28, 26, 23, .15);
  color: var(--c-on-image);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hero__btn:hover { background: rgba(253, 251, 247, .15); border-color: var(--c-on-image); }
.hero__btn svg {
  width: 1.1rem; height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__btn--pause .icon-play { display: none; }
.hero__btn--pause[aria-pressed="true"] .icon-play { display: block; fill: currentColor; stroke: none; }
.hero__btn--pause[aria-pressed="true"] .icon-pause { display: none; }

.hero__dots { display: flex; gap: .25rem; order: 1; }
.hero__dot {
  position: relative;
  width: 2.25rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hero__dot::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: rgba(253, 251, 247, .35);
}
.hero__dot::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0;
  height: 2px;
  background: var(--c-on-image);
}
.hero__dot[aria-current="true"]::after { width: 100%; }
.hero.is-playing .hero__dot[aria-current="true"]::after {
  width: 0;
  animation: dot-progress var(--slide-duration, 6000ms) linear forwards;
}
@keyframes dot-progress { to { width: 100%; } }

@media (min-width: 48rem) {
  .hero__content { padding-bottom: 8.5rem; }
  .hero__caption { display: block; }
  .hero__dots { order: 2; margin-left: auto; }
  .hero__buttons { order: 3; }
}

/* ---------- Sektionen allgemein ---------- */
.section { padding-block: var(--section-space); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.section-title {
  font-family: var(--f-serif);
  font-size: var(--fs-xl);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 380;
  margin-bottom: 1.25rem;
}
.section-text {
  max-width: 36rem;
  color: var(--c-muted);
  font-size: var(--fs-md);
  line-height: 1.55;
}

@media (min-width: 56rem) {
  .section-head--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 3rem;
    max-width: none;
  }
  .section-head--split .section-title { margin-bottom: 0; }
}

/* ---------- Kommerzielle Fotografie ---------- */
.commercial__intro {
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
  line-height: 1.45;
  font-weight: 350;
  max-width: 38ch;
}

.commercial__grid {
  display: grid;
  gap: 4.5rem;
}

.service__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--c-sand);
  margin-bottom: 1.75rem;
}
.service__media img { width: 100%; height: 100%; object-fit: cover; }

.service__body { max-width: 32rem; }
.service__title {
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.service__kicker {
  margin: .25rem 0 1.25rem;
  color: var(--c-accent-strong);
  font-weight: 500;
}
.service__list {
  margin-top: 1.5rem;
  border-top: 1px solid var(--c-line);
}
.service__list li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--c-line);
  font-size: .975rem;
}

@media (min-width: 48rem) {
  .commercial__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    row-gap: clamp(4rem, 8vw, 7rem);
    align-items: start;
  }
  .service--hochzeit  { grid-column: 1 / span 6; grid-row: 1; }
  .service--festival  { grid-column: 8 / span 5; grid-row: 1; margin-top: clamp(6rem, 12vw, 12rem); }
  .service--corporate { grid-column: 3 / span 5; grid-row: 2; }
}

/* ---------- Freie Arbeiten ---------- */
.projects { background: var(--c-bg-alt); }

.projects__grid {
  display: grid;
  gap: 1rem;
}

.project.is-hidden { display: none; }
.project.is-revealing { animation: project-in .7s var(--ease) both; }
@keyframes project-in {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: none; }
}

.project__link {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  color: var(--c-on-image);
  text-decoration: none;
  background: var(--c-sand);
}
.project__media {
  aspect-ratio: 4 / 3;
  height: 100%;
}
.project--tall .project__media { aspect-ratio: 4 / 5; }
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85);
  transition: transform 1.2s var(--ease), filter var(--t-med) var(--ease);
}

.project__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 3rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(28, 26, 23, .7), rgba(28, 26, 23, 0));
}
.project__title {
  font-family: var(--f-serif);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.badge {
  display: inline-block;
  padding: .2rem .7rem;
  border: 1px solid rgba(253, 251, 247, .6);
  border-radius: var(--radius-pill);
  font-size: .8rem;
  line-height: 1.4;
  backdrop-filter: blur(4px);
}

.project__title::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: .35rem;
  background: currentColor;
  transition: width var(--t-med) var(--ease);
}

@media (hover: hover) {
  .project__link:hover img { transform: scale(1.04); filter: saturate(1); }
  .project__link:hover .project__title::after { width: 100%; }
}
.project__link:focus-visible { outline-offset: -4px; outline-color: var(--c-on-image); }
.project__link:focus-visible .project__title::after { width: 100%; }

@media (min-width: 40rem) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(14rem, 30vw, 20rem);
  }
  .project__media,
  .project--tall .project__media { aspect-ratio: auto; }
  .project--wide,
  .project--full { grid-column: span 2; }
  .project--tall { grid-row: span 2; }
}

@media (min-width: 64rem) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(16rem, 22vw, 21rem);
    gap: 1.25rem;
  }
  .project--full { grid-column: 1 / -1; }
}

.projects__more {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}
.projects__more[hidden] { display: none; }

/* ---------- Über mich ---------- */
.about__grid {
  display: grid;
  gap: 3rem;
}
.about__media {
  aspect-ratio: 4 / 5;
  max-width: 28rem;
  overflow: hidden;
  background: var(--c-sand);
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }

.about__body { max-width: 36rem; }
.about__body p { color: var(--c-text); }
.about__lead {
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
  line-height: 1.4;
  font-weight: 350;
  font-style: italic;
  margin-bottom: 1.5em !important;
}

@media (min-width: 56rem) {
  .about__grid {
    grid-template-columns: 5fr 6fr;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: center;
  }
  .about__media { max-width: none; }
}

/* ---------- Ablauf ---------- */
.process { background: var(--c-paper); }

.steps {
  display: grid;
  gap: 2.75rem;
  margin-bottom: clamp(5rem, 8vw, 8rem);
  counter-reset: none;
}
.step {
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-text);
}
.step__num {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--f-serif);
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 300;
  color: var(--c-accent);
}
.step__title {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.step p { color: var(--c-muted); max-width: 30rem; }

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
}

/* ---------- FAQ / Accordion ---------- */
.faq {
  display: grid;
  gap: 2rem;
}
.faq__title {
  font-family: var(--f-serif);
  font-size: var(--fs-lg);
}

.accordion { border-top: 1px solid var(--c-line); }
.accordion__item { border-bottom: 1px solid var(--c-line); }
.accordion__heading { font-size: inherit; }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.4rem 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}
.accordion__trigger:hover { color: var(--c-accent-strong); }

.accordion__icon {
  position: relative;
  flex: none;
  width: 1rem;
  height: 1rem;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med) var(--ease);
}
.accordion__icon::after { transform: rotate(90deg); }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: rotate(0deg); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-med) var(--ease);
}
.accordion__panel.is-open { grid-template-rows: 1fr; }
.accordion__inner {
  overflow: hidden;
}
.accordion__content {
  max-width: 40rem;
  padding-bottom: 1.5rem;
  color: var(--c-muted);
}
.accordion__content > * { margin: 0; }
.accordion__content > * + * { margin-top: .75em; }
.accordion__content ul,
.accordion__content ol { padding-left: 1.25em; }
.accordion__content ul { list-style: disc; }
.accordion__content ol { list-style: decimal; }
.accordion__content a { color: var(--c-accent-strong); }

@media (min-width: 56rem) {
  .faq { grid-template-columns: 4fr 8fr; gap: var(--gutter); }
}

/* ---------- Kontakt ---------- */
.contact { background: var(--c-bg-alt); }

.contact__grid {
  display: grid;
  gap: 3rem;
}
.contact__direct {
  margin-top: 2rem;
  color: var(--c-muted);
}
.contact__direct a {
  font-family: var(--f-serif);
  font-size: var(--fs-md);
  color: var(--c-text);
}

@media (min-width: 56rem) {
  .contact__grid { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 7rem); }
  .contact__intro { position: sticky; top: calc(var(--header-h) + 3rem); align-self: start; }
}

.form { display: grid; gap: 1.5rem; }
.form__row { display: grid; gap: 1.5rem; }
@media (min-width: 36rem) {
  .form__row--half { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: .45rem; }
.field label { font-size: .95rem; font-weight: 500; }
.field__optional { font-weight: 400; color: var(--c-muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.1rem;
  padding: .75rem .95rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-paper);
  color: var(--c-text);
  font: inherit;
  font-size: 1rem; /* verhindert iOS-Zoom */
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--c-accent); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent-strong);
  box-shadow: 0 0 0 3px rgba(180, 154, 118, .25);
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%;
  width: .5rem; height: .5rem;
  border-right: 1.5px solid var(--c-text);
  border-bottom: 1.5px solid var(--c-text);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select { padding-right: 2.5rem; cursor: pointer; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--c-error); }
.field__error {
  min-height: 0;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-error);
}
.field__error:empty { display: none; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: .75rem;
}
.field--check input {
  width: 1.25rem;
  min-height: 0;
  height: 1.25rem;
  margin-top: .2rem;
  padding: 0;
  border: 1px solid var(--c-muted);
  border-radius: 2px;
  background: var(--c-paper);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.field--check input::before {
  content: "";
  width: .7rem; height: .7rem;
  background: var(--c-text);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform var(--t-fast) var(--ease);
}
.field--check input:checked::before { transform: scale(1); }
.field--check label { font-weight: 400; font-size: .925rem; color: var(--c-muted); }
.field--check .field__error { grid-column: 2; }

.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__status { margin: 0; font-size: .95rem; }
.form__status:empty { display: none; }
.form__status.is-success { color: var(--c-success); }
.form__status.is-error { color: var(--c-error); }

.form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 3.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
}
.site-footer__brand {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 1.15rem;
  color: var(--c-text);
  line-height: 1.4;
}
.site-footer__brand span { font-family: var(--f-sans); font-size: var(--fs-sm); color: var(--c-muted); }

.social { display: flex; gap: .5rem; }
.social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-text);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.social a:hover { border-color: var(--c-accent-strong); color: var(--c-accent-strong); }
.social svg {
  width: 1.15rem; height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social svg .fill { fill: currentColor; stroke: none; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
}
.site-footer__legal p { margin: 0; }

@media (min-width: 56rem) {
  .site-footer__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .site-footer__legal { justify-content: flex-end; }
}

/* ---------- WordPress-Basics ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.projects__grid { grid-auto-flow: dense; }
.projects__more { flex-direction: column; align-items: center; gap: 1rem; }
.alignwide, .alignfull { max-width: none; }
.wp-block-image img { height: auto; }

/* ---------- Inhaltsseiten (Impressum, Datenschutz, Fallback) ---------- */
.page-content {
  padding-block: clamp(3.5rem, 3rem + 4vw, 7rem) var(--section-space);
}
.page-content__title {
  font-family: var(--f-serif);
  font-size: var(--fs-xl);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 380;
  margin-bottom: 2.5rem;
}

.prose {
  max-width: 42rem;
  font-size: var(--fs-base);
}
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--f-serif);
  line-height: 1.2;
  margin-top: 2em;
}
.prose h2 { font-size: var(--fs-lg); }
.prose h3 { font-size: var(--fs-md); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose a:not(.btn) { color: var(--c-accent-strong); }
.prose blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--c-accent);
  font-family: var(--f-serif);
  font-size: var(--fs-md);
  font-style: italic;
}

.post-list { display: grid; gap: 2.5rem; max-width: 42rem; }
.post-list__title { font-family: var(--f-serif); font-size: var(--fs-lg); margin-bottom: .5rem; }
.post-list__title a { text-decoration: none; }
.post-list__title a:hover { color: var(--c-accent-strong); }

/* ---------- Einzelprojekt ---------- */
.project-hero {
  padding-top: clamp(2.5rem, 2rem + 3vw, 5rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--c-muted);
  font-size: .95rem;
  text-decoration: none;
}
.back-link::before { content: "\2039\00a0"; }
.back-link:hover { color: var(--c-text); }

.project-hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.badge--dark {
  border-color: var(--c-line);
  color: var(--c-muted);
  backdrop-filter: none;
}
.project-hero__title {
  max-width: 18ch;
  font-family: var(--f-serif);
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.5rem);
  font-weight: 340;
  line-height: 1;
  letter-spacing: -.025em;
}

.project-body { margin-bottom: clamp(3.5rem, 3rem + 4vw, 7rem); }
.project-body .prose { font-size: var(--fs-md); line-height: 1.6; }

/* Galerie: Masonry über CSS-Spalten, Seitenverhältnisse bleiben erhalten */
.gallery-grid {
  columns: 1;
  column-gap: 1rem;
}
.gallery-grid__item {
  break-inside: avoid;
  margin-bottom: 1rem;
}
.gallery-grid__link {
  display: block;
  overflow: hidden;
  background: var(--c-sand);
  cursor: zoom-in;
}
.gallery-grid__link img {
  width: 100%;
  transition: transform 1.2s var(--ease), opacity var(--t-med) var(--ease);
}
@media (hover: hover) {
  .gallery-grid__link:hover img { transform: scale(1.025); }
}
@media (min-width: 40rem) { .gallery-grid { columns: 2; } }
@media (min-width: 64rem) { .gallery-grid { columns: 3; column-gap: 1.25rem; } .gallery-grid__item { margin-bottom: 1.25rem; } }

.project-nav {
  display: grid;
  gap: 1rem;
  margin-top: var(--section-space);
  padding-top: 2rem;
  border-top: 1px solid var(--c-line);
}
.project-nav a {
  display: block;
  text-decoration: none;
}
.project-nav__label { display: block; font-size: var(--fs-sm); color: var(--c-muted); }
.project-nav__title { font-family: var(--f-serif); font-size: var(--fs-lg); line-height: 1.2; }
.project-nav a:hover .project-nav__title { color: var(--c-accent-strong); }
.project-nav__next { text-align: right; }
@media (min-width: 48rem) { .project-nav { grid-template-columns: 1fr 1fr; } }

/* ---------- Lightbox ----------
   Feste Geometrie statt Prozent-Ketten: Das Bild füllt die Fläche zwischen
   Kopfleiste und Bildunterschrift immer maximal aus, ohne das Fenster zu sprengen. */
.lightbox {
  --lb-top: calc(3.75rem + env(safe-area-inset-top, 0px));
  --lb-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  --lb-side: .5rem;

  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: rgba(28, 26, 23, .97);
  color: var(--c-on-image);
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(28, 26, 23, .97); }
.lightbox[open] { animation: lightbox-in .3s var(--ease); }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 48rem) {
  .lightbox { --lb-side: calc(var(--gutter) + 3.75rem); }
}

.lightbox__bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--lb-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  font-size: var(--fs-sm);
  color: rgba(253, 251, 247, .75);
  z-index: 2;
}
.lightbox__count { font-variant-numeric: tabular-nums; }

.lightbox__stage {
  position: absolute;
  top: var(--lb-top);
  bottom: var(--lb-bottom);
  left: var(--lb-side);
  right: var(--lb-side);
}
.lightbox__figure {
  position: absolute;
  inset: 0;
  margin: 0;
}
.lightbox__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transition: opacity var(--t-fast) var(--ease);
}
.lightbox__img.is-loading { opacity: 0; }

.lightbox__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--lb-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 var(--gutter) env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(253, 251, 247, .75);
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(253, 251, 247, .35);
  border-radius: 50%;
  background: rgba(28, 26, 23, .5);
  color: var(--c-on-image);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.lightbox__btn:hover { background: rgba(253, 251, 247, .15); border-color: var(--c-on-image); }
.lightbox__btn svg {
  width: 1.1rem; height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox__btn--prev,
.lightbox__btn--next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.lightbox__btn--prev { left: .75rem; }
.lightbox__btn--next { right: .75rem; }
@media (min-width: 48rem) {
  .lightbox__btn--prev { left: var(--gutter); }
  .lightbox__btn--next { right: var(--gutter); }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero__title span { opacity: 1; transform: none; }
  .hero__slide img { transform: none; }
}
