/* =========================================================
   DOMETIC HIGH-END EVENT FUNNEL UI
   CI-conform, mobile-first, iPad-ready
========================================================= */

:root {
  --black: #0D0D0D;
  --white: #FFFFFF;
  --container-secondary: #F6F6F3;
  --border: #D4D3CE;
  --text-muted: #666666;
  --error: #B42318;
  --success: #0F6B3F;

  --thin: 8px;
  --small: 16px;
  --medium: 24px;
  --large: 40px;
  --extra-large: 64px;

  --radius-4: 4px;

  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --button-height: 44px;
  --max-width: 620px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--large) var(--medium) 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden-form,
.honeypot {
  display: none !important;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: block;
  animation: screenEnter 260ms ease both;
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--medium);
}

.form-panel,
.intro-panel,
.success-panel {
  width: 100%;
}

.eyebrow {
  margin: 0 0 var(--thin);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: var(--small);
  font-size: clamp(32px, 8vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 800;
}

h2 {
  margin-bottom: var(--medium);
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.lead {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.42;
}

.lead.small {
  font-size: 16px;
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: var(--thin);
}

.flow-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--medium);
  align-items: center;
}

.progress-wrap {
  display: grid;
  gap: var(--thin);
}

.progress-wrap span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.progress {
  height: 4px;
  border-radius: var(--radius-4);
  background: var(--container-secondary);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 38%;
  background: var(--black);
  border-radius: inherit;
  transition: width 220ms ease;
}

.static-progress-54 {
  width: 54%;
}

.static-progress-70 {
  width: 70%;
}

.static-progress-100 {
  width: 100%;
}

.quiz-grid,
.choice-grid,
.consent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-card,
.choice-card,
.check-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--thin);
  padding: var(--small);
  border-radius: var(--radius-4);
  border: 1px solid transparent;
  background: var(--container-secondary);
  color: var(--black);
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.quiz-card:hover,
.choice-card:hover,
.check-card:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}

.quiz-card:active,
.choice-card:active,
.check-card:active {
  transform: scale(0.985);
}

.quiz-card input,
.check-card input {
  display: none;
}

.quiz-card span,
.check-title {
  font-weight: 700;
  line-height: 1.25;
}

.quiz-card.active,
.check-card.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.quiz-card.wrong {
  border-color: var(--error);
  background: rgba(180, 35, 24, 0.06);
  color: var(--black);
}

.quiz-feedback {
  display: none;
  padding: 10px 12px;
  border-radius: var(--radius-4);
  background: var(--container-secondary);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.quiz-feedback.show {
  display: block;
}

.choice-card {
  min-height: 116px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  border: none;
}

.choice-kicker {
  margin-bottom: auto;
  border: 1px solid currentColor;
  border-radius: var(--radius-4);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.choice-card strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.choice-card small {
  display: block;
  color: var(--text-muted);
  line-height: 1.35;
}

.choice-card:hover {
  background: var(--black);
  color: var(--white);
}

.choice-card:hover small {
  color: rgba(255, 255, 255, 0.74);
}

.question-box {
  padding: var(--small);
  border-radius: var(--radius-4);
  background: var(--container-secondary);
}

.step-label {
  margin-bottom: var(--thin);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--small);
}

.single-field {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field small {
  display: none;
  color: var(--error);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: var(--button-height);
  border: 1px solid var(--border);
  border-radius: var(--radius-4);
  background: var(--white);
  color: var(--black);
  padding: 0 12px;
  font-size: 16px;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.08);
}

.field.has-error input,
.field.has-error select {
  border-color: var(--error);
}

.field.has-error small {
  display: block;
}

.business-only {
  display: none;
}

body.business-mode .business-only {
  display: flex;
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--small);
}

.primary-button {
  display: flex;
  height: var(--button-height);
  min-width: 120px;
  padding: 0 var(--medium);
  justify-content: center;
  align-items: center;
  gap: var(--thin);
  border-radius: var(--radius-4);
  border: 0;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    background 150ms ease;
}

.primary-button:hover {
  opacity: 0.88;
}

.primary-button:active {
  transform: scale(0.97);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary-button.submit {
  width: 100%;
}

.ghost-button {
  display: flex;
  height: var(--button-height);
  min-width: 90px;
  padding: 0 var(--medium);
  justify-content: center;
  align-items: center;
  gap: var(--thin);
  border-radius: var(--radius-4);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: var(--black);
}

.check-card {
  align-items: flex-start;
}

.check-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-content small {
  color: var(--text-muted);
  line-height: 1.35;
}

.check-card.active small {
  color: rgba(255, 255, 255, 0.74);
}

.check-card.has-error {
  border-color: var(--error);
  background: rgba(180, 35, 24, 0.06);
  color: var(--black);
}

.form-message {
  display: none;
  padding: 12px;
  border-radius: var(--radius-4);
  font-size: 14px;
  font-weight: 700;
}

.form-message.error {
  display: block;
  background: rgba(180, 35, 24, 0.08);
  color: var(--error);
}

.form-message.success {
  display: block;
  background: rgba(15, 107, 63, 0.08);
  color: var(--success);
}

.standalone-error {
  display: none;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
}

.standalone-error.show {
  display: block;
}

.loader {
  width: 16px;
  height: 16px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.loading .loader {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-panel {
  align-items: center;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 40px;
  font-weight: 800;
}

.visitor-close-hint {
  display: none;
  margin-top: var(--small);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
}

.visitor-close-hint:hover {
  text-decoration: underline;
}

body.visitor-mode #newLeadButton {
  display: none;
}

body.visitor-mode #visitorCloseHint {
  display: inline-flex;
}

body.staff-mode #visitorCloseHint {
  display: none;
}

.legal-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--thin);
  color: var(--text-muted);
  font-size: 12px;
  z-index: 10;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  :root {
    --max-width: 720px;
  }

  .stage {
    padding-top: var(--extra-large);
  }

  .choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .choice-card {
    min-height: 160px;
  }
}

@media (max-width: 640px) {
  .stage {
    padding: var(--medium) var(--small) 72px;
    align-items: flex-start;
  }

  h1 {
    font-size: 40px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .flow-header {
    grid-template-columns: 1fr;
    gap: var(--small);
  }

  .ghost-button {
    width: fit-content;
  }

  .nav-actions {
    justify-content: stretch;
  }

  .primary-button {
    width: 100%;
  }
}
/* =========================================================
   IPAD MESSE MODE
========================================================= */

.messe-hud {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-4);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(13, 13, 13, 0.08);
}

.messe-hud-item {
  min-width: 64px;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: var(--radius-4);
  background: var(--container-secondary);
}

.messe-hud-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.messe-hud-item strong {
  color: var(--black);
  font-size: 18px;
  line-height: 1;
}

.messe-reset-button {
  height: auto;
  min-width: 56px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-4);
  background: var(--white);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.messe-reset-button:hover {
  border-color: var(--black);
}

body.visitor-mode .messe-hud {
  display: none;
}

@media (max-width: 640px) {
  .messe-hud {
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }
}