/* ==========================================================================
   Moodus River Water Heater Co. — East Haddam, CT
   Design: deep river-teal + copper, Fraunces display / IBM Plex Sans body
   ========================================================================== */

:root {
  --ink: #142321;
  --ink-soft: #3c524d;
  --paper: #f4efe4;
  --paper-dim: #e9e1cf;
  --deep: #10201e;
  --deep-2: #16302c;
  --copper: #c1712f;
  --copper-bright: #d98a45;
  --river: #4f8b8f;
  --river-deep: #2c5c60;
  --line: rgba(20, 35, 33, 0.14);
  --line-on-dark: rgba(244, 239, 228, 0.18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}

h2 { font-size: clamp(1.7rem, 1.35rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.18rem; font-weight: 600; }

p { margin: 0; color: var(--ink-soft); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--copper);
  color: #fff;
  padding: 0.8rem 1.2rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--copper-bright);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary {
  background: var(--copper);
  color: #fff;
}
.btn-primary:hover { background: var(--copper-bright); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-on-dark);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--copper-bright); color: var(--copper-bright); }
.btn-large { padding: 1.05rem 2.1rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(16, 32, 30, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-on-dark);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
}
.brand-mark { color: var(--copper-bright); flex-shrink: 0; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 600;
}
.brand-text em { font-style: normal; color: var(--copper-bright); font-weight: 500; }

.main-nav ul {
  display: flex;
  gap: 1.9rem;
}
.main-nav a {
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.88;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.main-nav a:hover { opacity: 1; border-color: var(--copper-bright); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }
.phone-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper);
  background: rgba(244, 239, 228, 0.08);
  border: 1px solid var(--line-on-dark);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.phone-pill:hover { border-color: var(--copper-bright); background: rgba(193, 113, 47, 0.16); }
.phone-pill svg { color: var(--copper-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--paper);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--deep) 0%, var(--deep-2) 62%, #1c3934 100%);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  color: var(--copper-bright);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}
.hero h1 {
  color: var(--paper);
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  max-width: 16ch;
}
.hero-lede {
  color: rgba(244, 239, 228, 0.82);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-top: 1.4rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.1rem;
  flex-wrap: wrap;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-on-dark);
}
.hero-trust li {
  color: rgba(244, 239, 228, 0.72);
  font-size: 0.88rem;
  position: relative;
  padding-left: 1.15rem;
}
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper-bright);
}
.hero-media { position: relative; }
.hero-media img {
  border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
}
.hero-media-caption {
  position: absolute;
  bottom: -1rem;
  left: 1.2rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,0.35);
  max-width: 220px;
}
.hero-wave {
  height: 60px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 40%, 85% 55%, 70% 30%, 55% 55%, 40% 25%, 25% 55%, 10% 35%, 0 55%);
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.trust-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.trust-item h2 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.trust-item p { font-size: 0.94rem; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--paper-dim); }
.section-inner { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section-head { max-width: 62ch; margin-bottom: 2.8rem; }
.section-head p { margin-top: 0.9rem; font-size: 1.05rem; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  background: #fff;
}
.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(193, 113, 47, 0.1);
  color: var(--copper);
  margin-bottom: 1.1rem;
}
.service-card p { margin-top: 0.55rem; font-size: 0.95rem; }
.service-cta { margin-top: 2.6rem; }

/* ---------- Why us ---------- */
.why-us-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}
.why-us-media img { border-radius: 6px; }
.why-us-copy h2 { margin-bottom: 1.8rem; max-width: 18ch; }
.why-list li {
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.why-list li:first-child { border-top: none; padding-top: 0; }
.why-list h3 { margin-bottom: 0.4rem; }
.why-list p { font-size: 0.95rem; }

/* ---------- Process ---------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.process-steps li { position: relative; padding-top: 2.6rem; }
.step-num {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--copper);
  border-bottom: 2px solid var(--copper);
  padding-bottom: 0.4rem;
  width: 2.6rem;
}
.process-steps h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.process-steps p { font-size: 0.94rem; }

/* ---------- Service area ---------- */
.area-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.area-copy p { font-size: 1.02rem; margin-top: 1rem; }
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}
.area-list li {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.42rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.area-note { margin-top: 1.5rem; font-size: 0.92rem; font-style: italic; }
.area-media img { border-radius: 6px; }

/* ---------- Trust cards ---------- */
.trust-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.trust-card {
  border-left: 3px solid var(--copper);
  padding: 0.3rem 0 0.3rem 1.4rem;
}
.trust-card p { margin-top: 0.5rem; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-inner { max-width: 820px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  padding: 1.35rem 0.2rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.faq-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--copper);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; transition: transform 0.2s ease; }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer p { padding: 0 0.2rem 1.4rem; font-size: 0.97rem; max-width: 68ch; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--river-deep), var(--deep));
  padding: 4.5rem 1.5rem;
  text-align: center;
}
.cta-band-inner { max-width: 640px; margin: 0 auto; }
.cta-band h2 { color: var(--paper); max-width: 20ch; margin: 0 auto; }
.cta-band p { color: rgba(244, 239, 228, 0.8); margin-top: 1rem; font-size: 1.05rem; }
.cta-band .btn { margin-top: 2rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
}
.contact-info h2 { margin-bottom: 0.9rem; }
.contact-info p { font-size: 1.02rem; }
.contact-details { margin-top: 2rem; }
.contact-details div { padding: 1rem 0; border-top: 1px solid var(--line); }
.contact-details div:first-child { border-top: none; }
.contact-details dt {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.contact-details dd { margin: 0; font-weight: 600; font-size: 1.02rem; }
.contact-details a:hover { color: var(--copper); }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2rem;
}
.form-row { margin-bottom: 1.15rem; }
.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--paper);
  color: var(--ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}
.form-note { margin-top: 0.9rem; font-size: 0.9rem; color: var(--river-deep); min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: rgba(244, 239, 228, 0.78);
  padding-top: 4rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
}
.footer-brand .brand-text { color: var(--paper); font-size: 1.15rem; }
.footer-brand p { margin-top: 1rem; color: rgba(244, 239, 228, 0.65); font-size: 0.92rem; max-width: 34ch; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-nav h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--copper-bright);
  margin-bottom: 1rem;
}
.footer-nav li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--copper-bright); }
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding: 1.4rem 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(244, 239, 228, 0.55);
}
.footer-privacy:hover { color: var(--copper-bright); }

/* ---------- Mobile call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 600;
  background: var(--copper);
  color: #fff;
  text-align: center;
  padding: 0.95rem 1rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 -8px 20px -8px rgba(0,0,0,0.3);
}

/* ---------- Reveal on scroll (single subtle effect) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.6rem; }
  .trust-strip-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .why-us-grid, .area-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .why-us-media, .area-media { order: -1; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--deep-2);
    border-bottom: 1px solid var(--line-on-dark);
    padding: 0.5rem 1.5rem 1.5rem;
  }
  .main-nav.is-open ul { flex-direction: column; gap: 0; }
  .main-nav.is-open a {
    display: block;
    padding: 0.9rem 0.2rem;
    border-bottom: 1px solid var(--line-on-dark);
  }
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 4.5rem; }
  .hero-media { order: -1; }
  .hero-media-caption { position: static; margin-top: -0.8rem; display: inline-block; }
  .trust-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
  .mobile-call-bar { display: flex; }
  body { padding-bottom: 3.6rem; }
}

@media (max-width: 620px) {
  .service-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding: 3rem 1.25rem 3.5rem; }
  .section { padding: 3.6rem 0; }
  .header-inner { padding: 0.75rem 1.1rem; }
  .phone-pill span { display: none; }
  .phone-pill { padding: 0.55rem; }
}
