/* ===========================================================
   McAdams Insurance Agency — Site Stylesheet
   Colors and fonts below come directly from the official
   McAdams brand guide. Change a value here and it updates
   everywhere on the site.
   =========================================================== */

:root {
  /* --- Brand Colors (from McAdams brand guide) --- */
  --navy: #002652;
  --navy-deep: #001430;
  --green: #7AC142;
  --green-light: #96D062;
  --green-dark: #649E33;
  --gray: #C7CDD1;
  --paper: #F7F8FA;
  --white: #FFFFFF;
  --charcoal: #262524;
  --slate: #5B6672;
  --border: rgba(0,38,82,0.12);

  /* --- Type --- */
  --font-display: 'Manrope', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-tagline: Verdana, Geneva, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* --- Layout --- */
  --max-width: 1180px;
  --radius: 6px;

  /* --- Theme tokens (these are the ones that flip between light/dark) --- */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --text-heading: #002652;
  --text-body: #262524;
  --text-muted: #5B6672;
  --border: rgba(0,38,82,0.12);
  --border-fixed: rgba(0,38,82,0.15);
}

/* Dark mode overrides. The header/logo/footer/hero stay brand-navy on
   purpose (see note in the HTML) — only these tokens change. */
[data-theme="dark"] {
  --bg: #0A121F;
  --surface: #101B2E;
  --text-heading: #F2F5F9;
  --text-body: #D6DBE2;
  --text-muted: #93A0AF;
  --border: rgba(255,255,255,0.10);
}

[data-theme="dark"] .eyebrow,
[data-theme="dark"] .card .card-icon,
[data-theme="dark"] .credential-badge,
[data-theme="dark"] .list-check li::before,
[data-theme="dark"] .timeline-item .t-year,
[data-theme="dark"] .team-card .role-tag {
  color: var(--green-light);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-heading);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { color: var(--text-body); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--green);
  display: inline-block;
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--green); color: var(--navy); }
.btn-primary:hover { background: var(--green-light); }

.btn-outline { background: transparent; border-color: rgba(255,255,255,0.4); color: var(--white); }
.btn-outline:hover { border-color: var(--white); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }

/* ===================== TOP BAR ===================== */
.topbar {
  background: var(--navy-deep);
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: var(--green-light); }
.topbar .topbar-links { display: flex; gap: 20px; }

/* ===================== HEADER / NAV ===================== */
header.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border-fixed);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; }
.logo img { height: 46px; width: auto; }

nav.main-nav { display: flex; align-items: center; gap: 32px; }
nav.main-nav ul { list-style: none; display: flex; gap: 28px; }
nav.main-nav a {
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--navy); border-color: var(--green); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone {
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-fixed);
  border-radius: var(--radius);
  color: var(--navy);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav-phone { display: inline; }
}

@media (max-width: 899px) {
  nav.main-nav ul { display: none; }
  .menu-toggle { display: block; }
  .nav-wrap { flex-wrap: wrap; }
  body.menu-open nav.main-nav ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 12px 0 20px;
  }
  body.menu-open nav.main-nav ul li { border-top: 1px solid var(--border-fixed); }
  body.menu-open nav.main-nav ul a { display: block; padding: 14px 4px; }
  body.menu-open nav.main-nav { flex-wrap: wrap; }
}

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(122,193,66,0.18);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--green-light); }
.hero p.lede { color: var(--gray); font-size: 1.15rem; max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---- Seal (signature element) ---- */
.seal {
  width: 190px;
  height: 190px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  position: relative;
  font-family: var(--font-mono);
  color: var(--green-light);
}
.seal::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(122,193,66,0.4);
  border-radius: 50%;
}
.seal .seal-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--white);
  line-height: 1;
}
.seal .seal-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 8px;
}
.seal .seal-sub {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 4px;
}

/* ===================== STATS STRIP ===================== */
.stats-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat {
  padding: 34px 16px;
  border-left: 1px solid var(--border);
}
.stat:first-child { border-left: none; }
.stat .stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--text-heading);
  font-weight: 600;
}
.stat .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
}

/* ===================== SECTIONS ===================== */
section { padding: 90px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 50px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---- Card grid (lines of business, resources) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,38,82,0.08); }
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card a.card-link {
  display: inline-block; margin-top: 16px;
  font-size: 0.85rem; font-weight: 700; color: var(--text-heading);
  border-bottom: 2px solid var(--green);
}

/* ---- Two column feature ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.list-check { list-style: none; margin-top: 24px; }
.list-check li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 14px;
  color: var(--text-body);
}
.list-check li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--green-dark);
  font-weight: 700;
}

.timeline-strip {
  display: flex;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.timeline-item {
  flex: 1;
  padding: 26px 20px;
  border-left: 1px solid var(--border);
}
.timeline-item:first-child { border-left: none; }
.timeline-item .t-year { font-family: var(--font-mono); color: var(--green-dark); font-size: 0.85rem; font-weight: 600; }
.timeline-item p { font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 750px) {
  .timeline-strip { flex-direction: column; }
  .timeline-item { border-left: none; border-top: 1px solid var(--border); }
  .timeline-item:first-child { border-top: none; }
}

/* ===================== CARRIER BAND ===================== */
.carrier-band { background: var(--navy); padding: 46px 0; }
.carrier-band p.eyebrow { color: var(--green-light); justify-content: center; text-align:center; display:flex; }
.carrier-band .container { text-align: center; }
.carrier-band .carrier-count {
  font-family: var(--font-mono);
  color: var(--white);
  font-size: 1.1rem;
}

/* ===================== FORMS ===================== */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text-body);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; }

/* ===================== CTA BAND ===================== */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
  border-top: 4px solid var(--green);
}
.cta-band h2 { color: var(--white); margin-bottom: 16px; }
.cta-band p { color: var(--gray); max-width: 50ch; margin: 0 auto 30px; }

/* ===================== FOOTER ===================== */
footer.site-footer {
  background: var(--navy-deep);
  color: var(--gray);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

footer .logo img { height: 40px; margin-bottom: 14px; }
footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; font-size: 0.9rem; }
footer ul a:hover { color: var(--green-light); }
footer p.foot-desc { font-size: 0.88rem; max-width: 34ch; color: var(--gray); }

.foot-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(199,205,209,0.5);
  font-family: var(--font-mono);
}

/* ===================== PAGE HEADER (interior pages) ===================== */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 60px 0;
}
.page-hero .eyebrow { color: var(--green-light); }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray); margin-top: 10px; }
.breadcrumb a { color: var(--green-light); }

/* ===================== TEAM / ORG CHART ===================== */
.org-chart { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.org-tier { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; width: 100%; }
.org-connector { width: 1px; height: 28px; background: var(--gray); }
.org-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-align: center;
  min-width: 190px;
}
.org-node.tier-1 { border-top: 3px solid var(--navy); }
.org-node.tier-2 { border-top: 3px solid var(--green); }
.org-node.tier-3 { border-top: 3px solid var(--gray); }
.org-node .org-name { font-weight: 700; color: var(--text-heading); font-size: 0.95rem; }
.org-node .org-title { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

.avatar-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 16px;
}

.team-card { text-align: left; }
.team-card .role-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  margin-bottom: 8px;
  display: block;
}
.team-card .credential-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--green);
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 20px;
  margin-top: 10px;
  font-weight: 700;
}
.team-card .team-contact { margin-top: 14px; font-size: 0.85rem; }
.team-card .team-contact a { color: var(--text-heading); font-weight: 600; }
.team-card .team-contact div { margin-bottom: 4px; color: var(--text-muted); }
.tagline {
  font-family: var(--font-tagline);
  font-style: italic;
  color: var(--green-dark);
}

/* ===================== ARTICLE / BLOG POST ===================== */
.article { max-width: 720px; margin: 0 auto; }
.article .article-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.article h2 { margin-top: 40px; margin-bottom: 14px; font-size: 1.5rem; }
.article p { margin-bottom: 18px; font-size: 1.02rem; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article .article-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 36px 0;
}
.article .article-cta p { margin-bottom: 14px; }

/* ===================== STICKY MOBILE CALL BAR ===================== */
.mobile-cta-bar { display: none; }
@media (max-width: 700px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: var(--navy);
    border-top: 2px solid var(--green);
  }
  .mobile-cta-bar a {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--white);
  }
  .mobile-cta-bar a.mobile-call { background: var(--navy-deep); }
  .mobile-cta-bar a.mobile-quote { background: var(--green); color: var(--navy); }
  body { padding-bottom: 54px; }
}

/* ===================== THEME TOGGLE ===================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-fixed);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--navy); background: rgba(0,38,82,0.05); }
.theme-toggle .icon-dark { display: none; }
.theme-toggle[data-current="dark"] .icon-light { display: none; }
.theme-toggle[data-current="dark"] .icon-dark { display: inline; }
