/* ════════════════════════════════════════════════════════════════════════════
   REVOTION B2B Sign-up Form
   ──────────────────────────────────────────────────────────────────────────
   Tokens, Inputs und Buttons 1:1 nach REVOTION Design System (Claude Design
   Export). Quelle: revotion-design-system/colors_and_type.css + preview/{
   inputs.html, buttons.html }.
   Form ist Iframe-embedded → transparenter Body, keine Card/Hero.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* ─── SURFACE / TEXT ─── */
  --color-bg:        #f7fbff;
  --color-bg-deep:   #f5f9fd;
  --color-card:      #ffffff;
  --color-text:      #08121b;
  --color-text-2:    #232e3e;
  --color-muted:     rgba(8, 18, 27, 0.62);
  --color-muted-2:   rgba(8, 18, 27, 0.45);
  --color-line:      rgba(8, 18, 27, 0.08);

  --color-steel:     #395f76;
  --color-mist:      #aecbdd;
  --color-fog:       #e8f0f4;

  /* ─── BRAND ACCENTS ─── */
  --color-cyan:        #30b6c6;
  --color-cyan-dark:   #2497a4;
  --color-cyan-soft:   rgba(48, 182, 198, 0.12);
  --color-cyan-glow:   rgba(48, 182, 198, 0.37);

  /* ─── DARK SURFACES ─── */
  --color-navy:      #232e3e;
  --color-navy-deep: #08121b;

  /* ─── STATUS ─── */
  --color-success:   #63d583;
  --color-coral:     #fd6262;

  /* ─── TYPOGRAPHY ─── */
  --font-heading: 'Poppins', 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-body:    16px;
  --fs-body-sm: 15px;
  --fs-label:   13px;
  --fs-caption: 12px;

  --fw-heading: 600;
  --ls-heading: -0.01em;
  --ls-label:   0.08em;

  --lh-body:  1.55;
  --lh-tight: 1.15;

  /* ─── SPACING ─── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;

  /* ─── RADII ─── */
  --radius-sm:      11px;
  --radius:         20px;
  --radius-card-sm: 24px;
  --radius-widget:  48px;
  --radius-pill:    9999px;

  /* ─── SHADOWS — Widget Directed Shadow (7-Layer) ─── */
  --shadow-widget:
    -2px -2px 6px 0 rgba(255, 255, 255, 0.45),
    2px 3px 6px 0 rgba(84, 141, 176, 0.08),
    4px 6px 12px 0 rgba(84, 141, 176, 0.07),
    8px 12px 22px 0 rgba(84, 141, 176, 0.07),
    16px 24px 38px 0 rgba(84, 141, 176, 0.06),
    32px 48px 64px 0 rgba(84, 141, 176, 0.05),
    56px 80px 100px 0 rgba(57, 95, 118, 0.04);

  --shadow-cyan:    0 0 0 3px rgba(48, 182, 198, 0.28), 0 0 24px rgba(48, 182, 198, 0.35);
  --shadow-cyan-sm: 0 2px 30px 0 rgba(48, 182, 198, 0.37);

  /* ─── MOTION ─── */
  --ease-out:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:  140ms;
  --dur:       200ms;
}

/* ════ Reset + Base ════════════════════════════════════════════ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ════ Form-Wrapper ════════════════════════════════════════════ */
.leadform {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sanfter Block-Trenner (1px hairline per Design System) */
.leadform__divider {
  height: 1px;
  background: var(--color-line);
  margin: 8px 0 4px;
  border: none;
}

/* ════ Field — Label + Input-Stack ═════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field > span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  padding-left: 18px;
}
.field > span em {
  color: var(--color-cyan);
  font-style: normal;
  margin-left: 2px;
}
.field > span small {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 6px;
}

/* ════ INPUTS — Pill 48px, Widget Shadow ═══════════════════════
   Match: revotion-design-system/preview/inputs.html
   ───────────────────────────────────────────────────────────── */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-card);
  border: none;
  outline: none;
  height: 48px;
  padding: 0 18px;
  border-radius: 45px;        /* pill für 48px Höhe */
  box-shadow: var(--shadow-widget);
  transition: box-shadow var(--dur) var(--ease-out);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  height: auto;
  min-height: 120px;
  padding: 16px 22px;
  border-radius: var(--radius-card-sm);  /* 24px für Multi-Line */
  resize: vertical;
  line-height: 1.5;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-mist);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23395f76' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 22px center;
  padding-right: 48px;
  color: var(--color-text);
}
.field select:invalid,
.field select option[value=""] { color: var(--color-mist); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: var(--shadow-widget), var(--shadow-cyan);
}
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  box-shadow: var(--shadow-widget), 0 0 0 2px var(--color-coral);
}

/* ════ Field-Row — 2-Col-Grid (kollabiert auf Mobile) ═════════ */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field-row--single { grid-template-columns: 1fr; }
.field-row--7-3    { grid-template-columns: 7fr 3fr; }

/* ════ Field-Hint (Zeichen-Counter etc.) ══════════════════════ */
.field__hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
  padding-left: 22px;
  margin-top: 4px;
}
.field__hint.is-ok   { color: var(--color-success); }
.field__hint.is-warn { color: var(--color-coral); }

/* ════ Checkbox-Box (Showroom — Pill mit Widget Shadow) ═══════ */
.field--checks .field__box {
  background: var(--color-card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-widget);
  padding: 14px 22px;
  display: flex;
  align-items: center;
}
.field--checks .field__box label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
  margin: 0;
  width: 100%;
}
.field--checks .field__box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-cyan);
  cursor: pointer;
}

/* ════ Consent-Row — minimaler Body-Text mit Checkbox ═════════ */
.field--consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
  padding-left: 6px;
  padding-right: 6px;
}
.field--consent input {
  margin-top: 3px;
  accent-color: var(--color-cyan);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.field--consent a {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.field--consent a:hover { color: var(--color-cyan-dark); }

/* ════ Honeypot ════════════════════════════════════════════════ */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ════ Turnstile-Container ═════════════════════════════════════ */
.turnstile-wrap {
  display: flex;
  justify-content: flex-start;
  min-height: 65px;
  padding-left: 6px;
}

/* ════ BUTTON — Primary (Navy + Widget Shadow) ═════════════════
   Match: revotion-design-system/preview/buttons.html
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: var(--ls-heading);
  color: #ffffff;
  background: var(--color-navy-deep);
  border: none;
  border-radius: 16px;
  height: 48px;
  padding: 0 24px;
  cursor: pointer;
  box-shadow: var(--shadow-widget);
  transition: background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.btn:not(:disabled):hover {
  background: var(--color-navy);
  box-shadow: var(--shadow-widget), var(--shadow-cyan-sm);
  transform: translateY(-1px);
}
.btn:not(:disabled):active {
  background: var(--color-navy);
  transform: translateY(1px);
}
.btn:disabled {
  background: var(--color-mist);
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.leadform__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.leadform__actions .btn { padding: 0 32px; }

.leadform__hint {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin: 6px 0 0;
  padding: 0 12px;
}

/* ════ Status — Pill-Chip mit Glow + weißer Schrift ══════════
   Match: revotion-design-system/preview/chips.html
   ───────────────────────────────────────────────────────────── */
.leadform__status {
  display: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: #ffffff;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  text-align: center;
  line-height: 1.35;
  margin: 4px auto 0;
  max-width: fit-content;
}
.leadform__status.is-success {
  display: block;
  background: var(--color-success);
  box-shadow: 0 4px 18px 0 rgba(99, 213, 131, 0.55);
}
.leadform__status.is-error {
  display: block;
  background: var(--color-coral);
  box-shadow: 0 4px 18px 0 rgba(253, 98, 98, 0.55);
}

/* ════ Focus — global cyan glow per Design System ════════════ */
:focus-visible {
  outline: none;
}

/* ════ Mobile ═════════════════════════════════════════════════ */
@media (max-width: 559px) {
  .leadform { padding: 20px 12px 32px; gap: 18px; }
  .field-row,
  .field-row--7-3 { grid-template-columns: 1fr; }
  .field input,
  .field select,
  .field textarea { font-size: 16px; }   /* iOS-Zoom-Block, bleibt 16 */
  .leadform__actions { justify-content: stretch; }
  .leadform__actions .btn { width: 100%; padding: 0 24px; }
  .field > span { padding-left: 16px; }
  .field--checks .field__box { padding: 13px 20px; }
}
