/* === 417 Garage Door Repair — Main Stylesheet === */
/* Modern, fast, mobile-first. No frameworks needed. */

:root {
  --primary: #c9411e;      /* Warm red-orange: urgency, action */
  --primary-dark: #a83418;
  --secondary: #1a3a5c;    /* Deep navy: trust, professionalism */
  --accent: #f0a500;       /* Gold: highlight, CTAs */
  --dark: #1a1a2e;
  --gray-900: #2d2d3f;
  --gray-700: #555570;
  --gray-500: #8888a0;
  --gray-300: #c8c8d8;
  --gray-100: #f0f0f5;
  --white: #ffffff;
  --green: #2e7d32;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { color: var(--secondary); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p { margin-bottom: 1rem; color: var(--gray-700); }

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: var(--accent);
  color: var(--dark);
}
.btn-secondary:hover {
  background: #d99400;
  color: var(--dark);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--secondary);
}
.btn-lg {
  padding: 18px 40px;
  font-size: 1.15rem;
}

/* === HEADER === */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
}
.logo span { color: var(--primary); }
.logo small {
  display: block;
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 400;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-phone a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}
.header-phone .badge {
  font-size: 0.7rem;
  background: var(--green);
  color: white;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #0d2440 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,65,30,0.15) 0%, transparent 70%);
}
.hero h1 {
  color: var(--white);
  max-width: 800px;
  margin: 0 auto 1rem;
}
.hero p {
  color: var(--gray-300);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-feature {
  text-align: center;
  color: var(--gray-300);
  font-size: 0.9rem;
}
.hero-feature strong {
  display: block;
  color: var(--white);
  font-size: 1.5rem;
}

/* === SECTIONS === */
section { padding: 60px 0; }
section:nth-child(even) { background: var(--gray-100); }

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--primary);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.service-card p { font-size: 0.95rem; }
.service-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* === WHY US === */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.why-card {
  text-align: center;
  padding: 24px;
}
.why-card .icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.why-card h3 { margin-bottom: 0.5rem; }

/* === PRICING TEASER === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.pricing-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.pricing-card.featured {
  border: 2px solid var(--accent);
  position: relative;
}
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--dark);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}
.pricing-card .price small { font-size: 1rem; color: var(--gray-500); }

/* === TESTIMONIALS === */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.testimonial .stars { color: var(--accent); font-size: 1.2rem; margin-bottom: 0.8rem; }
.testimonial p { font-style: italic; }
.testimonial .author { font-weight: 600; color: var(--dark); }

/* === SERVICE AREA === */
.service-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.service-area-item {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 600;
  color: var(--secondary);
  transition: transform 0.2s;
}
.service-area-item:hover { transform: translateY(-2px); color: var(--primary); }

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #b83716 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 0;
}
.cta-section h2 { color: var(--white); }
.cta-section p { color: var(--gray-100); margin-bottom: 2rem; font-size: 1.1rem; }
.cta-section .btn { background: var(--white); color: var(--primary); font-weight: 700; }
.cta-section .btn:hover { background: var(--accent); color: var(--dark); }

/* === FOOTER === */
.site-footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}
.footer-col h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.footer-col a { color: var(--gray-300); display: block; margin-bottom: 0.5rem; font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--gray-900);
  padding-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* === MOBILE NAV === */
@media (max-width: 768px) {
  .header-phone a { font-size: 1.1rem; }
  .hero { padding: 50px 0 40px; }
  .hero-features { gap: 20px; }
  section { padding: 40px 0; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }
}

/* === UTILITY === */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* === EMERGENCY BANNER === */
.emergency-banner {
  background: var(--accent);
  color: var(--dark);
  text-align: center;
  padding: 10px 0;
  font-weight: 700;
  font-size: 0.95rem;
}
.emergency-banner a { color: var(--dark); text-decoration: underline; }

/* === LEAD CAPTURE MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  color: var(--gray-500); line-height: 1;
}
.modal-close:hover { color: var(--dark); }
.modal-box h3 { margin-bottom: 0.3rem; font-size: 1.3rem; }
.modal-box .subtitle { color: var(--gray-500); margin-bottom: 1.2rem; font-size: 0.9rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201,65,30,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-dark); }
.form-disclaimer {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 0.8rem;
}
.form-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.form-success.active { display: block; }
.form-success .icon { font-size: 3rem; margin-bottom: 0.5rem; }
.form-success h3 { margin-bottom: 0.5rem; }
.form-success p { color: var(--gray-500); }
.modal-spinner {
  display: none;
  text-align: center;
  padding: 20px;
}
.modal-spinner.active { display: block; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .form-row { flex-direction: column; gap: 0; }
  .modal-box { padding: 24px 20px; }
}