/* VH-Calc — mobile-first, trustworthy finance aesthetic. */
:root {
  --navy: #0d2438;
  --ink: #16202b;
  --teal: #0e7c7b;
  --teal-d: #0a5e5d;
  --gold: #c8932b;
  --pos: #0f8a4d;
  --neg: #c0432e;
  --bg: #f4f1ea;
  --card: #ffffff;
  --line: #e4ddd0;
  --muted: #6b7785;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13,36,56,.06), 0 8px 28px rgba(13,36,56,.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 18px; }
em { font-style: normal; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---- HERO ---- */
.hero {
  background: radial-gradient(120% 120% at 80% -10%, #1c4a5e 0%, transparent 60%), linear-gradient(160deg, #0d2438 0%, #103a4d 100%);
  color: #fff;
  padding: 56px 0 64px;
  border-bottom: 4px solid var(--gold);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  font-weight: 600; color: #8fd4d2; margin-bottom: 16px;
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 2rem; line-height: 1.12; letter-spacing: -.01em;
}
.hero h1 em { color: var(--gold); font-style: italic; }
.hero .sub { margin-top: 18px; font-size: 1.02rem; color: #d6e2e6; max-width: 60ch; }
.hero .sub strong { color: #fff; }
.scroll-hint {
  display: inline-block; margin-top: 26px; color: #fff; text-decoration: none;
  font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}

/* ---- CARDS ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow);
}
main { padding-bottom: 60px; }
main > section:first-child { margin-top: -28px; position: relative; z-index: 2; }
.section-title {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.25rem;
  margin-bottom: 6px; color: var(--navy);
}

/* ---- FORM ---- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
@media (min-width: 540px) { .grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; border: 0; }
.field > span, .field > legend { font-weight: 600; font-size: .9rem; color: var(--ink); }
select, input[type=text] {
  font: inherit; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
  appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7785' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
select:focus, input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,123,.15); }
.hint { font-size: .78rem; color: var(--muted); }

.radio-row { display: flex; flex-direction: column; gap: 10px; }
.radio { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: .92rem; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio input { accent-color: var(--teal); width: 18px; height: 18px; }
.radio:has(input:checked) { border-color: var(--teal); background: #f0f8f7; }

input[type=range] { width: 100%; accent-color: var(--teal); height: 28px; }

.toggle-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; margin: 14px 0; cursor: pointer; }
.toggle-field span { display: flex; flex-direction: column; gap: 3px; }
.toggle-field small { font-weight: 400; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 28px; border-radius: 999px; background: #cdd5dd; position: relative; cursor: pointer; flex: none; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(22px); }

/* ---- BUTTONS ---- */
.btn { display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer; text-decoration: none; text-align: center; transition: transform .06s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn.big { width: 100%; font-size: 1.02rem; padding: 16px; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { background: #b7c2cb; cursor: not-allowed; }
.btn.cta { background: linear-gradient(120deg, var(--gold), #d9a948); color: #2a1e05; box-shadow: 0 6px 20px rgba(200,147,43,.4); }
.btn.cta:hover { filter: brightness(1.05); }

/* ---- GATE ---- */
.disclaimer-box { background: #fbf7ee; border: 1px solid #ecdfc4; border-left: 4px solid var(--gold); padding: 16px; border-radius: 10px; font-size: .92rem; margin: 12px 0; color: #4a4334; }
.ack-check { display: flex; gap: 11px; align-items: flex-start; margin: 16px 0; font-weight: 500; cursor: pointer; }
.ack-check input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; margin-top: 1px; }

/* ---- GROSS CARD ---- */
.gross-card { text-align: center; background: linear-gradient(160deg, #103a4d, #0d2438); color: #fff; border: 0; }
.gross-card .muted { color: #9fb6c0 !important; }
.gross-number { font-family: 'Fraunces', serif; font-weight: 700; font-size: 2.8rem; line-height: 1; margin: 10px 0 4px; color: #fff; }
.gross-brl { font-size: 1.05rem; color: #b8e6e4; }
.gross-caveat { margin-top: 16px; color: var(--gold); font-weight: 600; font-size: .95rem; }

/* ---- WATERFALL ---- */
.waterfall { margin-top: 12px; }
.wf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed var(--line); animation: fall .45s ease both; }
.wf-row .wf-label { font-size: .92rem; }
.wf-sub { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.wf-row .wf-amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.wf-row.deduction .wf-amt { color: var(--neg); }
.wf-row.deduction .wf-label::before { content: "− "; color: var(--neg); font-weight: 700; }
.wf-row.showcase { background: #fffbef; border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.wf-row.showcase .wf-label { font-weight: 600; }
.wf-row.subtotal { border-bottom: 2px solid var(--ink); font-weight: 700; padding-top: 14px; }
.wf-row.subtotal .wf-label { font-family: 'Fraunces', serif; font-size: 1.05rem; }
.wf-row.subtotal .wf-amt { color: var(--navy); }
.wf-row.gross-row .wf-amt, .wf-row.gross-row .wf-label { font-weight: 700; }
.wf-row.net-row { border: 0; margin-top: 6px; background: #f0f8f4; border-radius: 10px; padding: 14px 12px; }
.wf-row.net-row .wf-label { font-family: 'Fraunces', serif; font-size: 1.15rem; }
.wf-row.net-row .wf-amt { font-size: 1.25rem; }
.wf-row.net-row.pos .wf-amt { color: var(--pos); }
.wf-row.net-row.neg { background: #fdf1ee; }
.wf-row.net-row.neg .wf-amt { color: var(--neg); }
@keyframes fall { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }

/* ---- METRICS ---- */
.net-headline { text-align: center; padding: 8px 0 18px; }
.net-usd { font-family: 'Fraunces', serif; font-weight: 700; font-size: 2.4rem; line-height: 1; margin-top: 4px; }
.net-usd.pos { color: var(--pos); } .net-usd.neg { color: var(--neg); }
.net-brl { font-size: 1.05rem; color: var(--muted); margin-top: 4px; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: #f7f5f0; border: 1px solid var(--line); border-radius: 12px; padding: 13px; display: flex; flex-direction: column; gap: 4px; }
.metric.wide { grid-column: 1 / -1; }
.metric-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.metric-val { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.fx-note { margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---- NOTE / CTA / FOOTER ---- */
.note-card { background: #fbf7ee; border-color: #ecdfc4; font-size: .92rem; }
.note-card strong { color: var(--navy); }
.cta-card { text-align: center; }
.cta-card p { margin-bottom: 14px; font-weight: 600; font-size: 1.05rem; }
.footer-disclaimer { margin: 20px 0; font-size: .8rem; color: var(--muted); padding: 0 4px; }
.footer-disclaimer p { margin-bottom: 8px; }
.footnote { font-size: .76rem; }
.site-footer { text-align: center; padding: 24px; font-size: .8rem; color: var(--muted); }
.site-footer a { color: var(--teal); }

.error-msg { color: var(--neg); font-size: .85rem; margin-top: 8px; font-weight: 500; }
[hidden] { display: none !important; }
