:root {
  --bg: #ffffff;
  --accent: #2f6690;
  --accent-soft: #eaf2f7;
  --accent-soft2: #d7e6ee;
  --text: #2b2b28;
  --text-muted: #666660;
  --border: #e6e6e2;
  font-size: 18px;

  /* Golden-ratio-basierte Abstandsskala (φ ≈ 1.618) */
  --space-1: 0.5rem;
  --space-2: 0.809rem;
  --space-3: 1.309rem;
  --space-4: 2.118rem;
  --space-5: 3.427rem;
  --space-6: 5.545rem;
  --space-7: 8.972rem;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* --- Gate --- */

#gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  padding: 24px;
}

#gate.hidden {
  display: none;
}

.gate-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.gate-card h1 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--accent);
}

.gate-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.gate-card input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  margin-bottom: 14px;
  background: #fafaf8;
  color: var(--text);
}

.gate-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.gate-card button {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gate-card button:hover {
  filter: brightness(0.9);
}

.gate-error {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #a4453b;
  margin-top: 10px;
}

/* --- Site --- */

#site {
  display: none;
}

#site.visible {
  display: block;
}

/* Nav */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.nav-inner {
  max-width: 980px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nav-brand {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.nav-emergency {
  color: #a4453b;
  font-weight: 600;
}

#nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

#nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#nav-burger.open span:nth-child(2) {
  opacity: 0;
}

#nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero — bewusst deutlich abgesetzt von den übrigen Sektionen (above the fold) */

.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at 80% 20%, var(--accent-soft2) 0%, var(--accent-soft) 38%, var(--bg) 78%);
}

.hero-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-6) 24px;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.hero-text {
  /* Golden-ratio-Split: Text nimmt ~61.8%, Bildspalte ~38.2% */
  flex: 1.618 1 360px;
}

.hero-text .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-text h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  margin: 10px 0 14px;
  color: #222;
}

.hero-claim {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  font-style: italic;
}

.hero-photo {
  flex: 1 1 220px;
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photo img {
  width: 236px;
  height: 236px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

/* Pusteblume: fluffiger Kopf aus 56 Einzelfasern mit Astloch-Spitzen, Samen treiben einzeln im Wind weg */

.dandelion {
  position: absolute;
  top: -70px;
  right: -110px;
  width: 300px;
  height: 300px;
  color: var(--accent);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

.dandelion-head,
.dandelion-stem {
  opacity: 0.85;
}

.seed {
  transform-origin: center;
  animation: drift 11s ease-in infinite;
}

.seed-1 { animation-delay: 0s; }
.seed-2 { animation-delay: 2.1s; }
.seed-3 { animation-delay: 4.3s; }
.seed-4 { animation-delay: 6.5s; }
.seed-5 { animation-delay: 8.6s; }

@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(70px, -80px) rotate(50deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .seed { animation: none; opacity: 0.6; }
}

@media (max-width: 760px) {
  .dandelion {
    width: 210px;
    height: 210px;
    top: -40px;
    right: -70px;
  }
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn:hover {
  filter: brightness(0.9);
}

/* Sections — jede Sektion bekommt volle Breite + eigenen Hintergrund statt eines dünnen Dividers */

.section {
  width: 100%;
  scroll-margin-top: 64px;
}

.section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-6) 24px;
}

.section--white {
  background: var(--bg);
}

.section--tint {
  background: var(--accent-soft);
}

.section--tint2 {
  background: var(--accent-soft2);
}

.section h2,
.section-inner h2 {
  font-size: 1.5rem;
  color: #222;
  margin: 0 0 var(--space-1);
}

.section-intro {
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
  max-width: 640px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}

.pill {
  background: #fff;
  border: 1px solid var(--accent-soft2);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pill:hover {
  background: var(--accent-soft2);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.topic-detail {
  background: #fff;
  border: 1px solid var(--accent-soft2);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: var(--space-4);
  transition: background 0.15s ease;
}

.topic-detail.visible {
  background: #fff;
}

.topic-detail strong {
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

.topic-detail p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.topic-detail-placeholder {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: #fcfcfb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 18px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.steps strong {
  display: block;
}

.steps span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cost-note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 18px 22px;
  color: var(--text);
  font-size: 0.95rem;
}

.section--alert {
  background: #fdf5f3;
}

.section--alert h2 {
  color: #a4453b;
}

.kontakt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

footer {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

footer .section-inner {
  padding: var(--space-3) 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Color picker (Testwerkzeug, nicht final) --- */

#color-picker {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 60;
}

#color-picker span {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-left: 4px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.swatch.active {
  border-color: #222;
}

@media (max-width: 640px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  #nav-burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
  }
}
