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

:root {
  --sage: #7BA08A;
  --sage-light: #8fb39e;
  --peach: #F0A868;
  --cream: #FBF7F2;
  --ink: #2A2D2B;
  --muted: #8A8682;
  --bg: var(--cream);
  --bg-card: #ffffff;
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: #e8e4df;
  --nav-bg: rgba(251, 247, 242, 0.85);
  --shadow: 0 1px 3px rgba(42, 45, 43, 0.06);
  --shadow-lg: 0 4px 20px rgba(42, 45, 43, 0.08);
}

[data-theme="dark"] {
  --bg: #1A1D1B;
  --bg-card: #252826;
  --text: #e8e4df;
  --text-muted: #9a9692;
  --border: #3a3d3b;
  --nav-bg: rgba(26, 29, 27, 0.9);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.serif {
  font-family: 'Instrument Serif', Georgia, serif;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 44px;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
  letter-spacing: 0.03em;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 24px;
  height: 44px;
  border-radius: 10px;
  transition: background-color 0.2s ease, transform 0.15s ease;
  min-width: 120px;
}

.btn-download:hover {
  background: var(--sage-light);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

/* ── Mobile nav ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.4rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 8px 0; }
  .btn-download.nav-cta { display: none; }
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-deco {
  font-size: 2.5rem;
  opacity: 0.15;
  margin-bottom: 40px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 400;
  max-width: 700px;
}

.hero h1 .accent {
  color: var(--sage);
  font-style: italic;
}

.hero-sub {
  margin-top: 28px;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.65;
}

.hero-cta {
  margin-top: 48px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: 14px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  min-height: 56px;
}

.btn-hero:hover {
  transform: translateY(-2px);
  background: var(--muted);
}

[data-theme="dark"] .btn-hero {
  background: var(--cream);
  color: var(--ink);
}

[data-theme="dark"] .btn-hero:hover {
  background: var(--sage);
  color: #fff;
}

.btn-hero .arrow {
  transition: transform 0.2s ease;
}

.btn-hero:hover .arrow {
  transform: translateX(3px);
}

/* ── Sections ── */
section {
  padding: 100px 24px;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  line-height: 1.65;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sage);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.feature-icon.sage { background: rgba(123, 160, 138, 0.15); color: var(--sage); }
.feature-icon.peach { background: rgba(240, 168, 104, 0.15); color: var(--peach); }

.feature-card h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  section { padding: 72px 20px; }
}

/* ── Support ── */
.support-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
  margin: 48px auto 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.support-box a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: opacity 0.2s ease;
}

.support-box a:hover {
  opacity: 0.8;
}

.support-box p {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.95rem;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer-tagline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.footer-meta a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-meta a:hover {
  color: var(--sage);
}

/* ── Fade-up animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  .hero-deco { animation: none; }
  .feature-card:hover { transform: none; }
  .btn-hero:hover { transform: none; }
  .btn-download:hover { transform: none; }
}

/* App Store Badge */
.app-store-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.app-store-badge {
  height: 40px;
  width: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-link:hover .app-store-badge {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Light/dark badge toggle */
.light-badge { display: block; }
.dark-badge { display: none; }
[data-theme="dark"] .light-badge { display: none; }
[data-theme="dark"] .dark-badge { display: block; }

/* === Legal page styles === */

/* Language switch (legal pages + SPA) */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}

.lang-btn.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

[data-theme="dark"] .lang-btn.active {
  background: #353836;
  color: #e8e4df;
}

.lang-btn:hover:not(.active) { color: var(--text); }

/* Legal page content */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page-content h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 40px;
}

.page-content h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.page-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

.page-content p,
.page-content ul {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-content ul { padding-left: 20px; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--sage); text-decoration: none; }
.page-content a:hover { text-decoration: underline; }

/* Provider logo in impressum */
.provider-logo-wrap {
  margin-bottom: 12px;
}
.provider-logo-wrap .logo-img {
  height: 48px;
}
.provider-logo-wrap .light-logo {
  display: block;
}
.provider-logo-wrap .dark-logo {
  display: none;
}
[data-theme="dark"] .provider-logo-wrap .light-logo {
  display: none;
}
[data-theme="dark"] .provider-logo-wrap .dark-logo {
  display: block;
}

/* Legal page footer links */
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-muted); }
