/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1B2A4A;
  --navy-light: #243658;
  --terracotta: #9B5530;
  --terracotta-light: #D4843E;
  --cream: #F9F7F3;
  --cream-dark: #EDE9E1;
  --text: #2C2C2C;
  --text-muted: #595959;
  --white: #FFFFFF;
  --header-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Spectral', Georgia, serif;
  line-height: 1.25;
}

a { color: var(--terracotta); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--terracotta-light); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

body.nav-open { overflow: hidden; }

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.header.scrolled::before { opacity: 1; }
.header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.15); }

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.header-logo-text { transform: translateY(3px); }
.header-logo-text span { color: var(--terracotta-light); }

/* ========== Navigation ========== */
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta-light);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ========== Nav Toggle ========== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========== Mobile Nav ========== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  header nav {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 105;
  }

  header nav.open { opacity: 1; visibility: visible; }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
  }
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--terracotta-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--navy-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid var(--white);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  padding: 12px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid var(--terracotta);
  color: var(--terracotta);
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.btn-outline:hover {
  background: var(--terracotta);
  color: var(--white);
  transform: translateY(-2px);
}

.section-dark .btn-outline {
  border-color: var(--terracotta-light);
  color: var(--terracotta-light);
}

.section-dark .btn-outline:hover {
  background: var(--terracotta-light);
  color: var(--navy);
}

.section-cta {
  text-align: center;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .btn, .btn-ghost, .btn-outline {
    width: 100%;
    text-align: center;
  }
}

/* ========== Section Shared ========== */
.section { padding: 80px 0; }
.section-dark { background: var(--navy); color: var(--white); }
.section-accent { background: var(--cream-dark); }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-bottom: 12px;
}

.section-dark .section-label { color: var(--terracotta-light); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 20px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.section-dark .section-intro { color: rgba(255,255,255,0.8); }

/* ========== Legal Pages ========== */
.legal-page {
  flex: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 60px) 24px 80px;
  width: 100%;
}

.legal-page h1 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 28px 0 12px;
}

.legal-page p, .legal-page li {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.8;
}

.legal-page ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 12px;
}

/* ========== Footer ========== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-brand span { color: var(--terracotta-light); }

.footer-info p {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.footer a {
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  text-decoration: none;
}

.footer a:hover { color: var(--white); }
.footer a.active { color: var(--white); font-weight: 700; }

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom .powered-by { font-weight: 700; }

/* ========== Scroll Reveal ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Phase 3: Accessibility ========== */
#main-content { flex: 1; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; color: var(--white); }

:focus-visible {
  outline: 3px solid var(--terracotta-light);
  outline-offset: 2px;
}

.footer :focus-visible { outline-color: var(--terracotta-light); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle span, .nav-links, a { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ========== Kauf-Bestätigung ========== */
#kauf-bestaetigung {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: #16a34a;
  color: #fff;
}

.kauf-bestaetigung-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
}

.kauf-bestaetigung-inner p {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.kauf-bestaetigung-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.8;
  flex-shrink: 0;
}

.kauf-bestaetigung-close:hover { opacity: 1; }
