/* ============================================
   incometaxcentre.com — Premium Fintech Design System
   Inspired by Stripe, Mercury, Brex, Ramp, Plaid
   ============================================ */

:root {
  /* Colors */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --secondary: #0F172A;
  --accent: #14B8A6;
  --accent-dark: #0D9488;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --border-light: #F1F5F9;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;

  /* Spacing (8px system) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s7: 64px; --s8: 80px; --s9: 96px; --s10: 128px;

  /* Radius */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 4px 16px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 8px 30px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
  --shadow-primary: 0 8px 24px rgba(37,99,235,.25);

  /* Type */
  --font-head: 'Manrope', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.22,1,.36,1);
  --nav-h: 68px;
}

[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --secondary: #F8FAFC;
  --bg: #0B1120;
  --white: #0F172A;
  --card: #131C2E;
  --border: #1E293B;
  --border-light: #1E293B;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  transition: background .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--s3); }
.section { padding: var(--s9) 0; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--s2); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--s6); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: var(--s2); }
.section-head p { color: var(--text-muted); font-size: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: var(--radius-sm); font-family: var(--font-head); font-weight: 700; font-size: 15px; transition: all .25s var(--ease); white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,99,235,.35); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-ghost { color: var(--text-muted); padding: 10px 16px; }
.btn-ghost:hover { color: var(--primary); }
.btn svg { width: 18px; height: 18px; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: rgba(248,250,252,.7);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all .3s var(--ease);
}
[data-theme="dark"] .navbar { background: rgba(11,17,32,.7); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--s3); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-primary); }
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: var(--s1); }
.nav-links a { font-weight: 600; font-size: 15px; color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius-sm); transition: all .2s var(--ease); }
.nav-links a:hover { color: var(--text); background: var(--border-light); }
.nav-actions { display: flex; align-items: center; gap: var(--s1); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--text-muted); transition: all .2s var(--ease); border: 1px solid transparent; }
.icon-btn:hover { color: var(--primary); background: var(--border-light); }
.icon-btn svg { width: 20px; height: 20px; }
.hamburger { display: none; }

/* Mobile nav */
.mobile-nav { position: fixed; inset: var(--nav-h) 0 0 0; background: var(--bg); z-index: 99; transform: translateX(100%); transition: transform .35s var(--ease); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-family: var(--font-head); font-weight: 700; font-size: 20px; padding: var(--s2); border-radius: var(--radius-sm); border-bottom: 1px solid var(--border); }

/* Hero */
.hero { padding: calc(var(--nav-h) + var(--s9)) 0 var(--s8); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(ellipse at center, rgba(37,99,235,.12), transparent 70%); z-index: 0; }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: var(--s3); box-shadow: var(--shadow-sm); }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: var(--s3); }
.hero h1 .grad { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: clamp(17px, 2.5vw, 21px); color: var(--text-muted); max-width: 620px; margin: 0 auto var(--s5); }
.hero-cta { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; margin-bottom: var(--s6); }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
.hero-search input { width: 100%; padding: 18px 20px 18px 54px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); font-size: 16px; font-family: var(--font-body); color: var(--text); box-shadow: var(--shadow-md); transition: all .25s var(--ease); }
.hero-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1), var(--shadow-md); }
.hero-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-light); }
.trust-row { display: flex; gap: var(--s5); justify-content: center; flex-wrap: wrap; margin-top: var(--s6); color: var(--text-light); font-size: 14px; font-weight: 600; }
.trust-row span { display: flex; align-items: center; gap: 8px; }
.trust-row svg { width: 16px; height: 16px; color: var(--accent); }

/* Card grid */
.grid { display: grid; gap: var(--s3); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3); transition: all .3s var(--ease); display: flex; flex-direction: column; gap: var(--s2); }
.calc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.calc-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(37,99,235,.1); color: var(--primary); }
.calc-icon svg { width: 24px; height: 24px; }
.calc-card h3 { font-size: 17px; }
.calc-card p { font-size: 14px; color: var(--text-muted); }
.calc-card .arrow { margin-top: auto; color: var(--primary); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; transition: gap .2s var(--ease); }
.calc-card:hover .arrow { gap: 10px; }

/* Category cards */
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4) var(--s3); text-align: center; transition: all .3s var(--ease); }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card .cat-icon { width: 56px; height: 56px; margin: 0 auto var(--s2); border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(20,184,166,.12)); color: var(--primary); }
.cat-card .cat-icon svg { width: 28px; height: 28px; }
.cat-card h3 { font-size: 16px; margin-bottom: 4px; }
.cat-card p { font-size: 13px; color: var(--text-muted); }

/* Featured calculator */
.featured { background: var(--secondary); border-radius: var(--radius-lg); padding: var(--s7); position: relative; overflow: hidden; }
[data-theme="dark"] .featured { background: var(--card); border: 1px solid var(--border); }
.featured::before { content: ''; position: absolute; top: -40%; right: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(37,99,235,.3), transparent 70%); }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; position: relative; z-index: 1; }
.featured-copy .eyebrow { color: var(--accent); }
.featured-copy h2 { color: #fff; font-size: 34px; margin-bottom: var(--s2); }
.featured-copy p { color: rgba(255,255,255,.7); margin-bottom: var(--s4); }
.mini-calc { background: var(--white); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow-lg); }
[data-theme="dark"] .mini-calc { background: var(--bg); border: 1px solid var(--border); }
.field { margin-bottom: var(--s2); }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-size: 15px; font-family: var(--font-body); color: var(--text); transition: all .2s var(--ease); }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.result-box { margin-top: var(--s3); padding: var(--s3); background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(20,184,166,.08)); border-radius: var(--radius); border: 1px solid var(--border); }
.result-box .label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.result-box .value { font-family: var(--font-mono); font-size: 32px; font-weight: 700; color: var(--primary); margin-top: 4px; }

/* Guide articles */
.guide-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .3s var(--ease); }
.guide-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.guide-thumb { height: 160px; background: linear-gradient(135deg, var(--primary), var(--accent)); position: relative; }
.guide-thumb.g2 { background: linear-gradient(135deg, #8B5CF6, var(--primary)); }
.guide-thumb.g3 { background: linear-gradient(135deg, var(--accent), #22C55E); }
.guide-body { padding: var(--s3); }
.guide-body .tag { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.guide-body h3 { font-size: 18px; margin: 8px 0; }
.guide-body p { font-size: 14px; color: var(--text-muted); }

/* Why us / stats */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s3); }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); text-align: center; }
.stat .num { font-family: var(--font-mono); font-size: 40px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-top: 4px; }

.feature-row { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s4); margin-top: var(--s6); }
.feature { text-align: center; }
.feature .f-icon { width: 56px; height: 56px; margin: 0 auto var(--s2); border-radius: 14px; background: rgba(20,184,166,.12); color: var(--accent); display: grid; place-items: center; }
.feature .f-icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--text-muted); }

/* FAQ */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--s2); overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: var(--s3); font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.faq-q svg { width: 20px; height: 20px; color: var(--text-muted); transition: transform .3s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a p { padding: 0 var(--s3) var(--s3); color: var(--text-muted); font-size: 15px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius-lg); padding: var(--s8); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; top: -50%; left: -10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(20,184,166,.4), transparent 70%); }
.cta-band h2 { color: #fff; font-size: clamp(28px,4vw,40px); margin-bottom: var(--s2); position: relative; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 18px; margin-bottom: var(--s4); position: relative; }
.cta-band .btn-primary { background: #fff; color: var(--primary); position: relative; }
.cta-band .btn-primary:hover { background: #f1f5f9; }

/* Ad slot */
.ad-band { margin: var(--s6) 0; text-align: center; }
.ad-band:has(.ad-box:empty) { display: none; }
.ad-box { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-label { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }

/* Footer */
.footer { background: var(--secondary); color: #fff; padding: var(--s8) 0 var(--s4); margin-top: var(--s9); }
[data-theme="dark"] .footer { border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s5); margin-bottom: var(--s6); }
.footer .logo { color: #fff; margin-bottom: var(--s2); }
.footer-about p { color: rgba(255,255,255,.6); font-size: 14px; max-width: 300px; }
.footer-col h4 { font-size: 14px; color: #fff; margin-bottom: var(--s2); font-family: var(--font-head); }
.footer-col a { display: block; color: rgba(255,255,255,.6); font-size: 14px; padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--s3); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.footer-bottom p { color: rgba(255,255,255,.5); font-size: 13px; }
.footer-social { display: flex; gap: var(--s1); }
.footer-social a { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(255,255,255,.08); display: grid; place-items: center; color: rgba(255,255,255,.7); transition: all .2s; }
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg); z-index: 9999; display: grid; place-items: center; transition: opacity .5s ease, visibility .5s; }
.loader.hide { opacity: 0; visibility: hidden; }
.loader .logo-mark { width: 56px; height: 56px; animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.9); opacity: .7; } }

/* Page hero (sub pages) */
.page-hero { padding: calc(var(--nav-h) + var(--s7)) 0 var(--s6); text-align: center; }
.page-hero h1 { font-size: clamp(32px,5vw,52px); margin-bottom: var(--s2); }
.page-hero p { color: var(--text-muted); font-size: 18px; max-width: 600px; margin: 0 auto; }
.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: var(--s2); }
.breadcrumb a { color: var(--primary); }

/* Calculator page */
.calc-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s5); align-items: start; }
.calc-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5); }
.calc-panel h2 { font-size: 24px; margin-bottom: var(--s3); }
.result-panel { position: sticky; top: calc(var(--nav-h) + var(--s2)); }
.result-big { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius-lg); padding: var(--s5); color: #fff; }
.result-big .r-label { font-size: 14px; opacity: .8; font-weight: 600; }
.result-big .r-value { font-family: var(--font-mono); font-size: 44px; font-weight: 700; margin: 8px 0; }
.result-breakdown { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3); margin-top: var(--s3); }
.breakdown-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 15px; }
.breakdown-row:last-child { border-bottom: none; font-weight: 700; }
.breakdown-row .v { font-family: var(--font-mono); }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 28px; margin: var(--s5) 0 var(--s2); }
.prose h3 { font-size: 20px; margin: var(--s4) 0 var(--s1); }
.prose p { color: var(--text-muted); margin-bottom: var(--s2); }
.prose ul { color: var(--text-muted); margin: 0 0 var(--s2) var(--s3); }

/* Responsive */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .featured { padding: var(--s5); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: grid; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s3); }
  .section { padding: var(--s7) 0; }
  .hero { padding: calc(var(--nav-h) + var(--s6)) 0 var(--s6); }
  .featured, .cta-band { padding: var(--s4); }
}
