/* annuity+ website — shared design system (mirrors the iOS app) */
:root {
  --gold: #f5c42b;
  --gold-2: #f28c2e;
  --ink: #141416;
  --muted: rgba(20, 20, 22, 0.62);
  --card-bg: rgba(255, 255, 255, 0.35);
  --card-bg-strong: rgba(255, 255, 255, 0.6);
  --stroke: rgba(255, 255, 255, 0.55);
  --radius: 24px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  /* App-analog: cool grey (bottom-left) -> peach -> warm gold (top-right), + gold glow top-right */
  background:
    radial-gradient(circle at 98% 4%, rgba(245,196,43,.35), rgba(245,196,43,0) 300px),
    linear-gradient(to top right, #b8c7d9 0%, #e0e0e6 40%, #f7e6d6 75%, #fce3b8 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
}
a { color: inherit; }

/* Layout */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 8px;
}
.brand { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.brand b { font-style: italic; color: var(--gold); }
.nav { display: flex; gap: 20px; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { text-align: center; padding: 48px 0 20px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 span { color: var(--gold-2); }
.hero p.sub { max-width: 620px; margin: 18px auto 0; font-size: clamp(16px, 2.6vw, 19px); color: var(--muted); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  font-weight: 700; font-size: 16px; color: #000;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  box-shadow: 0 8px 22px rgba(245, 196, 43, 0.35);
  transition: transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.5); border: 1.5px solid rgba(20,20,22,.12); box-shadow: none; }

/* Phone frame + screenshot placeholders */
.hero-visual { margin: 44px auto 0; max-width: 980px; }
.phone {
  width: 300px; margin: 0 auto; padding: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.5), rgba(255,255,255,.2));
  border-radius: 44px; border: 1.5px solid var(--stroke);
  box-shadow: 0 30px 60px rgba(0,0,0,.18);
}
.phone .screen { border-radius: 30px; overflow: hidden; }

/* Glass card */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  border: 1.5px solid var(--stroke);
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
  padding: 28px;
}

/* Features grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 50px 0 10px; }
.feature { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--stroke); padding: 24px; backdrop-filter: blur(14px); }
.feature .ico { font-size: 26px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--muted); }
.feature .tag { display:inline-block; margin-top:10px; font-size:11px; font-weight:700; letter-spacing:.04em; color:#9a6a00; background:rgba(245,196,43,.18); padding:3px 9px; border-radius:999px; }

.section-h { text-align:center; font-size: clamp(24px,4vw,34px); font-weight:800; letter-spacing:-.02em; margin: 46px 0 6px; }
.section-sub { text-align:center; color: var(--muted); margin-bottom: 26px; font-size: 16px; }

/* Steps */
.steps { margin: 40px 0; display:grid; gap:14px; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
.step { background: var(--card-bg); border-radius: var(--radius); border:1.5px solid var(--stroke); padding:22px; backdrop-filter: blur(14px); }
.step .num { font-size: 32px; font-weight: 800; color: var(--gold-2); }
.step h4 { font-size:16px; font-weight:700; margin:6px 0 4px; }
.step p { font-size:14px; color:var(--muted); }

/* Final CTA */
.final-cta { margin: 56px 0; text-align:center; }

/* Footer */
.footer { margin-top: 60px; padding: 30px 0 40px; text-align:center; color: var(--muted); font-size: 14px; }
.footer .links { display:flex; gap:22px; justify-content:center; flex-wrap:wrap; margin-bottom:14px; font-weight:600; }
.footer .links a { text-decoration:none; }
.footer .links a:hover { color:var(--ink); }

/* Legal pages */
.legal { padding: 36px 0 10px; }
.legal .glass { max-width: 860px; margin: 0 auto; padding: 36px 40px; }
.legal h1 { font-size: 30px; font-weight: 800; letter-spacing:-.02em; margin-bottom: 6px; }
.legal h2 { font-size: 20px; font-weight: 700; margin: 26px 0 8px; }
.legal h3 { font-size: 16px; font-weight: 700; margin: 18px 0 6px; }
.legal p, .legal li { font-size: 15px; color: rgba(20,20,22,.82); margin-bottom: 10px; }
.legal ul { padding-left: 20px; margin-bottom: 10px; }
.legal .muted { color: var(--muted); }

/* Calc card view (shown when ?d= payload present) */
.calcwrap { max-width: 460px; margin: 0 auto; padding: 30px 0 10px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 4px; border-bottom:1px solid rgba(20,20,22,.10); }
.row:last-child { border-bottom:none; }
.row .label { color:var(--muted); font-size:15px; font-weight:500; }
.row .value { font-size:17px; font-weight:700; font-variant-numeric:tabular-nums; }
.row.payment .value { font-size:24px; color:var(--gold-2); }
.row.payment { background:rgba(245,196,43,.10); border-radius:12px; padding:16px 10px; margin-top:6px; }
.note { text-align:center; color:var(--muted); font-size:13px; font-weight:500; padding:10px 0 2px; }
.err { text-align:center; color:var(--muted); font-size:15px; padding:20px 0; }

/* Share calc: mode badge + hero */
.badge { display:inline-block; margin:14px 0 4px; font-size:12px; font-weight:700; letter-spacing:.03em; color:#5a3d00; background:rgba(245,196,43,.28); border:1px solid rgba(245,196,43,.5); padding:5px 14px; border-radius:999px; }
.herowrap { display:flex; align-items:baseline; justify-content:center; gap:8px; margin-top:6px; }
.herowrap .pre { font-size:22px; font-weight:800; color:var(--gold-2); }
.herowrap .val { font-size:44px; font-weight:800; letter-spacing:-.02em; }
.herowrap .unit { font-size:18px; font-weight:600; color:var(--muted); }
.hero-label { color:var(--muted); font-size:15px; font-weight:600; margin-top:2px; }

/* Schedule table */
.sched { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
.sched th { text-align:right; font-weight:600; color:var(--muted); padding:6px 6px; font-size:12px; border-bottom:1px solid rgba(20,20,22,.15); }
.sched th:first-child, .sched td:first-child { text-align:right; }
.sched td { text-align:right; padding:5px 6px; border-bottom:1px solid rgba(20,20,22,.06); color:rgba(20,20,22,.85); }
.sched tr.pay td:nth-child(2) { font-weight:700; color:var(--ink); }
.sched td .b { color:var(--gold-2); }
.schedscroll { max-height:340px; overflow:auto; margin:10px 0 4px; border:1px solid rgba(20,20,22,.08); border-radius:12px; background:rgba(255,255,255,.25); }
.totals { display:flex; gap:16px; flex-wrap:wrap; justify-content:flex-end; padding:12px 6px 2px; font-size:14px; border-top:1px solid rgba(20,20,22,.12); margin-top:6px; }
.totals .t { font-weight:700; }

/* ---- Calc view: app-like hero + input rows ---- */
.calcicon { width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.6); display:inline-flex; align-items:center; justify-content:center; flex:0 0 38px; }
.calcicon svg { width:20px; height:20px; stroke:#9a6a00; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.heroicon { width:44px; height:44px; }
.heroicon svg { width:22px; height:22px; stroke:#9a6a00; }
.herowrap2 { display:flex; align-items:center; gap:14px; text-align:left; margin-top:6px; }
.hero-main { flex:1; min-width:0; }
.herowrap2 .pre { font-size:24px; font-weight:800; color:var(--gold-2); }
.herowrap2 .val { font-size:40px; font-weight:800; letter-spacing:-.02em; }
.herowrap2 .unit { font-size:17px; font-weight:600; color:var(--muted); }
.hero-anno { margin-top:12px; padding-top:12px; border-top:1px solid rgba(20,20,22,.12); font-size:13px; color:var(--muted); text-align:center; }
.inrow { display:flex; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid rgba(20,20,22,.09); }
.inrow:last-child{border-bottom:none;}
.inrow .lab { flex:1; color:var(--muted); font-size:14px; font-weight:500; }
.inrow .val2 { font-weight:700; font-size:15px; font-variant-numeric:tabular-nums; }
.inrow .val2.gold { color:var(--gold-2); }
/* responsive: keep content off the screen edges on small phones */
.calcwrap { padding:0 14px; }
@media (max-width:380px){
  .herowrap2 .val { font-size:34px; }
  .inrow .val2 { font-size:14px; }
}

/* header: safe responsive spacing on phones */
.topbar { flex-wrap: wrap; gap: 10px; padding: 18px 20px 6px; }
.topbar .nav { gap: 14px; }
.topbar .nav a { padding: 6px 0; }
@media (max-width:480px){
  .topbar { padding: 14px 14px 4px; }
  .brand { font-size: 21px; }
  .nav { gap: 12px; font-size: 14px; }
}
@media (max-width:360px){
  .topbar .nav { gap: 10px; font-size: 13px; }
}

/* Landing header bar (logo + Home text) */
.landing-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 14px 10px; }
.landing-bar .brand { margin-left:2px; }
.landing-home { font-size:15px; font-weight:600; color:var(--muted); text-decoration:none; padding:6px 2px; }
.landing-home:hover { color:var(--ink); }
@media (max-width:480px){ .landing-bar { padding:14px 14px 8px; } }

/* Official Apple App Store badge */
.appbadge { height:46px; width:auto; display:inline-block; }
.appbadge:hover { opacity:.9; }
