/* Flora Marketing – Redesign „X1 Stängel“
   Tokens siehe HANDOFF.md */

/* ---------- Schriften (lokal, DSGVO) ---------- */
@font-face {
  font-family: 'The Bold Font';
  src: url(../assets/fonts/TheBoldFont-Free.otf) format('opentype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../assets/fonts/familjen-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../assets/fonts/familjen-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --c-dark: #1F4A33;
  --c-light: #E8F1E4;
  --c-yellow: #F2C230;
  --c-muted-on-dark: #BFD3C4;
  --c-muted-on-light: #2F5A43;
  --c-muted-on-light-2: #3A6650;
  --f-head: 'The Bold Font', sans-serif;
  --f-body: 'Familjen Grotesk', system-ui, sans-serif;
  --pad-x: 40px;
}

/* ---------- Basis ---------- */
body { margin: 0; }
a { color: var(--c-yellow); }
a:hover { color: var(--c-light); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

.page {
  font-family: var(--f-body);
  background: var(--c-dark);
  color: var(--c-light);
  overflow: hidden;
}

.head { font-family: var(--f-head); text-transform: uppercase; }

/* ---------- Header ---------- */
.site-header {
  padding: 24px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wordmark {
  color: var(--c-light);
  text-decoration: none;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px var(--pad-x) 96px; } /* ohne Kopfzeile: Abstand oben = Seitenrand */
.hero-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(52px, 9.5vw, 144px);
  line-height: 0.92;
  letter-spacing: 0;
  max-width: 11ch;
  width: min(766px, 100%);
}
/* Keimling (Inline-SVG, Farbe über currentColor) */
.hero-stem, .legal-stem { position: absolute; bottom: 0; width: auto; aspect-ratio: 380 / 722; color: var(--c-yellow); }
.hero-stem { right: 260px; height: min(520px, calc(100% - 64px)); }
/* Feste Linienstärke in Bildschirm-Pixeln, unabhängig von der Größe */
.hero-stem, .legal-stem { stroke-width: 5px; }
.hero-stem path, .legal-stem path { vector-effect: non-scaling-stroke; }
.hero-sticker {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: var(--c-yellow);
  color: var(--c-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.05;
  text-transform: uppercase;
  transform: rotate(-12deg);
  padding-top: 0.31em; /* Versalien optisch mittig (Unterlängen-Raum der Schrift) */
  box-sizing: border-box;
}
/* Hover: Schrift bleibt dunkel (globales a:hover würde sie hell machen), Sticker dreht sich gerade und wächst */
.hero-sticker { transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.hero-sticker:hover, .hero-sticker:focus-visible { color: var(--c-dark); transform: rotate(-4deg) scale(1.06); }

/* ---------- Intro ---------- */
.intro { background: var(--c-light); color: var(--c-dark); }
.intro-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 112px var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 40px 80px;
}
.intro-lead {
  margin: 0;
  flex: 1 1 480px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.4;
  font-weight: 500;
}
.intro-side {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-muted-on-light);
}
.intro-side p { margin: 0; }

/* ---------- Leistungen ---------- */
.services { padding: 112px var(--pad-x); }
.eyebrow {
  margin: 0 0 40px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--c-yellow);
}
.service-list { border-top: 2px solid var(--c-yellow); }
.service {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 48px;
  padding: 12px 0;
  border-bottom: 2px solid var(--c-yellow);
}
.service h3 {
  margin: 0;
  flex: 1 1 560px;
  font-weight: 900;
  font-size: clamp(40px, 6.2vw, 92px);
  line-height: 1;
  /* Optischer Ausgleich: Schrift reserviert Raum für Unterlängen. Nicht entfernen. */
  position: relative;
  top: 0.135em;
}
.service ul {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 0 1 380px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-muted-on-dark);
}

/* ---------- Team ---------- */
.team { padding: 32px var(--pad-x) 128px; }
.team-title {
  margin: 0 0 56px;
  font-weight: 900;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1;
}
.team-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
}

.flip {
  flex: 0 1 40%;
  min-width: 300px;
  max-width: 460px; /* Desktop: Bögen wachsen nicht weiter mit dem Fenster */
  color: var(--c-dark);
  perspective: 2400px;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.flip--florian { height: 528px; --arch: var(--c-light); }
.flip--mira { height: 554px; --arch: var(--c-yellow); }

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 600ms cubic-bezier(0.45, 0, 0.55, 1);
  transform-style: preserve-3d;
}
.flip-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 9999px 9999px 0 0;
  overflow: hidden;
  background: var(--arch);
}
.flip-front { text-align: center; }
.flip-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 132px 40px 20px;
  box-sizing: border-box;
}
.flip-back p {
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.5;
  max-width: 52ch;
  text-align: justify;
  text-align-last: center;
  -webkit-hyphens: manual;
  hyphens: manual;
  opacity: 0;
  transition: opacity 150ms linear;
}

/* Umdrehen: Hover (nur Geräte mit Maus), Tastaturfokus, Tippen (.is-flipped) */
@media (hover: hover) {
  .flip-left:hover .flip-inner { transform: rotateY(-180deg); }
  .flip-right:hover .flip-inner { transform: rotateY(180deg); }
  .flip:hover .flip-back p { opacity: 1; transition: opacity 300ms linear 300ms; }
}
.flip-left:focus-visible .flip-inner,
.flip-left.is-flipped .flip-inner { transform: rotateY(-180deg); }
.flip-right:focus-visible .flip-inner,
.flip-right.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip:focus-visible .flip-back p,
.flip.is-flipped .flip-back p { opacity: 1; transition: opacity 300ms linear 300ms; }
.flip:focus-visible .flip-face { box-shadow: inset 0 0 0 3px var(--c-dark); }

.card-intro { padding: 72px 32px 0; }
.card-intro h3 {
  margin: 0;
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
}
.card-intro p {
  margin: 8px auto 0;
  font-size: 19px;
  line-height: 1.4;
  max-width: 24ch;
}
.card-photo {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.card-photo img { display: block; width: 100%; mix-blend-mode: multiply; }
.flip--florian .card-photo { bottom: -24px; width: 100%; max-width: 430px; }
.flip--mira .card-photo { bottom: 0; width: 92%; max-width: 360px; }

/* ---------- Kontakt ---------- */
.contact { background: var(--c-yellow); color: var(--c-dark); }
.contact-inner {
  padding: 112px var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 48px 80px;
  align-items: flex-end;
}
.contact-text { flex: 1 1 560px; }
.contact-kicker { margin: 0; font-weight: 800; font-size: 24px; }
.contact-title {
  margin: 8px 0 0;
  font-weight: 900;
  font-size: clamp(52px, 8vw, 116px);
  line-height: 0.95;
}
.contact-copy { margin: 32px 0 0; font-size: 19px; line-height: 1.55; max-width: 40ch; }

.contact-form { flex: 1 1 360px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; }
.field input,
.field textarea {
  font: inherit;
  font-size: 18px;
  padding: 12px 0;
  border: 0;
  border-bottom: 3px solid var(--c-dark);
  border-radius: 0;
  background: transparent;
  color: var(--c-dark);
}
.field textarea { resize: vertical; min-height: 3.2em; }
.check { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--c-dark); }
.check a, .contact a { color: var(--c-dark); }
.check a:hover, .contact a:hover { color: var(--c-dark); text-decoration-thickness: 2px; }
.error { margin: -12px 0 0; font-size: 14px; font-weight: 500; color: #8A1C1C; }
.error[hidden] { display: none; }
.btn {
  align-self: flex-start;
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  /* The Bold Font reserviert Platz für Unterlängen: Versalien optisch mittig rücken */
  padding: calc(14px + 0.115em) 32px calc(14px - 0.115em);
  border: 0;
  border-radius: 4px;
  background: var(--c-dark);
  color: var(--c-yellow);
  cursor: pointer;
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover, .btn:focus-visible { transform: rotate(-3deg) scale(1.05); }
.btn:active { transform: rotate(-3deg) scale(0.97); transition-duration: 80ms; }
.btn:focus-visible { outline-color: var(--c-dark); }
.contact input:focus-visible, .contact textarea:focus-visible { outline-color: var(--c-dark); }

/* ---------- Footer ---------- */
.site-footer { padding: 28px var(--pad-x); display: flex; gap: 24px; font-size: 14px; }
.site-footer a { color: var(--c-muted-on-dark); }
.site-footer a:hover { color: var(--c-light); }

/* ---------- Danke-Seite ---------- */
.thanks {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 24px var(--pad-x) 96px;
  display: flex;
  flex-direction: column;
}
.thanks-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 40px; }
.thanks-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(52px, 9.5vw, 144px);
  line-height: 0.92;
  max-width: 12ch;
}
.thanks .site-footer { padding: 0; }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.legal-hero { position: relative; padding: 24px var(--pad-x) 112px; }
.legal-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(40px, 13vw, 144px);
  line-height: 0.92;
  overflow-wrap: anywhere;
}
.legal-stem { right: 120px; height: 260px; }

.page:has(.legal) { overflow: visible; }
.legal { background: var(--c-light); color: var(--c-dark); }
.legal-inner {
  padding: 96px var(--pad-x) 128px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-muted-on-light);
  overflow-wrap: break-word;
}
.legal-lead {
  margin: 0 0 40px;
  color: var(--c-dark);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.3;
  font-weight: 500;
}
.legal-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 68ch);
  gap: 16px 80px;
  padding: 24px 0 56px;
  border-top: 2px solid var(--c-dark);
}
.legal-block:last-child { padding-bottom: 0; }
.legal-block h2 {
  margin: 0;
  align-self: start;
  position: sticky;
  top: 24px;
  color: var(--c-dark);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  max-width: 22ch;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.legal-text { -webkit-hyphens: auto; hyphens: auto; }
.legal-text > :first-child { margin-top: 0; }
.legal-text > :last-child { margin-bottom: 0; }
.legal-text p, .legal-text ul { margin: 0 0 16px; }
.legal-text ul { padding-left: 1.2em; }
.legal-text li + li { margin-top: 6px; }
.legal-text h3, .legal-text h4 {
  color: var(--c-dark);
  font-weight: 500;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.legal-text h3 { margin: 40px 0 10px; font-size: 21px; line-height: 1.3; }
.legal-text h4 { margin: 24px 0 6px; font-size: 17px; line-height: 1.4; }
.legal-text strong { color: var(--c-dark); font-weight: 500; }
.legal-text a { color: var(--c-dark); }
.legal-text a:hover { color: var(--c-dark); text-decoration-thickness: 2px; }
.legal-text a:focus-visible { outline-color: var(--c-dark); }
@media (max-width: 1000px) {
  .legal-block { grid-template-columns: minmax(0, 1fr); }
  .legal-block h2 { position: static; max-width: none; }
}
.site-footer a[aria-current="page"] { color: var(--c-light); text-decoration: none; }

/* ---------- Responsive ---------- */
/* Tablet: zu wenig Platz neben der Headline -> Sticker unter die Headline, Keimling rechts unten */
@media (max-width: 1279px) {
  .hero-stem { right: 40px; height: min(416px, calc((100% - 64px) * 0.8)); }
  .hero-sticker { position: relative; right: auto; bottom: auto; margin: 40px 0 0; }
}
@media (max-width: 1100px) {
  .legal-hero { padding-bottom: 168px; }
  .legal-stem { height: 150px; }
  .flip-back { padding: 96px 28px 16px; }
  .flip-back p { font-size: 15px; }
}
@media (max-width: 720px) {
  .hero-stem, .legal-stem { stroke-width: 3.5px; }
  .site-header { display: none; }
  .site-header--sub { display: flex; padding: 24px 24px 8px; }
  .hero { padding: 48px 24px 56px; }
  .legal-hero { padding: 24px 24px 168px; }
  .legal-stem { right: 32px; }
  .legal-inner { padding: 64px 24px 96px; font-size: 16px; }
  .site-footer { flex-wrap: wrap; gap: 12px 24px; }
  .hero-stem { right: 32px; height: 200px; }
  .hero-sticker {
    position: relative;
    right: auto;
    bottom: auto;
    width: 128px;
    height: 128px;
    margin: 32px 0 0;
    font-size: 15px;
    transform: rotate(-8deg);
  }
}
/* 500–720 px: Keimling 20 % größer als mobil */
@media (min-width: 500px) and (max-width: 720px) {
  .hero-stem { height: 240px; }
}
@media (max-width: 600px) {
  .flip-back p { font-size: 14px; }
}
/* Kleine Displays (< 680 px): Bögen bleiben nebeneinander und überlappen seitlich.
   Alles in den Karten skaliert über --u (1 Design-Pixel einer 300 px breiten Karte).
   Reihe = 2 × 300 − 72 Überlappung = 528 Design-Pixel = volle Breite.
   Eine aktive (umgedrehte) Karte wächst über --uc auf Originalgröße, damit der Text lesbar ist. */
@property --uc { syntax: '<length>'; inherits: true; initial-value: 1px; }
@media (max-width: 679px) {
  .team { padding-left: 24px; padding-right: 24px; }
  .team-cards { container-type: inline-size; flex-wrap: nowrap; }
  .flip {
    --u: min(1px, calc(100cqw / 528));
    --uc: var(--u);
    position: relative;
    flex: none;
    min-width: 0;
    max-width: none;
    width: calc(300 * var(--u));
    height: calc(var(--h) * var(--u));
    transition: --uc 450ms cubic-bezier(0.45, 0, 0.55, 1), z-index 0s linear 450ms;
  }
  .flip--florian { --h: 528; }
  /* Überlappung wächst fließend: 0 bei ≥ 600 px Platz, bis 72 Design-Pixel */
  .flip--mira { --h: 554; margin-left: min(0px, calc(100cqw - 600 * var(--u))); }
  .flip.is-flipped, .flip:focus-visible {
    --uc: min(1px, calc(100cqw / 300));
    z-index: 2;
    transition-delay: 0s, 0s;
  }
  .flip-inner {
    position: absolute;
    width: calc(300 * var(--uc));
    height: calc(var(--h) * var(--uc));
    bottom: calc(var(--h) * (var(--u) - var(--uc)) / 2);
  }
  .flip--florian .flip-inner { left: 0; }
  .flip--mira .flip-inner { right: 0; }
  .card-intro { padding: calc(72 * var(--uc)) calc(32 * var(--uc)) 0; }
  /* Florians Text in den sichtbaren Teil seiner Karte rücken (Mira verdeckt rechts --ov) */
  .flip--florian { --ov: max(0px, calc(600 * var(--u) - 100cqw)); }
  .flip--florian .card-intro { padding-left: calc(16 * var(--uc)); padding-right: calc(16 * var(--uc) + var(--ov)); }
  .card-intro h3 { font-size: calc(38 * var(--uc)); }
  .card-intro p { margin-top: calc(8 * var(--uc)); font-size: max(10px, calc(19 * var(--uc))); }
  .flip--florian .card-photo { bottom: calc(-24 * var(--uc)); max-width: calc(430 * var(--uc)); }
  .flip--mira .card-photo { max-width: calc(360 * var(--uc)); }
  .flip-back { padding: calc(96 * var(--uc)) calc(28 * var(--uc)) calc(16 * var(--uc)); }
  .flip-back p { font-size: calc(14 * var(--uc)); }
}
@media (max-width: 679px) and (hover: hover) {
  .flip:hover {
    --uc: min(1px, calc(100cqw / 300));
    z-index: 2;
    transition-delay: 0s, 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flip, .flip-inner, .flip-back p, .hero-sticker, .btn { transition: none; }
}
