/* CA4CPA Salary Tools — Brand stylesheet
   Palette inspired by accounting/CPA professional aesthetics.
   Tweak --c-* tokens below to match exact CA4CPA brand guide. */

:root {
  /* CA4CPA brand palette — extracted from ca4cpa.com */
  --c-primary: #046BD2;       /* CA4CPA blue */
  --c-primary-2: #045CB4;     /* CA4CPA blue dark */
  --c-primary-3: #0693E3;     /* light accent blue */
  --c-accent: #F6A11C;        /* CA4CPA orange/gold accent */
  --c-accent-2: #E08F0F;
  --c-success: #16A34A;
  --c-text: #111111;
  --c-text-2: #1E293B;
  --c-muted: #475569;
  --c-border: #ECEFF3;
  --c-bg: #FFFFFF;
  --c-bg-soft: #F0F5FA;       /* CA4CPA soft blue tint */
  --c-bg-card: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(4, 107, 210, 0.06);
  --shadow: 0 8px 28px rgba(4, 107, 210, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--c-primary); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar {
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; opacity: .9; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--c-primary); font-size: 19px; line-height: 1.1; }
.brand img.logo { height: 40px; width: auto; display: block; }
.brand .sub { font-size: 12px; color: var(--c-muted); font-weight: 500; display: block; letter-spacing: .02em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--c-text); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--c-primary-2); text-decoration: none; }
.nav .btn-cta { padding: 10px 16px; }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform .05s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary { background: var(--c-accent); color: #1a1a1a; }
.btn-primary:hover { background: var(--c-accent-2); text-decoration: none; box-shadow: var(--shadow); }
.btn-secondary { background: #fff; color: var(--c-primary); border-color: var(--c-primary); }
.btn-secondary:hover { background: var(--c-primary); color: #fff; text-decoration: none; }
.btn-cta { background: var(--c-accent); color: #1a1a1a; }
.btn-cta:hover { background: var(--c-accent-2); }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at top right, rgba(246,161,28,.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(6,147,227,.22) 0%, transparent 55%),
    linear-gradient(135deg, var(--c-primary-2) 0%, var(--c-primary) 60%, #035AAA 100%);
  color: #fff;
  padding: 88px 0 96px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block;
  background: rgba(246,161,28,.16);
  color: #FFD58A;
  border: 1px solid rgba(246,161,28,.4);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 22px;
}
.hero h1 {
  color: #fff; max-width: 1000px; margin: 0 auto .5em;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.15; letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--c-accent); }
.hero p.subtitle {
  color: #BAD4F2; font-size: clamp(15px, 1.6vw, 17px); max-width: 740px;
  margin: 0 auto 18px; font-weight: 500; letter-spacing: .01em;
}
.hero p.lead {
  color: #E2EEFB; font-size: clamp(16px, 1.7vw, 19px); max-width: 760px;
  margin: 0 auto 28px; line-height: 1.6;
}
.hero .meta-row {
  color: #BAD4F2; font-size: 14px; margin: 0 0 30px; letter-spacing: .02em;
}
.hero .meta-row span { white-space: nowrap; }
.hero .meta-row .dot { color: var(--c-accent); margin: 0 10px; }
.hero .badges { display: flex; justify-content: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 28px; }
.badge {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  backdrop-filter: blur(8px);
}
.badge .check { color: #7DE2A8; margin-right: 6px; font-weight: 700; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.hero-cta .btn-primary {
  font-size: 16px; padding: 14px 28px;
  box-shadow: 0 10px 30px rgba(246,161,28,.35);
}
.hero-cta .btn-primary:hover { transform: translateY(-1px); }

/* Verification banner */
.verify-banner {
  background: #FFF6E5;
  border-bottom: 1px solid #F6CC8A;
  color: #5C3A00;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.verify-banner strong { color: #7A4D00; }

/* Sections */
section.section { padding: 60px 0; }
section.section.alt { background: var(--c-bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--c-muted); font-size: 17px; }

/* Calculator grid */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.calc-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.calc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c-primary); text-decoration: none; }
.calc-card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(10,37,64,.06); color: var(--c-primary); font-size: 20px; margin-bottom: 14px;
}
.calc-card h3 { color: var(--c-primary); margin-bottom: 6px; }
.calc-card p { color: var(--c-muted); font-size: 14px; margin: 0; flex: 1; }
.calc-card .arrow { color: var(--c-accent-2); font-weight: 700; margin-top: 14px; font-size: 14px; }
.calc-card .pill {
  position: absolute; top: 14px; right: 14px;
  background: var(--c-accent); color: #1a1a1a; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; letter-spacing: .03em;
}
.calc-card.coming-soon { opacity: .65; pointer-events: none; }
.calc-card.coming-soon .arrow::after { content: " · Coming Soon"; color: var(--c-muted); font-weight: 500; }

/* Categories */
.cat-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.cat-bar button {
  background: #fff; border: 1px solid var(--c-border); color: var(--c-text);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.cat-bar button:hover { border-color: var(--c-primary); }
.cat-bar button.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Calculator page layout */
.calc-page { display: grid; grid-template-columns: 1fr 380px; gap: 30px; padding: 40px 0; }
@media (max-width: 900px) { .calc-page { grid-template-columns: 1fr; } }

.calc-form {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 28px;
}
.calc-form h2 { margin-top: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--c-text); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--c-text);
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(10,37,64,.10);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* Results */
.results {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff; border-radius: var(--radius);
  padding: 28px;
  position: sticky; top: 100px;
  align-self: start;
}
.results h3 { color: #fff; margin-top: 0; }
.results .big {
  font-size: 36px; font-weight: 800; color: var(--c-accent);
  margin: 4px 0 8px; letter-spacing: -0.02em;
}
.results .breakdown { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; }
.results .row {
  display: flex; justify-content: space-between; padding: 8px 0;
  font-size: 14px; color: #e2e8f0;
}
.results .row strong { color: #fff; }
.results .row.total {
  border-top: 1px solid rgba(255,255,255,.18); margin-top: 6px; padding-top: 12px;
  font-size: 16px; color: #fff;
}

/* Tables */
table.data { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
table.data th { background: var(--c-bg-soft); font-weight: 600; color: var(--c-primary); }

/* FAQ */
.faq details {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--c-primary); }
.faq details[open] summary { margin-bottom: 8px; }

/* Footer */
.site-footer {
  background: var(--c-primary); color: #cbd5e1; padding: 50px 0 24px; margin-top: 60px;
}
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; letter-spacing: .04em; text-transform: uppercase; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  margin-top: 30px; padding-top: 18px; font-size: 13px; opacity: .8;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.disclaimer {
  font-size: 13px; color: var(--c-muted); background: var(--c-bg-soft);
  padding: 12px 16px; border-radius: var(--radius-sm); border-left: 3px solid var(--c-accent);
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--c-primary); }
@media (max-width: 800px) {
  .nav { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 16px; flex-direction: column; align-items: flex-start; min-width: 220px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* Search box */
.search-wrap { position: relative; max-width: 520px; margin: 0 auto 28px; }
.search-wrap input {
  width: 100%; padding: 14px 18px 14px 46px; font-size: 16px;
  border: 1px solid var(--c-border); border-radius: 999px; background: #fff;
}
.search-wrap input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(10,37,64,.10); }
.search-wrap::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
/* Scroll Top Button */
.scroll-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  border: none; cursor: pointer; font-size: 20px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 100;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--c-accent); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
