/* IQFuchs – warmes, modernes Design. Schrift selbst gehostet (assets/fonts, SIL OFL). */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("fonts/nunito.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #ea580c;
  --brand-2: #f97316;
  --brand-dark: #c2410c;
  --brand-deep: #9a3412;
  --brand-soft: #fff1e6;
  --brand-line: #fed7aa;
  --night: #1c1310;
  --night-2: #2b1e18;
  --text: #1c1917;
  --muted: #6b625c;
  --line: #efe4da;
  --bg: #fffaf5;
  --card: #ffffff;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(28, 19, 16, 0.04), 0 12px 32px -12px rgba(124, 45, 18, 0.14);
  --shadow-lg: 0 2px 4px rgba(28, 19, 16, 0.05), 0 30px 60px -24px rgba(124, 45, 18, 0.28);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand-dark); }
::selection { background: var(--brand-line); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 800; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 700px; margin-left: auto; margin-right: auto; }
main, main.wrap { padding-top: 32px; }

/* Kopf & Fuß */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 250, 245, 0.86); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.4rem; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.logo img { width: 38px; height: 38px; filter: drop-shadow(0 3px 6px rgba(28, 19, 16, 0.25)); }
.logo span b { color: var(--brand); font-weight: 900; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 0.97rem; font-weight: 700; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.nav-cta { background: var(--night); color: #fff; }
.nav a.nav-cta:hover { background: #000; color: #fff; }
@media (max-width: 520px) { .nav:has(.nav-cta) a:not(.nav-cta) { display: none; } .nav a { padding: 8px 12px; } }

.site-footer { margin-top: 88px; padding: 36px 0 44px; background: var(--night); color: #b9aca4; font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: #e7ddd6; text-decoration: none; }
.site-footer a:hover { color: var(--brand-2); }

/* Bausteine */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--brand-2), var(--brand-dark)); color: #fff;
  font-family: inherit; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em;
  text-decoration: none; box-shadow: 0 8px 20px -8px rgba(194, 65, 12, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(194, 65, 12, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #e7e1dc; color: #8a817b; cursor: not-allowed; box-shadow: none; transform: none; filter: none; }
.btn.secondary { background: var(--card); color: var(--text); border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgba(28, 19, 16, 0.05); }
.btn.secondary:hover { border-color: var(--brand-line); background: #fffdfb; }
.btn.light { background: #fff; color: var(--brand-deep); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); }
.btn.block { width: 100%; }
.btn .arr { transition: transform 0.15s; }
.btn:hover .arr { transform: translateX(3px); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 18px; }
@media (min-width: 720px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
.hidden { display: none !important; }
.notice { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 14px 16px; }
.error-box { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 14px 16px; }
.checks { list-style: none; padding: 0; margin: 0; text-align: left; }
.checks li { padding-left: 32px; position: relative; margin: 10px 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 21px; height: 21px; border-radius: 50%; background: var(--ok-soft); }
.checks li::after { content: ""; position: absolute; left: 7px; top: calc(0.2em + 5px); width: 6px; height: 10px; border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; transition: border-color 0.15s, box-shadow 0.15s; }
details + details { margin-top: 10px; }
details[open] { border-color: var(--brand-line); box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; font-size: 1.2rem; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: -4px 0 18px; color: #44403c; }

/* Startseite: dunkler Kopfbereich */
.home main { padding-top: 14px; }
.home-hero { position: relative; isolation: isolate; overflow: hidden; margin: 0 12px; border-radius: 32px; background: radial-gradient(800px 420px at 85% 10%, rgba(249, 115, 22, 0.35), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(234, 88, 12, 0.22), transparent 60%), var(--night); color: #e9dfd8; padding: 64px 0 72px; }
@media (min-width: 1100px) { .home-hero { max-width: 1240px; margin: 0 auto; } }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("muster.svg") 0 0 / 220px 220px; opacity: 0.06; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
.hero-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.home-hero h1 { color: #fff; font-size: clamp(2.4rem, 6.4vw, 4.2rem); line-height: 1.04; letter-spacing: -0.035em; }
.home-hero h1 .hl { background: linear-gradient(90deg, #fdba74, var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero .lead { font-size: 1.18rem; color: #cdbfb6; max-width: 540px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #fde6d4; margin-bottom: 22px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.home-hero .cta-row { margin-top: 30px; }
.home-hero .cta-note { color: #b9aca4; font-size: 0.92rem; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.facts div { color: #b9aca4; font-size: 0.9rem; font-weight: 700; }
.facts strong { display: block; color: #fff; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; }

/* Beispielaufgabe im Kopfbereich */
.sample { background: #fff; color: var(--text); border-radius: 26px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); transform: rotate(1.5deg); max-width: 400px; justify-self: center; width: 100%; }
.sample-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 800; color: var(--muted); margin-bottom: 14px; }
.sample-head .timer-mini { font-variant-numeric: tabular-nums; background: var(--brand-soft); color: var(--brand-dark); padding: 3px 10px; border-radius: 999px; }
.sample .matrix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; background: #faf6f2; border-radius: 16px; }
.sample .matrix span { aspect-ratio: 1; border-radius: 12px; background: #fff; border: 1.5px solid #e7ddd4; display: grid; place-items: center; }
.sample .matrix span.q { border: 2px dashed var(--brand-2); background: #fff7ed; color: var(--brand-2); font-weight: 900; font-size: 1.8rem; }
.sample svg { width: 58%; height: 58%; }
.shape-f { fill: var(--night); stroke: var(--night); stroke-width: 3; stroke-linejoin: round; }
.shape-o { fill: none; stroke: var(--night); stroke-width: 3; stroke-linejoin: round; }
.sample-q { font-weight: 800; font-size: 0.95rem; margin: 14px 2px 10px; }
.sample .answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sample .answers span { aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--line); display: grid; place-items: center; }
.sample .answers span.pick { border-color: var(--brand); background: var(--brand-soft); }

/* Startseite: Abschnitte */
section.block { padding: 88px 0 0; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.kicker { display: block; color: var(--brand-dark); font-weight: 900; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.steps { display: grid; gap: 14px; counter-reset: st; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.step::before { counter-increment: st; content: counter(st); flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--night); color: #fff; font-weight: 900; font-size: 1.1rem; }
.step h3 { margin: 2px 0 4px; }
.step p { margin: 0; color: var(--muted); }
.how { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) { .how { grid-template-columns: 1.1fr 0.9fr; gap: 32px; } }
.price-card { position: relative; border: 2px solid var(--brand-line); background: linear-gradient(180deg, #fff, #fffaf5); box-shadow: var(--shadow-lg); padding: 30px; }
.price-card .price { font-size: 3.4rem; font-weight: 900; color: var(--text); letter-spacing: -0.04em; line-height: 1; margin: 10px 0 4px; }
.price-card .price small { font-size: 1rem; color: var(--muted); font-weight: 800; letter-spacing: 0; }
.price-card .checks { margin: 18px 0 22px; }
.feature .icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 18px; }
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }
.promo { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; padding: 40px 26px; background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 50%, var(--brand-dark) 100%); color: #fff; display: grid; gap: 28px; align-items: center; box-shadow: var(--shadow-lg); }
@media (min-width: 820px) { .promo { grid-template-columns: 1.3fr 1fr; padding: 52px; } }
.promo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("muster.svg") 0 0 / 200px 200px; opacity: 0.12; }
.promo h2 { color: #fff; }
.promo p { color: #fff3ea; }
.promo .badge { background: rgba(255, 255, 255, 0.18); color: #fff; }
.promo .checks li::before { background: rgba(255, 255, 255, 0.22); }
.promo .checks li::after { border-color: #fff; }
.promo .checks { font-weight: 700; }

/* Test */
.test-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; font-weight: 700; }
.timer { font-variant-numeric: tabular-nums; font-weight: 900; padding: 7px 14px; border-radius: 999px; background: var(--night); color: #fff; }
.timer.warn { background: var(--bad); color: #fff; }
.progress { height: 10px; background: #f6e3d3; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand-dark)); width: 0; border-radius: 999px; transition: width 0.25s ease; }
.question { margin-top: 18px; }
.stem-svg { max-width: 380px; margin: 0 auto; }
.series { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 900; text-align: center; letter-spacing: 0.02em; margin: 18px 0; word-spacing: 0.15em; font-variant-numeric: tabular-nums; }
.prompt { font-size: 1.12rem; font-weight: 800; }
.options { display: grid; gap: 10px; margin-top: 18px; grid-template-columns: repeat(2, 1fr); }
.options.svg-opts { grid-template-columns: repeat(3, 1fr); max-width: 420px; margin-left: auto; margin-right: auto; }
@media (min-width: 600px) { .options.text-opts { grid-template-columns: repeat(2, 1fr); } }
.opt {
  border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 13px;
  font: inherit; font-weight: 800; cursor: pointer; text-align: center; color: var(--text);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.opt:hover { border-color: #fdba74; transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(124, 45, 18, 0.35); }
.opt.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt svg { display: block; width: 100%; }
.svg-opts .opt { padding: 6px; }
.test-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; justify-content: center; }
.dot { width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; color: var(--text); }
.dot.answered { background: #fed7aa; border-color: #fdba74; }
.dot.current { outline: 2.5px solid var(--brand); outline-offset: 1px; }

/* Ergebnis & Paywall */
.score-hero { text-align: center; padding: 34px 24px; }
.score-hero .iq { font-size: clamp(3.8rem, 15vw, 6rem); font-weight: 1000; letter-spacing: -0.04em; background: linear-gradient(180deg, var(--brand-2), var(--brand-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin: 10px 0; }
.blurred { filter: blur(9px); user-select: none; pointer-events: none; }
.offer { border: 2px solid var(--line); border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; background: var(--card); transition: border-color 0.12s, background 0.12s; }
.offer:hover { border-color: var(--brand-line); }
.offer + .offer { margin-top: 10px; }
.offers { margin-bottom: 14px; }
.offer .small { line-height: 1.45; display: inline-block; margin-top: 2px; }
.offer.active { border-color: var(--brand); background: var(--brand-soft); }
.offer input { margin-top: 5px; accent-color: var(--brand-dark); }
.offer .price { margin-left: auto; font-weight: 900; white-space: nowrap; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; margin: 16px 0; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand-dark); flex: none; }
.bar { height: 12px; background: #f6ece4; border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand-dark)); border-radius: 999px; }
.cat-row + .cat-row { margin-top: 16px; }
.cat-row .label { display: flex; justify-content: space-between; font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.review-item { border-top: 1px solid var(--line); padding: 18px 0; }
.review-item .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tag { font-size: 0.8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.review-item .options { pointer-events: none; }
.review-item .stem-svg { max-width: 240px; }
.review-item .options.svg-opts { max-width: 300px; }
.review-item .series { font-size: 1.3rem; }
.curve { max-width: 520px; margin: 0 auto; display: block; }

/* Training */
.hero { padding: 36px 0 12px; }
.hero .lead { font-size: 1.15rem; color: #44403c; max-width: 640px; }
.cat-card { cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; display: flex; flex-direction: column; align-items: flex-start; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.cat-card h3 { font-size: 1.25rem; }
.cat-card .badge { margin-top: auto; }
.cat-card:hover { border-color: #fdba74; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feedback { margin-top: 16px; padding: 16px; border-radius: 14px; }
.feedback.ok { background: var(--ok-soft); }
.feedback.bad { background: var(--bad-soft); }

/* Rechtstexte */
main.legal { padding-top: 44px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { margin-top: 1.8em; font-size: 1.3rem; }
.legal .placeholder { background: #fef9c3; padding: 0 4px; border-radius: 4px; }

/* Urkunde */
.cert-preview { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); margin: 14px 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.field input { font: inherit; font-weight: 600; padding: 13px 15px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15); }
.field input.invalid { border-color: var(--bad); }
.score-hero .cta-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
