/* ============================================================================
   KOMPONENTEN
============================================================================ */

/* ============================================================================
   Buttons
   Genau EIN gelber Button pro Bildschirmausschnitt. Gelb ist das einzige
   Signal auf der Seite, das "hier klicken" bedeutet – sobald es zweimal
   vorkommt, bedeutet es nichts mehr. Alles andere ist Outline oder Textlink.
   Schwarz auf Gelb erreicht 12,9:1 und ist damit auch bei Sonnenlicht auf dem
   Telefon noch klar lesbar.
============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  /* Mindestens 44px hoch – Apples/Googles Mindestmaß für Touch-Ziele. */
  min-height: 46px;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}

/* Kurzer, kleiner Hub statt großer Sprung: Der Button soll sich anfühlen wie
   eine echte Taste, nicht wie eine Animation. */
.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

/* Sekundär bewusst als Outline in Textfarbe – nicht in Gelb. Zwei gefüllte
   Buttons nebeneinander erzeugen Entscheidungsstau; ein gefüllter plus ein
   umrandeter macht die Rangfolge in Millisekunden klar. */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--text);
}

/* Für Einsatz auf invertierter (schwarzer bzw. weißer) Fläche */
.btn-invert {
  background: var(--surface-invert);
  color: var(--text-invert);
  border-color: var(--surface-invert);
}

.btn-invert:hover {
  background: var(--surface-invert);
  box-shadow: var(--shadow-md);
}

.btn-ghost-invert {
  background: transparent;
  color: var(--text-invert);
  border-color: var(--border-invert);
}

.btn-ghost-invert:hover {
  background: color-mix(in srgb, var(--text-invert) 12%, transparent);
  border-color: var(--text-invert);
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================================================
   Karten
============================================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard);
}

/* Hover in Textfarbe statt in Gelb: Auf einer Seite mit 4 Leistungskarten
   würden 4 gelbe Hover-Rahmen das Gelb entwerten. Die Karte reagiert über
   Rahmen + Anhebung; das Gelb erscheint nur an einer Stelle in der Karte –
   im Icon (siehe unten). */
.card:hover {
  transform: translateY(-4px);
  border-color: var(--text);
  box-shadow: var(--shadow-md);
}

.card > h3:first-child,
.card > h2:first-child {
  margin-top: 0;
}

/* Karte, die sich als Ganzes wie ein Link verhält (Referenzen, Leistungen) */
.card-linked {
  position: relative;
}

.card-linked .stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.icon-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: var(--space-5);
  transition: background-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard);
}

/* DAS gelbe Detail der Karte: erst bei Hover, genau ein Element, klar
   begrenzt. Belohnt die Interaktion, ohne die Ruhefläche zu stören. */
.card:hover .icon-badge {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.icon-badge svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: var(--fs-lg);
}

.service-card p {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Im Ruhezustand neutral unterstrichen. Vier gelbe Linien nebeneinander in
   einer Sektion würden das Gelb zur Grundfarbe machen – die Farbe kommt erst
   bei Hover, wenn sie tatsächlich einen Zustand bezeichnet. */
.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--text);
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-base) var(--ease-standard);
}

.card:hover .card-link,
.service-card .card-link:hover {
  border-bottom-color: var(--accent);
}

.service-card .card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease-standard);
}

.card:hover .card-link svg {
  transform: translateX(4px);
}

/* ============================================================================
   Preis-Karten
============================================================================ */
.price-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

/* Das empfohlene Paket wird invertiert (schwarz im Hell-, weiß im Dunkelmodus)
   statt gelb eingefärbt. Zwei Gründe: 1) Gelb als Fläche hinter Fließtext ist
   nicht lesbar. 2) Der Kontrastsprung lenkt den Blick zuverlässig in die Mitte
   – der "Ankereffekt" funktioniert über Kontrast, nicht über Buntheit. */
.price-card.is-featured {
  background: var(--surface-invert);
  border-color: var(--surface-invert);
  color: var(--text-invert);
  box-shadow: var(--shadow-lg);
}

.price-card.is-featured .price-note,
.price-card.is-featured .price-list li {
  color: var(--text-invert-muted);
}

/* Häkchen auf der Empfehlungskarte bewusst NICHT gelb: Sonst trägt eine
   einzige Karte Badge + fünf Häkchen + Button in Gelb – die Farbe verliert
   ihre Bedeutung genau dort, wo sie am meisten leisten soll. Gelb bleibt auf
   dieser Karte dem Label "Empfohlen" und dem Button vorbehalten. */
.price-card.is-featured .price-list .check {
  background: color-mix(in srgb, var(--text-invert) 12%, transparent);
  color: var(--text-invert);
  border-color: var(--border-invert);
}

.price-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.price-card h3 {
  font-size: var(--fs-lg);
}

.price-tag {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.price-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

.price-unit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.price-card.is-featured .price-unit {
  color: var(--text-invert-muted);
}

.price-note {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.price-card.is-featured .price-list {
  border-top-color: var(--border-invert);
}

.price-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--text-muted);
}

.price-card .btn {
  margin-top: var(--space-6);
}

/* Schiebt den Button aller Karten auf dieselbe Höhe, egal wie lang die
   Leistungsliste ist – ungleich hohe Buttons lesen sich als Schlamperei. */
.price-card .price-list {
  flex: 1 0 auto;
}

/* ============================================================================
   Häkchen-Listen
============================================================================ */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-6);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.check {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.check svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 640px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Badges / Tags
============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px var(--space-3);
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Das eine gelbe Label pro Sektion – hier: "Empfohlen" auf dem mittleren
   Paket. Schwarz auf Gelb, damit es auch klein lesbar bleibt. */
.badge-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* TODO-Marker: absichtlich hässlich und rot. Ein Platzhalter, der hübsch
   aussieht, geht irgendwann live. */
.badge-todo {
  background: var(--error-soft);
  border-color: color-mix(in srgb, var(--error) 45%, transparent);
  color: var(--error);
  text-transform: uppercase;
}

.badge-todo::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--error);
  flex-shrink: 0;
}

/* ============================================================================
   Bild-Platzhalter
============================================================================ */
.photo-frame {
  position: relative;
  overflow: clip;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(
    135deg,
    var(--surface-2) 0px,
    var(--surface-2) 10px,
    var(--surface) 10px,
    var(--surface) 20px
  );
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.photo-frame .placeholder-icon {
  width: 28%;
  height: 28%;
  max-width: 72px;
  max-height: 72px;
  opacity: 0.5;
}

.photo-frame .badge-todo {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.team-banner.photo-frame {
  border-radius: var(--radius-xl);
}

/* ============================================================================
   Zitat / Kundenstimme
============================================================================ */
.quote-card {
  background: var(--surface-invert);
  color: var(--text-invert);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-7);
}

.work-grid + .quote-card {
  margin-top: var(--space-7);
}

.quote-card blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  max-width: 40ch;
}

/* Gelbes Anführungszeichen: ein einzelnes grafisches Akzentelement, das das
   Zitat als Zitat markiert, ohne Text einzufärben. */
.quote-card blockquote::before {
  content: "„";
  display: block;
  font-size: 3.5rem;
  line-height: 0.6;
  margin-bottom: var(--space-4);
  color: var(--accent);
}

.quote-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-invert);
  font-size: var(--fs-sm);
  color: var(--text-invert-muted);
}

/* ============================================================================
   CTA-Banner
============================================================================ */
.cta-banner {
  position: relative;
  overflow: clip;
  border-radius: var(--radius-xl);
  padding: var(--space-9) var(--space-7);
  text-align: center;
  background: var(--surface-invert);
  color: var(--text-invert);
}

.cta-banner h2 {
  max-width: 22ch;
  margin-inline: auto;
}

.cta-banner p {
  max-width: 52ch;
  margin: var(--space-4) auto 0;
  color: var(--text-invert-muted);
}

.cta-banner .hero-actions {
  justify-content: center;
  margin-top: var(--space-7);
}

.cta-banner .hero-trust {
  justify-content: center;
  color: var(--text-invert-muted);
}

.cta-banner .hero-trust svg {
  color: var(--accent);
}

/* ============================================================================
   Formular
============================================================================ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* Label über dem Feld, nicht als Placeholder im Feld: Placeholder-Labels
   verschwinden beim Tippen, und wer beim Ausfüllen den Faden verliert, bricht
   ab. Bei einem Formular, das Anfragen bringt, ist das bare Münze. */
.form-field label {
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 13px var(--space-4);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: var(--text);
}

/* Fokus-Zustand in Gelb – ein "aktiver Zustand" im Sinne des Farbkonzepts.
   Der Rahmen ist ein Grafikelement, kein Text, deshalb ist Gelb hier zulässig;
   zusätzlich sichert die dunkle Outline aus base.css den Kontrast ab. */
.input:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.input {
  resize: vertical;
  min-height: 132px;
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 14px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--space-8);
}

.form-note {
  margin-top: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.form-note a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ============================================================================
   Anfrage-Modal
   Eine einzige, wiederverwendbare Formular-Komponente. Jeder Button mit
   [data-open-modal="anfrage-modal"] öffnet denselben Dialog (main.js) – das
   Formular gibt es nur einmal im DOM, egal wie viele CTAs darauf zeigen.
============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-standard), visibility 0s linear var(--dur-base);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-base) var(--ease-standard);
}

.modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: min(720px, 90vh);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-7) var(--space-6) var(--space-6);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--dur-base) var(--ease-standard);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal {
    transition: none;
  }
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}

.modal-close:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal h2 {
  font-size: var(--fs-xl);
  max-width: 26ch;
  padding-right: var(--space-7);
}

.modal-lede {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.modal-form {
  margin-top: var(--space-6);
}

/* Native Checkbox statt Eigenbau: accent-color übernimmt den Gelb-Akzent
   ohne zusätzliches Markup und bleibt per Tastatur bedienbar. Die ganze
   Zeile ist der Touch-Ziel-Bereich, nicht nur das kleine Kästchen. */
.modal-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: 44px;
  margin-bottom: var(--space-5);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  cursor: pointer;
}

.modal-consent input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.modal-consent a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

/* ============================================================================
   Kennzahlen-Kacheln
   Reduziert auf Zahl + Zeile. Die frühere Variante mit 3D-Neigung, Spotlight
   und rotierendem Farbrahmen ist bewusst entfallen: In einem
   High-Contrast-System mit einer einzigen Akzentfarbe wirken solche Effekte
   wie Effekt um des Effekts willen – und genau das unterstellt der Kunde einer
   Agentur ohnehin schon.
============================================================================ */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.stat-tile {
  padding-top: var(--space-5);
  border-top: 2px solid var(--text);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  color: var(--text);
}

.stat-label {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .stat-tiles {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ============================================================================
   Verwandte Leistungen (Unterseiten)
============================================================================ */
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
