/* Lavum — Auswanderer-Typ-Quiz · Web-Akquise-Front (LAV-654 §5.2)
   Brand-Tokens spiegeln landing/lavum-de/styles.css. */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --petrol-500: #1A3D4D;
  --petrol-700: #0F2A36;
  --lava-500: #D85A2E;
  --lava-700: #A8451E;
  --cream: #F4F2EE;
  --cream-deep: #ECE8E1;
  --text-900: #142730;
  --text-600: #4A5963;
  --text-400: #788591;
  --sun: #F38E43;
  --surface-0: #FFFFFF;
  --border-100: #E5E0D8;
  --shadow-card: 0 12px 32px -16px rgba(20, 39, 48, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 5vw, 2rem);
}

.brand-tag {
  display: inline-block;
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--petrol-500);
  text-decoration: none;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}
.brand-tag::after {
  content: '.';
  color: var(--lava-500);
}

/* ====== Screens (sequentially shown/hidden) ====== */
.screen {
  display: none;
  flex: 1;
  width: 100%;
  animation: fadeIn 240ms ease-out;
}
.screen.is-active {
  display: flex;
  flex-direction: column;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Intro ====== */
.hero-title {
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--petrol-700);
  margin-bottom: 1rem;
}
.hero-lead {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  color: var(--text-600);
  margin-bottom: 1.5rem;
  max-width: 540px;
}
.hero-meta {
  font-size: 0.875rem;
  color: var(--text-400);
  margin-bottom: 2rem;
}
.hero-tiny {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-400);
  max-width: 480px;
  line-height: 1.6;
}

/* ====== Quiz Question ====== */
.q-header {
  margin-bottom: 1.5rem;
}
.q-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}
.q-progress__dot {
  flex: 1;
  height: 4px;
  background: var(--border-100);
  border-radius: 2px;
  transition: background 200ms ease;
}
.q-progress__dot.is-done {
  background: var(--lava-500);
}
.q-progress__dot.is-current {
  background: var(--petrol-500);
}
.q-step {
  font-size: 0.8125rem;
  color: var(--text-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.q-title {
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  color: var(--petrol-700);
  margin-bottom: 0.5rem;
}
.q-sub {
  font-size: 1rem;
  color: var(--text-600);
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.q-option {
  appearance: none;
  text-align: left;
  background: var(--surface-0);
  border: 2px solid var(--border-100);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text-900);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 80ms ease;
}
.q-option:hover {
  border-color: var(--petrol-500);
  background: #fafaf7;
}
.q-option:active {
  transform: scale(0.99);
}
.q-option.is-selected {
  border-color: var(--lava-500);
  background: #fff4ee;
}
.q-back {
  background: none;
  border: none;
  color: var(--text-400);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 0.5rem 0;
}
.q-back:hover { color: var(--text-600); }

/* ====== Q5 — Heimat (Country-Pills) ====== */
.q-home-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 480px) {
  .q-home-pills { grid-template-columns: repeat(4, 1fr); }
}
.q-home-pill {
  appearance: none;
  background: var(--surface-0);
  border: 2px solid var(--border-100);
  border-radius: 16px;
  padding: 1.5rem 0.5rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-900);
  cursor: pointer;
  text-align: center;
  transition: all 160ms ease;
}
.q-home-pill:hover {
  border-color: var(--petrol-500);
}
.q-home-pill.is-selected {
  border-color: var(--lava-500);
  background: #fff4ee;
}
.q-home-pill__flag {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

/* ====== Loading ====== */
.loading-card {
  background: var(--surface-0);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-100);
  border-top-color: var(--lava-500);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 800ms linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== Result Card (Web-Ergebnis-Karte, Spec §4.2 #1) ====== */
.result-eyebrow {
  font-size: 0.8125rem;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.result-title {
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  color: var(--petrol-700);
  margin-bottom: 1rem;
}
.result-card {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--petrol-700);
}
.result-card__plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 42, 54, 0.92) 0%,
    rgba(15, 42, 54, 0.55) 40%,
    rgba(15, 42, 54, 0.15) 70%,
    rgba(15, 42, 54, 0) 100%
  );
}
.result-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.75rem;
  color: var(--surface-0);
}
.result-card__brand {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--surface-0);
  letter-spacing: -0.01em;
}
.result-card__brand::after { content: '.'; color: var(--lava-500); }
.result-card__name {
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.result-card__lead {
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.92;
  margin-bottom: 0.75rem;
}
.result-card__countries {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.result-card__recruit {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1.4;
}

.result-body {
  background: var(--surface-0);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}
.result-body h3 {
  font-family: 'General Sans', sans-serif;
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
  color: var(--petrol-700);
}
.result-body p {
  font-size: 0.9375rem;
  color: var(--text-600);
  margin-bottom: 1rem;
}
.result-body p:last-child { margin-bottom: 0; }

.result-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
/* LAV-922: ab ~480px die beiden Sekundär-Aktionen nebeneinander — drei
   gestapelte Full-Width-Pillen wirkten wie eine Button-Wand. */
@media (min-width: 480px) {
  .result-cta { flex-direction: row; flex-wrap: wrap; }
  .result-cta .btn--primary { flex: 1 1 100%; }
  .result-cta .btn--secondary { flex: 1 1 calc(50% - 0.375rem); }
}

/* ====== Buttons ====== */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 16px;
  border: 2px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  min-height: 52px;
  cursor: pointer;
  transition: all 160ms ease;
  text-decoration: none;
  /* LAV-922: mehrzeilige Button-Labels (z.B. App-CTA auf 375px) zentrieren
     statt linksbündig zu flattern. */
  text-align: center;
}
.btn--primary {
  background: var(--lava-500);
  color: var(--surface-0);
}
.btn--primary:hover { background: var(--lava-700); }
.btn--secondary {
  background: var(--surface-0);
  color: var(--petrol-700);
  /* LAV-922: --border-100 war auf Cream fast unsichtbar — Petrol-Ton gibt
     den weißen Pillen wieder eine Kante (User-Feedback 2026-07-18). */
  border-color: rgba(26, 61, 77, 0.28);
}
.btn--secondary:hover { border-color: var(--petrol-500); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====== Error ====== */
.error-banner {
  background: #fef0eb;
  border: 1px solid var(--lava-500);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9375rem;
  color: var(--lava-700);
}

/* LAV-719: Lead-Capture-Formular im Result-Screen */
.result-waitlist {
  margin-top: 1.75rem;
  text-align: left;
}
.result-waitlist-label {
  display: block;
  font-size: 0.9375rem;
  opacity: 0.85;
  margin-bottom: 0.6rem;
}
.result-waitlist-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
/* LAV-922: wenn der Button unters Feld umbricht (375px), volle Breite statt
   verloren links hängen. */
.result-waitlist-row .btn { flex: 1 1 auto; }
.result-waitlist-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 12px;
  /* LAV-783: Feld liegt auf der hellen Result-Page — die alten Dark-BG-
     Styles machten Input + getippten Text cream-auf-cream unsichtbar. */
  border: 1px solid var(--border-100);
  background: var(--surface-0);
  color: var(--text-900);
}
.result-waitlist-input::placeholder {
  color: var(--text-400);
}
.result-waitlist-input:focus {
  outline: none;
  border-color: var(--lava-500);
}
.result-waitlist-msg {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
}
/* LAV-783: Fehler-Banner (Score-EF nicht erreichbar) — Message existierte
   im State, wurde aber nie gerendert. */
.q-error {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(216, 90, 46, 0.35);
  background: rgba(216, 90, 46, 0.08);
  color: var(--lava-700);
  font-size: 0.9375rem;
  font-weight: 500;
}
