/* ============================================================
   SOBERVESTOR — Stylesheet
   ============================================================ */

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

:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f2;
  --bg-success: #eaf3de;
  --text-primary: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --text-success: #3b6d11;
  --border: rgba(0, 0, 0, 0.1);
  --green-mid: #639922;
  --green-dark: #3b6d11;
  --green-light: #eaf3de;
  --gray-mid: #b4b2a9;
  --red: #a32d2d;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a18;
    --bg-secondary: #252523;
    --bg-success: #1a2e0a;
    --text-primary: #f0ede8;
    --text-secondary: #a0a09a;
    --text-tertiary: #68675f;
    --text-success: #97c459;
    --border: rgba(255, 255, 255, 0.1);
    --green-mid: #639922;
    --green-dark: #97c459;
    --green-light: #1a2e0a;
    --gray-mid: #888780;
    --red: #f09595;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation
   ------------------------------------------------------------ */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--green-mid);
}

.nav-badge {
  font-size: 11px;
  background: var(--green-light);
  color: var(--text-success);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* Hero
   ------------------------------------------------------------ */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--text-success);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--green-mid);
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Hero — Large Wealth Number
   ------------------------------------------------------------ */
.hero-wealth {
  margin: 0 auto 2.5rem;
  max-width: 560px;
}

.hero-wealth-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.hero-wealth-number {
  font-size: clamp(52px, 12vw, 88px);
  font-weight: 700;
  color: var(--green-mid);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-wealth-sub {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

.hero-stats {
  display: flex;
  gap: 0;
  justify-content: center;
  margin-top: 1.5rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stat {
  flex: 1;
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-right: 0.5px solid var(--border);
}

.hero-stat:last-child {
  border-right: none;
}

.hero-stat-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hero-stat-val.green {
  color: var(--green-mid);
}

.hero-stat-lbl {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Sections
   ------------------------------------------------------------ */
.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.divider {
  height: 0.5px;
  background: var(--border);
  margin: 0.5rem 0 2.5rem;
}

/* Rechner — Controls
   ------------------------------------------------------------ */
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.ctrl label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.ctrl input[type=range] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.ctrl input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-mid);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--green-mid);
}

.ctrl input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-mid);
  cursor: pointer;
  border: 2px solid var(--bg);
}

.ctrl .val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* Rechner — Result Cards
   ------------------------------------------------------------ */
.result-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 1.75rem;
}

.res-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.res-card.highlight {
  border: 1.5px solid var(--green-mid);
  background: var(--green-light);
}

.res-val {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.res-val.green {
  color: var(--green-dark);
}

.res-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Chart
   ------------------------------------------------------------ */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 5px;
}

/* Meilensteine
   ------------------------------------------------------------ */
.milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}

.milestone {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  text-align: center;
}

.milestone-year {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.milestone-val {
  font-size: 17px;
  font-weight: 600;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.milestone-gain {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Vergleich — Trinken vs. Investieren
   ------------------------------------------------------------ */
.compare-section-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.compare-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.compare-card.invest-card {
  border: 1.5px solid var(--green-mid);
  background: var(--green-light);
}

.compare-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
}

.compare-card.invest-card h3 {
  color: var(--text-success);
}

.compare-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--border);
  color: var(--text-secondary);
}

.compare-item:last-child {
  border-bottom: none;
}

.compare-item .neg {
  color: var(--red);
  font-weight: 600;
}

.compare-item .neg-strong {
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
}

.compare-item .pos {
  color: var(--green-dark);
  font-weight: 600;
}

.sep-row {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0 3px;
  border-bottom: none !important;
}

.infl-note {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 0.6rem;
  line-height: 1.5;
}

.infl-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  background: var(--green-light);
  color: var(--text-success);
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 0.75rem;
}

/* Loss vs. Gain Duel Block
   ------------------------------------------------------------ */
.duel {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.duel-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.duel-side {
  padding: 2rem 1.75rem;
  text-align: center;
}

.duel-side.loss {
  background: #fcebeb;
}

.duel-side.gain {
  background: var(--green-light);
}

@media (prefers-color-scheme: dark) {
  .duel-side.loss { background: #2a1010; }
  .duel-side.gain { background: #1a2e0a; }
}

.duel-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.duel-side.loss .duel-eyebrow { color: #a32d2d; }
.duel-side.gain .duel-eyebrow { color: var(--text-success); }

.duel-number {
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.duel-side.loss .duel-number { color: #a32d2d; }
.duel-side.gain .duel-number { color: var(--green-mid); }

@media (prefers-color-scheme: dark) {
  .duel-side.loss .duel-number { color: #f09595; }
  .duel-side.gain .duel-number { color: #97c459; }
  .duel-side.loss .duel-eyebrow { color: #f09595; }
  .duel-side.gain .duel-eyebrow { color: #97c459; }
}

.duel-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.duel-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 0.4rem;
}

.duel-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: var(--bg-secondary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  border-left: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
}

.duel-breakdown {
  margin-top: 0.85rem;
  border-top: 0.5px solid rgba(163, 45, 45, 0.2);
  padding-top: 0.7rem;
  text-align: left;
}

.duel-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #a32d2d;
  padding: 3px 0;
  opacity: 0.85;
}

@media (prefers-color-scheme: dark) {
  .duel-breakdown { border-top-color: rgba(240, 149, 149, 0.2); }
  .duel-breakdown-row { color: #f09595; }
}

.duel-breakdown-row span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.duel-breakdown-gain {
  opacity: 1;
  font-weight: 500;
  border-top: 0.5px solid rgba(163, 45, 45, 0.15);
  margin-top: 3px;
  padding-top: 5px;
}

.duel-hook {
  text-align: center;
  margin-top: 1.5rem;
}

.duel-hook-top {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.duel-hook-top strong {
  color: var(--text-primary);
  font-weight: 600;
}

.duel-hook-price {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text-primary);
}

.duel-hook-price .price-small {
  color: var(--text-tertiary);
  font-size: 0.55em;
  font-weight: 400;
  text-decoration: line-through;
}

.duel-hook-price .price-real {
  color: #a32d2d;
}

@media (prefers-color-scheme: dark) {
  .duel-hook-price .price-real { color: #f09595; }
}

.duel-hook-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 0.4rem;
}

/* Bottom CTA
   ------------------------------------------------------------ */
.bottom-cta {
  background: var(--bg-secondary);
  border-top: 0.5px solid var(--border);
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
}

.bottom-cta-eyebrow {
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.bottom-cta-wealth {
  font-size: clamp(42px, 10vw, 72px);
  font-weight: 700;
  color: var(--green-mid);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.bottom-cta-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.bottom-cta-fine {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 2.25rem;
}

.bottom-cta-btn {
  display: inline-block;
  background: var(--green-mid);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 2.75rem;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
}

.bottom-cta-btn:hover {
  opacity: 0.88;
}

.bottom-cta-note {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 1rem;
}

/* Footer
   ------------------------------------------------------------ */
footer {
  border-top: 0.5px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Responsive
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .duel-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .duel-vs {
    padding: 0.6rem;
    border-left: none;
    border-right: none;
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .result-cards {
    grid-template-columns: 1fr 1fr;
  }

  .compare {
    grid-template-columns: 1fr;
  }

  .milestones {
    grid-template-columns: 1fr 1fr;
  }
}
