/* ========================================
   Magoffin County Rescue Squad
   Confident Corporate · Terracotta + Sand
   ======================================== */

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

:root {
  --terracotta:    #B85C38;
  --terracotta-dk: #9A4A2A;
  --terracotta-lt: #D4845E;
  --sand:          #F5F0EB;
  --sand-dk:       #E8DFD6;
  --cream:         #FDFBF9;
  --charcoal:      #1E1E1E;
  --slate:         #3A3A3A;
  --stone:         #6B6560;
  --stone-lt:      #9A9490;
  --white:         #FFFFFF;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 1px 3px rgba(30,30,30,.08);
  --shadow-md: 0 4px 20px rgba(30,30,30,.10);
  --shadow-lg: 0 8px 40px rgba(30,30,30,.12);
  --radius:    8px;
  --radius-lg: 12px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terracotta-dk); }
ul { list-style: none; }

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

.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--terracotta); color: var(--white);
  padding: 8px 16px; border-radius: var(--radius);
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(253,251,249,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-dk);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}

.logo { display: flex; align-items: center; gap: 12px; color: var(--charcoal); }
.logo:hover { color: var(--charcoal); }
.logo-icon { color: var(--terracotta); flex-shrink: 0; }

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-primary { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--charcoal); }
.logo-secondary { font-size: .75rem; font-weight: 500; color: var(--stone); letter-spacing: .06em; text-transform: uppercase; }

/* Nav */
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-menu a {
  padding: 8px 16px; font-size: .9rem; font-weight: 500;
  color: var(--stone); border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-menu a:hover { color: var(--terracotta); background: rgba(184,92,56,.06); }

.nav-cta {
  background: var(--terracotta) !important; color: var(--white) !important;
  font-weight: 600 !important; margin-left: 8px;
}
.nav-cta:hover { background: var(--terracotta-dk) !important; color: var(--white) !important; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 22px; height: 2px; background: var(--charcoal);
  border-radius: 2px; transition: var(--transition);
}
.hamburger { position: relative; margin: 0 auto; }
.hamburger::before { content: ''; position: absolute; top: -7px; left: 0; }
.hamburger::after  { content: ''; position: absolute; top: 7px;  left: 0; }
.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-top: 76px;
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 60%, #F7EDE4 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0 100px;
}
.hero-content { max-width: 560px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(184,92,56,.1); border: 1px solid rgba(184,92,56,.2);
  padding: 8px 18px; border-radius: 100px;
  font-size: .8rem; font-weight: 600; color: var(--terracotta-dk);
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 28px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--terracotta);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700; line-height: 1.12;
  color: var(--charcoal); margin-bottom: 24px;
}
.text-accent { color: var(--terracotta); }

.hero-desc {
  font-size: 1.1rem; color: var(--stone);
  line-height: 1.75; margin-bottom: 36px; max-width: 480px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 52px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  border: 2px solid transparent; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: var(--white); border-color: var(--terracotta); }
.btn-primary:hover { background: var(--terracotta-dk); border-color: var(--terracotta-dk); color: var(--white); box-shadow: 0 6px 24px rgba(184,92,56,.3); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--white); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { flex-shrink: 0; }

.hero-stats {
  display: flex; align-items: center; gap: 0;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px 36px; box-shadow: var(--shadow-md);
}
.stat { flex: 1; text-align: center; }
.stat-number {
  display: block; font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; color: var(--terracotta);
  line-height: 1.2; margin-bottom: 4px;
}
.stat-label { font-size: .78rem; color: var(--stone); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.stat-divider { width: 1px; height: 40px; background: var(--sand-dk); }

.hero-image { position: relative; }
.hero-image-wrapper { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-accent {
  position: absolute; bottom: -20px; right: -20px;
  width: 160px; height: 160px; border-radius: var(--radius-lg);
  background: var(--terracotta); opacity: .12; z-index: -1;
}

/* ---------- Section Shared ---------- */
.section-header { max-width: 720px; margin-bottom: 56px; }
.section-header--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-label {
  display: inline-block; font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--terracotta);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700; line-height: 1.18;
  color: var(--charcoal); margin-bottom: 18px;
}
.section-desc { font-size: 1.05rem; color: var(--stone); line-height: 1.75; }

/* ---------- Services ---------- */
.services { padding: 100px 0; background: var(--cream); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--sand-dk);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(184,92,56,.25);
}
.service-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: rgba(184,92,56,.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--terracotta); margin-bottom: 22px;
}
.service-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--charcoal); margin-bottom: 12px;
}
.service-desc { font-size: .92rem; color: var(--stone); line-height: 1.7; }

/* ---------- About ---------- */
.about { padding: 100px 0; background: var(--sand); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.about-images { position: relative; }
.about-img-main {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img-main img { width: 100%; height: 480px; object-fit: cover; }
.about-img-secondary {
  position: absolute; bottom: -40px; right: -32px;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 5px solid var(--sand);
}
.about-img-secondary img { width: 320px; height: 256px; object-fit: cover; }
.about-experience {
  position: absolute; top: -24px; left: -24px;
  background: var(--terracotta); color: var(--white);
  padding: 20px 24px; border-radius: var(--radius-lg);
  text-align: center; box-shadow: var(--shadow-md);
}
.about-experience .exp-number {
  display: block; font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; line-height: 1.2;
}
.about-experience .exp-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; opacity: .85; }

.about-content .section-label { margin-bottom: 14px; }
.about-content .section-title { margin-bottom: 24px; }
.about-text { font-size: 1rem; color: var(--stone); line-height: 1.8; margin-bottom: 18px; }
.about-values { margin-top: 32px; display: grid; gap: 14px; }
.value-item { display: flex; align-items: flex-start; gap: 14px; font-size: .92rem; color: var(--slate); }
.value-icon { color: var(--terracotta); flex-shrink: 0; margin-top: 2px; }

/* ---------- Response ---------- */
.response { padding: 100px 0; background: var(--cream); }
.map-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}
.map-visual {
  background: var(--sand); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--sand-dk);
}
.map-placeholder {
  padding: 80px 40px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.map-icon { color: var(--terracotta); opacity: .5; }
.map-caption { font-size: .9rem; color: var(--stone); font-weight: 500; }
.areas-list { display: grid; gap: 0; }
.area-item {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--sand-dk);
  font-size: 1rem; color: var(--slate); font-weight: 500;
  transition: color var(--transition), padding-left var(--transition);
}
.area-item:first-child { border-top: 1px solid var(--sand-dk); }
.area-item:hover { color: var(--terracotta); padding-left: 8px; }
.area-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--terracotta); flex-shrink: 0;
  transition: transform var(--transition);
}
.area-item:hover .area-dot { transform: scale(1.4); }

/* ---------- Community ---------- */
.community { padding: 100px 0; background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dk) 100%); color: var(--white); }
.community-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.community-content .section-label { color: rgba(255,255,255,.7); }
.community-content .section-title { color: var(--white); margin-bottom: 20px; }
.community-text { font-size: 1.05rem; line-height: 1.8; opacity: .88; margin-bottom: 32px; }
.community-list { display: grid; gap: 16px; }
.community-list li {
  display: flex; align-items: center; gap: 14px;
  font-size: .95rem; font-weight: 500; opacity: .92;
}
.list-icon { color: rgba(255,255,255,.7); flex-shrink: 0; }
.community-img {
  width: 100%; height: 640px; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}

/* ---------- Contact ---------- */
.contact { padding: 100px 0; background: var(--sand); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-desc { font-size: 1.05rem; color: var(--stone); line-height: 1.75; margin-bottom: 36px; }
.contact-details { display: grid; gap: 24px; }
.contact-item { display: flex; gap: 18px; }
.contact-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: rgba(184,92,56,.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--terracotta); flex-shrink: 0;
}
.contact-item strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--stone); margin-bottom: 4px; font-weight: 600; }
.contact-item p  { font-size: .95rem; color: var(--slate); line-height: 1.6; }
.contact-item a  { color: var(--terracotta); }
.contact-item a:hover { color: var(--terracotta-dk); text-decoration: underline; }

/* Form */
.contact-form-wrapper {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 44px; box-shadow: var(--shadow-md); border: 1px solid var(--sand-dk);
}
.form-title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700; color: var(--charcoal);
  margin-bottom: 28px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--stone); margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--sand-dk); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; color: var(--charcoal);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(184,92,56,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 14px 18px;
  background: rgba(34,129,81,.08); border: 1px solid rgba(34,129,81,.2);
  border-radius: var(--radius); color: #1a7a4e;
  font-size: .9rem; font-weight: 500;
}
.form-success svg { flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--charcoal); color: rgba(255,255,255,.7); padding: 72px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px; padding-bottom: 56px;
}
.logo--light { color: var(--white); }
.logo--light .logo-primary { color: var(--white); }
.logo--light .logo-secondary { color: rgba(255,255,255,.5); }
.footer-tagline { font-size: .9rem; line-height: 1.75; margin-top: 18px; opacity: .7; max-width: 280px; }
.footer h4 {
  font-size: .78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.4);
  margin-bottom: 20px;
}
.footer-links ul { display: grid; gap: 12px; }
.footer-links a { font-size: .9rem; color: rgba(255,255,255,.65); transition: color var(--transition), padding-left var(--transition); }
.footer-links a:hover { color: var(--white); padding-left: 6px; }
.footer-contact p { font-size: .9rem; line-height: 1.75; margin-bottom: 4px; }
.footer-contact a { color: rgba(255,255,255,.65); }
.footer-contact a:hover { color: var(--white); }
.footer-emergency { margin-top: 12px; font-size: .9rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0; text-align: center;
  font-size: .82rem; opacity: .5;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-menu {
    position: fixed; top: 76px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--sand-dk);
    flex-direction: column; padding: 16px 24px 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%); opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-menu a { padding: 12px 16px; width: 100%; }
  .nav-cta { margin-left: 0 !important; text-align: center; justify-content: center; }

  .hero-grid { grid-template-columns: 1fr; padding: 48px 0 64px; gap: 40px; }
  .hero-content { max-width: 100%; }
  .hero-image { order: -1; }
  .hero-image-wrapper img { height: 400px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .stat-divider { display: none; }
  .stat { flex: none; flex: 1 1 calc(50% - 8px); }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-img-secondary { right: 16px; bottom: -24px; }
  .about-img-main img { height: 320px; }

  .map-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .community-img { height: 360px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form-wrapper { padding: 28px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-image-wrapper img { height: 300px; }
}
