/* ============================================================
   CPAGUIDEPOST — Design System
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Tokens --- */
:root {
  --navy:       #0B2545;
  --gold:       #B08A2E;
  --gold-light: #C9A44A;
  --charcoal:   #1A1A1A;
  --slate:      #595959;
  --offwhite:   #F8F7F4;
  --lightgray:  #F2F4F7;
  --white:      #FFFFFF;

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;

  --radius:  6px;
  --radius-lg: 12px;
  --shadow:  0 2px 16px rgba(11,37,69,.10);
  --shadow-lg: 0 8px 40px rgba(11,37,69,.16);

  --transition: 0.22s ease;
  --max-w: 1160px;
  --section-pad: 96px 24px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body { font-family: var(--font-sans); color: var(--charcoal); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }

/* --- Typography --- */
h1, h2 { font-family: var(--font-serif); line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700; }
p  { max-width: 70ch; }
.mono { font-family: var(--font-mono); font-size: .92em; }

/* --- Container --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  padding: 13px 28px; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold  { background: var(--gold); color: var(--navy); }
.btn-gold:hover  { background: var(--gold-light); color: var(--navy); }
.btn-navy  { background: var(--navy); color: var(--white); }
.btn-navy:hover  { background: #0d2d60; color: var(--white); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.1); }

/* --- Eyebrow label --- */
.eyebrow {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  display: block; margin-bottom: 16px;
}

/* --- Gold divider --- */
.gold-bar { width: 52px; height: 3px; background: var(--gold); border-radius: 2px; margin: 16px 0 28px; }
.gold-bar-center { margin: 16px auto 28px; }

/* --- Section backgrounds --- */
.bg-navy      { background: var(--navy); }
.bg-white     { background: var(--white); }
.bg-offwhite  { background: var(--offwhite); }
.bg-lightgray { background: var(--lightgray); }
.bg-gold      { background: var(--gold); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--white); font-family: var(--font-serif);
  font-size: 1.3rem; text-decoration: none;
}
.navbar-brand svg { width: 38px; height: 38px; flex-shrink: 0; }
.navbar-brand span { line-height: 1.2; }
.navbar-brand small { display: block; font-family: var(--font-sans); font-size: .65rem; letter-spacing: .08em; color: var(--gold); font-weight: 600; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.08); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dropdown > a::after { content: '▾'; font-size: .7rem; opacity: .7; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--white); border-radius: var(--radius); min-width: 220px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,.08); overflow: hidden;
}
.dropdown-menu a {
  display: block; padding: 12px 18px; color: var(--charcoal) !important;
  background: transparent !important; font-size: .9rem; border-radius: 0;
  border-bottom: 1px solid var(--lightgray);
}
.dropdown-menu a:hover { background: var(--offwhite) !important; color: var(--navy) !important; }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }

.navbar-cta { margin-left: 12px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--navy);
  background-image: radial-gradient(ellipse at 70% 40%, rgba(176,138,46,.12) 0%, transparent 60%),
                    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  padding: 100px 24px 80px;
  position: relative; overflow: hidden;
}
.hero-content { max-width: var(--max-w); margin: 0 auto; }
.hero h1 { color: var(--white); max-width: 680px; margin-bottom: 20px; }
.hero-sub {
  color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 560px;
  line-height: 1.7; margin-bottom: 40px;
}
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-link { color: var(--white); font-weight: 500; font-size: .95rem; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.hero-link:hover { color: var(--gold); }

.trust-strip {
  display: flex; align-items: center; gap: 28px; margin-top: 60px;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: .82rem; font-weight: 500; letter-spacing: .04em; }
.trust-item::before { content: '✓'; color: var(--gold); font-weight: 700; }

/* ============================================================
   COMPLIANCE PROBLEM
   ============================================================ */
.compliance-problem { padding: var(--section-pad); }
.compliance-problem .section-header { margin-bottom: 48px; }
.pull-quote {
  border-left: 3px solid var(--gold); padding: 20px 28px;
  margin-bottom: 24px; background: var(--offwhite); border-radius: 0 var(--radius) var(--radius) 0;
}
.pull-quote p { max-width: none; color: var(--charcoal); line-height: 1.75; }

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services { padding: var(--section-pad); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.service-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px 32px; box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.service-card h3 { color: var(--navy); margin-bottom: 16px; font-size: 1.1rem; }
.service-card ul { margin: 0 0 28px; }
.service-card ul li { padding: 6px 0; color: var(--slate); font-size: .92rem; border-bottom: 1px solid var(--lightgray); display: flex; gap: 10px; }
.service-card ul li::before { content: '—'; color: var(--gold); flex-shrink: 0; }
.service-link { color: var(--navy); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.service-link:hover { color: var(--gold); }

/* ============================================================
   THRESHOLDS
   ============================================================ */
.thresholds { padding: var(--section-pad); }
.thresholds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.threshold-card {
  border-radius: var(--radius-lg); padding: 40px 36px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.06);
}
.threshold-card.review { background: var(--offwhite); }
.threshold-card.audit  { background: var(--navy); }
.threshold-card.audit h3,
.threshold-card.audit .threshold-range,
.threshold-card.audit dl dt { color: var(--white); }
.threshold-card.audit dl dd { color: var(--white); }
.threshold-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.threshold-range { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 500; color: var(--navy); margin-bottom: 28px; display: block; }
dl.threshold-details { display: grid; gap: 14px; }
dl.threshold-details dt { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-bottom: 2px; }
dl.threshold-details dd { color: var(--charcoal); font-size: .95rem; }
.threshold-note { margin-top: 32px; padding: 20px 24px; background: rgba(176,138,46,.1); border-radius: var(--radius); border-left: 3px solid var(--gold); font-size: .88rem; color: var(--slate); }
.threshold-note strong { color: var(--navy); }

/* --- Amount Highlight --- */
.amount-pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  margin-top: 8px;
}
.amount-pill.gold { background: var(--gold) !important; color: var(--navy) !important; }
.amount-pill.white { background: var(--white) !important; color: var(--navy) !important; }

/* ============================================================
   WHY GUIDEPOST
   ============================================================ */
.why-guidepost { padding: var(--section-pad); }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 48px; }
.why-tile {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px 32px;
  box-shadow: var(--shadow); transition: box-shadow var(--transition);
}
.why-tile:hover { box-shadow: var(--shadow-lg); }
.why-icon { width: 48px; height: 48px; background: rgba(176,138,46,.1); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.4rem; }
.why-tile h3 { color: var(--navy); margin-bottom: 10px; }
.why-tile p  { color: var(--slate); font-size: .95rem; max-width: none; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar { padding: 72px 24px; }
.stats-grid { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); border-radius: var(--radius-lg); overflow: hidden; }
.stat-block { background: var(--navy); padding: 44px 32px; text-align: center; }
.stat-number { font-family: var(--font-serif); font-size: 2.8rem; color: var(--white); display: block; margin-bottom: 6px; }
.stat-unit   { color: var(--gold); font-weight: 700; }
.stat-label  { color: rgba(255,255,255,.65); font-size: .85rem; font-weight: 500; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { padding: var(--section-pad); }
.faq-list { margin-top: 48px; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--lightgray); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 22px 0; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; font-family: var(--font-sans); font-size: 1rem; font-weight: 600;
  color: var(--navy); transition: color var(--transition);
}
.faq-question:hover { color: var(--gold); }
.faq-icon { font-size: 1.3rem; color: var(--gold); flex-shrink: 0; transition: transform .22s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 22px; color: var(--slate); line-height: 1.75; font-size: .97rem; max-width: 72ch; }
.faq-item.open .faq-answer { display: block; }
.faq-see-all { margin-top: 32px; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner { padding: 80px 24px; }
.cta-banner-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.cta-banner h2 { color: var(--navy); margin-bottom: 16px; }
.cta-banner p  { color: var(--navy); opacity: .8; margin-bottom: 36px; max-width: none; font-size: 1.05rem; }
.cta-banner .cta-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-phone { font-family: var(--font-sans); font-weight: 600; color: var(--navy); font-size: .95rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 72px 24px 0; }
.footer-grid { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.footer h4 { color: var(--white); font-family: var(--font-sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; font-weight: 700; }
.footer a  { color: rgba(255,255,255,.65); font-size: .9rem; display: block; margin-bottom: 10px; transition: color var(--transition); }
.footer a:hover { color: var(--gold); }
.footer-brand { font-family: var(--font-serif); color: var(--white); font-size: 1.25rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-tagline { font-size: .88rem; margin-bottom: 20px; max-width: 28ch; line-height: 1.6; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 4px; padding: 5px 10px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: rgba(255,255,255,.8); }
.footer-contact p { font-size: .9rem; margin-bottom: 8px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: 50%; color: rgba(255,255,255,.8) !important; font-size: .85rem; margin: 0; }
.footer-social a:hover { background: var(--gold); color: var(--navy) !important; }
.footer-bottom { max-width: var(--max-w); margin: 48px auto 0; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
.footer-bottom a { display: inline; margin: 0 0 0 16px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #D4D9E1; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: .97rem; color: var(--charcoal);
  background: var(--white); transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="checkbox"], input[type="radio"] {
  width: 20px !important; height: 20px !important;
  appearance: checkbox !important; -webkit-appearance: checkbox !important;
  cursor: pointer !important; flex-shrink: 0 !important;
  opacity: 1 !important; visibility: visible !important;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,37,69,.1); }
textarea { resize: vertical; min-height: 100px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honeypot { display: none !important; }
.alert { padding: 16px 20px; border-radius: var(--radius); font-size: .95rem; margin-bottom: 24px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ============================================================
   UTILITY
   ============================================================ */
.section-header { margin-bottom: 12px; }
.section-header h2 { color: var(--navy); }
.text-center { text-align: center; }
.text-white  { color: var(--white); }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--navy); }
.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }

/* Fade-in on scroll */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links, .navbar-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy); padding: 16px 24px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 999;
    gap: 4px;
  }
  .nav-links.open .navbar-cta { display: block; margin: 12px 0 0; }
  .nav-dropdown .dropdown-menu { position: static; box-shadow: none; background: rgba(255,255,255,.06); border: none; border-radius: var(--radius); margin-top: 4px; }
  .nav-dropdown .dropdown-menu a { color: rgba(255,255,255,.8) !important; }
  .navbar { position: relative; }
}

@media (max-width: 900px) {
  :root { --section-pad: 72px 20px; }
  .services-grid  { grid-template-columns: 1fr; }
  .thresholds-grid { grid-template-columns: 1fr; }
  .why-grid       { grid-template-columns: 1fr; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  :root { --section-pad: 56px 16px; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 72px 16px 56px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
