/* ============================================================
   site.css - shared foundation for houstontxcpa.com
   Tokens, base, buttons, section helpers, nav, footer.
   Page-specific CSS stays inline in each page's <style>.
   ============================================================ */

/* ─── Self-hosted fonts (local /fonts, latin) ──────────── */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-v17-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-v17-latin-italic.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-v17-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/dm-sans-v17-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-v17-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/dm-sans-v17-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 900; font-display: swap; src: url('/fonts/dm-sans-v17-latin-900.woff2') format('woff2'); }

@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/space-grotesk-v22-latin-300.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/space-grotesk-v22-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-v22-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/space-grotesk-v22-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/space-grotesk-v22-latin-700.woff2') format('woff2'); }

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #006C9F;
  --primary-dark: #005A85;
  --accent:       #8DB331;
  --accent-lt:    #A3C940;
  --white:        #FFFFFF;
  --off-white:    #FAFAF7;
  --gray-100:     #F0F2F5;
  --gray-200:     #E1E5EC;
  --gray-400:     #9AA3B2;
  --gray-600:     #5A6478;
  --gray-800:     #2D3548;
  --text:         #1A2235;
  --muted:        #5A6478;
  --border:       #E1E5EC;

  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  /* Consolidated 2-step radius scale. Legacy aliases remap onto it
     so page-specific inline CSS keeps working without per-line edits. */
  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 20px rgba(0,108,159,.08), 0 1px 4px rgba(0,108,159,.06);
  --shadow-lg:  0 16px 48px rgba(0,108,159,.14), 0 4px 12px rgba(0,108,159,.08);

  --max-w: 1200px;
  --section-gap: 6rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Typography helpers ───────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 800; }

.headline-xl { font-size: clamp(2.4rem, 5vw, 4rem);   font-weight: 900; letter-spacing: -.03em; }
.headline-lg { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
.headline-md { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; letter-spacing: -.015em; }

/* Same-family italic emphasis (replaces the retired Fraunces accent serif) */
.serif { font-style: italic; font-weight: 300; }

.lead { font-size: 1.1rem; color: var(--gray-600); line-height: 1.7; }

/* ─── Eyebrow tag + section helpers ────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(141,179,49,.10);
  border: 1px solid rgba(141,179,49,.22);
  border-radius: 100px; padding: 4px 14px;
}

.section { padding: var(--section-gap) 0; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section-header .tag { margin-bottom: 1rem; }

.section-label {
  display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem;
}
.section-sub { font-size: 1rem; color: var(--muted); line-height: 1.6; margin-bottom: 2.5rem; }

/* ─── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  border-radius: 100px; padding: 14px 28px; cursor: pointer; border: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }

.btn-primary {
  background: var(--accent); color: var(--white);
  box-shadow: 0 4px 16px rgba(141,179,49,.35);
}
.btn-primary:hover { background: var(--accent-lt); box-shadow: 0 8px 24px rgba(141,179,49,.45); }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.4); }
.btn-outline-white:hover { background: rgba(255,255,255,.08); border-color: var(--white); }

/* ─── Scroll reveal ────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.fade-up.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Navigation ───────────────────────────────────────── */
#nav { position: sticky; top: 0; z-index: 100; transition: box-shadow .3s ease; }
#nav.scrolled .nav-main { box-shadow: 0 4px 28px rgba(0,0,0,.28); }

.utility-bar { background: var(--primary-dark); border-bottom: 1px solid rgba(255,255,255,.06); padding: .3rem 0; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-location { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: rgba(255,255,255,.5); font-weight: 500; }
.utility-phone { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .01em; transition: color .15s; }
.utility-phone:hover { color: var(--accent-lt); }

.nav-main { background: rgba(0,108,159,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.08); transition: box-shadow .3s ease; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 46px; width: auto; display: block; border-radius: 5px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links > a { font-size: .9375rem; font-weight: 500; color: rgba(255,255,255,.75); transition: color .15s ease; }
.nav-links > a:hover, .nav-links > a[aria-current="page"] { color: var(--white); }
.nav-cta { margin-left: 1rem; padding: 10px 22px; font-size: .875rem; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn { display: flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-family: var(--font-body); font-size: .9375rem; font-weight: 500; color: rgba(255,255,255,.75); transition: color .15s; padding: 0; line-height: 1.6; }
.nav-dropdown-btn:hover { color: var(--white); }
.nav-dropdown-btn .chevron { display: flex; align-items: center; opacity: .6; transition: transform .2s ease, opacity .15s; }
.nav-dropdown.open .nav-dropdown-btn .chevron,
.nav-dropdown:hover .nav-dropdown-btn .chevron { transform: rotate(180deg); opacity: 1; }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 20px); left: -16px;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; min-width: 240px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 200; pointer-events: none;
}
.nav-dropdown-menu::before { content: ''; position: absolute; top: -6px; left: 28px; width: 12px; height: 12px; background: var(--white); border-left: 1px solid var(--gray-200); border-top: 1px solid var(--gray-200); transform: rotate(45deg); }
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: .875rem; font-weight: 500; color: var(--text); border-radius: var(--radius-sm); transition: background .15s, color .15s; }
.nav-dropdown-menu a:hover { background: var(--off-white); color: var(--primary); }
.nav-dropdown-menu a[aria-current="page"] { background: rgba(0,108,159,.07); color: var(--primary); font-weight: 700; }
.dd-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; color: var(--accent); }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; margin-left: .75rem; border-radius: var(--radius-sm); transition: background .15s; }
.nav-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all .25s ease; }

/* Mobile overlay + drawer */
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-drawer { position: fixed; top: 0; right: 0; width: min(400px, 100vw); height: 100dvh; background: var(--primary); z-index: 300; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); overflow-y: auto; }
.nav-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); flex-shrink: 0; }
.drawer-logo { display: flex; align-items: center; }
.drawer-logo-img { height: 36px; width: auto; display: block; border-radius: 4px; object-fit: contain; }
.drawer-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); border: none; color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; flex-shrink: 0; }
.drawer-close:hover { background: rgba(255,255,255,.2); }
.drawer-nav { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.drawer-nav > a { display: block; padding: 1rem 1.5rem; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.06); transition: color .15s, background .15s, padding-left .15s; }
.drawer-nav > a:hover { color: var(--white); background: rgba(255,255,255,.05); padding-left: 1.75rem; }
.drawer-accordion { border-bottom: 1px solid rgba(255,255,255,.06); }
.drawer-accordion-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1rem 1.5rem; background: none; border: none; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.8); cursor: pointer; text-align: left; transition: color .15s, background .15s; }
.drawer-accordion-btn:hover { color: var(--white); background: rgba(255,255,255,.05); }
.drawer-accordion-icon { font-size: 1.1rem; font-weight: 300; color: rgba(255,255,255,.45); transition: transform .25s ease, color .15s; flex-shrink: 0; }
.drawer-accordion.open .drawer-accordion-icon { transform: rotate(45deg); color: var(--accent); }
.drawer-accordion-body { overflow: hidden; max-height: 0; transition: max-height .35s ease; background: rgba(0,0,0,.12); }
.drawer-accordion.open .drawer-accordion-body { max-height: 400px; }
.drawer-accordion-body a { display: flex; align-items: center; padding: .8rem 1.5rem .8rem 2.25rem; font-size: .92rem; font-weight: 500; color: rgba(255,255,255,.6); transition: color .15s, background .15s; }
.drawer-accordion-body a::before { content: '\203A'; margin-right: 8px; font-size: 1rem; color: var(--accent); flex-shrink: 0; }
.drawer-accordion-body a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.drawer-footer { padding: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: .75rem; flex-shrink: 0; }
.drawer-footer .btn { justify-content: center; border-radius: var(--radius); }
.drawer-phone-btn { background: rgba(255,255,255,.1); color: var(--white); border: 1.5px solid rgba(255,255,255,.2); font-weight: 600; }
.drawer-phone-btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }

/* ─── Footer ───────────────────────────────────────────── */
#footer { background: var(--primary); color: rgba(255,255,255,.55); padding: 4rem 0 2rem; border-top: 1px solid rgba(141,179,49,.3); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(141,179,49,.2); margin-bottom: 2rem; }
.footer-brand .name { font-size: 1.05rem; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.footer-brand .cred { font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.footer-brand p { font-size: .83rem; line-height: 1.65; max-width: 280px; }
.footer-logo-img { width: 170px; height: auto; display: block; border-radius: 6px; object-fit: contain; margin-bottom: 1.25rem; }
.footer-contact { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.footer-contact a { font-size: .83rem; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 6px; transition: color .15s; }
.footer-contact a:hover { color: var(--accent); }
.footer-hours { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: rgba(255,255,255,.4); margin-top: 1rem; }
.footer-social { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.footer-social a { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.55); transition: background .15s, color .15s, border-color .15s; }
.footer-social a:hover { background: rgba(141,179,49,.15); border-color: rgba(141,179,49,.3); color: var(--accent-lt); }
.footer-col h4 { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col ul li a { font-size: .9rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: .78rem; }
.footer-bottom nav { display: flex; gap: 1.5rem; }
.footer-bottom nav a { font-size: .78rem; color: rgba(255,255,255,.35); transition: color .15s; }
.footer-bottom nav a:hover { color: rgba(255,255,255,.7); }

/* ─── Shared responsive (nav + footer) ─────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .utility-bar { display: none; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
