/* =========================================================
   FiscalAlly Design System
   Brand: Navy (#0A2540) + Gold (#C9A961)
   ========================================================= */

:root {
  /* Brand colors */
  --navy-900: #061A2E;
  --navy-800: #0A2540;
  --navy-700: #143257;
  --navy-600: #1E4470;
  --gold-500: #C9A961;
  --gold-600: #B89548;
  --gold-700: #876A2B; /* WCAG AA on white (5.09:1) - use for text on light bg */
  --gold-100: #F5EBD0;

  /* Neutrals */
  --ink-900: #0F172A;
  --ink-700: #1A2233;
  --ink-500: #5A6478;
  --ink-300: #94A0B5;
  --ink-100: #EDF1F7;
  --ink-50: #F7F9FC;
  --white: #FFFFFF;
  --border: #E2E8F0;

  /* Status */
  --success: #15803D;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;

  /* Layout */
  --max-w: 1200px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow: 0 4px 14px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 20px 40px rgba(10, 37, 64, 0.12);

  /* Transition */
  --t: 200ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-800); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--gold-700); }

h1, h2, h3, h4, h5 {
  color: var(--navy-800);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 3vw, 2.375rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { margin: 0 0 1em; color: var(--ink-500); }
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 1rem;
}

/* Layout */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--alt { background: var(--ink-50); }
.section--navy { background: var(--navy-800); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.78); }
.section--navy .eyebrow { color: var(--gold-500); }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.center { text-align: center; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head p { font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn--primary { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.btn--primary:hover { background: var(--gold-600); border-color: var(--gold-600); color: var(--navy-900); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--secondary { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.btn--secondary:hover { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy-800); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--navy-800); color: var(--navy-800); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); color: var(--white); border-color: var(--white); }
.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(3px); }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-800);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--navy-800); }
.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}
.nav-list a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-700);
  padding: 0.5rem 0;
  position: relative;
}
.nav-list a:hover { color: var(--navy-800); }
.nav-list a.active { color: var(--navy-800); }
.nav-list a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--gold-500);
}

.has-menu { position: relative; }
.has-menu > a::after { content: " ▾"; font-size: 0.7em; opacity: 0.6; }
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: -1rem;
  min-width: 260px;
  max-width: calc(100vw - 2rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--t);
}
/* Right-anchor the Industries submenu so it doesn't overflow viewport */
.has-menu:last-of-type .submenu { left: auto; right: -1rem; }
.has-menu:hover .submenu, .has-menu:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu li { display: block; }
.submenu a {
  display: block;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--ink-700);
}
.submenu a:hover { background: var(--ink-50); color: var(--navy-800); }

.nav-cta { display: flex; gap: 0.75rem; align-items: center; }
.nav-cta .login { font-size: 0.9375rem; color: var(--ink-700); font-weight: 500; }
.nav-cta .login:hover { color: var(--navy-800); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-800);
  margin: 5px 0;
  transition: var(--t);
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-list, .nav-cta { display: none; }
  .site-header.open .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 0;
  }
  .site-header.open .nav-list li { width: 100%; border-bottom: 1px solid var(--ink-100); }
  .site-header.open .nav-list a { display: block; padding: 0.875rem 0; }
  .site-header.open .has-menu > a::after { content: ""; }
  .site-header.open .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0.5rem 1rem;
    min-width: 0;
  }
  .site-header.open .nav-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0 0;
    justify-content: flex-start;
    align-items: center;
  }
  .site-header.open .nav-cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  color: var(--white);
  padding: 5rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 85% 20%, rgba(201, 169, 97, 0.18), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero .lead { font-size: 1.1875rem; color: rgba(255,255,255,0.82); max-width: 36rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }
.hero-trust {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.72);
  font-size: 0.9375rem;
}
.hero-trust .stars { color: var(--gold-500); letter-spacing: 0.05em; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
}
/* Only stretch cards when they're direct grid items so columns align */
.grid > .card { height: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-500); }
.card .card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  color: var(--gold-700);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.card h3 { margin-bottom: 0.625rem; }
.card p { flex: 1; }
.card .card-link {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--navy-800);
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.9375rem;
}
.card .card-link:hover { color: var(--gold-700); }
.card .card-link .arrow { transition: transform var(--t); }
.card .card-link:hover .arrow { transform: translateX(3px); }

/* Stat / number pill */
.numbered {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.numbered .num {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--navy-800);
  color: var(--gold-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

/* Feature row (text + visual) */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.feature--reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 2.5rem; }
  .feature--reverse > :first-child { order: 0; }
}
.feature-visual {
  background: var(--ink-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trust / logo bar */
.trustbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: center;
  align-items: center;
  color: var(--ink-500);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.trustbar .trust-label { color: var(--ink-500); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .stat-num {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--gold-500);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .stat-label {
  color: rgba(255,255,255,0.75);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}
.section--alt .stat .stat-num { color: var(--navy-800); }
.section--alt .stat .stat-label { color: var(--ink-500); }

/* CTA strip */
.cta-strip {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-strip::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.25), transparent 70%);
  pointer-events: none;
}
.cta-strip h2 { color: var(--white); margin: 0 0 0.5rem; max-width: 28em; }
.cta-strip p { color: rgba(255,255,255,0.78); margin: 0; max-width: 32em; }
.cta-strip-actions { position: relative; z-index: 1; }
@media (max-width: 600px) {
  .cta-strip { padding: 2rem 1.5rem; }
  .cta-strip h2 { font-size: 1.5rem; }
  .section { padding: 3.5rem 0; }
  .page-header { padding: 3rem 0 2.5rem; }
  .hero { padding: 3.5rem 0 4rem; }
}

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.checklist li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.5rem 0;
  color: var(--ink-700);
}
.checklist li::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23876A2B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
  margin-top: 2px;
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .pricing { grid-template-columns: 1fr; }
  /* Don't offset the featured card when stacked - prevents awkward gap */
  .price-card.featured { transform: none; }
}
.price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.featured {
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow);
  transform: translateY(-8px);
}
.price-card .badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.price-card .price-tag { font-size: 2.25rem; font-weight: 700; color: var(--navy-800); margin: 1rem 0 0.25rem; letter-spacing: -0.02em; }
.price-card .price-tag small { font-size: 0.875rem; font-weight: 500; color: var(--ink-500); }
.price-card .desc { color: var(--ink-500); font-size: 0.9375rem; }
.price-card .features { flex: 1; margin: 1.5rem 0; }
.price-card .features li { padding: 0.375rem 0; font-size: 0.9375rem; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}
.step .step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-500);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Inline FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq summary {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--gold-700);
  transition: transform var(--t);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 0.75rem; }

/* Forms */
.form { display: grid; gap: 1rem; max-width: 560px; }
.form label { font-weight: 600; font-size: 0.875rem; color: var(--ink-700); display: block; margin-bottom: 0.375rem; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink-700);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}
.form textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 600px) { .site-footer .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 {
  color: var(--white);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.5rem 0; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.9375rem; }
.site-footer a:hover { color: var(--gold-500); }
.site-footer .brand { color: var(--white); margin-bottom: 1rem; }
.site-footer .brand:hover { color: var(--white); }
.site-footer .tagline { font-size: 0.9375rem; max-width: 28em; }
.site-footer .legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}
.site-footer .legal a { font-size: 0.8125rem; }

/* Page header (subpage hero) */
.page-header {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(700px 360px at 90% 10%, rgba(201, 169, 97, 0.16), transparent 60%);
}
.page-header .container { position: relative; }
.page-header h1 { color: var(--white); max-width: 22em; }
.page-header .lead { font-size: 1.125rem; color: rgba(255,255,255,0.8); max-width: 44em; }
.breadcrumb {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--gold-500); }
.breadcrumb a:hover { color: var(--white); }

/* Utility */
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--ink-500); }
.text-gold { color: var(--gold-700); }
.center-content { text-align: center; }
.lead { font-size: 1.125rem; }

/* Skip link — visually hidden until focused (keyboard accessibility, WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--navy-800);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 200;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  color: var(--white);
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

/* Visible focus for keyboard users (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }
.btn:focus-visible { outline-offset: 3px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
