/* ═══════════════════════════════════════════════════════
   DARMTYP-QUIZ · style.css
   Design: Organic Science — warm cream + deep forest
   Fonts: Fraunces (display) + DM Sans (body)
═══════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────── */
:root {
  /* Light mode (default) */
  --bg:           #F5F0E8;
  --bg-card:      #FFFDF7;
  --bg-surface:   #EDE8DC;
  --accent:       #2D6A4F;
  --accent-muted: #52B788;
  --accent-light: #D8F3DC;
  --text-primary: #1A2E1A;
  --text-secondary:#4A5E4A;
  --text-muted:   #8A9E8A;
  --border:       rgba(45,106,79,0.15);
  --border-card:  rgba(45,106,79,0.12);
  --shadow-sm:    0 2px 8px rgba(29,53,29,0.07);
  --shadow-md:    0 8px 32px rgba(29,53,29,0.10);
  --shadow-lg:    0 20px 60px rgba(29,53,29,0.13);
  --hero-grad:    linear-gradient(160deg, #EAF4EC 0%, #F5F0E8 60%, #F0EAD6 100%);
  --result-grad:  linear-gradient(135deg, #2D6A4F 0%, #1B4332 100%);
  --result-text:  #FFFFFF;

  /* Radius tokens — driven by data-rundung */
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    18px;
  --radius-xl:    24px;
  --radius-pill:  999px;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Transitions */
  --transition: 0.2s ease;
}

/* Dark mode */
[data-modus="dark"] {
  --bg:           #0D1F0D;
  --bg-card:      #142214;
  --bg-surface:   #1A2E1A;
  --accent:       #52B788;
  --accent-muted: #74C69D;
  --accent-light: #1B4332;
  --text-primary: #E8F5E9;
  --text-secondary:#A8C5A0;
  --text-muted:   #5A8060;
  --border:       rgba(82,183,136,0.18);
  --border-card:  rgba(82,183,136,0.12);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.35);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.45);
  --hero-grad:    linear-gradient(160deg, #0D1F0D 0%, #0B1F12 60%, #0F1A14 100%);
  --result-grad:  linear-gradient(135deg, #52B788 0%, #2D6A4F 100%);
  --result-text:  #0D1F0D;
}

/* Roundness overrides */
[data-rundung="eckig"] {
  --radius-sm:    2px;
  --radius-md:    4px;
  --radius-lg:    6px;
  --radius-xl:    8px;
  --radius-pill:  4px;
}
[data-rundung="rund"] {
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --radius-pill:  999px;
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; }

.hidden { display: none !important; }

/* ── Container ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Typography ───────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(45,106,79,0.28);
}
.btn--primary:hover {
  background: var(--accent-muted);
  border-color: var(--accent-muted);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(45,106,79,0.36);
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.btn--next {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  margin-left: auto;
}
.btn--next:hover:not(:disabled) {
  background: var(--accent-muted);
  border-color: var(--accent-muted);
}
.btn--next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn--lg { padding: 15px 36px; font-size: 1.05rem; }
.btn--sm { padding: 8px 18px; font-size: 0.85rem; }
.btn--submit {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  margin-left: auto;
}
.btn--submit:hover {
  background: var(--accent-muted);
}

/* ── HERO ─────────────────────────────────────────── */
.hero {
  background: var(--hero-grad);
  padding: 64px 20px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(82,183,136,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45,106,79,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }

.hero__profile {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.hero__avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-card);
  box-shadow: 0 4px 20px rgba(45,106,79,0.2), 0 0 0 6px var(--accent-light);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero__bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* Social Icons */
.hero__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}
.social-icon:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ── INTRO SECTION ────────────────────────────────── */
.intro {
  padding: 72px 20px 64px;
  text-align: center;
}
.intro .container { text-align: center; }
.intro .section-lead { margin-left: auto; margin-right: auto; }

/* ── QUIZ SECTION ─────────────────────────────────── */
.quiz-section {
  padding: 0 20px 80px;
}

/* Progress bar */
.quiz-progress {
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}
.quiz-progress__bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz-progress__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-align: right;
}

/* Quiz step */
.quiz-step { animation: fadeInUp 0.35s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.quiz-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 28px;
  line-height: 1.3;
}
.quiz-hint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Quiz cards grid */
.quiz-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 480px) {
  .quiz-cards { grid-template-columns: 1fr; }
}
.quiz-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: all var(--transition);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.quiz-card:hover {
  border-color: var(--accent-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.quiz-card.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm);
}
.quiz-card__icon {
  font-size: 1.8rem;
  line-height: 1;
}
.quiz-card__label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Step actions */
.quiz-step__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

/* Slider */
.quiz-slider-wrap {
  padding: 24px 0;
  margin-bottom: 8px;
}
.quiz-slider-value-display {
  text-align: center;
  font-size: 2.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1;
}
.quiz-slider-unit {
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  font-weight: 400;
}
.quiz-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}
.quiz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(45,106,79,0.3);
  transition: transform var(--transition);
}
.quiz-slider::-webkit-slider-thumb:hover,
.quiz-slider:active::-webkit-slider-thumb {
  transform: scale(1.2);
}
.quiz-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(45,106,79,0.3);
  cursor: pointer;
}
.quiz-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Info note */
.quiz-info-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Loading spinner */
.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 64px 20px;
  color: var(--text-secondary);
  font-size: 1rem;
}
.quiz-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Contact block */
.quiz-contact-block {
  margin-bottom: 20px;
}
.quiz-contact-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.quiz-contact-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-input {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.quiz-input::placeholder { color: var(--text-muted); }
.quiz-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

/* ── RESULT SECTION ───────────────────────────────── */
.result-section {
  padding: 32px 20px 80px;
}
.result-card {
  background: var(--result-grad);
  color: var(--result-text);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: resultReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes resultReveal {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.result-card__top {
  padding: 40px 36px 32px;
  text-align: center;
  position: relative;
}
.result-card__top::after {
  content: '';
  position: absolute;
  bottom: 0; left: 36px; right: 36px;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.result-card__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 12px;
}
.result-card__type {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 10px;
}
.result-card__tagline {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.5;
}
.result-card__body {
  padding: 28px 36px;
}
.result-card__desc {
  font-size: 1rem;
  line-height: 1.75;
  opacity: 0.9;
  margin-bottom: 24px;
}
.result-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  opacity: 0.88;
  line-height: 1.5;
}
.result-tips li::before {
  content: '✓';
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}
.result-card__footer {
  padding: 20px 36px 28px;
  display: flex;
  justify-content: center;
}
.result-card__footer .btn--ghost {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.25);
}
.result-card__footer .btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
}

@media (max-width: 480px) {
  .result-card__top  { padding: 28px 20px 24px; }
  .result-card__body { padding: 20px 20px; }
  .result-card__footer { padding: 16px 20px 24px; }
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
  padding: 28px 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Reduced motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
