/* R.M Plumbing & Heating — mobile first */
:root {
  --bg: #f7f5f0;
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --sand: #efece6;
  --brand: #6dbe23;
  --ink: #0a0a0a;
  --dark: #0d0d0d;
  --line: rgba(15, 15, 15, 0.08);
  --input: rgba(15, 15, 15, 0.14);
  --shadow: 0 1px 2px rgba(15, 15, 15, 0.04), 0 8px 24px -12px rgba(15, 15, 15, 0.08);
  --radius: 1rem;
  --gutter: 1rem;
  --section: clamp(3.5rem, 2.5rem + 3vw, 5rem);
  --header-h: 4.5rem;
}
@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0.5rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.hl { color: var(--brand); }

.wrap { width: min(100% - 2 * var(--gutter), 80rem); margin-inline: auto; }
.wrap.narrow { width: min(100% - 2 * var(--gutter), 56rem); }
.wrap.slim { width: min(100% - 2 * var(--gutter), 48rem); }

.section { padding-block: var(--section); }
.bg-white { background: #fff; }
.bg-sand { background: var(--sand); }
.bg-cream { background: var(--bg); }

.h2 { font-size: clamp(1.875rem, 1.3rem + 2.6vw, 3rem); font-weight: 900; line-height: 1.1; max-width: 48rem; }
.lead { margin-top: 1rem; color: var(--muted); max-width: 42rem; }
.lead.lg { margin-top: 1.5rem; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); line-height: 1.7; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.75rem 1.5rem;
  border-radius: 0.5rem; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.btn-brand { background: var(--brand); color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); }
@media (hover: hover) {
  .btn-brand:hover { filter: brightness(1.1); }
  .btn-ghost:hover { background: rgba(255,255,255,0.2); }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #000; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand-link { display: flex; align-items: center; gap: 0.75rem; min-width: 0; text-decoration: none; }
.brand-link img { height: 3rem; width: auto; }
.tagline { display: none; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-actions .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
.header-call { display: none; }
.nav-toggle {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  background: transparent; border: 1px solid rgba(255,255,255,0.2); border-radius: 0.5rem; color: #fff; cursor: pointer;
}
.nav-toggle svg { width: 1.375rem; height: 1.375rem; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

.main-nav { display: none; }
.nav-open .main-nav {
  display: block; position: absolute; inset: 100% 0 auto 0;
  background: #000; border-top: 1px solid rgba(255,255,255,0.1);
  max-height: calc(100svh - var(--header-h)); overflow-y: auto;
  padding: 0.5rem var(--gutter) 1.25rem;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: flex; align-items: center; min-height: 3rem;
  color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.main-nav a[aria-current="page"] { color: var(--brand); }
.main-nav .nav-call { color: var(--brand); font-weight: 700; border-bottom: 0; }
@media (hover: hover) { .main-nav a:hover { color: var(--brand); } }

@media (min-width: 380px) { .brand-link img { height: 3.25rem; } }
@media (min-width: 768px) {
  .tagline { display: inline; }
  .header-call { display: inline-flex; color: #fff; font-weight: 600; font-size: 0.9375rem; text-decoration: none; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding-inline: 0.5rem; }
  .header-call svg { width: 1rem; height: 1rem; color: var(--brand); }
  .header-actions { gap: 1rem; }
  .header-actions .btn { padding: 0.5rem 1.25rem; }
}
@media (min-width: 1180px) {
  .brand-link img { height: 3.5rem; }
  .nav-toggle { display: none; }
  .main-nav, .nav-open .main-nav { display: block; position: static; padding: 0; border: 0; background: none; max-height: none; overflow: visible; }
  .main-nav ul { display: flex; gap: 1.5rem; }
  .main-nav a { min-height: 2.75rem; border: 0; font-size: 0.875rem; color: rgba(255,255,255,0.75); }
  .main-nav .nav-call { display: none; }
  .site-header .bar { gap: 2rem; }
  .main-nav { margin-left: auto; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: #111; color: #fff; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -1; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-img::before, .hero-img::after { content: ""; position: absolute; inset: 0; }
.hero-img::before { background: linear-gradient(to right, rgba(13,13,13,0.9), rgba(13,13,13,0.7), rgba(13,13,13,0.4)); }
.hero-img::after { background: linear-gradient(to top, rgba(13,13,13,0.7), transparent, rgba(13,13,13,0.3)); }
.hero .wrap { padding-block: clamp(4rem, 2.5rem + 7vw, 8rem); }
.hero-inner { max-width: 42rem; }
.pill {
  display: inline-flex; margin-bottom: 1rem; padding: 0.25rem 0.75rem; border-radius: 999px;
  border: 1px solid rgba(109,190,35,0.4); background: rgba(109,190,35,0.15); color: var(--brand);
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.hero h1 { font-size: clamp(2.25rem, 1.5rem + 3.6vw, 3.75rem); font-weight: 900; line-height: 1.05; }
.hero p { margin-top: 1.5rem; max-width: 36rem; color: rgba(255,255,255,0.9); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); line-height: 1.7; }
.hero p a { text-decoration: underline; }
.hero-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 479px) { .hero-ctas .btn { flex: 1 1 100%; } }

/* Cards and grids */
.grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.grid-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-steps { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .grid-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .grid-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; min-width: 0; }
@media (min-width: 640px) { .card.roomy { padding: 1.75rem; } }
.card h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.card h3 a { text-decoration: none; }
.card p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.65; color: var(--muted); }
.lift { transition: transform 0.2s, border-color 0.2s; }
@media (hover: hover) {
  .lift:hover { transform: translateY(-4px); border-color: rgba(109,190,35,0.4); }
  .card h3 a:hover { color: var(--brand); }
}
.icon-box { display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.25rem; border-radius: 0.5rem; background: rgba(109,190,35,0.1); color: var(--brand); }
.icon-box svg { width: 1.5rem; height: 1.5rem; }
.icon-box.solid { background: var(--brand); color: var(--ink); font-weight: 900; font-size: 1.125rem; }

.check-card { display: flex; gap: 1rem; }
.check-card p { margin-top: 0.25rem; }
.check-card h3 { font-size: 1.125rem; }
.tick { display: inline-grid; place-items: center; flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--brand); color: var(--ink); }
.tick svg { width: 1.25rem; height: 1.25rem; }
.tick.sm { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }
.tick.sm svg { width: 0.875rem; height: 0.875rem; }
.check-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.check-list li { display: flex; gap: 0.75rem; padding: 1.25rem; font-size: 0.9375rem; line-height: 1.6; }

/* About */
.about { display: grid; gap: 2.5rem; }
.about-img { order: 2; }
.about-text { order: 1; display: flex; flex-direction: column; justify-content: center; }
.about-text .body { margin-top: 1.5rem; display: grid; gap: 1rem; color: var(--muted); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); line-height: 1.7; }
.about-text .body strong { color: var(--fg); }
@media (min-width: 1024px) {
  .about { grid-template-columns: 1fr 1.3fr; gap: 4rem; }
  .about-img { order: 1; }
  .about-text { order: 2; }
}
.photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--sand); box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
@media (min-width: 640px) and (max-width: 1023px) { .about-img .photo { aspect-ratio: 4 / 3; } }
@media (hover: hover) { .photo.lift:hover img { transform: scale(1.05); } }

.gallery { grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Reviews */
.stars { display: flex; gap: 0.125rem; color: var(--brand); }
.stars svg { width: 1rem; height: 1rem; fill: currentColor; }
.rating { margin-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: var(--fg); font-weight: 600; }
.rating .stars svg { width: 1.125rem; height: 1.125rem; }
.review p { color: rgba(26,26,26,0.8); }
.review .who { margin-top: 1rem; font-weight: 700; color: var(--fg); font-size: 1rem; }

/* Contact form */
.center { text-align: center; }
.center .lead { margin-inline: auto; margin-top: 0.75rem; }
.form-card { margin-top: 2.5rem; padding: 1.25rem; }
@media (min-width: 640px) { .form-card { padding: 2rem; } }
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--input); border-radius: 0.5rem;
  background: #fff; color: var(--fg); font: inherit; font-size: 1rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109,190,35,0.3); }
.form .btn { width: 100%; padding-block: 0.9rem; font-size: 1rem; font-weight: 700; }
.form .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.fine { font-size: 0.75rem; color: var(--muted); }
.fine a { text-decoration: underline; }
.form-error { color: #dc2626; font-size: 0.875rem; font-weight: 500; text-align: center; }
.form-success { padding: 2.5rem 0; text-align: center; font-size: 1.125rem; font-weight: 600; }
.form-success .tick { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; }
.form-success .tick svg { width: 1.75rem; height: 1.75rem; }
[hidden] { display: none !important; }

/* Privacy */
.prose { padding-block: var(--section); }
.prose h1 { font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.25rem); font-weight: 900; }
.prose .meta { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.prose .intro { margin-top: 2rem; color: var(--muted); }
.prose section { margin-top: 2.5rem; }
.prose h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 700; }
.prose h2 span { border-bottom: 2px solid var(--brand); padding-bottom: 0.25rem; }
.prose section p { margin-top: 0.75rem; color: var(--muted); }
.prose a { color: var(--brand); font-weight: 600; overflow-wrap: anywhere; }
.back { display: inline-block; margin-top: 3rem; font-size: 0.875rem; }

/* Footer */
.site-footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,0.1); color: #fff; }
.site-footer .wrap { padding-block: 2.5rem; }
.foot-grid { display: grid; gap: 1.5rem; text-align: center; justify-items: center; }
.foot-grid .name { font-size: 0.875rem; font-weight: 600; }
.foot-grid .name span { color: rgba(255,255,255,0.4); }
.foot-grid .tag { margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand); }
.foot-call { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.foot-call svg { width: 1rem; height: 1rem; color: var(--brand); }
.foot-links { display: flex; align-items: center; gap: 0.5rem; }
.foot-links a { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.875rem; }
.foot-links svg { width: 1.25rem; height: 1.25rem; }
@media (hover: hover) { .foot-links a:hover, .foot-call:hover { color: var(--brand); } }
.copy { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.75); }
@media (min-width: 768px) {
  .foot-grid { grid-template-columns: repeat(3, 1fr); text-align: left; justify-items: stretch; align-items: center; }
  .foot-call { justify-self: center; }
  .foot-links { justify-content: flex-end; }
}

/* Mobile call bar */
.call-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); border-top: 1px solid rgba(255,255,255,0.1);
}
.call-bar .btn { padding: 0.65rem 0.75rem; font-size: 0.9375rem; }
.call-bar svg { width: 1rem; height: 1rem; }
body { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .call-bar { display: none; } body { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Exactly three cards: stack on phones, one row from tablet up (avoids a 2 + 1 orphan) */
.grid-3 { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } .grid-3 .card { padding: 1.25rem; } }
@media (min-width: 1024px) { .grid-3 { gap: 1.5rem; } .grid-3 .card { padding: 1.75rem; } }

/* FAQ */
.faq { margin-top: 2rem; display: grid; gap: 0.75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.25rem; padding: 0.875rem 1.25rem; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; font-size: 1.5rem; font-weight: 400; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 1.25rem 1.25rem; color: var(--muted); }
.faq .bg-white details, .bg-white .faq details { background: var(--bg); }
