/* ==========================================================================
   Automaten TiWi 2.0 — Design Tokens (Zwischenseite)
   Gleiche Designsprache wie die Arbeitsversion der neuen Website:
   dunkles Nacht-Theme, Türkis als Hauptakzent, Aubergine/Pink für
   dringliche Aktionen (Problem melden), warmer Amber-Akzent.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --ink:            #12141c;
  --ink-soft:       #454a5c;
  --paper:          #f6f7f4;
  --paper-alt:      #eef1ea;
  --white:          #ffffff;

  --teal-50:        #e6f7f3;
  --teal-300:       #6fe0c9;
  --teal-500:       #17a398;
  --teal-700:       #0b6e66;
  --teal-900:       #0a4842;

  --amber-400:      #f2a93b;
  --amber-600:      #d3801a;
  --amber-100:      #fdf1de;

  --aubergine-300:  #e8a3d0;
  --aubergine-500:  #b23f8f;
  --aubergine-600:  #9a2f7a;
  --aubergine-700:  #7a2361;
  --aubergine-800:  #591a47;
  --aubergine-900:  #33102c;
  --aubergine-100:  #fbebf5;
  --lilac-100:      #ece4fa;

  --night-500:      #232a52;
  --night-700:      #1b1f3b;
  --night-900:      #100e24;

  /* Dunklere, zum Türkis passende Blautöne — u. a. für die rotierende Headline */
  --indigo-300:     #a9b8f5;
  --indigo-500:     #6477dd;
  --blue-500:       #2f7dc2;

  /* Kräftigeres, helleres Pink für die rotierende Headline (besserer Kontrast auf Grün/Türkis) */
  --pink-400:       #e8559f;

  /* "Schmutziges" Weiß mit leichtem Grau-/Grünstich für Headline 4 — wirkt weniger hart als reines Weiß */
  --offwhite-sage:  #dde4da;

  --line:           rgba(18,20,28,.12);
  --line-dark:      rgba(255,255,255,.16);

  --f-display:      'Space Grotesk', 'Arial Narrow', sans-serif;
  --f-body:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:         'IBM Plex Mono', 'Courier New', monospace;

  --container:      1180px;
  --radius:         18px;
  --radius-sm:      10px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html, body{ margin:0; padding:0; }

body{
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family: var(--f-display); margin:0; font-weight:600; letter-spacing:-.01em; }
p{ margin:0; }
button{ font-family: inherit; cursor:pointer; }

.container{
  width:100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

:focus-visible{
  outline: 3px solid var(--amber-400);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------- */
/* Zeit-Marke / Eyebrow-Pille                                             */
/* ---------------------------------------------------------------------- */
.time-tag{
  display:inline-flex;
  align-items:center;
  gap:.55em;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .12em;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: .85;
}
.time-tag .dot{
  width:7px; height:7px; border-radius:50%;
  background: currentColor;
}

/* ---------------------------------------------------------------------- */
/* Navigation                                                              */
/* ---------------------------------------------------------------------- */
.nav{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 500;
  padding: 16px 0;
  background: rgba(16,14,36,.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--white);
}
.nav .container{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo-wrap{
  display:inline-flex;
  align-items:center;
  background: white;
  border-radius: 10px;
  padding: 9px 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.brand-logo{
  height: 30px;
  width: auto;
  display:block;
}
.nav-links{
  display:flex;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a{ opacity:.85; transition: opacity .2s; }
.nav-links a:hover{ opacity:1; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary{
  background: var(--teal-500);
  color: white;
}
.btn-primary:hover{ background: var(--teal-700); transform: translateY(-2px); }

.btn-ghost-dark{
  border-color: rgba(255,255,255,.35);
  color: white;
}
.btn-ghost-dark:hover{ border-color: white; transform: translateY(-2px); }

.btn-amber{
  background: var(--amber-400);
  color: var(--ink);
}
.btn-amber:hover{ background: var(--amber-600); transform: translateY(-2px); }

.btn-aubergine{
  background: var(--aubergine-500);
  color: white;
}
.btn-aubergine:hover{ background: var(--aubergine-700); transform: translateY(-2px); }

/* Die auffällige Zweitfarbe für dringliche Aktionen (z.B. "Problem melden") */
.btn-aubergine-solid{
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid var(--aubergine-500);
  color: white;
  background: var(--aubergine-500);
  white-space: nowrap;
  display:inline-flex;
  align-items:center;
  gap:10px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn-aubergine-solid:hover{ background: var(--aubergine-700); border-color: var(--aubergine-700); transform: translateY(-2px); }
.btn .btn-icon, .btn-aubergine-solid .btn-icon{ flex-shrink:0; }

/* ---------------------------------------------------------------------- */
/* Karten                                                                   */
/* ---------------------------------------------------------------------- */
.card{
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.tone-dark .card{
  background: rgba(255,255,255,.06);
  border-color: var(--line-dark);
}
.card-icon{
  width: 46px; height:46px;
  border-radius: 12px;
  display:grid; place-items:center;
  margin-bottom: 16px;
  background: var(--teal-50);
  color: var(--teal-700);
}
.tone-dark .card-icon{
  background: rgba(255,255,255,.1);
  color: var(--teal-300);
}
.card p{ margin-top:10px; font-size: 15px; }
.tone-light .card p{ color: var(--ink-soft); }
.tone-dark .card p{ color: rgba(255,255,255,.72); }
.h-card{ font-size: 1.1rem; font-weight:600; line-height:1.25; }

/* ---------------------------------------------------------------------- */
/* Typo                                                                     */
/* ---------------------------------------------------------------------- */
.h-display{
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: 1.08;
  font-weight: 600;
}
.h-section{
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  font-weight: 600;
}
.lede{
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  font-weight: 400;
}
.eyebrow{
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
}
.tone-dark{ color: var(--white); }
.tone-dark .ink-soft{ color: rgba(255,255,255,.74); }
.tone-light{ color: var(--ink); }
.tone-light .ink-soft{ color: var(--ink-soft); }

/* ---------------------------------------------------------------------- */
/* Layout-Helfer                                                           */
/* ---------------------------------------------------------------------- */
.stack{ display:flex; flex-direction:column; gap: 18px; }
.row{ display:flex; align-items:center; gap: 14px; }
.spread{ display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap:wrap; }
.grid-2{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items:center; }
.grid-2 > *{ min-width: 0; }
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-6{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; gap: 40px; }
  .grid-3{ grid-template-columns: 1fr 1fr; }
  .grid-6{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-6{ grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------------- */
/* Panels / Blobs                                                          */
/* ---------------------------------------------------------------------- */
.panel{ position:relative; overflow:hidden; isolation:isolate; }
.panel-bg{ position:absolute; inset:0; z-index:0; }

/* Startseiten-Hero: eigene Klasse statt Inline-Style, damit wir den Verlauf auf schmalen
   (Mobile-)Viewports gezielt anders aufbauen können — siehe Media Query unten. */
.hero-bg-home{
  background: radial-gradient(120% 100% at 15% 0%, #1c5f56 0%, #0f2f45 46%, #100e24 100%);
}
@media (max-width: 640px){
  /* Auf schmalen Bildschirmen zieht sich der helle Grünton sonst über die komplette Breite.
     Hier bleibt er enger auf die obere rechte Ecke begrenzt, mit deutlichem Verlauf von
     hell (rechts) zu dunkel (links) — der Rest der Fläche bleibt dunkel/nacht. */
  .hero-bg-home{
    background: radial-gradient(85% 60% at 100% 0%, #1c5f56 0%, #163f52 32%, #100e24 68%);
  }
  .blob-hero-teal{
    width: 340px !important;
    height: 340px !important;
    top: -120px !important;
    right: -110px !important;
    opacity: .4 !important;
  }
}
.panel-inner{ position:relative; z-index:2; width:100%; }
.blob{ position:absolute; border-radius:50%; filter: blur(60px); opacity:.5; pointer-events:none; }
.grain{
  position:absolute; inset:0;
  background-image: radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity:.5;
  pointer-events:none;
}

/* ---------------------------------------------------------------------- */
/* Pictogramm-Kacheln (Lösungen)                                          */
/* ---------------------------------------------------------------------- */
.solution-tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap: 12px;
  padding: 22px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-dark);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.solution-tile:hover{ transform: translateY(-3px); background: rgba(255,255,255,.08); border-color: rgba(111,224,201,.4); }
.solution-tile .icon-wrap{
  width: 56px; height:56px;
  border-radius: 14px;
  background: var(--lilac-100);
  color: var(--aubergine-700);
  display:grid; place-items:center;
}
.solution-tile .label{ font-size: 14px; font-weight:600; }

/* ---------------------------------------------------------------------- */
/* Rotierende Headline                                                     */
/* ---------------------------------------------------------------------- */
.headline-rotator{
  display: grid;
}
.headline-slide{
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.16;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  opacity:0;
  transform: translateY(10px);
  /* TIWI-TIMING-CONFIG: Fade-Dauer — muss zum "fadeMs"-Wert in assets/script.js passen */
  transition: opacity 2s ease, transform 2s ease;
  pointer-events:none;
}
@media (max-width: 480px){
  .headline-slide{ font-size: 1.8rem; line-height: 1.16; }
}
@media (max-width: 400px){
  .headline-slide{ font-size: 1.6rem; line-height: 1.18; }
}
@media (max-width: 345px){
  .headline-slide{ font-size: 1.42rem; line-height: 1.2; }
}
/* Jede Headline in einer eigenen Farbe — abwechselnd Violet/Lila/Pink und dunklere,
   zum Türkis-Stil passende Blautöne */
.headline-slide:nth-child(1){ color: var(--aubergine-300); }
.headline-slide:nth-child(2){ color: var(--indigo-300); }
.headline-slide:nth-child(3){ color: var(--amber-400); }
.headline-slide:nth-child(4){ color: var(--offwhite-sage); }

.headline-slide.is-active{
  opacity:1;
  transform:none;
  pointer-events:auto;
}

/* ---------------------------------------------------------------------- */
/* Formular (Kontakt / Problem)                                            */
/* ---------------------------------------------------------------------- */
.field{ display:flex; flex-direction:column; gap:7px; }
.field label{ font-size: 13px; font-weight:600; letter-spacing:.02em; }
.field .req-mark{ color: var(--amber-400); margin-left:2px; }
.field input, .field textarea, .field select{
  font-family: var(--f-body);
  font-size: 15px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: white;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder{ color: rgba(255,255,255,.4); }
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: var(--teal-300);
  outline: none;
}
.field select option{
  color: var(--ink);
  background: var(--white);
}
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }
.form-note{ font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ---------------------------------------------------------------------- */
/* Geführte Kurzanfrage ("Chat")                                          */
/* ---------------------------------------------------------------------- */
.chat-log{
  display:flex;
  flex-direction:column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.chat-bubble{
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
}
.chat-bubble.bot{
  align-self:flex-start;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line-dark);
  border-bottom-left-radius: 4px;
  color: rgba(255,255,255,.92);
}
.chat-bubble.user{
  align-self:flex-end;
  background: var(--teal-500);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-options{
  display:flex;
  flex-wrap:wrap;
  gap: 9px;
  margin-bottom: 6px;
}
.chat-option-btn{
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.03);
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.chat-option-btn:hover{ border-color: var(--teal-300); background: rgba(111,224,201,.14); transform: translateY(-1px); }
.chat-option-btn.is-selected{ background: var(--teal-500); border-color: var(--teal-500); }

/* Problem-Formular: eigene Chat-Button-Farben passend zum Aubergine-/Pink-Theme der Seite
   statt der sonst site-weiten Türkis-Akzente (nur für den Chat mit data-flow="problem"). */
#tiwi-chat[data-flow="problem"] .chat-option-btn:hover{
  border-color: var(--aubergine-300);
  background: rgba(178,63,143,.18);
}
#tiwi-chat[data-flow="problem"] .chat-option-btn.is-selected{
  background: var(--aubergine-500);
  border-color: var(--aubergine-500);
}
.chat-option-confirm{
  background: var(--amber-400);
  border-color: var(--amber-400);
  color: var(--ink);
  font-weight:600;
}
/* Honeypot-Feld gegen simple Formular-Bots: für Menschen unsichtbar, für Bots im DOM vorhanden */
.hp-field{
  position:absolute;
  left:-9999px;
  top:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}
.captcha-error{
  display:block;
  margin-top:6px;
  font-size:13px;
  color: var(--aubergine-300);
}
.captcha-error[hidden]{ display:none; }
.chat-log.chat-success{
  flex: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  max-height:none;
  padding: 30px 6px;
}
.chat-log.chat-success .chat-bubble{
  max-width: 100%;
  font-size: 16px;
  padding: 22px 26px;
}
.chat-log.chat-success .chat-bubble.bot{
  background: var(--amber-100);
  border-color: var(--amber-400);
  color: var(--ink);
}
.chat-back-btn{
  display:inline-flex;
  align-items:center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 500;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.chat-back-btn span{ font-size: 12px; line-height:1; }
.chat-back-btn:hover{ border-color: rgba(255,255,255,.5); color: white; background: rgba(255,255,255,.06); }
.chat-summary{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chat-summary .pill{
  font-size: 12px; padding: 6px 12px;
  color: rgba(255,255,255,.85);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
}

/* ---------------------------------------------------------------------- */
/* Legal-Seiten (Impressum / Datenschutz)                                  */
/* ---------------------------------------------------------------------- */
.legal-hero{
  background: var(--night-900);
  color: white;
  padding: 108px 0 70px;
}
.legal-body{
  padding: 64px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}
.legal-body h2{
  font-size: 1.4rem;
  margin-top: 44px;
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal-body h2:first-child{ border-top:none; padding-top:0; margin-top:0; }
.legal-body h3{ font-size: 1.05rem; margin-top:26px; margin-bottom:10px; }
.legal-body p, .legal-body li{ font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; line-height:1.65; }
.legal-body ul{ list-style: disc; padding-left: 22px; }
.legal-body a{ color: var(--teal-700); text-decoration:underline; text-underline-offset:2px; }
.legal-body strong{ color: var(--ink); }
.back-link{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--f-mono); font-size:13px;
  color: var(--teal-300);
  margin-bottom: 22px;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                   */
/* ---------------------------------------------------------------------- */
.site-footer{
  background: var(--night-900);
  color: white;
  padding: 48px 0 28px;
}
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.footer-bottom a:hover{ color: white; }

/* ---------------------------------------------------------------------- */
/* Scroll-reveal                                                           */
/* ---------------------------------------------------------------------- */
.reveal{
  opacity:0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{ opacity:1; transform:none; }
