/* ============================================================
   GLOBOGATE CSAT-Umfrage — Layout & Corporate Identity
   Dunkler Marken-Hero (Verlauf) + helle Formular-Karte.
   ============================================================ */

:root {
  /* Markenfarben (verbindlich, siehe CLAUDE.md) */
  --globo-blue: #15005a;
  --globo-grey: #dcdcdc;
  --globo-mint: #dbffdc;
  --globo-purple: #5f50ff;
  --globo-lavender: #c2bcff;
  --globo-pink: #f5d9ff;
  --globo-white: #ffffff;
  --globo-black: #000000;
  --globo-footer: #999999;

  /* abgeleitete Töne */
  --purple-dark: #4a3ee6;
  --error: #b00020;
  --ink-soft: #4a4470;

  /* Schriften */
  --font-base: "DM Sans", Arial, Helvetica, sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  /* Maße */
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 760px;
  --shadow: 0 30px 70px rgba(8, 0, 40, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--globo-blue); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-base);
  color: var(--globo-black);
  line-height: 1.55;
  font-size: 17px;
  background-color: var(--globo-blue);
  background-image:
    radial-gradient(85% 75% at 82% 72%, rgba(120, 104, 255, 0.60) 0%, rgba(120, 104, 255, 0) 60%),
    linear-gradient(140deg, #140050 0%, #1c0a6c 55%, #2c1a86 100%);
  background-attachment: fixed;
}

/* dezenter Marken-Bogen (wie auf globogate.de) */
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  right: -26vmax;
  bottom: -30vmax;
  width: 72vmax;
  height: 72vmax;
  border: 1.5px solid rgba(194, 188, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

/* Inhalte über dem Verlauf/Bogen */
.site-header, .progress, .wrap, .site-footer { position: relative; z-index: 1; }

/* ---------- Kopfbereich ---------- */
.site-header { background: transparent; }
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px 8px;
  display: flex;
  align-items: center;
}
/* Logo ist ein sehr breites Wortmarken-PNG (~11:1) — nur Breite steuern,
   Höhe automatisch, damit es nie überläuft oder verzerrt. */
.site-header__logo { display: block; width: clamp(150px, 45vw, 300px); height: auto; }

/* ---------- Container ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 72px;
}

/* ---------- Hero / Intro ---------- */
.intro { padding: 18px 4px 30px; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 14px;
  font-weight: 600;
  color: var(--globo-mint);
  margin: 0 0 14px;
}
.intro__title {
  font-family: var(--font-display);
  color: var(--globo-white);
  font-weight: 600;
  font-size: clamp(32px, 6.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  overflow-wrap: break-word;
  hyphens: auto;
}
.intro__lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 52ch;
}

/* ---------- Fortschritt ---------- */
.progress {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.progress__track {
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--globo-mint);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 10px 2px 16px;
}

/* ---------- Karte ---------- */
.card {
  background: var(--globo-white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
}

/* ---------- Schritt-Überschriften ---------- */
.step__title {
  font-family: var(--font-base);
  color: var(--globo-blue);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 4px;
}
.step__hint { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; }

/* Skala-Legende */
.scale-key {
  background: var(--globo-lavender);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--globo-blue);
  margin-bottom: 22px;
}
.scale-key strong { font-weight: 700; }

/* ---------- Frage ---------- */
.question {
  border: 0;
  margin: 0;
  padding: 0;
}
/* Großer Abstand ZWISCHEN den Fragen (Weißraum-Gruppierung), aber enge
   Kopplung der Skala an ihre Frage (legend margin-bottom). So gehört jede
   Skala eindeutig zur Frage darüber. */
.question + .question { margin-top: 40px; }
.question > legend {
  font-weight: 700;
  color: var(--globo-blue);
  padding: 0;
  margin-bottom: 10px;
}
.question__num { color: var(--globo-purple); }

/* ---------- Skala (1–5) ---------- */
.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.scale-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 12px 6px;
  border: 1.5px solid var(--globo-grey);
  border-radius: 10px;
  cursor: pointer;
  background: var(--globo-white);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.scale-option:hover { border-color: var(--globo-lavender); background: #faf9ff; }
.scale-option:active { transform: translateY(1px); }
.scale-option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.scale-option .num { font-size: 20px; font-weight: 700; color: var(--globo-blue); }
.scale-option .lbl { font-size: 12px; color: #5b557d; line-height: 1.2; }

.scale-option:has(input:checked) {
  border-color: var(--globo-purple);
  background: var(--globo-purple);
  box-shadow: 0 6px 16px rgba(95, 80, 255, 0.35);
}
.scale-option:has(input:checked) .num,
.scale-option:has(input:checked) .lbl { color: var(--globo-white); }

.scale-option:has(input:focus-visible) {
  outline: 3px solid var(--globo-lavender);
  outline-offset: 2px;
}

/* ---------- NPS (0–10) ---------- */
.nps {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 7px;
}
.nps .scale-option { padding: 12px 0; }
.nps .scale-option .num { font-size: 17px; }
.nps-ends {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #5b557d;
  margin-top: 10px;
}

/* ---------- Einfachauswahl (Chips, z. B. Dauer der Zusammenarbeit) ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-option {
  position: relative;
  border: 1.5px solid var(--globo-grey);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  background: var(--globo-white);
  font-size: 15px;
  color: var(--globo-blue);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.choice-option:hover { border-color: var(--globo-lavender); background: #faf9ff; }
.choice-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice-option:has(input:checked) {
  border-color: var(--globo-purple);
  background: var(--globo-purple);
  color: var(--globo-white);
  box-shadow: 0 6px 16px rgba(95, 80, 255, 0.35);
}
.choice-option:has(input:focus-visible) { outline: 3px solid var(--globo-lavender); outline-offset: 2px; }

/* ---------- Offene Fragen ---------- */
.field { margin: 0 0 20px; }
.field > label {
  display: block;
  font-weight: 700;
  color: var(--globo-blue);
  margin-bottom: 8px;
}
.field textarea,
.field input[type="text"] {
  width: 100%;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--globo-black);
  border: 1.5px solid var(--globo-grey);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--globo-white);
  resize: vertical;
}
.field textarea { min-height: 96px; }
.field textarea:focus,
.field input[type="text"]:focus {
  outline: none;
  border-color: var(--globo-purple);
  box-shadow: 0 0 0 3px var(--globo-lavender);
}
.field__optional { font-weight: 400; color: var(--globo-footer); font-size: 14px; }

/* ---------- Fehlermeldung ---------- */
.error-msg {
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}
.question.is-invalid > legend { color: var(--error); }
.question.is-invalid .scale-option,
.question.is-invalid .choice-option { border-color: #e7a3ac; }

/* ---------- Datenschutz ---------- */
.privacy {
  font-size: 13px;
  color: #5b557d;
  background: var(--globo-pink);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 8px;
}
.privacy a { color: var(--purple-dark); }

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn--primary {
  background: var(--globo-purple);
  color: var(--globo-white);
  box-shadow: 0 8px 20px rgba(95, 80, 255, 0.30);
}
.btn--primary:hover { background: var(--purple-dark); }
.btn--ghost {
  background: transparent;
  color: var(--globo-blue);
  border-color: var(--globo-grey);
}
.btn--ghost:hover { border-color: var(--globo-blue); }
.btn:focus-visible { outline: 3px solid var(--globo-lavender); outline-offset: 2px; }
.btn[hidden] { display: none; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- Danke-Ansicht ---------- */
.danke { text-align: center; padding: 18px 8px; }
.danke__badge {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--globo-mint);
  color: var(--globo-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 16px;
}
.danke__title {
  font-family: var(--font-display);
  color: var(--globo-blue);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
}
.danke__text { color: var(--ink-soft); margin: 0 auto; max-width: 46ch; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 44px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}
.site-footer__legal { margin: 0 0 6px; display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer__org { margin: 0; }
.site-footer a { color: rgba(255, 255, 255, 0.88); text-decoration: underline; }
.site-footer a:hover { color: var(--globo-white); }

/* visuell versteckt (Honeypot) */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .card { padding: 22px 16px; border-radius: 16px; }
  .intro { padding: 12px 2px 24px; }
  .scale { gap: 7px; }
  .scale-option { padding: 10px 2px; }
  .scale-option .num { font-size: 18px; }
  .scale-option .lbl { font-size: 11px; }
  .nps { gap: 5px; }
  .nps .scale-option .num { font-size: 15px; }
  .btn { padding: 12px 20px; font-size: 15px; }
}

@media (max-width: 380px) {
  .scale-option .lbl { display: none; } /* Worte ausblenden; via aria-label weiter zugänglich */
}
