/* =============================================
   Memorial HVAC — Stylesheet
   Mobile-first, semantic, accessible
   ============================================= */

/* --- Variables --- */
:root {
  --color-primary: #1a73e8;
  --color-primary-dark: #1557b0;
  --color-primary-light: #e8f0fe;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-bg-dark: #111827;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --max-w: 1200px;
  --transition: 200ms ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* --- Utility --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* --- Typography --- */
.section-label {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
}
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.main-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
}
.main-nav a:hover { color: var(--color-primary); text-decoration: none; }
.header-phone {
  display: none;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-left: auto;
  text-decoration: none;
}
.header-phone:hover { text-decoration: none; color: var(--color-primary-dark); }
.mobile-menu-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--color-text);
  margin-left: auto;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.mobile-nav a {
  padding: 0.75rem 0;
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav-phone {
  color: var(--color-primary) !important;
  font-weight: 700 !important;
}
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .header-phone { display: flex; }
  .mobile-menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(26,115,232,0.2);
  border: 1px solid rgba(26,115,232,0.4);
  color: #93c5fd;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub {
  color: #93c5fd;
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  color: #93c5fd;
  font-size: 0.875rem;
}
.hero-trust svg { color: #fbbf24; }

/* --- Services --- */
.services {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}
.services h2 { margin-bottom: 0.5rem; }
.services .section-sub { margin-bottom: 3rem; }
.services-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}
.service-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.service-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card > p { color: var(--color-text-muted); font-size: 0.9375rem; margin-bottom: 1rem; }
.service-card ul { display: flex; flex-direction: column; gap: 0.375rem; }
.service-card li {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding-left: 1rem;
  position: relative;
}
.service-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* --- About --- */
.about {
  padding: 5rem 0;
}
.about-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .about-inner { grid-template-columns: 1fr 1fr; }
}
.about-text h2 { margin-bottom: 1rem; }
.about-text p { color: var(--color-text-muted); margin-bottom: 1rem; }
.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.about-facts dt {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
}
.about-facts dd {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}
.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  width: 100%;
}

/* --- Reviews --- */
.reviews {
  padding: 5rem 0;
  background: var(--color-bg);
}
.reviews h2 { margin-bottom: 0.5rem; }
.reviews .section-sub { margin-bottom: 3rem; }
.reviews-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
.review-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.review-stars {
  display: flex;
  gap: 2px;
  color: #f59e0b;
}
.review-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  flex: 1;
  font-style: italic;
}
.review-text::before { content: '"'; }
.review-text::after { content: '"'; }
.review-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
}
.review-author strong { color: var(--color-text); }
.review-author span { color: var(--color-text-muted); }
.reviews-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Articles --- */
.articles {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}
.articles h2 { margin-bottom: 0.5rem; }
.articles .section-sub { margin-bottom: 3rem; }
.articles-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}
.article-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card img { width: 100%; height: 200px; object-fit: cover; }
.article-card > div { padding: 1.5rem; }
.article-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.article-meta span {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-meta time {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}
.article-card h3 { margin-bottom: 0.5rem; font-size: 1.0625rem; }
.article-card h3 a { color: var(--color-text); text-decoration: none; }
.article-card h3 a:hover { color: var(--color-primary); }
.article-card > div > p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.read-more {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary);
}
.read-more:hover { text-decoration: underline; }
.articles-more { text-align: center; margin-top: 2.5rem; }

/* --- Contact --- */
.contact {
  padding: 5rem 0;
}
.contact h2 { margin-bottom: 0.5rem; }
.contact .section-sub { margin-bottom: 3rem; }
.contact-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 340px; align-items: start; }
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-group label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--color-error);
}
.field-error {
  color: var(--color-error);
  font-size: 0.8125rem;
  min-height: 1em;
}
.form-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  color: var(--color-success);
  font-weight: 600;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.info-block h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.info-phone {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.info-block p { color: var(--color-text-muted); font-size: 0.9375rem; }
.info-block address { font-style: normal; color: var(--color-text-muted); font-size: 0.9375rem; line-height: 1.6; }
.info-block a { color: var(--color-primary); font-weight: 600; }
.emergency-note {
  color: var(--color-error) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  margin-top: 0.25rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-bg-dark);
  color: #9ca3af;
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr auto auto; align-items: start; }
}
.footer-brand { max-width: 360px; }
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-nav a { color: #9ca3af; font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-legal { font-size: 0.8125rem; line-height: 1.7; }
.footer-legal p:first-child { margin-bottom: 0.25rem; }
