/*
 * kontakt.css - das kurze Kontaktformular, in zwei Fassungen.
 *
 *   .ist-dunkel   der blaue Block auf der Startseite: schmal, zwei
 *                 Spalten, weiße Felder auf Navy
 *   .ist-hell     die Kontaktseite: weiß, deutlich mehr Platz, das
 *                 Namensfeld dreigeteilt statt untereinander
 *
 * Gemeinsam sind Felder, Abstände und Verhalten. Verschieden sind
 * Farben und Raster - mehr braucht es nicht, damit beide am
 * richtigen Platz richtig aussehen.
 */

.atu-kontakt {
  --k-navy:    #183650;
  --k-hell:    #34ccff;
  --k-akzent:  #0e6f9e;
  --k-text:    #434e57;
  --k-leise:   #68747d;
  --k-linie:   #dde3e8;
  --k-gruen:   #19783f;
  --k-rot:     #c0453c;
  --k-weich:   cubic-bezier(.22, .61, .36, 1);

  container-type: inline-size;
  box-sizing: border-box;
}
.atu-kontakt *,
.atu-kontakt *::before,
.atu-kontakt *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
   Kopf
   --------------------------------------------------------------------------- */

.atu-kontakt-kopf { margin-bottom: 22px; }
.atu-kontakt-kopf h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.atu-kontakt-kopf p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------------
   Das Raster

   Grundform: eine Spalte. Ab 420 Pixeln Breite des Blocks zwei, ab
   760 sechs - gemessen am Block selbst, nicht am Fenster. Dasselbe
   Formular steht einmal in einer halben Seite und einmal in einer
   ganzen; nach der Fensterbreite zu gehen träfe immer nur eines von
   beiden.
   --------------------------------------------------------------------------- */

.atu-kontakt-raster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 16px;
}
/* Ein Feld. Der Name hiess einmal .kf - zu kurz: kopf/kopf.css
   benutzt .kf fuer den Kopfbereich der Seite, und dessen Regeln
   (min-height 500px, dunkler Grund, 112px Polster oben) landeten
   auf jedem Feld dieses Formulars. Auf der Startseite stehen
   beide Dateien, dort war das Formular dadurch zerrissen. */
.atu-kf { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

@container (min-width: 420px) {
  .atu-kontakt-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atu-kf-ganz { grid-column: 1 / -1; }
}

@container (min-width: 760px) {
  .atu-kontakt-raster { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .atu-kf-klein { grid-column: span 2; }
  .atu-kf-halb  { grid-column: span 3; }
  .atu-kf-ganz  { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------
   Felder
   --------------------------------------------------------------------------- */

.atu-kontakt label {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
}
.atu-kontakt input[type="text"],
.atu-kontakt input[type="tel"],
.atu-kontakt input[type="email"],
.atu-kontakt select,
.atu-kontakt textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--k-linie);
  border-radius: 12px;
  background: #fff;
  font: 400 15px/1.35 inherit;
  color: var(--k-text);
  transition: border-color .18s var(--k-weich), box-shadow .18s var(--k-weich);
}
.atu-kontakt textarea { resize: vertical; min-height: 118px; }
.atu-kontakt ::placeholder { color: #9aa5ae; }

.atu-kontakt select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a757e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  cursor: pointer;
}

.atu-kontakt input:focus,
.atu-kontakt select:focus,
.atu-kontakt textarea:focus {
  outline: 0;
  border-color: var(--k-akzent);
  box-shadow: 0 0 0 3px rgba(14, 111, 158, .14);
}

/* Ein Feld, das der Empfänger bemängelt hat. */
.atu-kontakt .atu-kf.ist-fehlend input,
.atu-kontakt .atu-kf.ist-fehlend select,
.atu-kontakt .atu-kf.ist-fehlend textarea {
  border-color: var(--k-rot);
  box-shadow: 0 0 0 3px rgba(192, 69, 60, .12);
}

/* ---------------------------------------------------------------------------
   Die Falle

   Nicht display:none - darauf prüfen die besseren Roboter. Sie steht
   im Fluss, nur weit außerhalb des Bildes.
   --------------------------------------------------------------------------- */

.atu-kontakt-falle {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------------------------
   Fuß: Einwilligung und Knopf
   --------------------------------------------------------------------------- */

.atu-kontakt-fuss {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 20px;
}
.atu-kontakt-schutz {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 280px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}
.atu-kontakt-schutz input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--k-akzent);
  cursor: pointer;
}
.atu-kontakt-schutz a { text-decoration: none; font-weight: 600; }

.atu-kontakt-senden {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  font: 700 15.5px/1.2 inherit;
  cursor: pointer;
  transition: background-color .2s var(--k-weich), box-shadow .2s var(--k-weich),
              transform .12s var(--k-weich);
}
.atu-kontakt-pfeil { width: 17px; height: 17px; flex: none;
  transition: transform .2s var(--k-weich); }
@media (hover: hover) {
  .atu-kontakt-senden:hover .atu-kontakt-pfeil { transform: translateX(3px); }
}
.atu-kontakt-senden:active { transform: translateY(1px); }
.atu-kontakt-senden[disabled] { opacity: .6; cursor: progress; }
.atu-kontakt-senden[disabled] .atu-kontakt-pfeil { transform: none; }

/* ---------------------------------------------------------------------------
   Meldung und Dank
   --------------------------------------------------------------------------- */

.atu-kontakt-meldung {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.atu-kontakt-meldung.ist-fehler  { background: #fdf1ef; border-color: #f3d6d2; color: #a2382f; }
.atu-kontakt-meldung[hidden] { display: none; }

.atu-kontakt-danke {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 44px 28px;
  text-align: center;
}
.atu-kontakt-danke[hidden] { display: none; }
.atu-kontakt-haken {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(25, 120, 63, .12);
  color: var(--k-gruen);
}
.atu-kontakt-haken svg { width: 28px; height: 28px; }
.atu-kontakt-danke h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; }
.atu-kontakt-danke p  { margin: 0; font-size: 15px; line-height: 1.55; }

/* ===========================================================================
   Fassung hell - die Kontaktseite
   =========================================================================== */

.atu-kontakt.ist-hell { color: var(--k-text); }
.atu-kontakt.ist-hell .atu-kontakt-kopf h2 { color: var(--k-navy); }
.atu-kontakt.ist-hell .atu-kontakt-kopf p  { color: var(--k-leise); }
.atu-kontakt.ist-hell label { color: var(--k-leise); }
.atu-kontakt.ist-hell .atu-kontakt-schutz { color: var(--k-leise); }
.atu-kontakt.ist-hell .atu-kontakt-schutz a { color: var(--k-akzent); }
.atu-kontakt.ist-hell .atu-kontakt-senden {
  background: var(--k-akzent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 111, 158, .22);
}
@media (hover: hover) {
  .atu-kontakt.ist-hell .atu-kontakt-senden:hover {
    background: var(--k-navy);
    box-shadow: 0 4px 14px rgba(24, 54, 80, .26);
  }
}
.atu-kontakt.ist-hell .atu-kontakt-danke h3 { color: var(--k-navy); }
.atu-kontakt.ist-hell .atu-kontakt-danke p  { color: var(--k-leise); }

/* ===========================================================================
   Fassung dunkel - der blaue Block auf der Startseite

   Weiße Felder auf Navy, wie bisher: der Block lebt von diesem
   Gegensatz, und die Besucher kennen ihn so. Neu sind Beschriftungen
   über den Feldern - vorher stand alles nur als blasser Platzhalter
   darin, und der verschwindet beim ersten Tastendruck.
   =========================================================================== */

.atu-kontakt.ist-dunkel { color: #e8eef4; }
.atu-kontakt.ist-dunkel .atu-kontakt-kopf h2 { color: #fff; }
.atu-kontakt.ist-dunkel .atu-kontakt-kopf p  { color: rgba(232, 238, 244, .72); }
.atu-kontakt.ist-dunkel label { color: rgba(232, 238, 244, .78); }
.atu-kontakt.ist-dunkel input[type="text"],
.atu-kontakt.ist-dunkel input[type="tel"],
.atu-kontakt.ist-dunkel input[type="email"],
.atu-kontakt.ist-dunkel select,
.atu-kontakt.ist-dunkel textarea {
  border-color: rgba(255, 255, 255, .18);
}
.atu-kontakt.ist-dunkel input:focus,
.atu-kontakt.ist-dunkel select:focus,
.atu-kontakt.ist-dunkel textarea:focus {
  border-color: var(--k-hell);
  box-shadow: 0 0 0 3px rgba(52, 204, 255, .22);
}
.atu-kontakt.ist-dunkel .atu-kontakt-schutz { color: rgba(232, 238, 244, .74); }
.atu-kontakt.ist-dunkel .atu-kontakt-schutz a { color: var(--k-hell); }
.atu-kontakt.ist-dunkel .atu-kontakt-schutz input { accent-color: var(--k-hell); }
.atu-kontakt.ist-dunkel .atu-kontakt-senden {
  background: var(--k-hell);
  color: var(--k-navy);
}
@media (hover: hover) {
  .atu-kontakt.ist-dunkel .atu-kontakt-senden:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(52, 204, 255, .3);
  }
}
.atu-kontakt.ist-dunkel .atu-kontakt-meldung.ist-fehler {
  background: rgba(192, 69, 60, .18);
  border-color: rgba(255, 170, 160, .4);
  color: #ffd9d4;
}
.atu-kontakt.ist-dunkel .atu-kontakt-haken {
  background: rgba(52, 204, 255, .16);
  color: var(--k-hell);
}
.atu-kontakt.ist-dunkel .atu-kontakt-danke h3 { color: #fff; }
.atu-kontakt.ist-dunkel .atu-kontakt-danke p  { color: rgba(232, 238, 244, .76); }

/* Im dunklen Block bleibt es bei zwei Spalten, auch wenn er breit
   wird - dort steht daneben noch Text, und sechs Spalten würden die
   Felder zu Schlitzen schrumpfen. */
@container (min-width: 760px) {
  .atu-kontakt.ist-dunkel .atu-kontakt-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atu-kontakt.ist-dunkel .atu-kf-klein,
  .atu-kontakt.ist-dunkel .atu-kf-halb { grid-column: span 1; }
  .atu-kontakt.ist-dunkel .atu-kf-ganz { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .atu-kontakt * { transition: none !important; }
  .atu-kontakt-senden:hover .atu-kontakt-pfeil { transform: none; }
}
