/* VH-Calc — dark, luxury, brushed-silver theme matching juliorocha.us. */
:root {
  --bg: #0A0E1A;          /* deep navy near-black (page) */
  --bg-2: #0D1321;        /* alternate band */
  --surface: #141B2D;     /* cards */
  --surface-2: #1A2238;   /* lifted / inner */
  --text: #E8EAED;        /* off-white */
  --muted: #9CA3AF;       /* silver-gray */
  --silver-1: #C0C5CE;
  --silver-2: #E2E5EA;
  --hairline: rgba(226,229,234,.12);
  --hairline-2: rgba(226,229,234,.06);
  --silver-grad: linear-gradient(135deg, #E2E5EA 0%, #C0C5CE 45%, #AAB0BA 70%, #D4D8DE 100%);
  --gold-1: #E9CE8E;
  --gold-2: #C9A24B;
  --gold-grad: linear-gradient(135deg, #F1DCA0 0%, #D8B45C 45%, #B8923C 70%, #EAD196 100%);
  --gold-glow: rgba(216,180,92,.40);
  --pos: #5FD0A0;         /* functional P&L green, tuned for dark */
  --neg: #E8806B;         /* functional P&L red, tuned for dark */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 44px -26px rgba(0,0,0,.75);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 18px; }
em { font-style: normal; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
img { max-width: 100%; display: block; }

/* ---- HERO ---- */
.hero {
  background:
    radial-gradient(120% 120% at 80% -10%, #16203a 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  color: var(--text);
  padding: 52px 0 70px;
  border-bottom: 1px solid var(--hairline);
}
.hero-logo { height: clamp(44px, 8vw, 68px); width: auto; margin-bottom: 26px; opacity: .97; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .32em; font-size: .72rem;
  font-weight: 500; color: var(--muted); margin-bottom: 18px;
  display: flex; align-items: center; gap: .85rem;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: linear-gradient(90deg, var(--silver-1), transparent); flex: none; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500; font-size: clamp(2rem, 6.5vw, 2.9rem); line-height: 1.08; letter-spacing: -.02em;
}
.hero h1 em {
  font-style: italic;
  background: var(--silver-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { margin-top: 20px; font-size: 1.05rem; font-weight: 300; line-height: 1.6; color: #C9CDD4; max-width: 58ch; }
.hero .sub strong { color: var(--text); font-weight: 500; }
.scroll-hint {
  display: inline-block; margin-top: 28px; color: var(--text); text-decoration: none;
  font-weight: 500; letter-spacing: .02em; border-bottom: 1px solid var(--silver-1); padding-bottom: 3px;
}
.scroll-hint:hover { color: var(--silver-2); }

/* ---- CARDS ---- */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow);
}
main { padding-bottom: 60px; }
main > section:first-child { margin-top: -34px; position: relative; z-index: 2; }
.section-title {
  font-family: var(--serif); font-weight: 500; font-size: 1.4rem;
  margin-bottom: 6px; color: var(--text); letter-spacing: -.01em;
}

/* ---- 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: 500; font-size: .9rem; color: var(--text); }
select, input[type=text] {
  font: inherit; padding: 12px 13px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text); 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='%239CA3AF' 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(--silver-1); box-shadow: 0 0 0 3px rgba(192,197,206,.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: 1px solid var(--hairline); border-radius: var(--radius); cursor: pointer; }
.radio input { accent-color: var(--silver-1); width: 18px; height: 18px; }
.radio:has(input:checked) { border-color: rgba(226,229,234,.4); background: rgba(226,229,234,.05); }

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

.toggle-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--radius); 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: #2a3450; 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: #E8EAED; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .18s; }
.switch:checked { background: var(--silver-grad); }
.switch:checked::after { transform: translateX(22px); background: #0A0E1A; }

/* ---- BUTTONS ---- */
.btn { display: inline-block; font: inherit; font-weight: 500; letter-spacing: .02em; border: 1px solid transparent; border-radius: 2px; padding: 14px 20px; cursor: pointer; text-decoration: none; text-align: center; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background .35s ease, border-color .35s ease; }
.btn:active { transform: translateY(0); }
.btn.big { width: 100%; font-size: 1.02rem; padding: 16px; }
.btn.primary { background: var(--silver-grad); color: #0A0E1A; font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -14px rgba(192,197,206,.55), 0 1px 0 rgba(255,255,255,.5) inset; }
.btn.primary:disabled { background: #2d3650; color: #6b7488; box-shadow: none; transform: none; cursor: not-allowed; }
.btn.cta { background: var(--silver-grad); color: #0A0E1A; font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 10px 30px -10px rgba(192,197,206,.5); }
.btn.cta:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 40px -12px rgba(192,197,206,.65); }
.btn.gold { background: var(--gold-grad); color: #1A1206; font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 10px 30px -10px var(--gold-glow); }
.btn.gold:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 18px 44px -12px var(--gold-glow); }

/* ---- GATE ---- */
.disclaimer-box { background: var(--surface-2); border: 1px solid var(--hairline); border-left: 3px solid var(--silver-1); padding: 16px; border-radius: var(--radius); font-size: .92rem; margin: 12px 0; color: #C9CDD4; }
.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(--silver-1); flex: none; margin-top: 1px; }

/* ---- GROSS CARD ---- */
.gross-card { text-align: center; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--hairline); }
.gross-card .muted { color: var(--muted) !important; }
.gross-number { font-family: var(--serif); font-weight: 600; font-size: 2.9rem; line-height: 1; margin: 10px 0 4px; color: var(--text); }
.gross-brl { font-size: 1.05rem; color: var(--silver-1); }
.gross-assump { margin-top: 14px; font-size: .92rem; color: var(--silver-1); }
.gross-assump strong { color: #fff; font-weight: 600; }
.gross-disclaimer { margin-top: 6px; font-size: .73rem; line-height: 1.4; color: var(--muted); }
.gross-caveat { margin-top: 16px; color: var(--silver-2); font-weight: 500; 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 solid var(--hairline-2); 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: rgba(226,229,234,.05); border-left: 2px solid var(--silver-1); border-radius: 4px; padding-left: 10px; padding-right: 8px; }
.wf-row.showcase .wf-label { font-weight: 600; }
.wf-row.subtotal { border-bottom: 1px solid var(--silver-1); font-weight: 700; padding-top: 14px; }
.wf-row.subtotal .wf-label { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.wf-row.subtotal .wf-amt { color: var(--text); }
.wf-row.gross-row .wf-amt, .wf-row.gross-row .wf-label { font-weight: 700; }
.wf-row.net-row { border: 1px solid var(--hairline); margin-top: 8px; background: var(--surface-2); border-radius: var(--radius); padding: 14px 12px; }
.wf-row.net-row .wf-label { font-family: var(--serif); font-weight: 500; font-size: 1.18rem; }
.wf-row.net-row .wf-amt { font-size: 1.25rem; }
.wf-row.net-row.pos { border-color: rgba(95,208,160,.35); background: rgba(95,208,160,.08); }
.wf-row.net-row.pos .wf-amt { color: var(--pos); }
.wf-row.net-row.neg { border-color: rgba(232,128,107,.35); background: rgba(232,128,107,.08); }
.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: var(--serif); font-weight: 600; font-size: 2.5rem; 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: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 13px; display: flex; flex-direction: column; gap: 4px; }
.metric.wide { grid-column: 1 / -1; }
.metric-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metric-val { font-weight: 600; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--text); }
.metric-sub { display: block; margin-top: 3px; font-size: .68rem; line-height: 1.25; color: var(--muted); }
.fx-note { margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---- NOTE / CTA / FOOTER ---- */
.note-card { background: var(--surface-2); border-color: var(--hairline); border-left: 3px solid var(--silver-1); font-size: .92rem; color: #C9CDD4; }
.note-card strong { color: var(--text); }
.cta-card {
  text-align: center;
  background: linear-gradient(160deg, rgba(216,180,92,.16), rgba(216,180,92,.05));
  border: 1px solid rgba(216,180,92,.55);
  box-shadow: 0 0 0 1px rgba(216,180,92,.18), 0 20px 55px -22px var(--gold-glow);
  animation: ctaGlow 3.2s ease-in-out infinite;
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(216,180,92,.18), 0 20px 55px -22px var(--gold-glow); }
  50%      { box-shadow: 0 0 0 1px rgba(216,180,92,.30), 0 24px 66px -20px var(--gold-glow); }
}
@media (prefers-reduced-motion: reduce) { .cta-card { animation: none; } }
.cta-card p { margin-bottom: 14px; font-weight: 500; font-size: 1.08rem; color: var(--text); }
.cta-card .cta-sub { margin: 12px 0 0; font-size: .85rem; font-weight: 400; color: #C9CDD4; }

/* Secondary "chat first" WhatsApp link — quiet, so the gold CTA stays dominant. */
.wa-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: .85rem; font-weight: 400; color: var(--muted); text-decoration: none; transition: color .3s ease; }
.wa-link:hover { color: #25D366; }
.wa-link svg { width: 15px; height: 15px; fill: #25D366; flex: none; }
.cta-card .wa-link { justify-content: center; }
.modal-ask { margin-top: 14px; text-align: center; }

/* ---- LEAD MODAL ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,8,15,.72); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal-bg[hidden] { display: none; }
.modal { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; max-width: 460px; width: 100%; max-height: 92vh; overflow-y: auto; animation: fall .35s ease both; }
.modal-title { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; color: var(--text); }
.modal-sub { margin-top: 8px; font-size: .9rem; color: #C9CDD4; }
.modal input[type=tel], .modal input[type=email] { font: inherit; padding: 12px 13px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface-2); color: var(--text); width: 100%; appearance: none; -webkit-appearance: none; }
.modal .msg { margin: 4px 0 0; font-size: .85rem; }
.modal .msg.err { color: var(--neg); }
.modal .msg.ok { color: var(--pos); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.btn.ghost { background: transparent; border-color: var(--hairline); color: var(--text); }
.btn.ghost:hover { border-color: var(--silver-1); }
.hp-field { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.footer-disclaimer { margin: 20px 0; font-size: .8rem; color: var(--muted); padding: 0 4px; }
.footer-disclaimer p { margin-bottom: 8px; }
.footnote { font-size: .76rem; }
/* ---- FOOTER (identical to juliorocha.us) ---- */
.footer { border-top: 1px solid var(--hairline); padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem) 2rem; background: var(--bg); }
.footer__inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem; }
.footer__logo { height: 30px; width: auto; opacity: .9; margin-bottom: .9rem; }
.footer__line { margin: 0; font-size: .9rem; color: var(--muted); letter-spacing: .02em; }
.footer__social { display: flex; flex-direction: column; gap: .6rem; text-align: right; }
.footer__social a { font-size: .88rem; color: var(--muted); letter-spacing: .03em; transition: color .3s ease; }
.footer__social a:hover { color: var(--text); }
.footer__copy { max-width: 1180px; margin: 2.5rem auto 0; padding-top: 1.75rem; border-top: 1px solid var(--hairline-2); font-size: .8rem; color: var(--muted); text-align: center; letter-spacing: .04em; }
@media (max-width: 600px) { .footer__inner { flex-direction: column; align-items: flex-start; } .footer__social { text-align: left; } }

/* ---- NOI headline (asset) ---- */
.noi-card { text-align: center; }
.noi-usd { font-family: var(--serif); font-weight: 600; font-size: 2.4rem; line-height: 1; margin: 6px 0 4px; }
.noi-usd.pos { color: var(--pos); } .noi-usd.neg { color: var(--neg); }
.noi-brl { font-size: 1.02rem; color: var(--muted); margin-bottom: 8px; }

/* ---- Appreciation slider ---- */
.appr-card input[type=range] { margin-top: 6px; }

/* ---- Patrimônio block ---- */
.patrimonio-card .wf-row.patr-pos .wf-amt { color: var(--text); }
.patrimonio-card .wf-row.patr-neg .wf-amt { color: var(--neg); }
.patr-pct { text-align: center; margin-top: 14px; font-size: .95rem; color: var(--muted); }
.patr-pct strong { color: var(--silver-2); font-size: 1.05rem; }

/* ---- Honest framing note (negative carry) ---- */
.net-frame { margin: 12px 0 4px; background: rgba(232,128,107,.08); border: 1px solid rgba(232,128,107,.32); border-radius: var(--radius); padding: 13px 14px; font-size: .9rem; color: #E7C4BA; }
.net-frame strong { color: #F0D5CC; }

/* ---- Advisory note ---- */
.advisory-card { background: var(--surface-2); border-left: 3px solid var(--silver-1); font-size: .92rem; color: #C9CDD4; }
.advisory-card strong { color: var(--text); }
.advisory-text { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--silver-1); font-size: .88rem; color: #C9CDD4; }

/* ---- Comparison (opt-in) ---- */
#compareBody { margin-top: 16px; }
.cmp-title { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; margin-bottom: 10px; color: var(--text); }
.cmp-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--hairline-2); font-size: .9rem; }
.cmp-row > span:first-child { color: var(--muted); }
.cmp-row .pos { color: var(--pos); } .cmp-row .neg { color: var(--neg); }

/* ---- "(?)" info affordance + shared popover ---- */
.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 5px; padding: 0;
  border: 1px solid var(--hairline); border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: .68rem; font-weight: 700; line-height: 1; cursor: pointer;
  vertical-align: middle; flex: none; transition: color .15s, border-color .15s;
}
.info-btn:hover, .info-btn:focus-visible { color: var(--silver-2); border-color: rgba(226,229,234,.45); outline: none; }
.info-pop {
  position: absolute; z-index: 60; max-width: min(280px, 92vw);
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 6px;
  padding: 11px 13px; font-size: .82rem; line-height: 1.45; color: #C9CDD4;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.7);
}

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