/* ==========================================================================
   Covina Water Heater Pros: custom styles layered on compiled Tailwind
   Look: warm local trade. Ink navy, flame orange, cream paper.
   ========================================================================== */

:root {
  --ink: #0e1a2b;
  --ink-2: #17263b;
  --cream: #f6f1e9;
  --cream-2: #efe7da;
  --flame: #d9480f;
  --flame-dark: #b93b0a;
  --ember: #f59f00;
  --water: #0f6cbd;
}

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

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

h1, h2, h3, h4, .font-display {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  letter-spacing: -0.025em;
}

.fluid-h1 {
  font-size: clamp(2.25rem, 5.6vw, 4rem);
  line-height: 1.02;
}
.fluid-h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.08;
}

/* Eyebrow label with a flame dash */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flame);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--flame), var(--ember));
}
.eyebrow-light { color: #ffb37a; }

/* Textures */
.bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.bg-grid-light {
  background-image:
    linear-gradient(to right, rgba(14, 26, 43, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 26, 43, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}
.bg-paper {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(14, 26, 43, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Hot-water gradient text (on dark heroes) */
.text-gradient {
  background: linear-gradient(90deg, #ff8a3d, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Flame underline for light backgrounds */
.flame-underline {
  background-image: linear-gradient(90deg, var(--flame), var(--ember));
  background-repeat: no-repeat;
  background-size: 100% 0.14em;
  background-position: 0 92%;
  padding-bottom: 0.04em;
}

/* Inner-page hero: ink wash over the photo plus a warm glow and flame rule */
.hero-overlay {
  background:
    radial-gradient(60% 80% at 100% 100%, rgba(217, 72, 15, 0.35), transparent 60%),
    linear-gradient(105deg, rgba(14, 26, 43, 0.97) 0%, rgba(14, 26, 43, 0.86) 48%, rgba(14, 26, 43, 0.45) 100%);
}
section:has(> .hero-overlay)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--flame), var(--ember), var(--flame));
}

/* Cards */
.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 24px 44px -22px rgba(14, 26, 43, 0.4);
}

/* Photo frame with offset flame block */
.photo-frame {
  position: relative;
  isolation: isolate;
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, var(--flame), var(--ember));
  z-index: -1;
}

/* Process connector line */
.step-line {
  position: relative;
}
@media (min-width: 1024px) {
  .step-line::after {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: 3.5rem;
    right: -1.5rem;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 8px, transparent 8px 16px);
  }
  .step-line:last-child::after { display: none; }
}

/* 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 */
.faq-item {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.faq-item[open-state="true"] {
  box-shadow: 0 18px 36px -24px rgba(14, 26, 43, 0.45);
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-answer > div {
  overflow: hidden;
  min-height: 0;
  transition: padding-bottom 0.3s ease;
}
.faq-item:not([open-state="true"]) .faq-answer > div { padding-bottom: 0; }
.faq-item[open-state="true"] .faq-answer { grid-template-rows: 1fr; }
.faq-icon {
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.faq-item[open-state="true"] .faq-icon { transform: rotate(45deg); }

/* 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; }

/* Brand wordmarks */
.brand-logo {
  opacity: 0.55;
  transition: opacity 0.25s ease, color 0.25s ease;
}
.brand-logo:hover { opacity: 1; color: var(--flame); }

/* Inline links in body copy */
main p a:not([class*="rounded"]) { text-underline-offset: 3px; }

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

/* Sticky mobile call bar offset */
@media (max-width: 767px) {
  body { padding-bottom: 5rem; }
}

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