/* ============================================================
   Emergency Services Advisors — shared stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #221e1a;
  --ink-soft: #4a443d;
  --ink-faint: #756e63;
  --paper: #f3efe6;
  --paper-raised: #eae3d2;
  --maroon: #7a1f2b;
  --maroon-dark: #591019;
  --brass: #a9823e;
  --line: rgba(34, 30, 26, 0.16);
  --line-soft: rgba(34, 30, 26, 0.09);
  --focus: #2b5fa8;

  --font-display: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

a {
  color: var(--maroon);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--maroon-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.75rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; max-width: 42rem; }
p.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.wordmark:hover { color: var(--ink); }

.wordmark svg { flex-shrink: 0; }

.wordmark-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.wordmark-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: 0.15em;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--maroon); border-bottom-color: var(--brass); }
.main-nav a[aria-current="page"] {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; }
  .main-nav {
    width: 100%;
    gap: 0.9rem 1.1rem;
    padding-top: 0.25rem;
  }
  .main-nav a { font-size: 0.9rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--maroon);
  color: #fdf8ef;
}
.btn-primary:hover { background: var(--maroon-dark); color: #fdf8ef; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.75rem;
  margin-top: 1.9rem;
}

.cta-row .phone {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.cta-row .phone small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero .kicker {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: 1rem;
  display: inline-block;
}

.hero h1 { max-width: 20ch; }

/* ---------- Sections ---------- */

.section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.section-head h2 { margin-bottom: 0.3rem; }

.section-head .tag {
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 28rem;
}

/* ---------- Divided list (offerings, principles) ---------- */

.divided-list {
  border-top: 1px solid var(--line);
}

.divided-item {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.5rem 3rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.divided-item .mark {
  color: var(--brass);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.divided-item h3 { margin-bottom: 0.1rem; }
.divided-item p { margin: 0; color: var(--ink-soft); max-width: 36rem; }

@media (max-width: 680px) {
  .divided-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- People grid ---------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.person {
  padding: 2rem 2rem 2.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.person h3 { margin-bottom: 0.1rem; }
.person .role {
  display: block;
  color: var(--maroon);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}
.person p { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #cfc8b9; }
.cta-band .btn-primary { background: var(--brass); color: var(--ink); }
.cta-band .btn-primary:hover { background: #c29a51; }
.cta-band .btn-ghost { color: var(--paper); border-color: rgba(243,239,230,0.35); }
.cta-band .btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.cta-band .cta-row .phone { color: var(--paper); }
.cta-band .cta-row .phone small { color: #a89f8c; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.75rem 0 2.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
}
.footer-grid a:hover { color: var(--maroon); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

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

/* ---------- Page header (non-home pages) ---------- */

.page-head {
  padding: clamp(2.5rem, 6vw, 3.75rem) 0 2.5rem;
}
.page-head .kicker {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--maroon);
  display: block;
  margin-bottom: 0.75rem;
}
.page-head h1 { max-width: 24ch; }
.page-head p.lede { margin-top: 0.75rem; }

/* ---------- Statement blocks (vision/mission) ---------- */

.statement {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.statement h2 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; color: var(--ink-faint); margin-bottom: 0.9rem; }
.statement .statement-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  max-width: 46rem;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}

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

.contact-info dl {
  margin: 1.75rem 0 0;
}
.contact-info dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-top: 1.4rem;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.contact-info dd a { color: var(--ink); text-decoration: none; }
.contact-info dd a:hover { color: var(--maroon); }

.team-contacts {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.team-contacts h3 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; color: var(--ink-faint); margin-bottom: 0.9rem; }
.team-contacts ul { list-style: none; margin: 0; padding: 0; }
.team-contacts li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.team-contacts a { color: var(--ink-soft); }

/* ---------- Form ---------- */

.form-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.field .hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--maroon);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--maroon);
  background: var(--paper);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { border-left-color: #3f7a4f; }
.form-status.is-error { border-left-color: var(--maroon); }

/* ---------- Visually hidden (a11y) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Logo (wordmark lockup image) ---------- */

.wordmark img {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.site-footer .footer-logo img {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- Hero with media ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.hero-media::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  right: -14px;
  bottom: -14px;
  border: 1px solid var(--brass);
  z-index: -1;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 26rem; }
  .hero-media::before { top: 10px; left: 10px; right: -10px; bottom: -10px; }
}

/* ---------- Framed section photography ---------- */

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 2.75rem 0 0.5rem;
}

.photo-strip figure {
  margin: 0;
}

.photo-strip img {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
}

.photo-strip figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

@media (max-width: 680px) {
  .photo-strip { grid-template-columns: 1fr; }
}

/* ---------- Person photo (team grid) ---------- */

.person .photo {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
}

.people-grid.principals .person .photo {
  width: 6.5rem;
  height: 6.5rem;
}

/* ---------- Certifications strip (footer) ---------- */

.cert-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.75rem 0;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cert-strip .cert-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-right: 0.25rem;
}

.cert-strip img {
  height: 3.1rem;
  width: auto;
  display: block;
}
