/* ==========================================================================
   Covina Water Heater Pros — custom styles
   Small touches the Tailwind CDN can't do inline: fonts, fluid type,
   keyframe animations, scroll behavior, focus states.
   ========================================================================== */

:root {
  --brand-navy: #0d1b2a;
  --brand-slate: #14263b;
  --brand-water: #0ea5e9;
  --brand-cyan: #06b6d4;
  --brand-accent: #f97316;
  --brand-accent-dark: #ea580c;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* Fluid hero headline so it never overflows on small screens */
.fluid-h1 {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.05;
}
.fluid-h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.12;
}

/* Subtle dotted texture for dark sections */
.bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.bg-grid-light {
  background-image:
    linear-gradient(to right, rgba(13, 27, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 27, 42, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Water-gradient text + hero overlay */
.text-gradient {
  background: linear-gradient(90deg, var(--brand-water), var(--brand-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-overlay {
  background: linear-gradient(115deg, rgba(13, 27, 42, 0.96) 0%, rgba(13, 27, 42, 0.78) 45%, rgba(13, 27, 42, 0.25) 100%);
}

/* Card hover lift */
.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(13, 27, 42, 0.35);
}

/* Pulsing emergency dot */
.pulse-dot {
  position: relative;
}
.pulse-dot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.55;
  animation: pulse-ring 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.6; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { opacity: 0; }
}

/* FAQ accordion animation */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-answer > div {
  overflow: hidden;
}
.faq-item[open-state="true"] .faq-answer {
  grid-template-rows: 1fr;
}
.faq-item[open-state="true"] .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.25s ease;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Marquee for brand row on small screens (kept simple/static, no JS) */
.brand-logo {
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.brand-logo:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* Accessible focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-water);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sticky mobile call bar offset so content isn't hidden behind it */
@media (max-width: 767px) {
  body {
    padding-bottom: 4.5rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
