/* =========================================================
   CarMa — Theme-CSS
   Tokens & Entscheidungen: siehe Obsidian-Vault
   03-Caro/Projekte/Carma-Website/DESIGN-SPEC.md
   ========================================================= */

/* ---------- Selbst gehostete Fonts (DSGVO, kein Google-CDN) ---------- */
/* .woff2-Dateien müssen manuell ergänzt werden — siehe README.md im Projektordner */
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Basis-Palette — vom Kunden vorgegeben, siehe DESIGN-SPEC.md */
  --color-petrol: #305c5a;
  --color-salbei: #a8c3af;
  --color-terracotta: #e6a08c;
  --color-sand: #ecd8a1;
  --color-off-white: #f3f7f4;
  --color-dark-neutral: #22302e;
  --color-white: #ffffff;

  /* Semantische Tokens */
  --color-bg: var(--color-off-white);
  --color-text: var(--color-dark-neutral);
  --color-heading: var(--color-petrol);
  --color-primary-bg: var(--color-petrol);
  --color-primary-text: var(--color-white);
  --color-section-alt-bg: var(--color-salbei);
  --color-accent-bg: var(--color-terracotta);
  --color-accent-text: var(--color-dark-neutral);
  --color-card-bg: var(--color-sand);
  --color-card-text: var(--color-dark-neutral);
  --color-border: color-mix(in srgb, var(--color-salbei) 55%, var(--color-dark-neutral) 12%);

  /* Typografie */
  --font-display: "Comfortaa", sans-serif;
  --font-body: "Montserrat", sans-serif;

  /* Radius / Schatten — eine Skala, konsequent (better-ui Shape Consistency Lock) */
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-soft: 0 12px 30px -12px color-mix(in srgb, var(--color-petrol) 35%, transparent);

  /* Spacing */
  --space-section: clamp(3.5rem, 6vw, 6rem);
  --content-max: 1120px;
  --content-narrow: 640px;

  color-scheme: light;
}

/* ---------- Reset & Basis ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  font-size: 1rem;
}
img { max-width: 100%; display: block; }
a { color: var(--color-petrol); }
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-heading);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
/* Nur Comfortaa-Schnitte 400–600 verwenden (Risiko "kindisch" bei 700, siehe DESIGN-SPEC) */
h1 { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.15; font-weight: 500; }
h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 500; }
p { margin: 0 0 1em; text-wrap: pretty; max-width: 65ch; }
.preis, .price-num { font-variant-numeric: tabular-nums; }

/* ---------- Skip-Link & Fokus ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-petrol);
  color: var(--color-white);
  padding: 0.75em 1.25em;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible {
  outline: 3px solid var(--color-terracotta);
  outline-offset: 2px;
}

/* ---------- Layout-Grundbausteine ---------- */
.section { padding-block: var(--space-section); }
.section--alt { background: var(--color-section-alt-bg); color: var(--color-dark-neutral); }
.section--alt h2, .section--alt h3 { color: var(--color-dark-neutral); } /* Petrol-Text auf Salbei nicht fließtextgroß, siehe Kontrasttabelle */
.section-inner { max-width: var(--content-max); margin-inline: auto; padding-inline: 1.25rem; }
.section-inner--narrow { max-width: var(--content-narrow); }
.section-inner--split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .section-inner--split { grid-template-columns: 1fr 1fr; align-items: start; }
}
.section-lead { max-width: 50ch; }

/* Wiederkehrendes Soundwave-Motiv aus dem Logo — als leiser, aber
   erkennbarer Marken-Anker über zentralen Überschriften. Farbe steckt
   direkt in der jeweiligen SVG-Datei (waveform-terracotta.svg /
   waveform-petrol.svg), da bei <img>-Einbindung kein "currentColor"
   aus dem umgebenden CSS greift. */
.section-motif { opacity: 0.85; margin-bottom: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-lg);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--color-primary-bg);
  color: var(--color-primary-text); /* 7,5:1 Kontrast, siehe DESIGN-SPEC */
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  box-shadow: 0 18px 38px -10px color-mix(in srgb, var(--color-petrol) 50%, transparent);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-off-white) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px; /* Nav-Höhe unter 80px, siehe better-layout */
}
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-inline-end: auto;
}
.site-logo img { height: 38px; width: auto; display: block; }
.site-nav { display: none; gap: 1.5rem; }
.site-nav a { text-decoration: none; color: var(--color-dark-neutral); font-weight: 500; }
.site-nav a:hover { color: var(--color-petrol); }
.site-header__cta { display: none; }
.nav-toggle {
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  align-items: center;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-petrol); border-radius: 2px; }
.mobile-nav {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.5rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.mobile-nav a { padding: 0.6em 0; text-decoration: none; color: var(--color-dark-neutral); }
.mobile-nav[hidden] { display: none; }

@media (min-width: 860px) {
  .site-nav { display: flex; }
  .site-header__cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 5rem) var(--space-section);
  overflow: clip; /* Deko-Formen dürfen nicht scrollen/Layout sprengen */
}
/* Zwei weiche Farbflächen im Hintergrund — nehmen die Markenfarben auf,
   ohne den Textkontrast im Vordergrund zu berühren (rein dekorativ,
   liegt hinter dem Inhalt, siehe z-index). */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  filter: blur(6px);
}
.hero::before {
  width: clamp(280px, 38vw, 480px);
  aspect-ratio: 1;
  top: -12%;
  right: -8%;
  background: color-mix(in srgb, var(--color-terracotta) 35%, transparent);
}
.hero::after {
  width: clamp(200px, 26vw, 340px);
  aspect-ratio: 1;
  bottom: -18%;
  right: 18%;
  background: color-mix(in srgb, var(--color-salbei) 45%, transparent);
}
.hero .section-inner { position: relative; z-index: 1; }
.hero__claim { color: var(--color-petrol); }
.hero__subclaim { font-weight: 600; font-size: 1.125rem; max-width: 45ch; }
.hero__text { max-width: 65ch; }
.hero__text p { max-width: none; }

/* ---------- Sorgen-Flipcards ---------- */
.flipcard-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 2rem;
}
.flipcard {
  all: unset;
  cursor: pointer;
  height: 220px;
  border-radius: var(--radius-md);
  perspective: 1200px;
}
.flipcard__inner {
  position: relative;
  width: 100%; height: 100%;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flipcard[aria-pressed="true"] .flipcard__inner { transform: rotateY(180deg); }

/* Desktop/Maus: Karte dreht sich schon bei Hover bzw. Tastatur-Fokus.
   Gate auf (hover: hover) + (pointer: fine), damit Touch-Geräte (kein
   echtes Hover) nicht ein "hängendes" Hover-Flip bekommen — dort bleibt
   Tap (siehe carma.js/aria-pressed oben) der Auslöser. */
@media (hover: hover) and (pointer: fine) {
  .flipcard:hover .flipcard__inner,
  .flipcard:focus-visible .flipcard__inner {
    transform: rotateY(180deg);
  }
}

.flipcard__face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem; justify-content: center;
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.flipcard__face--front {
  background: var(--color-white);
  color: var(--color-dark-neutral);
  border: 1px solid var(--color-border);
}
.flipcard__face--back {
  background: var(--color-terracotta);
  color: var(--color-dark-neutral); /* nie weißer Text auf Terracotta, siehe Kontrasttabelle DESIGN-SPEC */
  transform: rotateY(180deg);
}
.flipcard__icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.flipcard-grid .flipcard:nth-of-type(3n+1) .flipcard__icon-badge { background: var(--color-sand); }
.flipcard-grid .flipcard:nth-of-type(3n+2) .flipcard__icon-badge { background: var(--color-salbei); }
.flipcard-grid .flipcard:nth-of-type(3n) .flipcard__icon-badge { background: color-mix(in srgb, var(--color-terracotta) 55%, var(--color-sand) 45%); }
.flipcard__icon { opacity: 0.8; }
.flipcard__cta { font-weight: 600; }
.flipcard__face--front:hover,
.flipcard:focus-visible .flipcard__face--front { box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--color-petrol) 40%, transparent); }

/* Hinweistext: zeigt, je nach Eingabegerät, die passende Interaktion */
.flipcard-hint { display: none; align-items: center; gap: 0.5em; }
.flipcard-hint svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-petrol); }
@media (hover: hover) and (pointer: fine) {
  .flipcard-hint--desktop { display: inline-flex; }
}
@media (hover: none), (pointer: coarse) {
  .flipcard-hint--mobile { display: inline-flex; }
}

/* Peek-Animation: einmaliger, dezenter Kipp-Hinweis auf der ersten Karte,
   sobald der Bereich beim Scrollen sichtbar wird — nur auf Touch-Geräten
   (Desktop kommuniziert die Interaktion bereits per Hover) und nur, wenn
   die Nutzerin keine reduzierte Bewegung eingestellt hat. Ausgelöst durch
   die Klasse "is-visible" (siehe carma.js, IntersectionObserver). */
@media (hover: none), (pointer: coarse) {
  @media (prefers-reduced-motion: no-preference) {
    .flipcard-grid.is-visible .flipcard:first-of-type .flipcard__inner {
      animation: flipcard-peek 1.1s ease-in-out 0.4s 1;
    }
  }
}
@keyframes flipcard-peek {
  0% { transform: rotateY(0deg); }
  40% { transform: rotateY(38deg); }
  65% { transform: rotateY(-12deg); }
  100% { transform: rotateY(0deg); }
}

/* ---------- Über mich ---------- */
.eyebrow-free-lead { font-weight: 600; }
.bullet-list { padding-left: 1.1em; }
.bullet-list li { margin-bottom: 0.4em; }
.merkmale { display: grid; gap: 1.25rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.merkmal {
  background: var(--color-card-bg);
  color: var(--color-card-text);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border-top: 3px solid color-mix(in srgb, var(--color-petrol) 35%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.merkmal:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.langtext :where(p) { max-width: none; }

/* ---------- Angebots-Karten ---------- */
.angebot-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-soft);
}
.angebot-card--sand { background: var(--color-card-bg); }
.angebot-frage { font-weight: 600; font-size: 1.125rem; max-width: 55ch; }
.ablauf-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1.5rem; }
@media (min-width: 700px) {
  .ablauf-list { grid-template-columns: repeat(2, 1fr); }
}
.ablauf-list li { background: var(--color-off-white); border-radius: var(--radius-md); padding: 1.25rem; }
.leistungen-grid { display: grid; gap: 1.5rem; margin: 2rem 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.leistung {
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leistung:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.angebot-preis { margin-top: 2rem; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.preishinweis { font-family: var(--font-body); font-weight: 400; font-size: 0.875rem; color: color-mix(in srgb, var(--color-dark-neutral) 75%, transparent); }
.angebot-bonus { font-style: italic; font-size: 0.95rem; }
.angebot-wichtig { background: var(--color-off-white); border-radius: var(--radius-md); padding: 1.25rem; margin: 1.5rem 0; }

/* ---------- FAQ-Akkordeon ---------- */
.faq-accordion { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 0.25rem 1.25rem;
  transition: box-shadow 0.2s ease;
}
.faq-item:hover { box-shadow: var(--shadow-soft); }
.faq-item[open] { box-shadow: var(--shadow-soft); }
.faq-item summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__answer { padding-bottom: 1.1rem; }

/* ---------- Warteliste-Formular ---------- */
.waitlist-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.form-field { display: grid; gap: 0.4em; }
.form-field label { font-weight: 600; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  font: inherit;
  font-size: 16px; /* iOS-Zoom-Fix, siehe UX-SPEC */
  padding: 0.75em 1em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-dark-neutral);
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-petrol); }
.optional { font-weight: 400; opacity: 0.7; }
.form-field--consent label { display: flex; gap: 0.6em; align-items: flex-start; font-weight: 400; }
.form-field--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status[data-state="success"] { color: var(--color-petrol); }
.form-status[data-state="error"] { color: #8a3324; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-bg); color: var(--color-primary-text); padding-block: 2.5rem; }
.site-footer a { color: var(--color-primary-text); }
.site-footer__inner {
  max-width: var(--content-max); margin-inline: auto; padding-inline: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center;
}
.site-footer__logo { height: 34px; width: auto; margin: 0 0 0.5rem; }
.site-footer__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Rechtsseiten ---------- */
.legal-page :where(h2) { margin-top: 1.5em; }
.legal-page :where(p, li) { max-width: 70ch; }

/* ---------- Motion: wenig, gezielt, reduced-motion-sicher ---------- */
@media (prefers-reduced-motion: no-preference) {
  .section { animation: none; } /* Platzhalter — Scroll-Reveal optional in carma.js ergänzen */
}
@media (prefers-reduced-motion: reduce) {
  .flipcard__inner { transition: none; }
  .btn { transition: none; }
}
