/* JNG Plumbing — rebuilt from the Tilda export (project 13635501)
   Layout: header → dark photo hero → grey "About" with photo collage →
   white 2-column services grid → contact form → dark footer. */

:root {
  --navy: #140033;        /* logo navy */
  --blue: #369cfe;        /* logo water-drop blue */
  --blue-dark: #1f7fdc;
  --ink: #111111;
  --text: #2a2a33;
  --muted: #5d5f6b;
  --grey-bg: #dedede;     /* About section (from Tilda) */
  --header-top: #eceef4;
  --header-bottom: #b9bcc6;
  --white: #ffffff;
  --error: #c62828;

  --font: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 700 16px/1 var(--font); letter-spacing: .01em;
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { border-color: rgba(255,255,255,.8); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--dark { background: var(--navy); color: #fff; min-width: 160px; }
.btn--dark:hover { background: var(--blue-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header { background: linear-gradient(to bottom, var(--header-top), var(--header-bottom)); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 120px; padding-block: 12px; }
.brand img { width: 200px; }
.site-nav { display: flex; align-items: center; gap: 40px; flex: 1; justify-content: flex-end; }
.nav-list { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 28px; }
.nav-list a { text-decoration: none; font-weight: 600; font-size: 17px; color: var(--navy); padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s; }
.nav-list a:hover { border-color: var(--blue); }
.header-contacts { display: flex; align-items: center; gap: 14px; }
.fb-link { color: #1877f2; display: inline-flex; }
.header-contacts__text { display: flex; flex-direction: column; font-size: 16px; line-height: 1.45; }
.header-contacts__text a { text-decoration: none; color: var(--navy); }
.header-contacts__text a:hover { color: var(--blue-dark); }

.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { position: absolute; left: 12px; width: 24px; height: 2px; background: var(--navy); content: ""; transition: transform .2s, opacity .2s; }
.nav-toggle__bar { top: 23px; }
.nav-toggle__bar::before { left: 0; top: -8px; }
.nav-toggle__bar::after { left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  color: #fff; text-align: center;
  background: linear-gradient(rgba(0,0,0,.68), rgba(0,0,0,.68)), url("../images/hero.jpg") center / cover no-repeat;
  padding-block: clamp(96px, 16vw, 200px);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hero-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.hero h1 { color: #fff; font-size: clamp(32px, 5.2vw, 66px); font-weight: 800; max-width: 21ch; }
.hero-lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 52ch; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 8px; }

/* ---------- About ---------- */
.about { background: var(--grey-bg); position: relative; padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(110px, 12vw, 170px); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.about-text { display: flex; flex-direction: column; gap: 18px; max-width: 34em; min-width: 0; }
.about-text h2 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; margin-bottom: 6px; }
.about-collage { position: relative; aspect-ratio: 560 / 580; max-width: 100%; }
.about-collage img { position: absolute; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.about-collage__a { left: 0; top: 0; width: 58%; height: 76%; }
.about-collage__b { right: 0; top: 15%; width: 38%; height: 44%; }
.about-collage__c { left: 20%; bottom: 0; width: 61%; height: 37%; z-index: 1; }
.about-divider { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(30px, 5vw, 80px); fill: var(--white); }

/* ---------- Section head ---------- */
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); display: flex; flex-direction: column; gap: 16px; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; }
.section-head p { font-size: 18px; color: var(--muted); }
.section-head a { color: var(--blue-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Services ---------- */
.services { padding-block: clamp(48px, 7vw, 90px); }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.service-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.service-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 8px; }
.service-card h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; }
.service-card p { font-size: 15.5px; color: var(--muted); }
/* odd last card stays left-aligned at half width, like the Tilda layout */

/* ---------- Contact ---------- */
.contact { padding-block: clamp(56px, 8vw, 110px); background: #f4f5f8; }
.contact-inner { max-width: calc(620px + 2 * var(--gutter)); }
.contact .section-head { margin-bottom: 36px; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; color: var(--ink); }
.req { color: var(--blue-dark); }
.field input, .field textarea, .phone-input {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--ink);
  background: #fff; border: 1px solid #000; border-radius: 0;
}
.field input, .field textarea { padding: 14px 16px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .phone-input:focus-within { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(54,156,254,.25); }
.phone-input { display: flex; align-items: center; }
.phone-input__prefix { padding: 0 4px 0 16px; font-weight: 600; }
.phone-input input { border: 0; padding-left: 6px; }
.phone-input input:focus { box-shadow: none; }
.field.has-error input, .field.has-error .phone-input { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { align-self: center; margin-top: 6px; }
.form-status { text-align: center; font-size: 15px; }
.form-status.is-error { color: var(--error); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 28px; }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-credit { font-weight: 400; font-style: italic; opacity: .8; }
.footer-credit a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.back-to-top { white-space: nowrap; }

/* ---------- Success popup ---------- */
.popup { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10,10,20,.6); }
.popup[hidden] { display: none; }
.popup__box { position: relative; background: #fff; max-width: 420px; width: 100%; padding: 40px 32px 34px; text-align: center; border-radius: 6px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.popup__icon { color: var(--blue); }
.popup__box h2 { font-size: 26px; }
.popup__box p { color: var(--muted); }
.popup__close { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav { gap: 24px; }
  .nav-list { gap: 20px; }
}

@media (max-width: 900px) {
  .header-inner { min-height: 84px; flex-wrap: wrap; }
  .brand img { width: 140px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 20px; padding: 8px 0 20px; }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 4px; margin: 0; }
  .nav-list a { display: block; font-size: 20px; padding: 10px 0; border-bottom: 1px solid rgba(20,0,51,.12); }
  .header-contacts { align-items: flex-start; }
  .about-inner { grid-template-columns: 1fr; }
  .about-collage { width: 100%; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-direction: column; }
}


/* ==========================================================
   Final look (approved): Onest, navy text, navy rounded buttons,
   navy footer, and the "depth" scroll effect between sections.
   ========================================================== */
:root {
  --navy: #110032;                     /* exact Tilda menu colour */
  --font: "Onest", "Helvetica Neue", Arial, sans-serif;
  --ink: #110032; --text: #110032; --muted: #110032;
  --w-body: 400; --w-head: 650; --w-ui: 550;
}
body { color: var(--navy); font-weight: var(--w-body); }
h1, h2, h3 { font-family: var(--font); font-weight: var(--w-head); color: var(--navy); letter-spacing: -0.015em; }
.hero h1, .hero-eyebrow, .hero-lead { color: #fff; }
.about-text p, .section-head p, .service-card p, .contact .section-head p, .hero-lead { font-weight: var(--w-body); }
.about-text p, .section-head p, .service-card p, .contact .section-head p { color: var(--navy); }
.service-card p { font-size: 16px; }

.nav-list a, .header-contacts__text a { color: var(--navy); font-weight: var(--w-ui); }
.nav-list a:hover { border-bottom-color: var(--navy); }
.section-head a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline-color: var(--navy); }

/* buttons: navy, fully rounded */
.btn { border-radius: 999px; font-weight: var(--w-ui); }
.btn--primary { background: #fff; color: var(--navy); }
.btn--primary:hover { background: var(--navy); color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #000; }

/* form */
.field label { color: var(--navy); font-weight: var(--w-ui); }
.field input, .field textarea, .phone-input { color: var(--navy); border-color: var(--navy); font-weight: var(--w-body); }
.field input::placeholder, .field textarea::placeholder { color: rgba(17,0,50,.6); }
.field input:focus, .field textarea:focus, .phone-input:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(17,0,50,.15); }
.req, .popup__icon, .popup__box h2 { color: var(--navy); }
.popup__box h2 { font-weight: var(--w-head); }

/* footer: navy like the buttons */
.site-footer { background: var(--navy); font-weight: var(--w-ui); }
.site-footer a:hover { color: #9fc7ff; }

/* ---------- Scroll effect "depth" ----------
   Each section pins; the next one rides up over it while the one underneath
   sinks back (shrinks to 90%), softly blurs and dims in navy.
   JS (main.js) sets --p (0→1 while being covered) and --in (0→1 while arriving). */
main { background: #0b0022; }           /* deep navy seen behind a receding section */
.services { background: #fff; }
.fx-sec { position: sticky; isolation: isolate; will-change: transform;
  transform: scale(calc((1 - .1 * var(--p, 0)) * (1 + .04 * (1 - var(--in, 1)))));
  filter: blur(calc(5px * var(--p, 0))); }
.fx-sec::after { content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none;
  background: #110032; opacity: calc(.35 * var(--p, 0)); }
.fx-sec + .fx-sec { box-shadow: 0 -30px 60px -30px rgba(17,0,50,calc(.45 * var(--in, 0))); }
html.fx-measure .fx-sec { position: relative !important; top: auto !important; transform: none !important; filter: none !important; }
@media (prefers-reduced-motion: reduce) {
  .fx-sec { position: relative !important; top: auto !important; transform: none !important; filter: none !important; }
  .fx-sec::after { opacity: 0 !important; }
}


/* ---------- Google reviews ---------- */
.reviews { background: #fff; padding-block: clamp(56px, 8vw, 100px); }
.reviews [hidden] { display: none !important; }
.reviews .section-head { margin-bottom: 40px; }
.reviews-summary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  color: var(--navy); text-decoration: none !important; font-weight: var(--w-ui); white-space: normal !important; }
.reviews-summary__score { font-size: 28px; font-weight: var(--w-head); letter-spacing: -0.02em; }
.reviews-summary__count { font-size: 16px; font-weight: var(--w-body); border-bottom: 1px solid rgba(17,0,50,.35); }
.reviews-summary:hover .reviews-summary__count { border-bottom-color: var(--navy); }
.stars { display: inline-flex; gap: 2px; color: var(--navy); }
.stars svg { width: 18px; height: 18px; }
.stars .is-empty { opacity: .2; }

.reviews-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.review-card { background: #f4f5f8; border-radius: 20px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.review-card__text { margin: 0; color: var(--navy); font-weight: var(--w-body); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.review-card.is-open .review-card__text { -webkit-line-clamp: unset; display: block; }
.review-card__more { align-self: flex-start; background: none; border: 0; padding: 0; font: var(--w-ui) 14px var(--font);
  color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.review-card__author { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.review-card__photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e3e2ea; flex: none; }
.review-card__initial { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: var(--w-head); flex: none; }
.review-card__name { color: var(--navy); font-weight: var(--w-ui); text-decoration: none; display: block; }
a.review-card__name:hover { text-decoration: underline; }
.review-card__time { font-size: 13px; color: rgba(17,0,50,.7); }
.reviews-actions { display: flex; justify-content: center; margin-top: 36px; }
.reviews-source { text-align: center; font-size: 13px; color: rgba(17,0,50,.7); margin-top: 14px; }

@media (max-width: 900px) {
  .reviews-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 8px;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .review-card { flex: 0 0 min(82%, 360px); scroll-snap-align: start; }
}

/* The arriving section starts at 104% scale; clip it so the page never scrolls sideways
   (overflow-x: clip, unlike hidden, keeps position: sticky working). */
html, body { overflow-x: clip; }

/* reviews: invitation mode + accessibility details */
.reviews-lead { max-width: 34em; margin-inline: auto; }
.btn__ext { margin-left: 8px; flex: none; }
.reviews-track:focus-visible { outline: 2px solid var(--navy); outline-offset: 6px; border-radius: 22px; }
.review-card__more:focus-visible, .review-card__name:focus-visible, .reviews-summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.review-card__more { min-height: 32px; }

/* One light grey across the site (same as the "Get in touch" background) */
.hero h1 { color: #f4f5f8; }
.about { background: #f4f5f8; }
