/* ==========================================================================
   Impact Med Solutions — Design System
   ========================================================================== */

:root {
  /* Brand colors (sampled from logo + business card) */
  --gold: #A6874F;
  --gold-btn: #8A6A35;      /* darkened for AA text contrast on white/cream */
  --gold-btn-hover: #74582C;
  --gold-light: #E9DEC6;
  --gold-tint: #FAF6EE;

  --sage: #7E9070;
  --sage-btn: #5F6F54;      /* darkened for AA text contrast */
  --sage-btn-hover: #4C5A43;
  --sage-light: #DDE5D6;
  --sage-tint: #F2F5EF;

  --charcoal: #262521;
  --charcoal-soft: #3A3833;
  --text: #2B2A26;
  --text-muted: #66645C;
  --cream: #FBF9F5;
  --white: #FFFFFF;
  --border: #E6E1D6;

  --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 8px rgba(38, 37, 33, 0.08);
  --shadow-md: 0 8px 24px rgba(38, 37, 33, 0.12);
  --shadow-lg: 0 20px 48px rgba(38, 37, 33, 0.18);

  --container-width: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

section { padding: 72px 0; }
@media (max-width: 640px) { section { padding: 48px 0; } }

.section-tint { background: var(--sage-tint); }
.section-gold-tint { background: var(--gold-tint); }
.section-charcoal { background: var(--charcoal); color: var(--cream); }
.section-charcoal h2, .section-charcoal h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-btn);
  background: var(--gold-tint);
  border: 1px solid var(--gold-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-head { max-width: 680px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary { background: var(--gold-btn); color: var(--white); }
.btn-primary:hover { background: var(--gold-btn-hover); box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--sage-btn); color: var(--white); }
.btn-secondary:hover { background: var(--sage-btn-hover); box-shadow: var(--shadow-md); }

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

.btn-outline-dark { background: transparent; border-color: var(--charcoal); color: var(--charcoal); }
.btn-outline-dark:hover { background: var(--charcoal); color: var(--white); }

.btn-block { width: 100%; }

/* ==========================================================================
   Top utility bar
   ========================================================================== */
.topbar {
  background: var(--charcoal);
  color: var(--cream);
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar-tagline { display: flex; align-items: center; gap: 8px; opacity: 0.92; }
.topbar-phone { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.01em; }
.topbar-phone:hover { color: var(--gold-light); }
.topbar svg { width: 14px; height: 14px; flex-shrink: 0; }

@media (max-width: 640px) {
  .topbar-tagline span { display: none; }
}

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: 58px; width: auto; }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  line-height: 1.15;
  color: var(--charcoal);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .logo-text { display: none; }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-btn); background: var(--gold-tint); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--charcoal);
}
.header-phone svg { width: 18px; height: 18px; color: var(--gold-btn); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--charcoal); }

@media (max-width: 1060px) {
  .header-phone span { display: none; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    top: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 88px 20px 24px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(38,37,33,0.5);
    z-index: 90;
  }
  .nav-scrim.is-open { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--charcoal) 0%, #4A4335 55%, var(--gold-btn) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 140px;
}
.hero-shield {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  opacity: 0.08;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 700px; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 .accent { color: var(--gold-light); }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 560px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-divider {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  line-height: 0;
}
.hero-divider svg { width: 100%; height: auto; display: block; }

.page-hero {
  padding: 64px 0 110px;
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

/* ==========================================================================
   Trust bar
   ========================================================================== */
.trust-bar {
  background: var(--white);
  margin-top: -84px;
  position: relative;
  z-index: 2;
}
.trust-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 8px;
}
.trust-item svg { width: 30px; height: 30px; color: var(--gold-btn); }
.trust-item span { font-family: var(--font-heading); font-weight: 600; font-size: 0.88rem; color: var(--charcoal); }

@media (max-width: 760px) {
  .trust-card { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--gold-tint);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 28px; height: 28px; color: var(--gold-btn); }
.card-icon.sage { background: var(--sage-tint); }
.card-icon.sage svg { color: var(--sage-btn); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.92rem;
  color: var(--gold-btn); margin-top: 16px;
}
.card-link svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.card-link:hover svg { transform: translateX(3px); }

/* Feature list */
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
@media (max-width: 700px) { .feature-list { grid-template-columns: 1fr; } }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item svg { width: 24px; height: 24px; color: var(--sage-btn); flex-shrink: 0; margin-top: 2px; }
.feature-item h4 { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.feature-item p { color: var(--text-muted); font-size: 0.96rem; }

/* ==========================================================================
   Agent cards
   ========================================================================== */
.agent-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.agent-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sage-tint); }
.agent-photo img { width: 100%; height: 100%; object-fit: cover; }
.agent-body { padding: 26px 26px 30px; }
.agent-body .agent-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-btn);
  margin-bottom: 6px;
}
.agent-body h3 { margin-bottom: 12px; }
.agent-body p.bio { color: var(--text-muted); margin-bottom: 18px; }
.agent-contact { display: flex; flex-direction: column; gap: 8px; font-size: 0.94rem; }
.agent-contact a, .agent-contact span { display: flex; align-items: center; gap: 8px; }
.agent-contact svg { width: 16px; height: 16px; color: var(--sage-btn); flex-shrink: 0; }
.agent-contact a:hover { color: var(--gold-btn); }

/* ==========================================================================
   Steps
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 4px; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold-btn);
  color: var(--white);
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); }

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(120deg, var(--sage-btn), var(--charcoal));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.85); }
@media (max-width: 700px) { .cta-banner { padding: 36px 28px; text-align: center; justify-content: center; } }

/* ==========================================================================
   Office / split section
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.info-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.info-row svg { width: 20px; height: 20px; color: var(--gold-btn); flex-shrink: 0; margin-top: 3px; }
.info-row strong { display: block; font-family: var(--font-heading); font-size: 0.95rem; }
.info-row span { color: var(--text-muted); font-size: 0.94rem; }

/* ==========================================================================
   Testimonial
   ========================================================================== */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.testimonial-stars { display: flex; gap: 3px; margin-bottom: 14px; color: var(--gold); }
.testimonial-stars svg { width: 18px; height: 18px; }
.testimonial-card p.quote { font-style: italic; color: var(--text); margin-bottom: 18px; }
.testimonial-author { display: flex; align-items: center; gap: 6px; }
.testimonial-author strong { font-family: var(--font-heading); font-size: 0.95rem; }
.testimonial-author span { color: var(--text-muted); font-size: 0.88rem; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; color: var(--charcoal); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  min-height: 48px;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold-btn);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }
.form-success {
  display: none;
  background: var(--sage-tint);
  border: 1px solid var(--sage-light);
  color: var(--sage-btn-hover);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 20px;
}
.form-success.is-visible { display: block; }

/* ==========================================================================
   FAQ (accordion)
   ========================================================================== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: var(--white);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 22px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--charcoal);
  min-height: 48px;
}
.faq-question svg { width: 20px; height: 20px; color: var(--gold-btn); flex-shrink: 0; transition: transform 0.2s ease; }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer-inner { padding: 0 22px 20px; color: var(--text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--charcoal); color: rgba(251,249,245,0.75); }
.footer-top { padding: 64px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 46px; width: auto; }
.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-col p { font-size: 0.94rem; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.94rem; }
.footer-contact svg { width: 17px; height: 17px; color: var(--gold-light); flex-shrink: 0; margin-top: 2px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(251,249,245,0.25);
  border-radius: 50%;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.footer-social a:hover { background: var(--gold-btn); border-color: var(--gold-btn); }
.footer-social svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid rgba(251,249,245,0.12);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.footer-bottom a:hover { color: var(--gold-light); }

/* ==========================================================================
   Misc utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.disclaimer-banner {
  background: var(--charcoal);
  color: rgba(251,249,245,0.65);
  font-size: 0.78rem;
  padding: 14px 0;
  text-align: center;
  line-height: 1.5;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--gold-btn);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-family: var(--font-heading);
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  line-height: 0;
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }
