/* =============================================
   DALLAS COOLING & HEATING — Brand Styles
   Palette: Deep Navy (#0a1628) + Warm Off-White (#f7f5f0) + Amber (#f59e0b)
   Type: Oswald (display) + Source Sans 3 (body)
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* --- Design Tokens --- */
:root {
  /* Palette */
  --navy: #0a1628;
  --navy-light: #132240;
  --off-white: #f7f5f0;
  --amber: #f59e0b;
  --amber-hover: #d48806;
  --warm-gray: #8a8275;
  --warm-gray-light: #c4bdb0;
  --card-bg: #ffffff;
  --star-gold: #f59e0b;

  /* Typography */
  --display: 'Oswald', sans-serif;
  --body: 'Source Sans 3', sans-serif;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 96px;

  /* Misc */
  --radius: 6px;
  --max-width: 1200px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--off-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.88) 0%,
    rgba(10, 22, 40, 0.65) 50%,
    rgba(10, 22, 40, 0.82) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-lg);
  max-width: 900px;
}

.hero-tag {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 var(--space-sm) 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-family: var(--body);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: rgba(247, 245, 240, 0.85);
  margin: 0 auto var(--space-xl) auto;
  max-width: 600px;
  line-height: 1.5;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--amber);
  color: var(--navy);
  padding: 16px 40px;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  background: var(--amber-hover);
  transform: translateY(-2px);
}

.hero-cta:active {
  transform: translateY(0);
}

.hero-phone {
  display: block;
  margin-top: var(--space-lg);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--off-white);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.hero-phone:hover {
  opacity: 1;
  color: var(--amber);
}

/* =============================================
   SECTION COMMON
   ============================================= */
.section {
  padding: var(--space-2xl) 0;
}

.section-dark {
  background: var(--navy);
  color: var(--off-white);
}

.section-label {
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin: 0 0 var(--space-sm) 0;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-md) 0;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--warm-gray);
  max-width: 650px;
  margin: 0 0 var(--space-xl) 0;
  line-height: 1.6;
}

.section-dark .section-desc {
  color: rgba(247, 245, 240, 0.7);
}

/* =============================================
   REVIEWS / SOCIAL PROOF
   ============================================= */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 1px 3px rgba(10, 22, 40, 0.08);
  display: flex;
  flex-direction: column;
}

.section-dark .review-card {
  background: var(--navy-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.review-stars {
  color: var(--star-gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--navy);
  margin: 0 0 var(--space-md) 0;
  flex: 1;
}

.section-dark .review-text {
  color: rgba(247, 245, 240, 0.9);
}

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warm-gray);
}

.section-dark .review-author {
  color: rgba(247, 245, 240, 0.6);
}

.review-author span {
  font-weight: 400;
  color: var(--warm-gray-light);
}

/* =============================================
   SERVICES
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: 0 1px 3px rgba(10, 22, 40, 0.08);
  border-top: 4px solid var(--amber);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.12);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: block;
  line-height: 1;
}

.service-card h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-sm) 0;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--warm-gray);
  margin: 0;
  line-height: 1.6;
}

/* =============================================
   HOURS
   ============================================= */
.hours-table {
  width: 100%;
  max-width: 500px;
  border-collapse: collapse;
  font-size: 1rem;
}

.hours-table tr {
  border-bottom: 1px solid rgba(247, 245, 240, 0.12);
}

.hours-table tr:last-child {
  border-bottom: none;
}

.hours-table td {
  padding: var(--space-sm) 0;
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.hours-note {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: rgba(247, 245, 240, 0.6);
}

/* =============================================
   GALLERY
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.gallery-grid img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .contact-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-md) 0;
}

.contact-info p {
  margin: 0 0 var(--space-sm) 0;
  color: var(--warm-gray);
  line-height: 1.6;
}

.contact-info a {
  color: var(--amber);
  font-weight: 600;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--warm-gray-light);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--navy);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--amber);
  color: var(--navy);
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  align-self: flex-start;
}

.contact-form button:hover {
  background: var(--amber-hover);
  transform: translateY(-2px);
}

.contact-form button:active {
  transform: translateY(0);
}

.form-status {
  font-size: 0.9rem;
  margin: 0;
  min-height: 1.4em;
}

.form-status.success { color: #22c55e; }
.form-status.error { color: #ef4444; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--navy);
  color: rgba(247, 245, 240, 0.6);
  padding: var(--space-xl) 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.site-footer a {
  color: var(--amber);
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-attribution {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: var(--space-sm);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content {
  animation: fadeUp 0.8s ease-out;
}

.review-card,
.service-card {
  animation: fadeUp 0.6s ease-out both;
}

.review-card:nth-child(2) { animation-delay: 0.1s; }
.review-card:nth-child(3) { animation-delay: 0.2s; }

.service-card:nth-child(2) { animation-delay: 0.08s; }
.service-card:nth-child(3) { animation-delay: 0.16s; }
.service-card:nth-child(4) { animation-delay: 0.24s; }
.service-card:nth-child(5) { animation-delay: 0.32s; }
.service-card:nth-child(6) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* =============================================
   RESPONSIVE TWEAKS
   ============================================= */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.4rem;
  }
  .hero-cta {
    padding: 14px 28px;
    font-size: 1rem;
  }
  .hero-phone {
    font-size: 1.2rem;
  }
  .section {
    padding: var(--space-xl) 0;
  }
  .gallery-grid img {
    height: 240px;
  }
}
