/* ============================================================
   BUDGETHINK - Calculator suite (Signature edition)
   Shared premium styling for all calculators + the hub.
   Palette/tokens inherited from style.css (navy / ivory / gold / mono).
   ============================================================ */

/* ---------- Calculator hero ---------- */
.calc-hero {
  background:
    radial-gradient(900px 560px at 86% -10%, rgba(201,166,107,0.22), transparent 58%),
    radial-gradient(680px 460px at 4% 112%, rgba(110,196,154,0.16), transparent 58%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 60%, #0e1830 100%);
  color: var(--white);
  padding: 120px 0 170px;
  position: relative;
  overflow: hidden;
}
.calc-hero .eyebrow { color: var(--gold-light); }
.calc-hero .eyebrow::before { background: var(--gold-light); }
.calc-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  max-width: 17ch;
  color: var(--white);
}
.calc-hero h1 .accent {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.calc-hero p.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--hero-sub);
  max-width: 54ch; margin-top: 20px;
}

/* ---------- Calculator card (overlaps hero) ---------- */
.calc-wrap { margin-top: -120px; position: relative; z-index: 5; }
.calc {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0;
  background: var(--white); border: 1px solid var(--ivory-dark);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.calc-inputs { padding: 36px 34px; }
.calc-inputs h2 { font-size: 22px; margin-bottom: 6px; }
.calc-inputs .hint { color: var(--slate); font-size: 14.5px; margin-bottom: 24px; }

/* ---------- Fields: sliders + number/select ---------- */
.field { margin-bottom: 22px; }
.field .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.field .lab { font-weight: 600; font-size: 14.5px; color: var(--navy); }
.field .val {
  font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 7px;
  border-radius: 999px; outline: none; background: var(--ivory-dark); cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 5px solid var(--gold);
  box-shadow: 0 2px 8px rgba(27,42,74,0.22); cursor: pointer; transition: transform 0.12s;
}
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.12); }
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--white);
  border: 5px solid var(--gold); cursor: pointer;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-input, .calc-select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--ivory-dark);
  border-radius: 12px; font: inherit; font-size: 15.5px; color: var(--navy);
  background: var(--white); transition: border-color 0.18s;
}
.calc-input:focus, .calc-select:focus { outline: none; border-color: var(--gold); }
.seg { display: inline-flex; gap: 0; background: var(--ivory-dark); border-radius: 999px; padding: 4px; }
.seg button {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; color: var(--slate); transition: all 0.18s;
}
.seg button.on { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.disclaimer { color: var(--slate); font-size: 12.5px; margin-top: 18px; max-width: 60ch; }

/* ---------- Result panel ---------- */
.result {
  background: linear-gradient(170deg, var(--navy-light), var(--navy-deep));
  color: var(--white); padding: 36px 34px; display: flex; flex-direction: column;
}
.result .rl {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 700;
}
.result .big {
  font-family: var(--font-display); font-weight: 800; line-height: 1;
  font-size: clamp(40px, 6vw, 60px); margin: 10px 0 4px;
  background: linear-gradient(120deg, #fff 30%, var(--gold-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result .sub { color: var(--hero-sub); font-size: 15px; margin-bottom: 20px; }
.result .sub b { color: var(--white); }
.result .rows { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; margin-top: auto; }
.result .row { display: flex; justify-content: space-between; font-size: 14.5px; padding: 7px 0; }
.result .row b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.result .row .gold { color: var(--gold-light); font-weight: 700; }

/* ---------- Growth chart (SVG) ---------- */
.chart { margin: 4px 0 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: rgba(255,255,255,0.14); stroke-width: 1; }
.chart .area { opacity: 0.9; }
.chart .line { fill: none; stroke: var(--gold-light); stroke-width: 3; stroke-linecap: round; }
.chart .dot { fill: var(--white); stroke: var(--gold); stroke-width: 3; }
.chart .mlabel { fill: var(--hero-sub); font-size: 10px; font-family: var(--font-mono); }

/* ---------- Milestones ---------- */
.miles { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 16px 0 4px; }
.mile { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 11px 10px; text-align: center; }
.mile .pct { font-family: var(--font-mono); font-weight: 800; font-size: 15px; color: var(--gold-light); }
.mile .amt { font-size: 11px; color: var(--hero-sub); margin-top: 2px; }
.mile .when { font-size: 12px; font-weight: 700; color: var(--white); margin-top: 4px; }

/* ---------- Booster ---------- */
.booster {
  background: rgba(201,166,107,0.14); border: 1px solid rgba(201,166,107,0.3);
  border-radius: 14px; padding: 16px 18px; margin: 18px 0 2px;
}
.booster .bt { font-weight: 700; font-size: 14px; color: var(--gold-light); margin-bottom: 10px; }
.booster .bres { font-size: 14.5px; color: var(--white); margin-top: 10px; }
.booster .bres b { color: var(--gold-light); font-family: var(--font-mono); }

/* ---------- Lead capture (NO mailto, best-effort + funnel) ---------- */
.leadcap { margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; }
.leadcap p { font-size: 13.5px; color: var(--hero-sub); margin-bottom: 11px; }
.leadcap form { display: flex; gap: 8px; flex-wrap: wrap; }
.leadcap input[type=email] {
  flex: 1 1 160px; min-width: 0; padding: 13px 16px; border-radius: 999px;
  border: 1px solid rgba(201,166,107,0.5); background: rgba(255,255,255,0.08);
  color: var(--white); font: inherit; font-size: 14.5px;
}
.leadcap input[type=email]::placeholder { color: #8f9cbb; }
.leadcap .ok { display: none; color: var(--gold-light); font-weight: 700; font-size: 14px; }
.result .cta { margin-top: 20px; }
.result .cta .btn { width: 100%; }

/* ---------- Explainer band + cards ---------- */
.calc-band { padding: 80px 0; }
.calc-band h2 { font-size: clamp(26px, 3.4vw, 38px); max-width: 20ch; }
.calc-band .section-lead { margin-top: 16px; }
.calc-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 36px; }
.calc-c { background: var(--white); border: 1px solid var(--ivory-dark); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.calc-c .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(201,166,107,0.16); color: var(--gold); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.calc-c h3 { font-size: 18px; margin-bottom: 7px; }
.calc-c p { font-size: 14.5px; color: var(--slate); }

/* ---------- Final CTA ---------- */
.calc-final {
  background: linear-gradient(160deg, var(--navy-light), var(--navy-deep));
  color: var(--white); border-radius: var(--radius-lg); padding: 60px 40px;
  text-align: center; margin: 24px 0 80px;
}
.calc-final h2 { font-size: clamp(28px, 3.6vw, 42px); color: var(--white); max-width: 20ch; margin: 0 auto; }
.calc-final p { color: var(--hero-sub); margin: 16px auto 28px; max-width: 46ch; }

/* ---------- Hub page ---------- */
.hub-hero { background: linear-gradient(165deg, var(--navy), var(--navy-deep)); color: var(--white); padding: 130px 0 70px; text-align: center; }
.hub-hero .eyebrow { color: var(--gold-light); justify-content: center; }
.hub-hero h1 { font-size: clamp(34px, 5vw, 58px); color: var(--white); max-width: 18ch; margin: 0 auto; }
.hub-hero p { color: var(--hero-sub); font-size: 19px; max-width: 56ch; margin: 18px auto 0; }
.hub-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin: 48px 0 40px; }
.hub-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--ivory-dark); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.hub-card .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(27,42,74,0.06); color: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.hub-card.feat .ic { background: var(--gold); color: var(--navy-deep); }
.hub-card h3 { font-size: 19px; margin-bottom: 7px; }
.hub-card p { font-size: 14.5px; color: var(--slate); flex: 1; }
.hub-card .go { margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--navy); display: inline-flex; align-items: center; gap: 6px; }
.hub-card:hover .go { color: var(--gold); }
.hub-card .tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy-deep); background: var(--gold-light); padding: 3px 9px; border-radius: 999px; margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc-cards { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .calc-wrap { margin-top: -130px; }
  .miles { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .calc-hero { padding: 104px 0 160px; }
  .field-row { grid-template-columns: 1fr; }
}
