/* Marelle Studio
   Grüntöne aus dem Design, enge Grotesk (Inter Tight) für Headlines,
   Instrument Serif kursiv für betonte Wörter, Inter für Text. */

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Farben aus dem Design */
  --ink: #16211a;
  --forest: #223b26;
  --forest-hell: #2f4d33;
  --moos: #4f6b32;
  --salbei: #8da35d;
  --salbei-hell: #c9d5a8;
  --nebel: #e3e9cd;
  --papier: #f0f3e1;
  --creme: #f7f8ee;
  --text-weich: #3f4e40;
  --linie: rgba(34, 59, 38, 0.18);
  --fehler: #9b2c1f;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;

  --text-hero: clamp(3.25rem, 1.2rem + 7.4vw, 8.25rem);
  --text-h2: clamp(2.4rem, 1.4rem + 3.8vw, 5rem);
  --text-h3: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  --text-lead: clamp(1.15rem, 1.05rem + 0.45vw, 1.45rem);

  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --section: clamp(5rem, 3rem + 7vw, 10rem);
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 4.25rem);
  --max: 86rem;

  --radius: 28px;
  /* Kurven nach Emil Kowalski: kräftiges ease-out für UI, ease-in-out für Bewegung auf der Fläche */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* transitions.dev: Fehler-Wackeln und Erfolgshaken */
  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

img,
svg,
picture,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

h1 em,
h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.02em;
}

p {
  text-wrap: pretty;
}

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

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--salbei-hell);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--forest);
  color: var(--creme);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-weich);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 1rem 2.1rem;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--creme);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}

.btn:active,
.choice:active span {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--forest-hell);
  }
}

.btn--line {
  background: transparent;
  color: var(--forest);
}

@media (hover: hover) and (pointer: fine) {
  .btn--line:hover {
    background: var(--forest);
    color: var(--creme);
  }
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.75;
}

/* Kopfzeile */

.site-header {
  position: relative;
  z-index: 10;
  color: var(--forest);
}

.site-header--over {
  position: absolute;
  inset: 0 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) var(--s-4);
}

.logo {
  display: inline-flex;
  flex-direction: column;
  margin: 0 auto 0 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.logo__word {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.6rem + 1.6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.logo__sub {
  margin: 0.55rem 0 0 0.12em;
  font-size: clamp(0.8rem, 0.75rem + 0.25vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.24em;
}

.site-nav ul {
  display: flex;
  gap: var(--s-6);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  white-space: nowrap;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav__toggle {
  display: none;
}

/* Handy und Tablet: Menü als Glas-Dropdown */
@media (max-width: 64rem) {
  .site-header__inner {
    gap: var(--s-3);
  }

  .no-js .site-nav {
    display: none;
  }

  .site-nav {
    position: relative;
  }

  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 3.1rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(240, 243, 225, 0.55);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--forest);
    font: 500 1rem/1 var(--font-text);
    cursor: pointer;
    transition: transform 160ms var(--ease-out);
  }

  .site-nav__toggle:active {
    transform: scale(0.97);
  }

  /* transitions.dev Menü-Dropdown: wächst aus der Ecke des Knopfs, nie aus scale(0) */
  .site-nav ul {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    gap: 0;
    min-width: 13rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    background: rgba(247, 248, 238, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 48px -28px rgba(34, 59, 38, 0.6);
    transform-origin: top right;
    transform: scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 150ms var(--ease-out),
      opacity 150ms var(--ease-out),
      visibility 0s linear 150ms;
  }

  .site-nav ul.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition:
      transform 220ms var(--ease-out),
      opacity 220ms var(--ease-out),
      visibility 0s linear 0s;
  }

  .site-nav a {
    width: 100%;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 12px;
  }
}

/* Fließender Hintergrund */

.flow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 35%, #7f9a4f 0%, transparent 70%),
    radial-gradient(50% 60% at 65% 85%, #a9bd7c 0%, transparent 70%),
    radial-gradient(70% 80% at 15% 20%, #eef2d6 0%, transparent 70%),
    linear-gradient(120deg, #e6ecca, #b9c98f);
}

.flow__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1200ms var(--ease-out);
}

.flow__canvas.is-ready {
  opacity: 1;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(9rem, 6rem + 10vh, 14rem);
  padding-bottom: clamp(5rem, 3rem + 6vh, 8rem);
}

.hero__eyebrow {
  color: var(--forest);
}

.hero__title {
  margin-top: clamp(1.5rem, 1rem + 2vw, 3rem);
  font-size: var(--text-hero);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.hero__line {
  display: block;
}

.hero__title em {
  display: inline-block;
  -webkit-text-stroke: 0.012em currentColor;
  padding: 0 0.06em 0.08em 0;
  font-size: 1.1em;
}

.hero__lead {
  margin-top: clamp(1.75rem, 1rem + 2vw, 3rem);
  max-width: 34ch;
  color: var(--forest);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.hero__cta {
  align-self: flex-start;
  margin-top: clamp(1.75rem, 1rem + 2vw, 3rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.hero__actions .btn--line {
  border-color: var(--forest);
  background: rgba(240, 243, 225, 0.45);
}

.scroll-btn {
  position: absolute;
  left: 50%;
  bottom: clamp(6rem, 5rem + 3vw, 8rem);
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-left: -1.625rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(240, 243, 225, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--forest);
  animation: nudge 2.4s var(--ease-in-out) 2s 3;
}

.scroll-btn svg {
  width: 1.4rem;
}

@keyframes nudge {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(6px); }
}

.hero__strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-6);
  padding-block: var(--s-6);
  border-top: 1px solid rgba(34, 59, 38, 0.22);
  /* Linie über die volle Breite, Text bündig mit dem Inhalt */
  max-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--forest);
}

.hero__strip p:first-child {
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

@media (max-width: 40rem) {
  .scroll-btn {
    display: none;
  }

  .hero__strip p:last-child {
    letter-spacing: 0.1em;
  }
}

/* Studio und Leistungen */

.studio {
  padding-block: var(--section);
}

.studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 2rem + 5vw, 8rem);
  align-items: start;
}

.studio__intro {
  position: sticky;
  top: var(--s-7);
  display: grid;
  justify-items: start;
  gap: var(--s-5);
}

.studio__title {
  font-size: var(--text-h2);
  max-width: 13ch;
}

.studio__text {
  max-width: 46ch;
  color: var(--text-weich);
  font-size: 1.125rem;
}

.services {
  border-bottom: 1px solid var(--linie);
}

.service {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--s-4);
  padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  border-top: 1px solid var(--linie);
}

.service__num {
  padding-top: 0.35rem;
  color: var(--moos);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.service__title {
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.service__text {
  margin-top: var(--s-3);
  max-width: 48ch;
  color: var(--text-weich);
}

@media (max-width: 60rem) {
  .studio__grid {
    grid-template-columns: 1fr;
  }

  .studio__intro {
    position: static;
  }
}

/* Abschnittsköpfe */

.section-head {
  display: grid;
  gap: var(--s-5);
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-title {
  font-size: var(--text-h2);
}

/* Arbeiten */

.work {
  padding-block: 0 var(--section);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 4rem) clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
}

.project--wide {
  grid-column: 1 / -1;
}

.project__link {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
}

.project__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--nebel);
}

.project__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

.project--wide .project__media img {
  aspect-ratio: 21 / 9;
}

@media (hover: hover) and (pointer: fine) {
  .project__link:hover img {
    transform: scale(1.03);
  }
}

.project__desc {
  margin-top: var(--s-3);
  max-width: 52ch;
  color: var(--text-weich);
}

.project__sticker {
  position: absolute;
  left: var(--s-5);
  top: var(--s-5);
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(240, 243, 225, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-4);
}

.project__name {
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project__what {
  color: var(--text-weich);
  font-size: 0.95rem;
}

@media (max-width: 45rem) {
  .work__grid {
    grid-template-columns: 1fr;
  }

  .project--wide .project__media img {
    aspect-ratio: 16 / 10;
  }
}

/* Ablauf: dunkles Waldgrün */

.process {
  background: var(--forest);
  color: var(--creme);
  padding-block: var(--section);
  --forest-on: var(--salbei-hell);
}

.process .eyebrow {
  color: var(--salbei-hell);
}

.process :focus-visible {
  outline-color: var(--creme);
}

.process__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  counter-reset: step;
}

.process__list li {
  padding-top: var(--s-5);
  border-top: 1px solid rgba(240, 243, 225, 0.25);
  counter-increment: step;
}

.process__list li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--s-5);
  color: var(--salbei);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
}

.process__list h3 {
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.process__list p {
  margin-top: var(--s-3);
  max-width: 34ch;
  color: var(--salbei-hell);
}

@media (max-width: 60rem) {
  .process__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--s-7);
  }
}

@media (max-width: 38rem) {
  .process__list {
    grid-template-columns: 1fr;
  }
}

/* Beweis */

.proof {
  background: var(--nebel);
  padding-block: var(--section);
}

.proof__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 1.5rem + 5vw, 8rem);
  align-items: start;
}

.proof__title {
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.75rem);
  max-width: 15ch;
}

.proof__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
}

.proof__list dt {
  padding-top: var(--s-4);
  border-top: 1px solid var(--linie);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.proof__list dd {
  margin-top: var(--s-2);
  color: var(--text-weich);
}

@media (max-width: 60rem) {
  .proof__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 38rem) {
  .proof__list {
    grid-template-columns: 1fr;
  }
}

/* Fragen */

.faq {
  padding-block: var(--section);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 1rem + 5vw, 8rem);
  align-items: start;
}

.faq__grid .section-title {
  margin-top: var(--s-5);
}

.faq__list {
  border-bottom: 1px solid var(--linie);
}

.faq__item {
  border-top: 1px solid var(--linie);
}

.faq__item summary {
  position: relative;
  padding: var(--s-5) 3rem var(--s-5) 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -0.55rem;
  background:
    linear-gradient(var(--forest), var(--forest)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--forest), var(--forest)) center / 1.5px 100% no-repeat;
  transition: transform 300ms var(--ease-out);
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item[open] p {
  animation: faq-in 260ms var(--ease-out);
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
}

.faq__item p {
  max-width: 62ch;
  padding-bottom: var(--s-5);
  color: var(--text-weich);
}

@media (max-width: 60rem) {
  .faq__grid {
    grid-template-columns: 1fr;
  }
}

/* Kontakt */

.contact {
  padding-block: var(--section);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 1.5rem + 5vw, 7rem);
  align-items: start;
}

.contact__copy {
  display: grid;
  justify-items: start;
  gap: var(--s-5);
}

.contact .eyebrow {
  color: var(--forest);
}

.contact__title {
  font-size: var(--text-h2);
  max-width: 12ch;
}

.contact__lead {
  max-width: 36ch;
  color: var(--forest);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.contact__booking {
  display: grid;
  justify-items: start;
  gap: var(--s-3);
  max-width: 36ch;
  color: var(--forest);
}

.contact__mail {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact__panel {
  padding: clamp(1.4rem, 1rem + 2vw, 2.75rem);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  background: rgba(247, 248, 238, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -40px rgba(34, 59, 38, 0.55);
}

@media (max-width: 60rem) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* Formular */

.form {
  display: grid;
  gap: var(--s-5);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}

.field {
  display: grid;
  gap: var(--s-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.field__optional {
  color: var(--text-weich);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(34, 59, 38, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font: inherit;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.field input::placeholder {
  color: #6b7868;
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(34, 59, 38, 0.18);
}

.field__error {
  color: var(--fehler);
  font-size: 0.9rem;
  font-weight: 500;
}

.t-error-msg {
  display: none;
}

.t-input-wrap.is-error .t-error-msg {
  display: block;
}

.t-input.is-error input {
  border-color: var(--fehler);
}

.t-input.is-shaking {
  animation: t-input-shake calc(var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2) linear;
}

@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.choices legend {
  width: 100%;
  margin-bottom: var(--s-2);
}

.choice {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(34, 59, 38, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}

.choice input:checked + span {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--creme);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

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

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-5);
}

.form__note {
  flex: 1 1 15rem;
  color: var(--text-weich);
  font-size: 0.875rem;
  line-height: 1.45;
}

.form__status:empty {
  display: none;
}

.form__status.is-error {
  padding: var(--s-3) var(--s-4);
  border-radius: 12px;
  background: rgba(155, 44, 31, 0.08);
  color: var(--fehler);
  font-weight: 500;
}

.form-done {
  display: grid;
  justify-items: start;
  gap: var(--s-4);
  padding-block: var(--s-5);
}

.form-done:focus {
  outline: none;
}

.form-done__check {
  width: 3.75rem;
  height: 3.75rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--creme);
}

.form-done__title {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
}

.form-done__text {
  max-width: 44ch;
  color: var(--text-weich);
}

/* transitions.dev: Erfolgshaken (ohne Überschwingen) */
.t-success-check {
  display: inline-block;
  opacity: 0;
}

.t-success-check svg {
  overflow: visible;
}

.t-success-check svg path {
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
}

.t-success-check[data-state="in"] {
  animation:
    t-check-fade 550ms var(--ease-out) forwards,
    t-check-rotate 550ms var(--ease-out) forwards,
    t-check-blur 500ms var(--ease-out) forwards;
}

.t-success-check[data-state="in"] svg path {
  animation: t-check-draw 550ms var(--ease-out) 80ms forwards;
}

@keyframes t-check-fade { to { opacity: 1; } }
@keyframes t-check-rotate { from { transform: rotate(80deg); } to { transform: rotate(0); } }
@keyframes t-check-blur { from { filter: blur(10px); } to { filter: blur(0); } }
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 38rem) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

/* Fußzeile */

.site-footer {
  background: var(--forest);
  color: var(--creme);
  padding-block: var(--s-8) var(--s-6);
}

.site-footer :focus-visible {
  outline-color: var(--creme);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-7) var(--s-6);
}

.logo--footer {
  color: var(--creme);
}

.site-footer__claim {
  margin-top: var(--s-5);
  color: var(--salbei-hell);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.site-footer__nav {
  display: flex;
  gap: var(--s-8);
}

.site-footer__nav a {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__copy {
  grid-column: 1 / -1;
  padding-top: var(--s-5);
  border-top: 1px solid rgba(240, 243, 225, 0.2);
  color: var(--salbei-hell);
  font-size: 0.875rem;
}

@media (max-width: 45rem) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Rechtliche Seiten und 404 */

.legal {
  padding-block: clamp(2rem, 1rem + 4vw, 5rem) var(--section);
}

.legal__inner {
  max-width: var(--max);
}

.legal h1 {
  font-size: var(--text-h2);
}

.legal h2 {
  margin-top: var(--s-7);
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.legal p,
.legal ul,
.legal address {
  margin-top: var(--s-3);
  max-width: 68ch;
  color: var(--text-weich);
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal .legal__stand {
  margin-top: var(--s-8);
  font-size: 0.875rem;
}

.todo {
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: #f3e3a3;
  color: var(--ink);
  font-weight: 600;
}

.notfound {
  justify-content: center;
}

.notfound .hero__title {
  font-size: clamp(3rem, 1.5rem + 6vw, 7rem);
}

/* Einblenden beim Scrollen (nur mit JavaScript) */

.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal-armed .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Hero-Auftritt */

.js .hero__eyebrow,
.js .hero__line,
.js .hero__lead,
.js .hero__cta {
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(8px);
  animation: rise 800ms var(--ease-expo) forwards;
}

.js .hero__line:nth-child(1) { animation-delay: 80ms; }
.js .hero__line:nth-child(2) { animation-delay: 150ms; }
.js .hero__line:nth-child(3) { animation-delay: 220ms; }
.js .hero__lead { animation-delay: 340ms; transform: translateY(14px); }
.js .hero__cta { animation-delay: 410ms; transform: translateY(14px); }

@keyframes rise {
  to { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Bewegung raus, sanftes Ein- und Ausblenden bleibt */
  .reveal-armed .reveal {
    transform: none;
    transition: opacity 300ms ease;
    transition-delay: 0ms;
  }

  .js .hero__eyebrow,
  .js .hero__line,
  .js .hero__lead,
  .js .hero__cta {
    transform: none;
    filter: none;
    animation: fade-in 400ms ease forwards;
  }

  .site-nav ul {
    transform: none;
  }

  .scroll-btn,
  .t-input.is-shaking,
  .faq__item[open] p {
    animation: none;
  }

  .project__media img,
  .btn,
  .choice span {
    transition-property: background-color, color, opacity;
  }

  .t-success-check[data-state="in"] {
    animation: fade-in 300ms ease forwards;
  }

  .t-success-check svg path {
    stroke-dashoffset: 0;
    animation: none !important;
  }
}

@keyframes fade-in {
  to { opacity: 1; }
}
