/* ==========================================================================
   mietfit – Design-System
   Reduziert, modern, warm. Inspiriert von Apple (Klarheit) & Peloton (Emotion).
   ========================================================================== */

:root {
  /* Farben */
  --deep: #0c2f26;        /* Tannengrün, fast schwarz */
  --deep-2: #114536;
  --green: #12805f;       /* Primär */
  --green-hover: #0e6a4f;
  --mint: #7fd6b4;
  --lime: #c8f169;        /* Akzent, sparsam */
  --sand: #f4f1ea;        /* warme Sektion-Hintergründe */
  --paper: #ffffff;
  --ink: #14211d;
  --muted: #5c6b64;
  --line: #e4e2da;

  /* Typografie */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1160px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -24px rgba(12, 47, 38, 0.25);
  --shadow-sm: 0 8px 30px -12px rgba(12, 47, 38, 0.18);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

section { padding-block: clamp(72px, 9vw, 128px); }

/* ---------- Typografie ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }

h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.015em; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted);
  max-width: 46ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lead { margin-top: 16px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-hover); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-light { background: #fff; color: var(--deep); }
.btn-light:hover { background: var(--lime); }

.btn-ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }

.btn svg { flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 24px -16px rgba(12,47,38,0.25); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--deep);
}
.logo .dot { color: var(--green); }
.logo .claim {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 10px;
  white-space: nowrap;
  display: none;
}
@media (min-width: 900px) { .logo .claim { display: inline; } }

.main-nav ul { display: flex; gap: clamp(16px, 2.5vw, 32px); }
.main-nav a {
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { opacity: 1; color: var(--green); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone {
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep);
  display: none;
}
@media (min-width: 1100px) { .header-phone { display: inline; } }
.header-cta .btn { padding: 11px 22px; font-size: 0.92rem; }

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--deep);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-cta .btn { display: none; }
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .main-nav ul { flex-direction: column; text-align: center; gap: 28px; }
  .main-nav a { font-size: 1.5rem; font-weight: 700; opacity: 1; }
  body.nav-open .main-nav { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(140px, 16vw, 200px);
  padding-bottom: clamp(72px, 8vw, 110px);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(127, 214, 180, 0.22), transparent 60%),
    linear-gradient(var(--paper), var(--sand));
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 24px; color: var(--deep); }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lead { margin-bottom: 36px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust svg { color: var(--green); flex-shrink: 0; }

.hero-media { position: relative; }
.hero-media img {
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  width: 100%;
  height: auto; /* überschreibt den height-Attribut-Hint, sonst greift aspect-ratio nicht */
}

.hero-badge {
  position: absolute;
  left: -18px;
  bottom: 28px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}
.hero-badge .price { color: var(--green); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 900px) { .hero-badge { left: 12px; } }

/* ---------- Segmente (Ziele) ---------- */
.segments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 28px);
}
@media (max-width: 900px) { .segments-grid { grid-template-columns: 1fr; } }

.segment-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.segment-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.segment-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.4s ease;
}
.segment-card:hover img { transform: scale(1.04); }

.segment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(9, 30, 24, 0.88) 0%, rgba(9, 30, 24, 0.25) 55%, rgba(9, 30, 24, 0.1) 100%);
}

.segment-body { padding: 28px; }
.segment-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 10px;
}
.segment-body h3 { font-size: 1.5rem; margin-bottom: 10px; }
.segment-body p { font-size: 0.95rem; opacity: 0.85; margin-bottom: 16px; }
.segment-link { font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Vorteile ---------- */
.section-benefits { background: var(--deep); color: #fff; }
.section-benefits .eyebrow { color: var(--lime); }
.section-benefits .lead { color: rgba(255, 255, 255, 0.7); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 900px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefits-grid { grid-template-columns: 1fr; } }

.benefit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.2s ease;
}
.benefit:hover { background: rgba(255, 255, 255, 0.09); }
.benefit svg { color: var(--lime); margin-bottom: 16px; }
.benefit h3 { font-size: 1.1rem; margin-bottom: 8px; }
.benefit p { font-size: 0.93rem; color: rgba(255, 255, 255, 0.7); }

/* ---------- Ablauf ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
  counter-reset: step;
}
@media (max-width: 980px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }

.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px 28px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: 0.93rem; color: var(--muted); }

.section-ablauf { background: var(--sand); }
.ablauf-note {
  margin-top: 36px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
.ablauf-note strong { color: var(--ink); }

/* ---------- Geräte ---------- */
.device-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.device-filters button {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.device-filters button:hover { border-color: var(--green); color: var(--green); }
.device-filters button.active { background: var(--deep); border-color: var(--deep); color: #fff; }

.devices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 1080px) { .devices-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .devices-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .devices-grid { grid-template-columns: 1fr; } }

.device-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.device-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.device-card.hidden { display: none; }

.device-card img { aspect-ratio: 640 / 520; object-fit: cover; width: 100%; height: auto; }

.device-info { padding: 20px 22px 24px; }
.device-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.device-info h3 { font-size: 1.08rem; margin: 6px 0 4px; }
.device-brands { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.device-price { font-size: 0.95rem; }
.device-price strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--deep); }
.device-price span { color: var(--muted); font-size: 0.85rem; }

.devices-footer { margin-top: 40px; text-align: center; color: var(--muted); font-size: 0.95rem; }

/* ---------- Tarife ---------- */
.section-tarife { background: var(--sand); }

.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}
@media (max-width: 900px) { .tariffs-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

.tariff {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tariff.featured { border: 2px solid var(--green); box-shadow: var(--shadow-sm); }

.tariff-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.tariff h3 { font-size: 1.3rem; }
.tariff .tariff-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 22px; }
.tariff .tariff-price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--deep); line-height: 1; }
.tariff .tariff-price span { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tariff .tariff-save { font-size: 0.85rem; font-weight: 600; color: var(--green); margin-top: 8px; min-height: 1.2em; }

.tariff ul { margin-top: 24px; display: grid; gap: 12px; }
.tariff li { display: flex; gap: 10px; font-size: 0.93rem; color: var(--muted); align-items: flex-start; }
.tariff li svg { color: var(--green); flex-shrink: 0; margin-top: 3px; }

.tariff-note { margin-top: 36px; text-align: center; font-size: 0.9rem; color: var(--muted); }

/* ---------- Meinungen ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 980px) { .quotes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .quotes-grid { grid-template-columns: 1fr; } }

.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quote .stars { color: #e8a512; letter-spacing: 2px; font-size: 0.95rem; }
.quote blockquote { font-size: 1.02rem; line-height: 1.55; color: var(--ink); flex: 1; }
.quote figcaption { font-size: 0.88rem; font-weight: 600; color: var(--muted); }

/* ---------- Regionen ---------- */
.section-regionen { background: var(--deep); color: #fff; }
.section-regionen .eyebrow { color: var(--lime); }
.section-regionen .lead { color: rgba(255, 255, 255, 0.7); }

.regions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.regions-list li {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.98rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.regions-list li:hover { border-color: var(--lime); color: var(--lime); }

.regions-note { color: rgba(255, 255, 255, 0.65); font-size: 0.95rem; max-width: 62ch; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin-inline: auto; }
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 44px 24px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  transition: color 0.15s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--green);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { color: var(--green); }
.faq-list .faq-body { padding: 0 4px 26px; color: var(--muted); max-width: 68ch; }

/* ---------- Kontakt / CTA ---------- */
.section-kontakt { background: var(--sand); }

.contact-panel {
  background: linear-gradient(135deg, var(--deep-2), var(--deep));
  border-radius: calc(var(--radius) + 8px);
  color: #fff;
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .contact-panel { grid-template-columns: 1fr; } }

.contact-panel h2 { margin-bottom: 16px; }
.contact-panel .lead { color: rgba(255, 255, 255, 0.75); margin-bottom: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.contact-details { display: grid; gap: 22px; font-size: 0.98rem; }
.contact-details a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-details a:hover { color: var(--lime); }
.contact-details .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 4px;
}
.contact-details .hours { color: rgba(255, 255, 255, 0.75); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 56px 0 40px;
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer .logo { color: #fff; font-size: 1.4rem; }
.footer-claim { margin-top: 8px; font-size: 0.85rem; letter-spacing: 0.06em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: rgba(255, 255, 255, 0.65); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: #fff; }

/* ---------- Rechtsseiten ---------- */
.legal-page { padding-top: 160px; max-width: 780px; }
.legal-page h1 { font-size: 2.4rem; margin-bottom: 32px; }
.legal-page h2 { font-size: 1.3rem; margin: 36px 0 12px; }
.legal-page p { margin-bottom: 14px; color: var(--muted); }

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

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