/* Lirel.ch  Kontaktseite (Formular). Baut auf den Tokens aus styles.css auf.
   Felder mit denselben Werten wie im Konfigurator (editor.css), damit sich alles gleich anfühlt. */

.kontakt [hidden] { display: none !important; }
.kontakt { padding-block: clamp(32px, 7vw, 104px) clamp(64px, 10vw, 128px); }

/* Desktop: Einleitung links, Formular rechts. Handy: Einleitung, Formular, E-Mail-Adresse untereinander. */
.kontakt-grid {
  width: min(1080px, 100% - 32px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); grid-template-rows: auto auto 1fr;
  grid-template-areas: "intro card" "faq card" "direct card"; gap: 0 clamp(40px, 7vw, 112px); align-items: start;
}
.kontakt-intro { grid-area: intro; display: grid; justify-items: start; padding-top: clamp(8px, 2vw, 24px); }
.kontakt-intro .mark { width: 64px; height: 63px; color: var(--accent); margin-bottom: 22px; }
.kontakt-intro .mark svg, .sent .mark svg { width: 100%; height: 100%; }
.kontakt-intro h1 { font-size: clamp(2.5rem, 5.2vw, 4.2rem); margin-top: 14px; text-wrap: balance; }
.kontakt-intro .lead { margin-top: 20px; font-size: 1.12rem; max-width: 40ch; overflow-wrap: anywhere; }

.kontakt-direct { grid-area: direct; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 2px; max-width: 40ch; }
.kontakt-direct .k { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.kontakt-direct a { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.3; color: var(--accent-strong); text-decoration: none; text-underline-offset: 4px; justify-self: start; }
.kontakt-direct a:hover { text-decoration: underline; }

.kontakt-card {
  grid-area: card; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); scroll-margin-top: calc(var(--nav-h) + 16px);
}
#kontakt-form { display: grid; gap: 22px; }

/* Felder (wie editor.css) */
.field { display: grid; gap: 7px; align-content: start; scroll-margin-top: calc(var(--nav-h) + 18px); }
.field > label { font-size: 0.88rem; font-weight: 700; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1.0625rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--r-input); padding: 13px 15px; min-height: 52px;
  transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 168px; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.help { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.help span:last-child:not(:first-child) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.help .near { color: var(--accent-strong); font-weight: 700; }
.error { display: none; font-size: 0.86rem; font-weight: 600; color: #a5392f; }
.field.invalid input, .field.invalid textarea { border-color: #a5392f; }
.field.invalid .error { display: block; }
.field.invalid .help#hint-email { display: none; }

/* Worum geht es? Drei grosse Auswahl-Chips (Radio), auf dem Handy untereinander, Auswahl deutlich gefüllt */
.topic { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.topic legend { padding: 0; font-size: 0.88rem; font-weight: 700; margin-bottom: 10px; }
.topic-chips { display: grid; grid-template-columns: 1fr; gap: 10px; }
.chip { position: relative; display: block; min-width: 0; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip span {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--ink);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
/* Rundes Auswahlzeichen wie ein Radio-Knopf, damit die Auswahl auch ohne Farbe erkennbar ist */
.chip span::before { content: ""; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); box-sizing: border-box; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.chip input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.chip input:checked + span::before { border-color: var(--accent-ink); background: var(--accent-ink); box-shadow: inset 0 0 0 4px var(--accent-strong); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.topic-help { font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
@media (min-width: 480px) { .topic-chips { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .chip span { justify-content: flex-start; } }

/* Schnelle Antworten: FAQ wie auf der Startseite, als Aufklapp-Liste */
.kontakt-faq { grid-area: faq; margin-top: 40px; max-width: 46ch; display: grid; gap: 12px; }
.kontakt-faq .faq { display: grid; }
.kontakt-faq details { border-top: 1px solid var(--line); }
.kontakt-faq details:last-child { border-bottom: 1px solid var(--line); }
.kontakt-faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 700; font-size: 1rem; line-height: 1.4; min-height: 56px; -webkit-tap-highlight-color: transparent;
}
.kontakt-faq summary::-webkit-details-marker { display: none; }
.kontakt-faq summary i { flex: 0 0 auto; font-size: 1.2rem; color: var(--accent); transition: transform 0.35s var(--ease); }
.kontakt-faq details[open] summary i { transform: rotate(45deg); }
.kontakt-faq details p { padding: 0 0 18px; color: var(--ink); line-height: 1.65; overflow-wrap: anywhere; }
.kontakt-faq a { color: var(--ink); text-underline-offset: 3px; }
.kontakt-faq .faq-more { font-size: 0.9rem; color: var(--muted); }

/* Honigtopf: ausserhalb des Bildschirms statt display:none (manche Bots überspringen versteckte Felder) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.privacy { font-size: 0.86rem; line-height: 1.55; color: var(--muted); margin-top: -4px; }
.privacy a, .notice a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.notice {
  border-radius: var(--r-input); padding: 14px 16px; font-size: 0.92rem; line-height: 1.55;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.notice.err { background: color-mix(in srgb, #a5392f 8%, var(--surface)); border-color: color-mix(in srgb, #a5392f 36%, transparent); }
.notice strong { display: block; margin-bottom: 2px; }
.notice:focus { outline: none; }
.submit { width: 100%; }

/* Danke-Zustand */
.sent { display: grid; justify-items: center; text-align: center; padding: clamp(18px, 4vw, 40px) 0; animation: kontakt-in 0.9s var(--ease) both; }
.sent .mark { width: 52px; height: 52px; color: var(--accent); margin-bottom: 20px; }
.sent h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-wrap: balance; }
.sent h2:focus { outline: none; }
.sent p { margin-top: 14px; max-width: 36ch; overflow-wrap: anywhere; }
.sent .btn { margin-top: 28px; }
@keyframes kontakt-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .kontakt-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "intro" "card" "faq" "direct"; }
  .kontakt-faq { max-width: none; margin-top: 44px; }
  .kontakt-intro { padding-top: 0; margin-bottom: 28px; }
  .kontakt-intro .mark { width: 52px; height: 51px; margin-bottom: 16px; }
  .kontakt-intro .lead { font-size: 1.06rem; }
  .kontakt-direct { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .sent { animation: none; }
  .chip span, .chip span::before, .kontakt-faq summary i { transition: none; }
}
