/* =========================================================================
   DATEV Cloud-Ready-Check — your admins
   MOBILE-FIRST: base styles target small screens; min-width breakpoints
   progressively enhance for tablet (>=640px) and desktop (>=1024px).
   Offizielle CI (Türkis + Grau). Alle Assets self-hosted (DSGVO).
   Marken-Schrift: Museo Sans (lizenzpflichtig) — Ersatz: Mulish (OFL).
   ========================================================================= */

/* ---- self-hosted fonts (variable woff2) ----
   Museo Sans ist lizenzpflichtig (exljbris). Bis die Dateien vorliegen dient
   Mulish als freie Ersatzschrift. Echtes Museo Sans aktivieren: woff2 unter
   /static/fonts/museosans-*.woff2 ablegen und den Block unten einkommentieren —
   die font-family-Kette bevorzugt bereits "Museo Sans". */

/* @font-face { font-family:"Museo Sans"; font-weight:400 800; font-display:swap;
     src:url("/static/fonts/museosans-latin.woff2") format("woff2"); } */

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/mulish-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/mulish-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- design tokens (offizielle CI: Türkis + Grau) ---- */
:root {
  --petrol: #00999A;
  --petrol-deep: #056b6c;
  --petrol-ink: #1c2b2b;
  --teal: #31B8BD;
  --teal-2: #00999A;

  --paper: #eef6f6;
  --paper-2: #dfeeee;
  --card: #ffffff;
  --ink: #1c2b2b;
  --muted: #7c817f;
  --text-grey: #6F6F6E;
  --line: #d3e5e5;
  --line-strong: #b9d6d6;
  --sky-1: #BFE2E3;

  --rot: #d7261e;
  --orange: #e8820c;
  --gelb: #d99a00;
  --gruen: #3f8f56;

  --font-display: "Museo Sans", "Mulish", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Museo Sans", "Mulish", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --pad: 20px;            /* horizontal gutter (mobile) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-grey);
  background: var(--paper);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* fine film grain for warmth/texture */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.4; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/></svg>");
}

::selection { background: var(--teal); color: var(--petrol-ink); }

a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* main fills the space between header and footer regardless of their heights */
main { flex: 1 0 auto; display: flex; flex-direction: column; }

/* ---- landing sky background (self-hosted SVG) ---- */
body.page-landing {
  background:
    radial-gradient(140% 70% at 50% 40%, rgba(255,255,255,0.5), rgba(255,255,255,0) 55%),
    url("/static/sky.svg") center top / cover no-repeat,
    #dff1f1;
}
body.page-landing::after { display: none; }
body.page-landing .site-header {
  background: transparent; border-top-color: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* Once scrolled, give the sticky header a real background so page content
   passing underneath it doesn't visually overlap the logo/label (mobile). */
body.page-landing .site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-top-color: var(--petrol); border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(1.1) blur(8px); backdrop-filter: saturate(1.1) blur(8px);
}
body.page-landing .hero { background: transparent; }

/* ---- typography ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; color: var(--petrol-ink); margin: 0; }

.eyebrow {
  font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--teal-2); display: inline-block; }
.eyebrow--index { color: var(--petrol); }
.eyebrow--index::before { display: none; }
.eyebrow .idx { font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(8px); backdrop-filter: saturate(1.1) blur(8px);
  border-top: 3px solid var(--petrol); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--pad); max-width: var(--wrap); margin: 0 auto; }
.logo { height: 40px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 9px; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.header-right .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); flex: 0 0 auto; }

/* ---- buttons ---- */
.btn {
  --_bg: var(--petrol); --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 600;
  padding: 14px 24px; border: 1.5px solid var(--_bg); border-radius: 3px;
  background: var(--_bg); color: var(--_fg); cursor: pointer; text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.25s;
}
.btn .arrow { transition: transform 0.28s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--petrol); }
.btn:hover .arrow { transform: translateX(5px); }
.btn-lg { padding: 16px 30px; font-size: 1.04rem; }
.btn-primary { --_bg: var(--petrol); }
.btn-ghost { --_bg: transparent; --_fg: var(--petrol); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--card); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* =========================================================================
   LANDING — centered hero; the cloud sky is the visual
   ========================================================================= */
.hero {
  position: relative; flex: 1 0 auto;
  display: grid; grid-template-rows: 1fr auto; align-items: center;
  padding: 32px 0 20px;
}
.hero > .wrap { align-self: center; }
.hero-center { width: 100%; max-width: 900px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-center .eyebrow { justify-content: center; }
.hero h1 { font-size: clamp(2.4rem, 9.5vw, 4.6rem); line-height: 1.06; margin: 16px 0 0; }
.hero h1 em { font-style: normal; color: var(--petrol); }
.hero-lead { font-size: 1.05rem; color: var(--muted); margin: 18px auto 26px; max-width: 54ch; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.hero-cta .btn { width: 100%; max-width: 340px; }
.hero-cta .fineprint { font-size: 0.85rem; color: var(--muted); }

.hero-domains { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.hero-domains .hd-label { width: 100%; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.hero-domains .tag {
  font-size: 0.82rem; font-weight: 600; color: var(--petrol-ink);
  background: rgba(255,255,255,0.62); border: 1px solid rgba(255,255,255,0.85);
  border-radius: 999px; padding: 7px 14px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 6px 16px -12px rgba(0,74,76,0.5);
}

.hero-footnote {
  margin: 24px auto 0; max-width: 60ch; padding: 0 var(--pad);
  font-size: 0.72rem; line-height: 1.4; color: var(--muted); text-align: center;
}
.hero-footnote sup { color: var(--petrol); }

/* =========================================================================
   SHELL (quiz / email / confirm / legal content)
   ========================================================================= */
.shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 32px var(--pad) 56px; }

/* ---- quiz ---- */
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quiz-domain { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-2); font-weight: 600; }
.quiz-count { font-family: var(--font-display); font-size: 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-count b { color: var(--petrol-ink); }

.progress { height: 3px; background: var(--line); position: relative; overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; background: var(--petrol); transition: width 0.5s var(--ease); }
.progress-bar::after { content: ""; position: absolute; right: 0; top: -3px; width: 3px; height: 9px; background: var(--teal); }

/* Fester Frage-Bereich: reserviert Platz für die längste Frage, damit die
   Antworten immer auf gleicher Höhe beginnen (1- vs. 2-/3-zeilige Fragen). */
.question-text {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  color: var(--petrol-ink); font-size: clamp(1.45rem, 5.6vw, 2.3rem);
  line-height: 1.2; max-width: 34ch;
  margin: 40px 0 28px; min-height: 3.6em; /* reserve space so answers always align */
}

.options { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.option {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 12px 16px 8px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background 0.2s, padding-left 0.25s var(--ease);
}
.option::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--petrol); transform: scaleY(0); transform-origin: top; transition: transform 0.25s var(--ease); }
.option:hover { background: var(--card); }
.option:hover::before { transform: scaleY(1); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .marker {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 0.98rem; color: var(--muted); transition: all 0.2s var(--ease);
}
.option .option-label { font-size: 1.02rem; color: var(--ink); }
.option:has(input:checked) { background: var(--card); }
.option:has(input:checked)::before { transform: scaleY(1); }
.option:has(input:checked) .marker { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.option:has(input:focus-visible) .marker { outline: 2px solid var(--teal-2); outline-offset: 2px; }

.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; gap: 12px; }
.quiz-nav .btn { flex: 1 1 auto; }

.form-error {
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--rot) 8%, var(--card)); color: #a81b13;
  border: 1px solid color-mix(in srgb, var(--rot) 35%, transparent);
  border-radius: 4px; padding: 12px 14px; margin: 0 0 22px; font-size: 0.92rem;
}
.form-error::before { content: "!"; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; }

/* ---- email capture ---- */
.email-title { font-size: clamp(1.6rem, 6vw, 2.6rem); margin: 26px 0 12px; max-width: 20ch; }
.email-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 30px; max-width: 48ch; }
.email-form { display: flex; flex-direction: column; gap: 24px; }
.field-label { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.optional-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; }
.input { width: 100%; font-family: var(--font-sans); font-size: 1.1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--line-strong); padding: 10px 2px; transition: border-color 0.2s; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.input:focus { outline: none; border-color: var(--petrol); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; color: var(--ink); line-height: 1.5; }
.consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--petrol); }
.consent--optional { font-size: 0.88rem; color: var(--muted); }
.consent--optional b { color: var(--petrol); }
.email-form .btn { width: 100%; }

/* ---- confirm ---- */
.confirm { text-align: left; max-width: 620px; }
.confirm-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--gruen); color: #fff; display: grid; place-items: center; margin-bottom: 22px; }
.confirm-mark svg { width: 30px; height: 30px; }
.confirm h1 { font-size: clamp(1.8rem, 6vw, 3rem); margin-bottom: 16px; }
.confirm-lead { font-size: 1.1rem; color: var(--muted); }
.confirm-note { margin-top: 20px; padding: 16px 18px; background: var(--card); border-left: 3px solid var(--teal); border-radius: 0 6px 6px 0; font-size: 0.95rem; }
.confirm .btn { margin-top: 26px; }

/* ---- legal ---- */
.legal { max-width: 720px; }
.legal h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin-bottom: 10px; }
.legal h2 { font-size: 1.2rem; margin: 26px 0 8px; color: var(--petrol); }
.legal h3 { font-size: 1.02rem; margin: 18px 0 6px; color: var(--ink); }
.legal p { margin: 0 0 14px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--petrol-deep); color: #dfeceb; border-top: 3px solid var(--teal); margin-top: auto; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 16px var(--pad);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 0.84rem;
}
.footer-inner .fclaim { opacity: 0.85; }
.footer-inner .fclaim b { color: #fff; font-weight: 600; }
.fnav { display: flex; flex-wrap: wrap; gap: 18px; }
.fnav a { color: #dfeceb; text-decoration: none; opacity: 0.85; }
.fnav a:hover { opacity: 1; text-decoration: underline; }

/* =========================================================================
   MOTION
   ========================================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: rise 0.7s var(--ease) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.14s; }
.reveal.d3 { animation-delay: 0.23s; }
.reveal.d4 { animation-delay: 0.32s; }
.reveal.d5 { animation-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; }
}

/* =========================================================================
   >= 640px  (tablet / large phone landscape)
   ========================================================================= */
@media (min-width: 640px) {
  :root { --pad: 28px; }
  body { font-size: 1.0625rem; }

  .logo { height: 52px; }
  .header-right { font-size: 0.72rem; letter-spacing: 0.16em; }

  .hero { padding: 24px 0 40px; }
  .hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
  .hero-lead { font-size: 1.18rem; margin: 22px auto 30px; }
  .hero-cta { flex-direction: row; justify-content: center; gap: 22px; }
  .hero-cta .btn { width: auto; }
  .hero-domains { gap: 10px; margin-top: 40px; }
  .hero-domains .hd-label { width: auto; margin-bottom: 0; margin-right: 4px; }
  .hero-domains .tag { font-size: 0.9rem; padding: 8px 17px; }

  .shell { padding: 56px 28px 80px; }
  .question-text { font-size: clamp(1.85rem, 3.4vw, 2.3rem); min-height: 2.4em; margin: 48px 0 30px; }
  .option { padding: 20px 20px 20px 8px; gap: 18px; }
  .option:hover { padding-left: 18px; }
  .option:has(input:checked) { padding-left: 18px; }
  .option .marker { width: 40px; height: 40px; }
  .option .option-label { font-size: 1.12rem; }
  .quiz-nav .btn { flex: 0 0 auto; }

  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; }
}

/* =========================================================================
   >= 1024px  (desktop) — bigger logo per CI, more generous hero
   ========================================================================= */
@media (min-width: 1024px) {
  .logo { height: 60px; }
  .hero { padding: 20px 0 48px; }
  .hero-lead { font-size: 1.2rem; }
}
