:root {
  --red: #c0392b;
  --red-light: #e74c3c;
  --dark: #1a1a2e;
  --mid: #16213e;
  --accent: #e94560;
  --text: #f0f0f0;
  --muted: #a0a0b0;
  --old-color: #3498db;
  --new-color: #e74c3c;
  --green: #2ecc71;
  --font: 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
}

/* ── Sections ── */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem;
}

.container { max-width: 800px; margin: 0 auto; width: 100%; }

/* ── Hero ── */
#hero {
  background: linear-gradient(160deg, var(--dark) 0%, var(--mid) 100%);
  text-align: center;
}

#hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

#hero h1 span { color: var(--accent); }

#hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  animation: bounce 2s infinite;
}

.scroll-hint svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Calculator ── */
#calculator { background: var(--mid); }

#calculator h2 { font-size: 2rem; margin-bottom: 0.5rem; }
#calculator .lead { color: var(--muted); margin-bottom: 2.5rem; }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-group input,
.input-group select {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.3rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus { border-color: var(--accent); }

.input-group input::placeholder { color: var(--muted); }

.input-hint { font-size: 0.8rem; color: var(--muted); }

/* ── Result cards ── */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 600px) { .result-grid { grid-template-columns: 1fr; } }

.result-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border-top: 4px solid var(--old-color);
}

.result-card.new { border-top-color: var(--new-color); }

.result-card .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.result-card .amount {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.result-card.old .amount { color: var(--old-color); }
.result-card.new .amount { color: var(--new-color); }

.result-card .days {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── Period table ── */
.period-compare { margin-top: 2rem; }

.period-compare h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.old-row td { color: #7fb3d3; }
.new-row td { color: #e87070; }

.badge-old { color: var(--old-color); font-weight: 700; }
.badge-new { color: var(--new-color); font-weight: 700; }

/* ── Privacy note ── */
.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

.privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Timeline ── */
#timeline { background: var(--dark); }

#timeline h2 { font-size: 2rem; margin-bottom: 0.5rem; }
#timeline .lead { color: var(--muted); margin-bottom: 3rem; }

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--old-color), var(--new-color));
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--dark);
}

.timeline-item .date {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.timeline-item h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

.timeline-item p { color: var(--muted); font-size: 0.95rem; }

/* ── Gap section ── */
#gap { background: var(--mid); }

#gap h2 { font-size: 2rem; margin-bottom: 0.5rem; }
#gap .lead { color: var(--muted); margin-bottom: 2.5rem; }

.gap-bars { display: flex; flex-direction: column; gap: 1.2rem; }

.gap-bar-group { }

.gap-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.gap-bar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  height: 28px;
  overflow: hidden;
  position: relative;
}

.gap-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: width 0.6s ease;
  min-width: 3rem;
}

.gap-bar-fill.old-bar { background: var(--old-color); }
.gap-bar-fill.new-bar { background: var(--new-color); }

/* ── CTA ── */
#cta {
  background: linear-gradient(160deg, var(--mid) 0%, var(--dark) 100%);
  text-align: center;
}

#cta h2 { font-size: 2.2rem; margin-bottom: 1rem; }
#cta p { color: var(--muted); max-width: 540px; margin: 0 auto 2.5rem; font-size: 1.05rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(233,69,96,0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(233,69,96,0.55);
}

/* ── Hidden state ── */
.hidden { display: none !important; }
