/* =====================================================
   STACKSMB DESIGN SYSTEM — CLEAN BUILD 2026-05-20
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --navy:        #1B2A4A;
  --charcoal:    #2C3E50;
  --burgundy:    #7D2040;
  --grey-light:  #F8F9FA;
  --grey-mid:    #6B7280;
  --grey-border: #E5E7EB;
  --grey-soft:   #EEF2F7;
  --card-bg:     #EDF1F7;
  --card-border: #CBD5E1;
  --text:        #1A1A1A;
  --text-muted:  #4B5563;
  --white:       #FFFFFF;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-head:   'DM Sans', system-ui, sans-serif;
  --max-width:   1200px;
  --gutter:      48px;
  --radius:      6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--grey-light); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--burgundy); }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; font-weight: 700; }
h1 { font-weight: 800; }
h2 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 800; letter-spacing: -0.5px; }
h3 { font-size: clamp(16px, 2vw, 20px); font-weight: 700; letter-spacing: -0.3px; }
h4 { font-size: 17px; font-weight: 700; }
p { margin-bottom: 1em; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

/* ---- Shared container — used by header, nav, hero, all sections, footer ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Header ---- */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 100; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
}
.site-header__brand { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--white); letter-spacing: -0.3px; }
.site-header__brand:hover { color: var(--white); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--white); }

/* ---- Navigation ---- */
.site-nav { background: #2D3748; border-bottom: 2px solid #374151; }
.site-nav__inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-nav__list { display: flex; list-style: none; }
.site-nav__link { display: block; padding: 12px 18px; color: #D1D5DB; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; transition: background 0.15s, color 0.15s; }
.site-nav__link:hover { color: var(--white); background: rgba(255,255,255,0.08); }

/* ---- Hero ---- */
.hero { background: var(--navy); padding: 80px 0 88px; position: relative; }
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--burgundy); }
.hero__title { color: var(--white); font-size: clamp(40px, 5.5vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 24px; max-width: 820px; }
.hero__subtitle { color: #A8B8CC; font-size: 18px; line-height: 1.6; margin-bottom: 40px; max-width: 600px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; padding: 13px 28px; border-radius: 4px; font-size: 14px; font-weight: 500; font-family: var(--font-body); cursor: pointer; transition: all 0.18s; border: 2px solid transparent; text-decoration: none; }
.btn--primary { background: var(--burgundy); color: var(--white); border-color: var(--burgundy); }
.btn--primary:hover { background: #6B1A36; border-color: #6B1A36; color: var(--white); }
.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn--outline:hover { border-color: rgba(255,255,255,0.8); color: var(--white); background: rgba(255,255,255,0.08); }

/* ---- Sections ---- */
.section { padding: 64px 0; }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); }
.section--soft { background: var(--grey-soft); padding-bottom: 32px; }
.section__header { text-align: center; margin-bottom: 48px; }
.section__header--left { text-align: left; margin-bottom: 32px; }
.section__title { font-size: clamp(22px, 3vw, 32px); margin-bottom: 6px; font-weight: 800; letter-spacing: -1px; }
.section__title--light { color: var(--white); }
.section__subtitle { color: var(--grey-mid); font-size: 16px; max-width: 540px; margin: 0 auto; }
.section__subtitle--light { color: #A8B8CC; }

/* ---- Category cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 32px 28px; transition: box-shadow 0.2s, transform 0.2s; }
.card--linked { display: block; text-decoration: none; outline: none; cursor: pointer; }
.card--linked:hover { box-shadow: 0 6px 20px rgba(27,42,74,0.15); transform: translateY(-3px); background: #E2E9F2; border-color: var(--navy); }
.card--linked:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.card__icon { font-size: 40px; margin-bottom: 16px; display: block; }
.card__title { font-size: 18px; margin-bottom: 10px; color: var(--navy); font-weight: 800; letter-spacing: -0.3px; }
.card__body { font-size: 14px; color: var(--text-muted); line-height: 1.6; height: 4.8em; overflow: hidden; }
.card__link { font-size: 14px; font-weight: 500; color: var(--navy); display: block; margin-top: 16px; }
.card--linked:hover .card__link { color: var(--burgundy); }

/* ---- Payroll links (navy section) ---- */
.payroll-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.payroll-link { display: block; padding: 24px 28px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); text-decoration: none; outline: none; transition: background 0.2s, border-color 0.2s; }
.payroll-link:hover { background: rgba(255,255,255,0.12); border-color: var(--burgundy); }
.payroll-link:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.payroll-link__title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--white); margin-bottom: 6px; }
.payroll-link__desc { font-size: 13px; color: #A8B8CC; line-height: 1.5; }

/* ---- Trust items ---- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.trust-item--card { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.trust-item__label { display: block; font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--navy); margin-bottom: 10px; }
.trust-item__desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ---- Disclosure strip ---- */
.disclosure-strip { background: var(--white); border-top: 1px solid var(--grey-border); padding: 16px 0; }
.disclosure-strip p { font-size: 13px; color: var(--grey-mid); margin: 0; text-align: center; line-height: 1.5; }
.disclosure-strip a { color: var(--navy); }

/* ---- Page header (inner pages) ---- */
.page-header { background: var(--navy); padding: 48px 0 52px; border-bottom: 3px solid var(--burgundy); }
.page-header__eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: #A8B8CC; margin-bottom: 12px; }
.page-header__title { color: var(--white); margin-bottom: 12px; }
.page-header__subtitle { color: #A8B8CC; font-size: 16px; max-width: 640px; }

/* ---- Page content (inner pages) ---- */
.page-content { padding: 56px 0; }
.page-content h2 { margin-top: 2em; margin-bottom: 0.5em; padding-top: 0.6em; border-top: 1px solid var(--burgundy); }
.page-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.page-content h3 { margin-top: 1.5em; margin-bottom: 0.4em; padding-top: 0.4em; border-top: 1px solid #D1D5DB; }
.page-content h3:first-child { border-top: none; padding-top: 0; }
.page-content ul, .page-content ol { padding-left: 1.4em; margin-bottom: 1em; }
.page-content li { margin-bottom: 0.4em; color: var(--text-muted); line-height: 1.65; }
.page-content li strong { color: var(--text); }

/* ---- Disclosure box (inner pages) ---- */
.disclosure { background: var(--grey-soft); border-left: 4px solid var(--burgundy); padding: 16px 20px; margin: 0 0 32px; border-radius: 0 4px 4px 0; font-size: 14px; color: var(--grey-mid); line-height: 1.6; }
.disclosure a { color: var(--navy); }

/* ---- Comparison table ---- */
.comparison-table-wrap { overflow-x: auto; margin: 32px 0; border-radius: var(--radius); border: 1px solid var(--grey-border); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
.comparison-table thead { background: var(--navy); color: var(--white); }
.comparison-table thead th { padding: 14px 18px; font-family: var(--font-head); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; text-align: left; white-space: nowrap; }
.comparison-table tbody tr { border-bottom: 1px solid var(--grey-border); }
.comparison-table tbody tr:last-child { border-bottom: none; }
.comparison-table tbody tr:nth-child(even) { background: var(--grey-light); }
.comparison-table tbody tr:hover { background: var(--grey-soft); }
.comparison-table tbody td { padding: 14px 18px; color: var(--text); vertical-align: top; line-height: 1.5; }
.comparison-table tbody td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }

/* Tables inside narrow container — scrollable with indicator */
.table-scroll-hint {
  text-align: right;
  font-size: 12px;
  color: var(--grey-mid);
  margin: 8px 0 0;
  font-style: italic;
  line-height: 1;
}
.table-scroll-hint::after {
  content: ' →';
  font-weight: 700;
  color: var(--navy);
}
.page-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: 0 0 var(--radius) var(--radius);
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  margin: 0 0 32px;
}
.page-content table thead { background: var(--navy); }
.page-content table thead th { padding: 12px 16px; font-family: var(--font-head); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; text-align: left; color: var(--white); white-space: nowrap; }
.page-content table tbody tr { border-bottom: 1px solid var(--grey-border); }
.page-content table tbody tr:nth-child(even) { background: var(--grey-light); }
.page-content table tbody td { padding: 14px 16px; color: var(--text); vertical-align: middle; white-space: nowrap; }
.page-content table tbody td:first-child { font-weight: 700; color: var(--navy); }

/* ---- Last updated ---- */
.last-updated { font-size: 13px; color: var(--grey-mid); font-style: italic; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--grey-border); }

/* ---- Footer ---- */
.site-footer { background: var(--charcoal); color: #9CA3AF; padding: 40px 0 0; border-bottom: 15px solid var(--burgundy); }
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-footer__brand { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--white); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; }
.site-footer__nav a { color: #9CA3AF; font-size: 13px; padding: 4px 6px; transition: color 0.15s; }
.site-footer__nav a:hover { color: var(--white); }
.site-footer__copy {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 24px;
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  line-height: 1.7;
}
.site-footer__copy a { color: #6B7280; }
.site-footer__copy a:hover { color: #9CA3AF; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .site-header__inner { height: 56px; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav__inner { flex-direction: column; padding: 8px var(--gutter); }
  .site-nav__list { flex-direction: column; width: 100%; }
  .site-nav__link { padding: 10px 0; }
  .nav-toggle { display: block; }
  .hero { padding: 48px 0 56px; }
  .hero__subtitle { font-size: 16px; }
  .section { padding: 40px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .comparison-table thead th, .comparison-table tbody td { padding: 10px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ---- Provider cards ---- */
.provider-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin: 24px 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.provider-card__header {
  background: var(--navy);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-card__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  letter-spacing: -0.3px;
}

.provider-card__tag {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}

.provider-card__body {
  padding: 20px 24px;
}

.provider-card__body > p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.65;
}

.provider-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: var(--grey-light);
  border-radius: 4px;
  padding: 16px;
  margin-top: 4px;
}

.provider-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.provider-card__meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--grey-mid);
}

.provider-card__meta-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

/* ---- Logo ---- */
.site-logo {
  height: 29px;
  width: auto;
  display: block;
}

.site-logo-footer {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.9;
}

.site-logo-footer:hover {
  opacity: 1;
}

/* ---- Review summary card ---- */
.review-summary {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.review-summary__header {
  background: var(--navy);
  padding: 20px 24px;
}

.review-summary__name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.review-summary__verdict {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

.review-summary__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  background: var(--white);
}

.review-summary__item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-border);
  border-right: 1px solid var(--grey-border);
}

.review-summary__item:nth-last-child(-n+3) {
  border-bottom: none;
}

.review-summary__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--grey-mid);
  margin-bottom: 4px;
}

.review-summary__value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}

/* ---- Hub link grid ---- */
.hub-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 16px 0 32px;
}

.hub-link {
  display: block;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.hub-link:hover {
  border-color: var(--burgundy);
  box-shadow: 0 2px 8px rgba(125,32,64,0.1);
  transform: translateY(-1px);
}

.hub-link__title {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.hub-link__desc {
  display: block;
  font-size: 13px;
  color: var(--grey-mid);
  line-height: 1.5;
}

/* ---- Nav dropdown ---- */
.site-nav__item {
  position: relative;
}

.site-nav__link--dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-arrow {
  font-size: 10px;
  opacity: 0.7;
}

.site-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1E2D4A;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid var(--burgundy);
  border-radius: 0 0 var(--radius) var(--radius);
  list-style: none;
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.site-nav__item--dropdown:hover .site-nav__dropdown {
  display: block;
}

.site-nav__dropdown li a {
  display: block;
  padding: 10px 16px;
  color: #D1D5DB;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s;
}

.site-nav__dropdown li:last-child a {
  border-bottom: none;
}

.site-nav__dropdown li a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
