:root {
  /* Brand colors mirror the app — see lib/core/theme/brand_colors.dart */
  --primary: #0E5A43;        /* BrandColors.seed */
  --primary-dark: #071A12;   /* BrandColors.appBarBackground */
  --primary-light: #1F9370;  /* lightened seed, gradients only */
  --primary-soft: #E8F5E9;   /* BrandColors.summaryBackground */

  /* Card icon accents, darkened from the app icon's own palette so thin
     strokes stay legible on the tint. Contrast: 4.8:1 warm, 7.6:1 cool. */
  --accent-warm: #A05614;      --accent-warm-soft: #FBEEE0;
  --accent-cool: #1D4C7C;      --accent-cool-soft: #E6EFF7;
  /* Neutral greys with a faint warm cast — plain slate reads cold next to the green */
  --text: #1A1E1C;
  --text-muted: #6A716E;
  --bg: #ffffff;
  --bg-soft: #F7F9F8;
  --border: #E3E7E5;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* German compounds ("Ausbildungsnachweis") overflow narrow viewports; hyphens needs lang="de" */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }

/* Keyboard focus. :focus-visible keeps the ring off mouse clicks.
   Inside the CTA the ring turns white — green on green is invisible. */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.cta :focus-visible { outline-color: #fff; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text);
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .9rem;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--primary); color: #fff !important; font-weight: 600;
  text-decoration: none; font-size: .95rem; transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.hero .badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .85rem; font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 20px;
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.2rem; color: var(--text-muted);
  max-width: 640px; margin: 0 auto 36px;
}
.store-badges {
  display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap;
}
/* Original store artwork — never restyled, only scaled uniformly.
   Both badges render 56px tall; the 14px gap is the quarter-height clear space
   Apple and Google each require. */
.store-badge { display: inline-flex; transition: transform .15s, opacity .15s; }
.store-badge:hover { transform: translateY(-2px); opacity: .9; }
.store-badge img { display: block; height: 56px; width: auto; }
/* Google bakes 29px of clear space into the top and bottom of its 646x250 asset,
   so the image must be taller for the visible badge to match Apple's 56px. */
.store-badge.play img { height: 73px; }
.hero-note { margin-top: 16px; font-size: .85rem; color: var(--text-muted); }

/* QR codes — desktop only, hidden in the media query below */
.qr-block { margin-top: 40px; }
.qr-hint { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; }
.qr-codes { display: flex; gap: 40px; justify-content: center; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr img {
  /* 180px minus 2x16px padding = 148px for 37 modules, exactly 4px each.
     Fractional module sizes blur the edges and break some scanners.
     White background is explicit — the SVGs themselves are transparent. */
  display: block; width: 180px; height: 180px; padding: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
}
.qr figcaption {
  font-size: .9rem; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.35;
}
.qr figcaption span {
  display: block; font-size: .78rem; font-weight: 400; color: var(--text-muted);
}

/* Features */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); letter-spacing: -0.01em; margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.grid {
  display: grid; gap: 24px;
  /* min() keeps the 280px floor from exceeding the container on narrow screens */
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
/* Stroke styling lives here so the inline SVGs carry only their paths */
.card .icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.card .icon.warm { background: var(--accent-warm-soft); color: var(--accent-warm); }
.card .icon.cool { background: var(--accent-cool-soft); color: var(--accent-cool); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: .95rem; }

/* How it works */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.step { text-align: center; padding: 0 12px; }
.step .num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .95rem; }

/* CTA */
.cta {
  text-align: center; padding: 80px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 24px; color: #fff; margin: 0 24px 72px;
}
.cta h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); margin-bottom: 12px; letter-spacing: -0.01em; }
.cta p { opacity: .9; margin-bottom: 28px; font-size: 1.05rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; font-size: .9rem; color: var(--text-muted);
}
/* Padded to a usable tap target — on mobile these are the only links to the legal pages */
.footer-inner a {
  display: inline-block; padding: 10px 0;
  color: var(--text-muted); text-decoration: none; margin-left: 20px;
}
.footer-inner a:hover { color: var(--text); }

/* Legal / content page (Datenschutz, Impressum, …) */
/* Keeps .container's horizontal padding — the shorthand used to reset it to 0,
   which let the text run edge to edge below ~1100px. max-width caps the line
   length; the 1080px container is far too wide to read long legal text in. */
.legal { padding: 56px 24px 72px; max-width: 680px; }
.legal .back-link {
  display: inline-block; margin-bottom: 24px;
  color: var(--primary); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.legal .back-link:hover { text-decoration: underline; }
.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.02em; margin-bottom: 8px;
}
.legal .meta { color: var(--text-muted); font-size: .95rem; margin-bottom: 40px; }
.legal h2 {
  font-size: 1.35rem; letter-spacing: -0.01em;
  margin: 40px 0 12px; padding-top: 8px;
}
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.legal p { margin-bottom: 14px; color: var(--text); }
.legal ul { margin: 0 0 14px 1.25rem; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--primary); text-decoration: underline; }
.legal a:hover { color: var(--primary-dark); }
.legal .card {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px;
}
.legal .card p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 64px 0 48px; }
  .cta { margin: 0 12px 48px; }
  .qr-block { display: none; }
}
