/* ================================================================
   TITLE HQ — Global Stylesheet
   Design system extracted from reference files.
   Design decisions applied per CLAUDE.md.
   ================================================================ */

/* ── CSS VARIABLES ── */
:root {
  --teal:        #187980;
  --teal-dark:   #0f5a60;
  --teal-light:  #e8f4f5;
  --navy:        #434b54;
  --orange:      #f96e46;
  --sky:         #a4cded;
  --sky-light:   #deeef9;
  --warm-white:  #fdfbf7;
  --sand:        #f5f0e8;
  --stone:       #ede8df;
  --mid-gray:    #8a9199;
  --text-dark:   #2a3240;
  --text-body:   #4a5260;
  --dark-bg:     #434b54;
  --radius:      8px;
  --radius-lg:   16px;
  --shadow-sm:   0 2px 8px rgba(42,50,64,0.07);
  --shadow-md:   0 4px 24px rgba(42,50,64,0.11);
  --shadow-lg:   0 8px 48px rgba(42,50,64,0.16);
  --transition:  0.3s ease;
  --font-serif:  'Lora', Georgia, serif;
  --font-sans:   'Poppins', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans); color: var(--text-body); background: var(--warm-white); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── ACCESSIBILITY ── */
/* Skip-to-content link — visible only when focused. WCAG 2.4.1 Bypass
   Blocks. The target is `<main id="main">` in baseof.html. */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* Programmatic focus on the main landmark from the skip link should not
   render a focus ring on the content itself — only when keyboard-focused. */
main:focus { outline: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--text-dark); }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { font-size: 1rem; line-height: 1.75; }

.emphasis {
  color: var(--teal);
  font-style: italic;
}

.label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 12px;
}

.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 { margin-bottom: 0; }

/* ── BUTTONS ── */
/* Design decision: 11px 22px padding globally (CLAUDE.md) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: #e05a35; border-color: #e05a35; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--teal); border-color: #fff; }
.btn-white:hover { background: var(--teal-light); transform: translateY(-1px); }
.btn-ghost-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ── HEADER / NAV ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--stone);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: var(--font-sans);
  line-height: inherit;
  text-decoration: none;
}
.nav-link:hover, .nav-item:hover > .nav-link { color: var(--teal); background: var(--teal-light); }
.nav-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.nav-link svg { transition: transform 0.2s; flex-shrink: 0; }
.nav-item:hover .nav-link svg,
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Active nav state — converted from inline styles per design decisions */
.nav-link.active { color: var(--teal); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stone);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.22s ease;
  z-index: 100;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown,
.nav-link[aria-expanded="true"] + .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--navy);
  border-radius: 6px;
  transition: var(--transition);
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--teal-light); color: var(--teal); }
.dropdown a:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }

.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-phone {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-phone svg { color: var(--teal); }
.nav-phone:hover { color: var(--teal); }

/* Nav CTA button — converted from inline style on "Start a File" */
.nav-cta-btn { padding: 9px 20px; font-size: 0.82rem; }

/* Padding bumped to 8px so the hit area is ~40×40, comfortably above the
   WCAG 2.5.8 Target Size minimum (24×24). Visible focus ring for the
   icon-only button — required since the SVG inside has no text label. */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--navy); border-radius: var(--radius); }
.mobile-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
#mobile-close button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── MOBILE NAV DRAWER ── */
/* Design decision: z-index 2000 globally (CLAUDE.md) */
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 2000; }
.mobile-nav.open { display: block; }
.mobile-overlay { position: absolute; inset: 0; background: rgba(35,42,48,0.6); backdrop-filter: blur(2px); }
.mobile-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 300px;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-nav.open .mobile-drawer { transform: translateX(0); }
.mobile-close { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.mobile-close button { background: none; border: none; cursor: pointer; color: var(--text-dark); padding: 4px; }
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { border-bottom: 1px solid var(--stone); }
/* Generic drawer link/button look — scoped to regular nav items only.
   `.mobile-nav-cta` content (CTA button, phone link, social icons) is
   styled by its own rules below and must not inherit this. */
.mobile-nav-links li:not(.mobile-nav-cta) a,
.mobile-nav-links li:not(.mobile-nav-cta) button {
  display: block;
  padding: 13px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
}
.mobile-caret { transition: transform 0.2s; flex-shrink: 0; margin-left: auto; }
.mobile-toggle-sub[aria-expanded="true"] .mobile-caret { transform: rotate(180deg); }
.mobile-toggle-sub { display: flex; align-items: center; gap: 6px; }
.mobile-sub { display: none; padding-left: 16px; }
.mobile-sub.open { display: block; }
.mobile-sub a { font-size: 0.875rem; color: var(--text-body); padding: 8px 0; }

/* Drawer CTA block — stack button, phone, socials */
.mobile-nav-cta {
  padding-top: 20px;
  border: none !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.mobile-start-file {
  width: 100%;
  justify-content: center;
}
.mobile-nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  align-self: center;
}
.mobile-nav-phone svg { color: var(--teal); flex-shrink: 0; }
.mobile-nav-phone:hover { color: var(--teal); }

.mobile-nav-social {
  display: flex;
  gap: 10px;
  justify-content: center;
}
/* Drawer social icons get a light, neutral treatment so they read well
   against the white drawer background. The visible bg lives on the
   ::before pseudo (same as the footer rule) — these overrides target
   the pseudo too. */
.mobile-nav-social .footer-social-icon { color: var(--teal); }
.mobile-nav-social .footer-social-icon::before { background: var(--teal-light); }
.mobile-nav-social .footer-social-icon:hover { color: #fff; }
.mobile-nav-social .footer-social-icon:hover::before { background: var(--teal); }

/* ── FOOTER ── */
.site-footer { background: var(--dark-bg); color: rgba(255,255,255,0.65); padding: 64px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 44px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-logo-link { display: inline-block; margin-bottom: 6px; }
.footer-logo { height: 38px; width: auto; filter: brightness(0) invert(1); }

.footer-tagline { font-style: italic; font-family: var(--font-serif); font-size: 0.88rem; color: rgba(255,255,255,0.35); margin: 6px 0 14px; }
.footer-desc { font-size: 0.84rem; line-height: 1.75; margin-bottom: 22px; max-width: 300px; }

/* `.footer-connect` (not `.footer-social`) — common ad/privacy blocker
   filter lists hide `.footer-social` as a tracker/share-widget container,
   which made the entire icon row invisible in the production browser.
   Renamed to a neutral wrapper class to bypass the cosmetic filter. The
   `.footer-social-icon` children keep their established name (CLAUDE.md
   design decision) — they're not on the filter lists I've seen. */
.footer-connect { display: flex; gap: 10px; }

/* Design decision: use .footer-social-icon everywhere (CLAUDE.md).
   The <a> spans 44×44 to satisfy WCAG 2.5.8 Target Size + iOS HIG hit
   comfort. The visible icon footprint (background + border-radius) is
   rendered via a 34×34 ::before so the dark footer doesn't show three
   oversized faint blobs — the 7%-white bg only reads visually at small
   sizes, so we keep the original sharper 34×34 silhouette. */
.footer-social-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: rgba(255,255,255,0.55);
  transition: color 0.3s ease;
  background: transparent;
}
.footer-social-icon::before {
  content: '';
  position: absolute;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  transition: background 0.3s ease;
}
.footer-social-icon svg { position: relative; z-index: 1; }
.footer-social-icon:hover { color: #fff; }
.footer-social-icon:hover::before { background: var(--teal); }
.footer-social-icon:focus-visible { outline: none; color: #fff; }
.footer-social-icon:focus-visible::before {
  background: var(--teal);
  box-shadow: 0 0 0 2px var(--teal), 0 0 0 4px rgba(255,255,255,0.4);
}

.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}
.footer-contact-item svg { color: var(--teal); flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-contact-item a:hover { color: #fff; }

/* Address item needs top-aligned icon */
.footer-contact-address { align-items: flex-start; }
.footer-contact-address svg { margin-top: 3px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: 0.76rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a { color: rgba(255,255,255,0.38); transition: color 0.2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ── SCROLL ANIMATIONS ── */
.fade-up { opacity: 1; transform: translateY(0); transition: opacity 0.65s ease, transform 0.65s ease; }
.js-ready .fade-up { opacity: 0; transform: translateY(24px); }
.js-ready .fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ── UTILITY ── */
.text-center { text-align: center; }
.mt-44 { margin-top: 44px; }
.align-start { align-self: flex-start; }

/* ── RESPONSIVE ── */
/* Tighten the nav between mobile breakpoint and ~1100px so all 5 items,
   phone, and "Start a File" button fit on one line without overflow. */
@media (max-width: 1100px) {
  .nav-inner { gap: 14px; }
  .nav-link { padding: 8px 9px; font-size: 0.82rem; }
  .nav-phone { font-size: 0.82rem; }
  .nav-cta-btn { padding: 8px 14px; font-size: 0.78rem; }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  /* Drop the phone link first so the main nav items keep breathing room
     before we collapse to the mobile drawer at 768px. */
  .nav-phone { display: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-phone { display: none; }
  .mobile-toggle { display: flex; }
  /* Push the CTA group (just "Start a File" at mobile) to the right so it
     sits immediately next to the hamburger, with the logo alone on the left. */
  .nav-cta { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
}

@media (max-width: 480px) {
  /* Page-specific responsive rules will go in page stylesheets */
}
