/* =====================================================================
   /anfrage/ und /anfrage/danke/: kurze Projektanfrage im Look der Startseite.
   Baut auf start.css auf; hier nur, was es dort nicht gibt. Klassen mit an-Praefix,
   Formularbausteine (feld, auswahl, pillen, einwilligung) wie auf tobias.social,
   hier auf hellem Grund.
   ===================================================================== */

/* ---------- Seitenkopf und Raster ---------- */
.an-hero { text-align: left; padding-bottom: clamp(64px, 8vw, 104px); }
.an-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.an-krumen { display: flex; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--ink-3); }
.an-krumen a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.an-hero h1 { font-size: clamp(40px, 4.8vw, 64px); max-width: none; margin: 0 0 18px; }
.an-hero .lead { margin: 0; max-width: 26em; }

/* ---------- Formular-Karte ---------- */
.an-formular {
  position: relative; display: grid; gap: 22px;
  padding: clamp(22px, 3.4vw, 36px); border-radius: var(--r-big);
  background: var(--paper); border: 1px solid var(--line-mid);
  box-shadow: 0 50px 90px -60px rgba(75, 24, 184, .45);
}
.feld { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.feld-label { padding: 0; font: 600 14px/1.4 Manrope, sans-serif; color: var(--ink); }
.optional { font-weight: 500; color: var(--ink-3); }
.feld input[type="text"], .feld input[type="email"], .feld input[type="tel"], .feld textarea {
  width: 100%; font: 16px/1.5 Manrope, sans-serif; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-mid); border-radius: var(--r-btn);
  padding: 12px 14px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.feld textarea { resize: vertical; min-height: 128px; }
.feld textarea::placeholder { color: #8E87A0; }
.feld input[type="text"]:focus, .feld input[type="email"]:focus, .feld input[type="tel"]:focus, .feld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); background: var(--paper); }
.feld.hat-fehler input[type="text"], .feld.hat-fehler input[type="email"], .feld.hat-fehler input[type="tel"], .feld.hat-fehler textarea, .feld.hat-fehler .auswahl-knopf { border-color: #B42318; }
.fehler { margin: 0; font-size: 13px; line-height: 1.45; color: #B42318; }
.an-paar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }

/* Eigenes Dropdown (Tastatur: Pfeile, Enter, Escape) */
.auswahl { position: relative; }
.auswahl-knopf {
  position: relative; width: 100%; text-align: left; font: 16px/1.5 Manrope, sans-serif; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-mid); border-radius: var(--r-btn);
  padding: 12px 44px 12px 14px; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.auswahl-knopf .leer { color: #8E87A0; }
.auswahl-knopf::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease); }
.auswahl-knopf[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
.auswahl-knopf:hover { border-color: var(--accent-soft); }
.auswahl-knopf:focus-visible, .auswahl-knopf[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); background: var(--paper); }
.auswahl-liste {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); list-style: none;
  padding: 6px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-mid);
  box-shadow: 0 24px 50px -20px rgba(23, 16, 43, .35); outline: none;
  transform-origin: top; animation: an-aufklappen .18s var(--ease);
}
.auswahl-liste[hidden] { display: none; }
.auswahl-liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 8px; color: var(--ink); font-size: 15px; cursor: pointer; }
.auswahl-liste li.aktiv { background: var(--tint-weak); }
.auswahl-liste .haken { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.auswahl-liste li[aria-selected="true"] { font-weight: 600; }
.auswahl-liste li[aria-selected="true"] .haken { opacity: 1; }
@keyframes an-aufklappen { from { opacity: 0; transform: scaleY(.96); } to { opacity: 1; transform: none; } }

/* Zeitrahmen als Pillen */
.pillen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 600px) { .pillen { grid-template-columns: minmax(0, 1fr); } }
.pille-wahl { position: relative; cursor: pointer; display: flex; }
.pille-wahl span { flex: 1; }
.pille-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pille-wahl span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 14px; border-radius: 8px;
  font: 600 14px/1.3 Manrope, sans-serif; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--line-mid);
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.pille-wahl:hover span { border-color: var(--accent-soft); }
.pille-wahl input:checked + span { background: var(--tint); border-color: var(--accent); color: var(--accent-deep); }
.pille-wahl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Einwilligung: eigenes Kaestchen, Haken als zentriertes SVG wie im Funnel */
.einwilligung { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--ink-2); cursor: pointer; }
.einwilligung input { position: absolute; left: 0; top: 0; width: 24px; height: 24px; opacity: 0; margin: 0; }
.einwilligung-box {
  position: relative; flex: none; width: 24px; height: 24px; margin-top: 0; border-radius: 6px;
  background: var(--paper); border: 2px solid var(--line-mid);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.einwilligung:hover .einwilligung-box { border-color: var(--accent-soft); }
.einwilligung input:checked + .einwilligung-box { background: var(--accent); border-color: var(--accent); }
.einwilligung input:checked + .einwilligung-box::after {
  content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}
.einwilligung input:focus-visible + .einwilligung-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.feld.hat-fehler .einwilligung-box { border-color: #B42318; }
.einwilligung a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.honig { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.an-senden { width: 100%; min-height: 54px; font-size: 16px; }
.an-senden[aria-busy="true"] { opacity: .75; cursor: progress; }
.an-senden[aria-busy="true"] .ic-pfeil { display: none; }
.status { margin: -8px 0 0; min-height: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.status:empty { display: none; }
.status.nein { padding: 12px 14px; border-radius: var(--r-btn); background: #FEF3F2; border: 1px solid #FECDCA; color: #B42318; }
.status a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Seitenspalte: Foto-Kaertchen und direkter Weg ---------- */
.an-seite { display: grid; gap: 16px; align-content: start; }
.an-person {
  position: relative; display: flex; align-items: center; gap: 18px;
  padding: 20px 22px; border-radius: var(--r-card); background: var(--paper); border: 1px solid var(--line-mid);
}
.an-foto { position: relative; flex: none; width: 64px; height: 64px; }
.an-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.an-foto .strom { inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.an-person-name { font: 500 19px/1.2 var(--head); letter-spacing: -.02em; color: var(--ink); }
.an-person-text { margin-top: 4px; font-size: 15px; line-height: 1.5; }
.an-notiz { position: absolute; right: 18px; top: -16px; padding: 2px 8px; background: var(--paper); font: 600 22px/1 Caveat, cursive; color: var(--accent); transform: rotate(-4deg); white-space: nowrap; }

.an-direkt { padding: 22px; border-radius: var(--r-card); background: var(--tint-weak); border: 1px solid var(--line); }
.an-direkt h2 { font-size: 22px; letter-spacing: -.02em; }
.an-direkt p { margin-top: 6px; font-size: 15px; }
.an-direkt-wege { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (min-width: 900px) {
  .an-raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; gap: 28px clamp(40px, 5vw, 72px); align-items: start; }
  .an-kopf { grid-column: 1; grid-row: 1; padding-top: 12px; }
  .an-formular { grid-column: 2; grid-row: 1 / span 2; }
  .an-seite { grid-column: 1; grid-row: 2; margin-top: 12px; }
  .an-paar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 759px) {
  .an-hero h1 { font-size: 40px; }
  .an-formular { padding: 22px 18px; }
  .an-notiz { right: 14px; }
}

/* ---------- Danke-Seite ---------- */
.seite-danke main { min-height: calc(100vh - 140px); min-height: calc(100svh - 140px); display: flex; align-items: center; }
.seite-danke main > .an-danke { width: 100%; }
.an-danke { text-align: center; padding-top: clamp(72px, 10vw, 120px); padding-bottom: clamp(64px, 9vw, 104px); }
.an-portrait { position: relative; display: block; width: 164px; height: 164px; margin: 0 auto 36px; }
.an-portrait img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.an-portrait .strom { inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); }
.an-danke-notiz { left: calc(100% + 64px); top: -8px; transform: rotate(-5deg); }
.an-danke-notiz svg { right: calc(100% + 4px); top: 18px; width: 58px; height: 44px; }
.an-danke h1 { font-size: clamp(40px, 6vw, 72px); }
.an-daumen { display: inline-block; transform-origin: 70% 80%; }
.an-danke .hero-knoepfe { margin-top: 32px; }
.an-zurueck { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.an-zurueck .ic { width: 16px; height: 16px; }

@media (max-width: 759px) {
  .an-danke-notiz { left: 50%; top: auto; bottom: -38px; transform: translateX(-50%) rotate(-3deg); }
  .an-danke-notiz svg { display: none; }
  .an-portrait { width: 140px; height: 140px; margin-bottom: 64px; }
  .an-danke .hero-knoepfe .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .auswahl-liste { animation: none; }
}
