/* ============================================================
   Tiefentest - Design-System "Das Lot"
   Leitmotiv: die Lotlinie (Echolot/Senkblei). Jede Seite ist eine
   Tiefenmessung: oben die helle Oberfläche (warmes Papier), beim
   Scrollen geht es hinab, der Footer ist der Grund (dunkles Petrol).
   Typografie: Fraunces (Display-Serif) + Instrument Sans (UI/Text).
   ============================================================ */

/* ---------- Token ---------- */
:root {
  /* Fallback-Hex zuerst, dann OKLCH für moderne Browser */
  --paper: #f6f3ec;
  --paper-deep: #eee9dd;
  --ink: #1c2733;
  --petrol: #14565c;
  --petrol-soft: #e3ecea;
  --petrol-deep: #0d2c33;
  --brass: #a8762a;
  --muted: #5d6a74;
  --line: #d9d2c2;
  --card: #fdfcf8;
  --rose: #a04848;
  --amber: #94661c;
  --blue: #2e5f7a;
  --test-accent: var(--petrol);
  --radius: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@supports (color: oklch(50% 0.1 200)) {
  :root {
    --paper: oklch(96.2% 0.013 92);
    --paper-deep: oklch(93.5% 0.018 92);
    --ink: oklch(25.5% 0.027 235);
    --petrol: oklch(41% 0.068 200);
    --petrol-soft: oklch(92.5% 0.022 195);
    --petrol-deep: oklch(27% 0.045 210);
    --brass: oklch(60% 0.105 75);
    --muted: oklch(50% 0.025 230);
    --line: oklch(86% 0.02 92);
    --card: oklch(98.3% 0.008 92);
    --rose: oklch(48% 0.105 25);
    --amber: oklch(52% 0.1 75);
    --blue: oklch(46% 0.075 235);
  }
}

/* ---------- Grundgerüst ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  background:
    linear-gradient(to bottom, var(--paper) 0%, var(--paper) 72%, var(--paper-deep) 100%);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 60;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.1rem); margin-bottom: 1.1rem; text-wrap: balance; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 2.4rem 0 0.7rem; }
p { margin-bottom: 1.05rem; }
a { color: var(--petrol); text-decoration-color: color-mix(in srgb, var(--petrol) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass); }
strong { font-weight: 600; }
::selection { background: var(--petrol); color: var(--paper); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---------- Layout + Lotlinie ---------- */
main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.2rem 1.4rem 5rem;
  position: relative;
  flex: 1;
}
/* Die Lotlinie: feine Messlinie am linken Rand der Spalte (ab Tablet) */
@media (min-width: 920px) {
  main { padding-left: 4.5rem; }
  main::before {
    content: "";
    position: absolute;
    top: 3.2rem; bottom: -2rem; left: 1.6rem;
    width: 1px;
    background: linear-gradient(to bottom, var(--line), var(--line));
  }
  /* Das Senkblei am Ende der Linie */
  main::after {
    content: "";
    position: absolute;
    bottom: -2.45rem; left: calc(1.6rem - 4px);
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--brass);
  }
}

/* Tiefenmarken: nummerierte Abschnitts-Anker */
.depth-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 3.2rem 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.depth-mark::before {
  content: "";
  width: 1.6rem; height: 1px;
  background: var(--test-accent);
}
.depth-mark .num { color: var(--test-accent); font-variant-numeric: tabular-nums; }
@media (min-width: 920px) {
  .depth-mark { position: relative; }
  /* Tick auf der Lotlinie */
  .depth-mark::after {
    content: "";
    position: absolute;
    left: -3.05rem; top: 50%;
    width: 0.9rem; height: 1px;
    background: var(--test-accent);
  }
}

/* ---------- Kopfzeile ---------- */
header.site {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.3rem 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 920px) { header.site { padding-left: 4.5rem; } }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark svg { display: block; }
.wordmark:hover { text-decoration: none; color: var(--petrol); }
header.site nav { display: flex; gap: 1.1rem; font-size: 0.92rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--petrol); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- KI-Transparenz ---------- */
.ki-hinweis {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  padding: 0.32rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 999px;
  margin-bottom: 2.2rem;
}
.ki-hinweis::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brass);
  flex-shrink: 0;
}

/* ---------- Startseite: Test-Index ---------- */
.hero-claim {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  max-width: 56ch;
}
.test-index { list-style: none; margin: 0.6rem 0 0.4rem; }
.test-index li { border-top: 1px solid var(--line); }
.test-index li:last-child { border-bottom: 1px solid var(--line); }
.test-link {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: baseline;
  gap: 0.4rem 1rem;
  padding: 1.25rem 0.4rem 1.3rem 0;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: transform 0.35s var(--ease-out);
}
.test-link .num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-c, var(--petrol));
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.test-link .title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 3.4vw, 1.8rem);
  font-weight: 560;
  line-height: 1.15;
}
.test-link .question { display: block; font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.95rem; color: var(--muted); margin-top: 0.3rem; font-weight: 400; }
.test-link .meta { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.test-link .meta::after { content: " →"; color: var(--accent-c, var(--petrol)); }
.test-link::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 2px;
  background: var(--accent-c, var(--petrol));
  transition: width 0.45s var(--ease-out);
}
.test-link:hover { transform: translateX(6px); }
.test-link:hover::before { width: 2.6rem; }
.test-link.t-beziehung { --accent-c: var(--rose); }
.test-link.t-geld { --accent-c: var(--amber); }
.test-link.t-arbeit { --accent-c: var(--blue); }
@media (max-width: 560px) {
  .test-link { grid-template-columns: 1fr; padding-right: 0; }
  .test-link .num { display: none; }
  .test-link .meta { white-space: normal; }
}

/* ---------- Buttons + Formulare ---------- */
.btn, button.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  background: var(--petrol);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 500;
  font-size: 1.02rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { background: color-mix(in srgb, var(--petrol) 86%, var(--brass)); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; transform: none; }
form.kontakt { margin-top: 1rem; display: grid; gap: 0.85rem; max-width: 32rem; }
form.kontakt label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
form.kontakt input, form.kontakt textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.2s;
}
form.kontakt input:focus, form.kontakt textarea:focus { border-color: var(--petrol); outline: none; }
form.kontakt textarea { min-height: 130px; resize: vertical; }
form.kontakt button { justify-self: start; }

/* ---------- Quiz ---------- */
.quiz-shell { margin-top: 1.4rem; }
.progress {
  position: relative;
  height: 14px;
  margin-bottom: 1.6rem;
  background:
    repeating-linear-gradient(to right,
      var(--line) 0, var(--line) 1px,
      transparent 1px, transparent calc(100% / 16));
  background-size: calc(100% + 1px) 7px;
  background-position: 0 bottom;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}
.progress > div {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  background: var(--test-accent);
  width: 0%;
  transition: width 0.45s var(--ease-out);
}
.progress > div::after {
  content: "";
  position: absolute;
  right: -4px; top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass);
}
.question-text {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  font-weight: 560;
  line-height: 1.3;
  min-height: 3.2em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.55rem; }
.scale button {
  padding: 0.95rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s var(--ease-out), background 0.2s;
}
/* Antwort-Skala als Tiefenstufen: von der Oberfläche in die Tiefe */
.scale button:nth-child(1) { background: var(--card); }
.scale button:nth-child(2) { background: color-mix(in srgb, var(--petrol-soft) 45%, var(--card)); }
.scale button:nth-child(3) { background: color-mix(in srgb, var(--petrol-soft) 90%, var(--card)); }
.scale button:nth-child(4) { background: color-mix(in srgb, var(--petrol) 16%, var(--card)); }
.scale button:nth-child(5) { background: color-mix(in srgb, var(--petrol) 30%, var(--card)); }
.scale button:hover {
  border-color: var(--test-accent);
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .scale { grid-template-columns: 1fr; gap: 0.45rem; }
  .scale button { padding: 0.75rem 0.9rem; text-align: left; font-size: 0.92rem; }
}
.back-btn {
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit; font-size: 0.88rem;
  margin-top: 1.1rem;
  padding: 0.2rem 0;
}
.back-btn:hover { color: var(--petrol); }

/* ---------- Ergebnis ---------- */
.result-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.result-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  font-weight: 640;
  line-height: 1.05;
  color: var(--test-accent);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}
.result-secondary { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.8rem; }
#pattern-text p { max-width: 60ch; }
#pattern-text strong { color: var(--test-accent); font-weight: 600; }

/* ---------- Zonen (statt Karten) ---------- */
.zone {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.7rem 1.5rem;
  margin: 2.2rem 0 1.4rem;
  position: relative;
}
.zone::before {
  content: "";
  position: absolute;
  top: -1px; left: 1.7rem;
  width: 3.2rem; height: 2px;
  background: var(--brass);
}
.zone h2 { margin-top: 0; font-size: 1.35rem; }
.price-line { font-weight: 600; font-size: 1.05rem; margin: 0.9rem 0 1.1rem; }

/* Kauf-Box (Stufe 2) */
.consent {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.95rem;
  cursor: pointer;
  padding-left: 1.9rem;
  text-indent: -1.9rem;
  line-height: 1.55;
}
.consent input { width: 1.05rem; height: 1.05rem; margin-right: 0.72rem; vertical-align: -0.14rem; cursor: pointer; text-indent: 0; accent-color: var(--petrol); }
.buy-error { color: var(--rose); font-size: 0.9rem; margin-top: 0.9rem; }

/* ---------- Kleingedrucktes ---------- */
.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  max-width: 60ch;
}

/* ---------- Fußzeile: der Grund ---------- */
footer.site {
  background: var(--petrol-deep);
  color: color-mix(in srgb, var(--paper) 78%, var(--petrol-deep));
  margin-top: 3rem;
}
footer.site .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.4rem 1.4rem 2.6rem;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  align-items: baseline;
  justify-content: space-between;
}
@media (min-width: 920px) { footer.site .inner { padding-left: 4.5rem; } }
footer.site a { color: color-mix(in srgb, var(--paper) 88%, var(--petrol-deep)); text-decoration-color: color-mix(in srgb, var(--paper) 30%, transparent); }
footer.site a:hover { color: var(--paper); text-decoration-color: var(--brass); }
footer.site .transparenz { width: 100%; font-size: 0.8rem; color: color-mix(in srgb, var(--paper) 55%, var(--petrol-deep)); }
footer.site nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Bewegung ---------- */
.reveal { animation: rise 0.65s var(--ease-out) both; }
.reveal.d1 { animation-delay: 0.07s; }
.reveal.d2 { animation-delay: 0.14s; }
.reveal.d3 { animation-delay: 0.21s; }
.reveal.d4 { animation-delay: 0.28s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Hilfsklassen ---------- */
.hidden { display: none; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.2rem); }

/* Test-Akzent pro Seite */
body.accent-beziehung { --test-accent: var(--rose); }
body.accent-geld { --test-accent: var(--amber); }
body.accent-arbeit { --test-accent: var(--blue); }
