/* Ravi vs Suresh Wealth Calculator
   Layout idea: one dark cinematic world; Ravi = green, Suresh = blue, money and verdicts = gold. */
:root {
  --bg: #0a0d12;
  --surface: #121720;
  --surface-2: #19202b;
  --line: #252e3c;
  --ink: #eef1f6;
  --muted: #8d98aa;
  --ravi: #2fbf71;
  --suresh: #4c8dff;
  --gold: #f4b740;
  --danger: #ef6a55;
  --display: "Anek Telugu", "Noto Sans Telugu", system-ui, sans-serif;
  --body: "Noto Sans Telugu", "Anek Telugu", system-ui, sans-serif;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; text-decoration: none; font-weight: 600;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn-primary { background: var(--gold); color: #1a1405; border-color: var(--gold); }
.btn-primary:hover { background: #ffc85c; border-color: #ffc85c; }
.btn-ghost { background: var(--surface); }
.btn-small { padding: 8px 14px; font-size: 14px; }
.arrow { font-family: system-ui, sans-serif; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { display: flex; }
.logo-mark span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg); }
.logo-mark span:first-child { background: var(--ravi); }
.logo-mark span:last-child { background: var(--suresh); margin-left: -8px; }
.logo b { font-family: var(--display); font-size: 18px; }
.logo small { color: var(--muted); font-size: 12px; display: block; line-height: 1; }
.bar nav { display: flex; gap: 8px; align-items: center; }

/* ---------- landing ---------- */
.promo { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; padding: 8px var(--gutter); }
.promo b { color: var(--gold); }

.hero { padding: clamp(40px, 7vw, 88px) 0 56px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 14px; letter-spacing: .04em; margin-bottom: 18px; display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.hero h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 700; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--ravi), var(--suresh)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 22px 0 30px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.proof { margin-top: 26px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.proof b { color: var(--ink); }

.stage { position: relative; display: grid; place-items: center; min-height: 520px; }
.glow { position: absolute; inset: 8% 4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47,191,113,.35), transparent 70%) 20% 40% / 70% 70% no-repeat,
              radial-gradient(closest-side, rgba(76,141,255,.35), transparent 70%) 80% 60% / 70% 70% no-repeat;
  filter: blur(20px); animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: rotate(12deg) scale(1.06); } }
.phone {
  position: relative; width: 300px; border-radius: 40px; padding: 12px;
  background: linear-gradient(160deg, #2a3240, #0d1118); border: 1px solid #3a4456;
  box-shadow: 0 40px 80px rgba(0,0,0,.6);
}
.phone-screen { border-radius: 30px; background: var(--bg); padding: 18px 14px; display: grid; gap: 12px; }
.phone-notch { width: 90px; height: 22px; border-radius: 999px; background: #000; margin: -6px auto 4px; }
.mini-verdict { background: var(--gold); color: #1a1405; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; line-height: 1.35; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.mini-card.r { border-top: 3px solid var(--ravi); }
.mini-card.s { border-top: 3px solid var(--suresh); }
.mini-card small { color: var(--muted); font-size: 11px; display: block; }
.mini-card b { font-family: var(--display); font-size: 15px; white-space: nowrap; }

.section { padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 760px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 52px); }
.section-head p { color: var(--muted); font-size: 18px; }

.rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}
.calc-card { min-width: 0; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; align-content: start; min-height: 250px; }
.calc-card .no { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--line); line-height: 1; }
.calc-card h3 { font-size: 22px; }
.calc-card p { color: var(--muted); font-size: 15px; }
.vs-chip { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.vs-chip span { padding: 3px 10px; border-radius: 999px; }
.vs-chip .r { background: rgba(47,191,113,.14); color: var(--ravi); }
.vs-chip .s { background: rgba(76,141,255,.14); color: var(--suresh); }
.badge { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #1a1405; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 26px 22px; display: grid; gap: 4px; }
.stat b { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); color: var(--gold); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 15px; }

.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.who div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.who h3 { font-size: 19px; }
.who p { color: var(--muted); font-size: 15px; }

.price-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: grid; gap: 18px; align-content: start; }
.price-card.best { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 30px 60px rgba(244,183,64,.08); }
.price { font-family: var(--display); font-size: 64px; font-weight: 700; line-height: 1; }
.price small { font-size: 18px; color: var(--muted); font-weight: 500; }
.price s { color: var(--muted); font-size: 24px; margin-left: 10px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: "✓"; color: var(--ravi); font-weight: 700; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-top: 12px; }

.closing { text-align: left; display: grid; gap: 24px; }
.closing h2 { font-size: clamp(40px, 7vw, 84px); }

.foot { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: grid; gap: 16px; }
.disclaimer { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* ---------- app ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 60px; }
.menu { position: sticky; top: 88px; align-self: start; display: grid; gap: 6px; }
.menu button {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px;
  text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.mobile-picker { display: none; }
.menu button:hover { background: var(--surface); }
.menu button[aria-current="true"] { background: var(--surface-2); border-color: var(--line); }
.menu .mno { font-family: var(--display); color: var(--muted); font-weight: 700; }
.menu button[aria-current="true"] .mno { color: var(--gold); }
.menu .mname { font-size: 15px; line-height: 1.3; }
.menu .lock { font-size: 12px; color: var(--muted); }
.menu .free { font-size: 11px; font-weight: 700; color: #1a1405; background: var(--gold); border-radius: 999px; padding: 1px 8px; }

.panel { display: grid; gap: 22px; min-width: 0; }
.panel-head { display: grid; gap: 6px; }
.panel-head h1 { font-size: clamp(28px, 4vw, 42px); }
.panel-head p { color: var(--muted); }

.inputs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 16px; }
.inputs-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inputs-top h2 { font-size: 18px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); line-height: 1.3; }
.field .box { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.field .box:focus-within { border-color: var(--gold); }
.field input { width: 100%; background: transparent; border: 0; padding: 10px 12px; outline: none; font-variant-numeric: tabular-nums; font-size: 16px; }
.field .unit { padding: 0 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.field .hint { font-size: 12px; color: var(--gold); min-height: 1em; font-variant-numeric: tabular-nums; }
.assume { color: var(--muted); font-size: 13px; }

.verdict {
  border-radius: var(--radius); padding: 22px 24px; background: var(--gold); color: #1a1405;
  display: grid; gap: 4px;
}
.verdict small { font-weight: 600; opacity: .75; }
.verdict b { font-family: var(--display); font-size: clamp(22px, 3.2vw, 32px); line-height: 1.25; }
.verdict.tie { background: var(--surface-2); color: var(--ink); }

.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; align-content: start; position: relative; }
.person.r { border-top: 4px solid var(--ravi); }
.person.s { border-top: 4px solid var(--suresh); }
.person.win::after { content: attr(data-win); position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; background: var(--gold); color: #1a1405; border-radius: 999px; padding: 2px 10px; }
.who-row { display: flex; gap: 12px; align-items: center; }
.who-row svg { width: 56px; height: 56px; flex: none; }
.who-row b { font-family: var(--display); font-size: 22px; display: block; line-height: 1.1; }
.who-row span { color: var(--muted); font-size: 14px; }
.big { font-family: var(--display); font-size: clamp(30px, 4.6vw, 46px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.person.r .big { color: var(--ravi); }
.person.s .big { color: var(--suresh); }
.big-label { color: var(--muted); font-size: 13px; margin-top: -8px; }
.dl { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 6px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }

.insight { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; display: grid; gap: 6px; font-size: 15px; }
.insight b { color: var(--gold); }

.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.chart-box h2 { font-size: 17px; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend .r::before { background: var(--ravi); } .legend .s::before { background: var(--suresh); }
#chart text { fill: var(--muted); font-size: 11px; font-family: var(--body); }

.yearly { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.yearly summary { cursor: pointer; font-weight: 600; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; }
td.r { color: var(--ravi); } td.s { color: var(--suresh); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.toast { color: var(--muted); font-size: 14px; min-height: 1.4em; }

.lockbox { background: var(--surface); border: 1px solid var(--gold); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; justify-items: start; }
.lockbox h2 { font-size: 26px; }
.lockbox p { color: var(--muted); max-width: 40em; }
.code-row { display: flex; gap: 10px; flex-wrap: wrap; }
.code-row input { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; min-width: 220px; text-transform: uppercase; letter-spacing: .06em; }
.msg-bad { color: var(--danger); font-size: 14px; }
.msg-ok { color: var(--ravi); font-size: 14px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; place-items: center; z-index: 50; padding: 16px; }
.modal.open { display: grid; }
.modal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; max-width: 440px; width: 100%; max-height: 92vh; overflow: auto; }
.modal-card img { border-radius: 10px; width: 100%; }

/* ---------- entrance motion (visible at rest) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s ease both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
  @keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .glow { animation: none; } .btn { transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { min-height: 440px; }
  .stats, .who { grid-template-columns: 1fr 1fr; }
  .price-wrap { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .menu { position: static; display: block; min-width: 0; }
  .menu button { display: none; }
  .mobile-picker { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
  .mobile-picker select {
    width: 100%; min-width: 0; min-height: 48px; padding: 9px 12px;
    border: 1px solid var(--line); border-radius: 12px;
    background-color: #fff; color: var(--ink); font: inherit; font-size: 16px;
  }
  .bar nav .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .duel { grid-template-columns: 1fr; }
  .stats, .who { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
}

/* ---------- print (PDF report) ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #111; --muted: #555; --line: #ccc; }
  body { background: #fff; color: #111; }
  .bar, .menu, .actions, .toast, .inputs-top button, .modal { display: none !important; }
  .app { grid-template-columns: 1fr; padding: 0; }
  .verdict { border: 2px solid #111; }
  .yearly { display: block; } .yearly summary { display: none; }
  .yearly .table-scroll { display: block; }
}
