/* finklenburg.ch – Richtung A «Höhenlinien» */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3EFE6;
  --ink: #1C1B19;
  --muted: #5A564E;
  --line: #D8D2C4;
  --field: #77715F;
  --accent: #2E4A3B;
  --contour: #C2BAA8;
  --error: #A3261E;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151513;
    --ink: #ECE7DC;
    --muted: #A39E92;
    --line: #34322D;
    --field: #8A8578;
    --accent: #8DB39C;
    --contour: #3B3934;
    --error: #E0796F;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--paper);
  padding: .5em 1em;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* Links mit Unterstreichung, die von links einläuft */
.link, .nav a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .3s ease;
  padding-bottom: 2px;
}
.link { background-size: 100% 1px; background-image: linear-gradient(var(--line), var(--line)); }
.link:hover, .link:focus-visible { background-image: linear-gradient(var(--accent), var(--accent)); }
.nav a:hover, .nav a:focus-visible { background-size: 100% 1px; }

/* Layout */
.site-header, main > section, .site-footer {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-block: 1.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.375rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .9375rem;
}

/* Hero */
.hero {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 2rem;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 7rem);
}

.eyebrow {
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
}

.hero__lead {
  margin-top: 2rem;
  max-width: 38ch;
  font-size: 1.1875rem;
  color: var(--muted);
}

.cta {
  display: inline-block;
  margin-top: 2rem;
  padding: .8em 1.5em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.cta:hover, .cta:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.hero__map {
  max-width: 420px;
  margin-left: auto;
  width: 80%;
}
.hero__map img, .hero__map svg { display: block; width: 100%; height: auto; }
.hero__map svg { stroke: var(--contour); }
.hero__map svg .accent { stroke: var(--accent); stroke-width: 1.4; }
.hero__map svg g { transition: transform .6s cubic-bezier(.2, .7, .2, 1); will-change: transform; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    min-height: min(78vh, 760px);
  }
  .hero__text { grid-column: 1 / 8; grid-row: 1; position: relative; z-index: 1; }
  .hero__map { grid-column: 7 / 13; grid-row: 1; max-width: none; width: 100%; }
}

/* Sektionen */
.section {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 2rem;
  padding-block: clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
}

.section__head h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.section__head p { margin-top: 1rem; color: var(--muted); max-width: 32ch; }

@media (min-width: 900px) {
  .section { grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; }
  .section__head { grid-column: 1 / 5; }
  .section > :not(.section__head) { grid-column: 6 / 13; }
}

.num {
  font-family: var(--serif);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}

/* Leistungen: Liste, Beschreibung klappt auf */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.service {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  column-gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.service .num { grid-row: 1 / 3; }
.service h3 { font-size: clamp(1.625rem, 3vw, 2.25rem); transition: transform .3s ease; }
.service__body p { margin-top: .75rem; max-width: 52ch; }
.service:focus-visible { outline-offset: -2px; }

@media (hover: hover) and (pointer: fine) {
  .service { cursor: default; }
  .service__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
  }
  .service__body > p { min-height: 0; overflow: hidden; }
  .service:hover .service__body,
  .service:focus-within .service__body,
  .service:focus .service__body { grid-template-rows: 1fr; }
  .service:hover h3, .service:focus h3 { transform: translateX(.5rem); }
}

/* Vorgehen: Zeitleiste */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.steps li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  column-gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.steps .num { grid-row: 1 / 3; font-size: 2.25rem; }
.steps h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); }

@media (min-width: 900px) {
  .section > .steps { grid-column: 1 / 13; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .steps li { grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
  .steps .num { grid-row: auto; margin-bottom: 1.5rem; }
}

/* Über uns */
.about__text p { font-size: 1.1875rem; max-width: 52ch; }

.about__photo { margin: 0; max-width: 360px; }
.photo-placeholder {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, var(--line) 14px 15px);
  color: var(--muted);
  font-size: .875rem;
}
.photo-placeholder span { background: var(--paper); padding: .25em .75em; }
.about__photo figcaption { margin-top: .75rem; font-size: .875rem; color: var(--muted); }

@media (min-width: 900px) {
  .section.about > .about__text { grid-column: 6 / 10; }
  .section.about > .about__photo { grid-column: 10 / 13; }
}

/* Kontakt */
.contact__direct { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
.contact__direct p { margin: 0; }
.contact__direct p + p { font-size: 1.0625rem; font-family: var(--sans); color: var(--muted); margin-top: .5rem; }

.contact__form { display: grid; gap: 1.25rem; max-width: 40rem; }
@media (min-width: 900px) {
  .section.contact > .contact__direct { grid-column: 6 / 13; }
  .section.contact > .contact__form { grid-column: 6 / 13; }
}

.field { display: grid; gap: .35rem; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--field);
  border-radius: 0;
  padding: .7em .8em;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.form-status[data-state="error"] { color: var(--error); }

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

.form-note { font-size: .875rem; color: var(--muted); }
.contact__form .cta { justify-self: start; margin-top: 0; }
.form-status { min-height: 1.6em; font-weight: 600; }
.form-status[data-state="ok"] { color: var(--accent); }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.clock { font-variant-numeric: tabular-nums; }

/* Unterseiten (Impressum, Datenschutz) */
.page { max-width: var(--max); margin-inline: auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
.page > * { max-width: 46rem; }
.page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 2rem; }
.page h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
.page ul { padding-left: 1.2em; }
.page .draft { border-left: 2px solid var(--accent); padding-left: 1rem; color: var(--muted); font-size: .9375rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
