/* Windmill Plumbing, Grand Rapids MI
   Palette from the logo (black windmill of pipe wrenches, blue ring) and the brushed brass fixtures in their bathroom work */
:root {
  --white: #FFFFFF;
  --ink: #15181B;
  --black: #000000;
  --blue: #0082C8;      /* logo blue */
  --band: #0078BA;      /* before/after band, white text 4.8:1 */
  --blue-d: #00609A;    /* buttons and links, white text 6:1 */
  --blue-dd: #004C7A;
  --block: #ECEDEA;     /* basement block gray */
  --brass: #A57F45;
  --muted: #4F555B;
  --rule: #D5D8D4;
  --gutter: 16px;
  --wrap: 1240px;
  --head: "Sansation", "Trebuchet MS", sans-serif;
  --body: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-d); text-underline-offset: 3px; }
a:hover { color: var(--blue-dd); }
h1, h2, h3, h4, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.band :focus-visible, .foot :focus-visible, .sticky-book :focus-visible, .lightbox :focus-visible { outline-color: var(--white); }
section[id], main { scroll-margin-top: 12px; }

.defs { position: absolute; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 12px; color: var(--white); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2 { font-family: var(--head); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; }
h3 { font-size: 23px; line-height: 1.25; font-weight: 700; }

.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: var(--brass); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  font: 700 18px/1.1 var(--body); text-decoration: none; border-radius: 4px; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--blue { background: var(--blue-d); color: var(--white); }
.btn--blue:hover { background: var(--blue-dd); color: var(--white); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--block); color: var(--ink); }

/* Header */
.top { background: var(--white); border-bottom: 1px solid var(--rule); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: block; margin-right: auto; }
.brand img { height: 42px; width: auto; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 0; }
.nav a:hover { color: var(--blue-d); text-decoration: underline; }
.top__call { display: none; }
.menu-btn { width: 48px; height: 48px; display: grid; place-content: center; gap: 6px; background: none; border: 0; cursor: pointer; margin-right: -10px; }
.menu-btn span { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px; }
@media (min-width: 1000px) {
  .top__in { min-height: 88px; }
  .brand img { height: 50px; }
  .nav { display: flex; }
  .top__call { display: inline-flex; }
  .menu-btn { display: none; }
}

.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(320px, 86vw);
  background: var(--white); padding: 88px 24px 24px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-menu[hidden], .scrim[hidden] { display: none; }
.mobile-menu a:not(.btn) { font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mobile-menu .btn { margin-top: 14px; }
body.menu-open { overflow: hidden; }
body.menu-open .menu-btn { position: fixed; right: 16px; top: 14px; z-index: 80; margin: 0; }

/* Hero: the logo's layout. Photo in the middle where the windmill stands, broken blue ring behind it */
.hero { padding: 32px 0 0; overflow: hidden; }
.hero__grid { display: grid; gap: 24px; grid-template-areas: "text" "call" "photo" "meta"; }
.hero__text { grid-area: text; }
.hero__call { grid-area: call; }
.hero__meta { grid-area: meta; }
.hero__photo { grid-area: photo; position: relative; isolation: isolate; margin-top: 4px; }
.hero h1 { font-size: clamp(36px, 9.6vw, 44px); line-height: 1.05; }
.hero__lede { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 34ch; }

.hero__photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; border-radius: 4px; }
.hero__photo figcaption { position: relative; z-index: 1; margin-top: 8px; font-size: 15px; color: var(--muted); }
.hero__ring { display: none; }

.hero__label { font-weight: 600; color: var(--muted); font-size: 16px; }
.hero__phone { display: inline-block; font: 700 clamp(34px, 9vw, 40px)/1.1 var(--head); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.hero__phone:hover { color: var(--blue-d); }
.hero__btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero__btns .btn { flex: 1 1 auto; }
.hero__hours { font-size: 17px; }
.hero__rating { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--ink); text-decoration: none; font-size: 17px; }
.hero__rating:hover span:last-child { text-decoration: underline; }

@media (max-width: 719px) {
  .hero__lede { font-size: 18px; margin-top: 12px; }
  .hero__photo img { aspect-ratio: 4 / 3; object-position: 50% 70%; }
}

@media (min-width: 720px) and (max-width: 1099px) {
  .hero__grid { grid-template-columns: 1.1fr .9fr; grid-template-areas: "text photo" "call photo" "meta photo"; align-items: start; column-gap: 40px; }
  .hero h1 { font-size: clamp(40px, 5.6vw, 54px); }
  .hero__photo img { aspect-ratio: 3 / 4; }
}

@media (min-width: 1100px) {
  .hero { padding-top: 24px; }
  .hero__grid { grid-template-columns: 1.12fr .86fr .78fr; grid-template-rows: 1fr 1fr; grid-template-areas: "text photo call" "text photo meta"; column-gap: 64px; row-gap: 22px; align-items: center; }
  .hero__call { align-self: end; }
  .hero__meta { align-self: start; }
  .hero__callbtn { display: none; }
  .hero h1 { font-size: clamp(48px, 3.9vw, 60px); line-height: 1.04; }
  .hero__lede { font-size: 20px; margin-top: 22px; }
  .hero__photo { padding: 80px 0 8px; }
  .hero__photo img { aspect-ratio: 3 / 4; object-position: 50% 50%; }
  .hero__ring {
    display: block; position: absolute; z-index: 0; left: 50%; top: 0; width: 150%; transform: translateX(-50%);
    fill: none; stroke: var(--blue); stroke-width: 4.2; stroke-linecap: butt; overflow: visible;
  }
  .hero__btns { flex-direction: column; align-items: stretch; }
  .hero__phone { font-size: clamp(34px, 2.7vw, 42px); }
}

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 36px; border-top: 1px solid var(--rule); }
.facts li { padding: 18px 16px 20px 0; display: flex; flex-direction: column; gap: 2px; }
.facts li:nth-child(odd) { border-right: 1px solid var(--rule); }
.facts li:nth-child(even) { padding-left: 16px; }
.facts li:nth-child(n+3) { border-top: 1px solid var(--rule); }
.facts strong { font-size: 18px; line-height: 1.3; }
.facts span { font-size: 15px; color: var(--muted); line-height: 1.4; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, 1fr); margin-top: 48px; }
  .facts li { padding: 22px 24px 26px; border-right: 1px solid var(--rule); border-top: 0 !important; }
  .facts li:first-child { padding-left: 0; }
  .facts li:last-child { border-right: 0; }
  .facts li:nth-child(even) { padding-left: 24px; }
  .facts strong { font-size: 20px; }
}

/* Services */
.services { padding: 72px 0 80px; border-top: 1px solid var(--rule); }
.services__grid { display: grid; gap: 32px; }
.services__head p { margin-top: 14px; max-width: 40ch; }
.services__head p:first-of-type { font-size: 20px; }
.services__also { color: var(--muted); font-size: 17px; }
.services__head .btn { margin-top: 24px; }
.svc { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid var(--rule); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.svc img[src*="shower-valve"] { object-position: 50% 92%; }
.svc img[src*="water-heater"] { object-position: 50% 30%; }
.svc img[src*="softener"] { object-position: 50% 20%; }
.svc__body p { margin-top: 8px; }
.svc__quote { margin-top: 16px; padding-left: 16px; border-left: 3px solid var(--blue); }
.svc__quote p { margin: 0; font-size: 17px; }
.svc__quote footer { margin-top: 6px; font-size: 15px; color: var(--muted); }
@media (min-width: 720px) {
  .svc { grid-template-columns: 200px 1fr; gap: 28px; }
  .svc img { aspect-ratio: 4 / 5; }
}
@media (min-width: 1000px) {
  .services { padding: 104px 0 104px; }
  .services__grid { grid-template-columns: .78fr 1.5fr; gap: 72px; align-items: start; }
  .services__head { position: sticky; top: 28px; }
  .svc { grid-template-columns: 210px 1fr; gap: 36px; padding: 32px 0; }
}

/* When it gets cold */
.cold { margin-top: 56px; background: var(--block); border-radius: 6px; padding: 28px 20px 32px; display: grid; gap: 26px; }
.cold__title { font: 700 clamp(28px, 2.8vw, 36px)/1.1 var(--head); }
.cold__item h4 { font-size: 21px; line-height: 1.3; }
.cold__item > p { margin-top: 8px; }
.cold blockquote { margin-top: 12px; padding-left: 16px; border-left: 3px solid var(--blue); }
.cold blockquote p { font-size: 17px; }
.cold blockquote footer { margin-top: 6px; font-size: 15px; color: var(--muted); }
@media (min-width: 900px) {
  .cold { grid-template-columns: .7fr 1fr 1fr; gap: 48px; padding: 40px 44px 44px; margin-top: 80px; }
}

/* Before and after: the one loud band */
.band { background: var(--band); color: var(--white); padding: 72px 0 84px; }
.band__head { display: grid; gap: 12px; margin-bottom: 40px; }
.band__head p { color: #EAF4FB; max-width: 46ch; font-size: 19px; }
.pairs { display: grid; gap: 44px; }
.pair__imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair__img { position: relative; overflow: hidden; border-radius: 3px; background: #0A5F92; }
.pair__img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tag-ba { position: absolute; left: 8px; top: 8px; background: var(--black); color: var(--white); font-size: 15px; font-weight: 700; line-height: 1; padding: 7px 10px 8px; border-radius: 3px; }
.tag-ba--after { background: var(--white); color: var(--ink); }

.svc-tag {
  position: relative; display: grid; gap: 2px; margin: -30px 0 0 14px; width: calc(100% - 28px);
  background: var(--white); color: var(--ink); border-radius: 4px; padding: 14px 18px 16px 74px; min-height: 76px;
}
.svc-tag img { position: absolute; left: 16px; top: 14px; width: 42px; height: auto; }
.svc-tag__label { font-size: 15px; color: var(--muted); line-height: 1.3; }
.svc-tag__line { font-size: 18px; font-weight: 700; line-height: 1.35; padding-bottom: 6px; border-bottom: 1px solid #C7D3DC; }
.svc-tag__note { margin-top: 6px; font-size: 16px; color: var(--muted); line-height: 1.45; }
@media (min-width: 900px) {
  .band { padding: 104px 0 112px; }
  .band__head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; margin-bottom: 56px; }
  .pairs { grid-template-columns: 1fr 1fr; gap: 64px 48px; }
}

/* Recent work */
.work { padding: 80px 0 88px; }
.work h2 { margin-bottom: 32px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 44vw; gap: 8px; }
.g { display: block; overflow: hidden; border-radius: 4px; background: var(--block); }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.g:hover img { transform: scale(1.03); }
.g--big { grid-column: span 2; grid-row: span 2; }
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(180px, 21vw, 290px); gap: 10px; }
}
@media (min-width: 1000px) { .work { padding: 104px 0 112px; } }

/* Reviews */
.reviews { background: var(--block); padding: 80px 0 88px; }
.reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 40px; }
.score { display: flex; align-items: center; gap: 16px; }
.score__num { font: 700 clamp(64px, 7vw, 96px)/.9 var(--head); color: var(--blue); }
.score__txt { display: grid; gap: 4px; font-weight: 600; font-size: 17px; }
.feature { padding: 0 0 36px; border-bottom: 1px solid #C9CCC8; }
.feature p { font-size: clamp(21px, 2.1vw, 27px); line-height: 1.45; font-weight: 600; max-width: 60ch; }
.feature footer, .quotes footer { margin-top: 12px; font-size: 15px; color: var(--muted); }
.quotes { margin-top: 36px; columns: 1; column-gap: 56px; }
.quotes blockquote { break-inside: avoid; padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid #C9CCC8; }
.quotes blockquote:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .reviews { padding: 104px 0 112px; }
  .quotes { columns: 2; }
}

/* About and service area */
.about { padding: 80px 0 88px; }
.about__grid { display: grid; gap: 48px; }
.about__text p { margin-top: 16px; max-width: 52ch; }
.area__h { margin-bottom: 20px; }
.area__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.area__list li { font: 700 clamp(22px, 2.3vw, 30px)/1.2 var(--head); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.area__list li:first-child { color: var(--blue-d); }
@media (min-width: 1000px) {
  .about { padding: 104px 0 112px; }
  .about__grid { grid-template-columns: 1fr 1fr; gap: 88px; align-items: start; }
}

/* Contact */
.contact { padding: 80px 0 88px; border-top: 1px solid var(--rule); }
.contact__grid { display: grid; gap: 40px; }
.contact__info > p { margin-top: 14px; max-width: 42ch; }
.contact__phone { display: inline-block; margin-top: 22px; font: 700 clamp(34px, 3.4vw, 46px)/1.1 var(--head); color: var(--ink); text-decoration: none; }
.contact__phone:hover { color: var(--blue-d); }
.contact__mail { display: block; margin-top: 6px; font-weight: 600; word-break: break-word; }
.hours { margin-top: 28px; border-collapse: collapse; width: 100%; max-width: 380px; }
.hours caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.hours th, .hours td { text-align: left; font-weight: 400; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.contact__addr { margin-top: 20px; font-size: 16px; color: var(--muted); }

.quote { background: var(--block); border-radius: 6px; padding: 24px 20px 28px; display: grid; gap: 18px; align-self: start; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 17px; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 400 18px/1.4 var(--body); color: var(--ink);
  background: var(--white); border: 1.5px solid #8E959B; border-radius: 4px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue-d); }
.quote__send { width: 100%; }
@media (min-width: 900px) {
  .contact { padding: 104px 0 112px; }
  .contact__grid { grid-template-columns: 1fr 1.05fr; gap: 80px; }
  .quote { padding: 36px 36px 40px; }
}

/* Footer */
.foot { background: var(--black); color: #C9CED2; padding: 48px 0 40px; }
.foot__in { display: grid; gap: 20px; }
.foot__logo { width: 200px; height: auto; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot__links a { color: var(--white); text-decoration: none; font-weight: 600; }
.foot__links a:hover { text-decoration: underline; color: var(--white); }
.foot__small { font-size: 15px; }
@media (min-width: 900px) {
  .foot__in { grid-template-columns: auto 1fr; align-items: center; gap: 16px 56px; }
  .foot__links { justify-content: flex-end; }
  .foot__small { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid #2A2D30; }
}

/* Sticky bottom bar on phones */
.sticky-book { display: none; }
@media (max-width: 719px) {
  .sticky-book {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--black);
    transform: translateY(110%); transition: transform .3s ease;
  }
  .sticky-book.is-visible { transform: none; }
  .sticky-book .btn { flex: 1; min-height: 50px; }
  .foot { padding-bottom: 104px; }
}

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .97); color: var(--white); }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 78vh; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lightbox__cap { position: absolute; left: 16px; right: 16px; bottom: 20px; text-align: center; font-size: 17px; }
.lightbox__btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 0; border-radius: 6px; color: var(--white); cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -26px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -26px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .g:hover img { transform: none; }
}
