/* ============================================================
   TaxKerb — global styles. Luxury, calm, and very easy to read.
   ============================================================ */
:root {
  --ink: #0E1116;
  --ink-2: #1A1F29;
  --ink-3: #2A313E;
  --cream: #FBF8F1;
  --paper: #FFFFFF;
  --muted: #6B7280;
  --line: #E7E2D6;
  --gold: #C9A227;
  --gold-soft: #F4D58D;
  --gold-deep: #B8860B;
  --green: #1F8A55;
  --green-soft: #E3F3EA;
  --red: #C0392B;
  --red-soft: #FBEAE7;
  --blue: #2563EB;
  --shadow: 0 10px 40px rgba(14,17,22,.10);
  --shadow-sm: 0 2px 10px rgba(14,17,22,.06);
  --radius: 16px;
  --radius-sm: 10px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
a { color: inherit; }
img, svg { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.gold { color: var(--gold-deep); }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--sans); font-weight: 600;
  font-size: 16px; padding: 14px 26px; border-radius: 999px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  color: #2A2308; box-shadow: 0 8px 22px rgba(184,134,11,.35);
}
.btn-gold:hover { box-shadow: 0 10px 28px rgba(184,134,11,.45); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-block { width: 100%; }
.btn-lg { font-size: 18px; padding: 16px 32px; }
.btn-sm { font-size: 14px; padding: 9px 16px; }

/* ---- Top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,241,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--ink-3); }
.nav-links a:hover { color: var(--gold-deep); }
.brand img { height: 44px; }

/* ---- Hero ---- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero h1 { font-size: 60px; margin: 0 0 18px; letter-spacing: -.5px; }
.hero p.lead { font-size: 21px; color: var(--ink-3); max-width: 620px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .reassure { margin-top: 18px; font-size: 14px; color: var(--muted); }
.badge-pill {
  display: inline-block; background: #fff; border: 1px solid var(--line);
  color: var(--gold-deep); font-weight: 600; font-size: 13px; letter-spacing: 1px;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px; text-transform: uppercase;
}

/* decorative gold road line */
.road-accent { height: 4px; width: 180px; margin: 30px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---- Sections ---- */
section.block { padding: 80px 0; }
.section-title { text-align: center; font-size: 40px; margin: 0 0 12px; }
.section-sub { text-align: center; color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 50px; }

/* ---- Feature cards ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff7e0, #f6e6b8); margin-bottom: 18px; font-size: 26px; }
.card h3 { font-size: 22px; margin: 0 0 8px; }
.card p { color: var(--ink-3); margin: 0; }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.step { text-align: center; }
.step .num { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid;
  place-items: center; font-family: var(--serif); font-size: 24px; color: #2A2308;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); }

/* ---- Pricing ---- */
.price-wrap { display: flex; justify-content: center; }
.price-card {
  background: var(--ink); color: var(--cream); border-radius: 22px; padding: 44px;
  max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow);
  border: 1px solid var(--ink-3); position: relative;
}
.price-card .tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); color: #2A2308;
  font-weight: 700; font-size: 12px; letter-spacing: 1px; padding: 7px 16px; border-radius: 999px; }
.price-card .amount { font-family: var(--serif); font-size: 60px; line-height: 1; margin: 10px 0 4px; }
.price-card .amount span { font-size: 18px; color: #C9CBD1; }
.price-card ul { list-style: none; padding: 0; margin: 26px 0; text-align: left; }
.price-card li { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 10px; }
.price-card li::before { content: "✓"; color: var(--gold-soft); font-weight: 700; }

/* ---- Footer ---- */
footer { background: var(--ink); color: #B9BDC6; padding: 50px 0; margin-top: 40px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
footer a { color: #B9BDC6; text-decoration: none; }
footer a:hover { color: var(--gold-soft); }
.disclaimer { font-size: 12.5px; color: #7C828E; max-width: 560px; }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(14,17,22,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--paper); border-radius: 20px; max-width: 440px; width: 100%;
  padding: 36px; box-shadow: var(--shadow); animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h2 { font-size: 28px; margin: 0 0 6px; text-align: center; }
.modal p.sub { text-align: center; color: var(--muted); margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink-3); }
.field input, .field select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 16px; font-family: var(--sans); background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
.modal .switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.modal .switch a { color: var(--gold-deep); font-weight: 600; cursor: pointer; text-decoration: none; }
.modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; margin: -12px -8px 0 0; }

/* ============================================================
   Dashboard
   ============================================================ */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #C9CBD1; padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { margin-bottom: 30px; }
.sidebar .brand img { height: 38px; filter: brightness(0) invert(1); opacity: .95; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
  cursor: pointer; font-weight: 500; color: #C9CBD1; text-decoration: none; margin-bottom: 4px; transition: background .15s; }
.side-link:hover { background: var(--ink-2); color: #fff; }
.side-link.active { background: linear-gradient(135deg, rgba(244,213,141,.18), rgba(184,134,11,.10));
  color: var(--gold-soft); }
.side-link .ic { font-size: 19px; width: 22px; text-align: center; }
.sidebar .trial-box { margin-top: 24px; background: var(--ink-2); border-radius: 14px; padding: 16px; font-size: 13px; }
.sidebar .trial-box b { color: var(--gold-soft); }

.main { padding: 32px 40px 80px; max-width: 1000px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.page-head h1 { font-size: 32px; margin: 0; }
.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 28px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.stat .lab { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat .val { font-family: var(--serif); font-size: 30px; margin-top: 6px; }
.stat.green .val { color: var(--green); }
.stat.red .val { color: var(--red); }
.stat.gold .val { color: var(--gold-deep); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.panel h2 { font-size: 22px; margin: 0 0 4px; }
.panel .hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; align-items: end; }
.toggle-row { display: inline-flex; background: #F0ECE0; border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.toggle-row button { border: none; background: transparent; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--ink-3); }
.toggle-row button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
td.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tag-cat { background: #F3EFE4; color: var(--ink-3); padding: 3px 10px; border-radius: 999px; font-size: 12.5px; }
.del-x { color: var(--red); cursor: pointer; font-weight: 700; opacity: .6; }
.del-x:hover { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* tax breakdown */
.breakdown li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); list-style: none; }
.breakdown { padding: 0; margin: 0; }
.breakdown li.total { font-weight: 700; font-size: 18px; border-bottom: none; padding-top: 16px; }
.bignum { font-family: var(--serif); font-size: 46px; color: var(--gold-deep); }

/* AI advisor */
.ai-box { background: linear-gradient(135deg, #fffaf0, #fdf3da); border: 1px solid #efe1bd; border-radius: var(--radius); padding: 22px; }
.ai-box .ai-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.ai-box .ai-head .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg,var(--gold-soft),var(--gold-deep)); display: grid; place-items: center; }
.ai-answer { white-space: pre-wrap; }
.chip { display:inline-block; background:#fff; border:1px solid var(--line); border-radius:999px; padding:7px 14px; margin:4px 6px 4px 0; cursor:pointer; font-size:14px; }
.chip:hover { border-color: var(--gold); }

.notice { font-size: 13px; color: var(--muted); background: #F3EFE4; border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.spinner { display:inline-block; width:16px;height:16px;border:2px solid #e0d6b8;border-top-color:var(--gold-deep);border-radius:50%;animation:spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg);} }

/* responsive */
@media (max-width: 900px) {
  .grid-3, .steps, .stats { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 44px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .sidebar .brand { width: 100%; margin-bottom: 10px; }
  .sidebar .trial-box { display: none; }
  .side-link { margin: 0; }
  .main { padding: 20px; }
}
@media (max-width: 600px) {
  .grid-3, .steps, .stats, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .nav-links a:not(.btn) { display: none; }
}
