/* Kontakt page: the three ways in the hero window, phone and mail in poster size, the form, the steps after. Shared tokens and blocks come from ../css/site.css. */

:root { --wein: #780022; }

/* ---------- Hero: the three ways take turns in the window, each word gains weight as its colour opens ---------- */
.kt-hero { --hero-fit: 12.2; --hero-fit-m: 4.6; --window-bg: var(--gelb); }
.way-slide { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; row-gap: 3cqh; padding: 0 max(84px, 14cqh); color: var(--nacht); }
.way-slide--gelb { background: var(--gelb); }
.way-slide--rosa { background: var(--rosa); }
.way-slide--creme { background: var(--creme); }
.js .way-slide:not(.is-top) { clip-path: circle(0 at 50% 50%); } /* opened by js as a circle; a slide that has opened keeps clip-path none inline */
.way-slide__num { position: absolute; left: max(40px, 12cqh); top: 50%; transform: translateY(-50%); font-size: max(13px, 5cqh); font-weight: 600; letter-spacing: 0.06em; }
.way-slide__word { font-size: 40cqh; line-height: 0.9; font-weight: 700; letter-spacing: -0.045em; white-space: nowrap; }
.way-slide__value { font-size: max(14px, 7cqh); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }

/* ---------- 01 Direkt: phone and mail in poster size ---------- */
.posterways { display: grid; gap: var(--space-5); container-type: inline-size; }
.posterway { display: grid; gap: var(--space-1); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.posterway__label { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.posterway__label .icon { width: 18px; height: 18px; }
.posterway__value { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; line-height: 1; font-weight: 300; letter-spacing: -0.04em; white-space: nowrap; }
.posterway__value--phone { font-size: calc(100cqw / 7.9); }
.posterway__value--mail { font-size: calc(100cqw / 11.9); }
html:not(.has-lens) .posterway__value:hover, .posterway__value:focus-visible { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
.lens-char { display: inline-block; white-space: pre; } /* pre keeps the space in "0152 23257674" */
.direct__where { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.direct__where > .icon { width: 20px; height: 20px; }
.direct__where .text-link { color: var(--fg); }

/* ---------- 01 Nachricht: form on the left, the guided way on the right ---------- */
.message__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.form-stage { grid-column: 1 / 8; position: relative; }
.form { display: grid; gap: var(--space-5); }
.field { position: relative; display: grid; gap: var(--space-1); }
.field__label { font-size: var(--t-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--muted); transition: color var(--dur-fast-out) linear, font-weight var(--dur-moderate-out) var(--ease-exit); }
.field.is-filled .field__label, .field:focus-within .field__label { color: var(--fg); font-weight: 700; transition: color var(--dur-fast) linear, font-weight var(--dur-moderate) var(--ease-enter); }
.field__input {
  width: 100%;
  min-height: 56px;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: clamp(1.375rem, 2vw, 1.875rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: box-shadow var(--dur-fast-out) var(--ease-exit);
}
.field__input--area { min-height: 140px; resize: vertical; line-height: 1.35; }
.field__input::placeholder { color: color-mix(in oklab, var(--nacht) 45%, var(--creme)); }
/* Focus: the underline grows to a 3 px accent line (the visible focus indicator of the fields). */
.field__input:focus { outline: none; box-shadow: inset 0 -3px 0 0 var(--accent); transition: box-shadow var(--dur-fast) var(--ease-enter); }
.field__hint { font-size: var(--t-small); color: var(--muted); }
.field__error { display: flex; align-items: center; gap: 8px; font-size: var(--t-small); font-weight: 600; color: var(--wein); }
.field__error::before { content: "!"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--round); background: var(--wein); color: var(--creme); font-size: 0.75rem; font-weight: 800; flex: none; }
.field__error[hidden] { display: none; }
.field.is-invalid .field__input { border-bottom-color: var(--wein); box-shadow: inset 0 -3px 0 0 var(--wein); }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.form__privacy { max-width: 38ch; font-size: var(--t-small); color: var(--muted); }
.form__privacy .text-link { min-height: 0; color: var(--fg); }
/* The send button is not the main action (Koralle is reserved): Nachtblau on Creme, inverted on hover. */
.button--send { background: var(--nacht); color: var(--creme); transition: background-color var(--dur-fast-out) linear, color var(--dur-fast-out) linear; }
.button--send:hover { background: var(--blau); transition-duration: var(--dur-fast); }
.button--send[aria-busy="true"] { cursor: progress; }
.button--send[aria-busy="true"] .icon { animation: send-wait 900ms var(--ease-move) infinite alternate; }
@keyframes send-wait { to { transform: translateX(6px); } }
.form__status:empty { display: none; }
.form__status { font-size: var(--t-small); font-weight: 600; color: var(--wein); }

/* Confirmation: a Blau circle grows out of the send button over the form (JS sets the clip). */
.sent {
  position: absolute;
  inset: calc(-1 * var(--space-4));
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--blau);
  color: var(--creme);
  --fg: var(--creme); --accent: var(--gelb); --logo-ring: var(--creme); --logo-core: var(--gelb); --logo-big: var(--creme); --logo-small: var(--gelb);
}
.sent[hidden] { display: none; }
.sent:focus { outline: none; }
.sent__mark svg { width: 72px; height: 72px; overflow: visible; }
.sent__title { font-size: clamp(2.25rem, 4vw, 3.75rem); line-height: 1.04; font-weight: 300; letter-spacing: -0.025em; text-wrap: balance; }
.sent__text { max-width: 44ch; color: color-mix(in oklab, var(--creme) 82%, var(--blau)); }
.sent__again { color: var(--creme); }

.aside { grid-column: 9 / 13; display: grid; gap: var(--space-7); align-content: start; }
.alt {  display: grid; gap: var(--space-3); justify-items: start; padding-top: var(--space-3); border-top: 1px solid var(--fg); }
.alt__label { font-size: var(--t-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.alt__title { font-size: clamp(1.75rem, 2.4vw, 2.375rem); line-height: 1.08; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.alt__text { color: var(--muted); text-wrap: pretty; }
.alt__cta { margin-top: var(--space-2); }

/* ---------- 03 Danach: three steps on one line, their weight grows as the answer gets more concrete ---------- */
.next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); position: relative; padding-top: var(--space-4); }
.next::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--fg); transform-origin: 0 50%; }
.next__step { position: relative; display: grid; align-content: start; gap: var(--space-2); padding-right: var(--space-4); }
.next__step::before { content: ""; position: absolute; left: 0; top: calc(-1 * var(--space-4) - 7px); width: 16px; height: 16px; border-radius: var(--round); background: var(--fg); }
.next__num { font-size: var(--t-small); font-weight: 600; letter-spacing: 0.04em; }
.next__title { font-size: clamp(2.25rem, 1rem + 2.9vw, 4.25rem); line-height: 1; font-weight: var(--w); letter-spacing: -0.035em; text-wrap: balance; }
.next__text { max-width: 30ch; color: var(--muted); text-wrap: pretty; }
.js .next:not(.is-drawn)::before { transform: scaleX(0); }
.js .next::before { transition: transform 1.2s var(--ease-move); }
.after__terms { margin-top: var(--space-8); padding-top: var(--space-4); border-top: 1px solid var(--line); max-width: 30ch; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .next { grid-template-columns: 1fr; row-gap: var(--space-6); padding-top: 0; padding-left: var(--space-5); }
  .next::before { left: 7px; right: auto; top: 8px; bottom: 0; width: 2px; height: auto; transform-origin: 50% 0; }
  .js .next:not(.is-drawn)::before { transform: scaleY(0); }
  .next__step::before { left: calc(-1 * var(--space-5)); top: 0.2em; }
  .form-stage { grid-column: 1 / -1; }
  .aside { grid-column: 1 / -1; margin-top: var(--space-7); }
}

/* ---------- Phone: own composition ---------- */
@media (max-width: 640px) {
  .way-slide { padding: 0 0 52px; row-gap: 10px; }
  .way-slide__num { left: 50%; top: 16px; transform: translateX(-50%); font-size: 13px; }
  .way-slide__word { font-size: 15cqw; }
  .way-slide__value { font-size: 15px; }
  .posterway__value--phone { font-size: calc(100cqw / 7.4); }
  .posterway__value--mail { font-size: calc(100cqw / 11.3); }
  .direct__where { display: grid; justify-items: start; }

  .form { gap: var(--space-4); }
  .field__input { font-size: 1.375rem; }
  .form__foot { flex-direction: column; align-items: stretch; }
  .form__foot .button { width: 100%; }
  .sent { inset: calc(-1 * var(--space-2)) calc(-1 * var(--margin)); padding: var(--space-5) var(--margin); }
  .alt__cta { width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; }

  .next__title { font-size: 2.25rem; }
  .after__terms { margin-top: var(--space-7); }
}

@media (prefers-reduced-motion: reduce) {
  .posterway__value, .field__label, .field__input { transition-duration: 0ms; }
  .button--send[aria-busy="true"] .icon { animation: none; }
  .js .next::before { transition: none; }
  .js .next:not(.is-drawn)::before { transform: none; }
}

/* Ohne JavaScript kann das Formular nicht senden (der Hinweis im noscript nennt die Mail). Der Knopf fuehrte dann auf eine
   weisse Fehlerseite "405 Not Allowed" (POST auf die statische Seite, gemessen 2026-11-01); ohne JS bleibt er weg. */
html:not(.js) .button--send { display: none; }

/* ---------- Short form extras: optional phone, consent box ---------- */
.field__opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.consent { display: grid; gap: var(--space-1); }
.consent__label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: var(--t-small); color: var(--muted); cursor: pointer; text-wrap: pretty; }
.consent__box { appearance: none; width: 24px; height: 24px; margin: 0; border: 1px solid var(--fg); border-radius: 0; background: transparent; display: grid; place-content: center; cursor: pointer; }
.consent__box::after { content: ""; width: 12px; height: 12px; background: var(--fg); transform: scale(0); transition: transform var(--dur-fast-out) var(--ease-exit); }
.consent__box:checked::after { transform: scale(1); transition: transform var(--dur-fast) var(--ease-enter); }
.consent__box:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent .text-link { min-height: 0; color: var(--fg); }

/* ---------- Termin ausmachen: dialog ---------- */
.termin { width: min(560px, calc(100vw - 2 * var(--margin))); max-height: calc(100dvh - 2 * var(--space-3)); overflow: auto; margin: auto; padding: var(--space-5); border: 1px solid var(--fg); border-radius: 0; background: var(--creme); color: var(--fg); }
.termin::backdrop { background: color-mix(in oklab, var(--nacht) 70%, transparent); }
.termin__form { display: grid; gap: var(--space-4); }
.termin__head { display: flex; justify-content: space-between; align-items: start; gap: var(--space-3); }
.termin__title { font-size: clamp(1.75rem, 2.4vw, 2.375rem); line-height: 1.08; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.termin__title:focus { outline: none; }
.termin__close { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--fg); font-size: 2rem; line-height: 1; cursor: pointer; }
.termin__text { color: var(--muted); text-wrap: pretty; }
.termin__slots { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.termin__day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.termin__dayname { flex: 0 0 100%; font-size: var(--t-small); font-weight: 600; }
.termin__slot { position: relative; }
.termin__slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.termin__slot span { display: grid; place-items: center; min-width: 76px; min-height: 48px; padding: 0 14px; border: 1px solid var(--fg); font-weight: 500; }
.termin__slot input:checked + span { background: var(--nacht); color: var(--creme); }
.termin__slot input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.termin__slot input:disabled + span { opacity: 0.4; text-decoration: line-through; }
.termin__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.termin__done { display: grid; gap: var(--space-4); }
.termin__done:focus { outline: none; }
.termin .field__input { font-size: 1.375rem; }
@media (max-width: 640px) {
  .termin { padding: var(--space-4) var(--margin); width: calc(100vw - 2 * var(--space-2)); }
  .termin .button { width: 100%; }
}
.termin__form[hidden], .termin__done[hidden] { display: none; }
