/* Fix & Flow Plumbing Co. - shared design system. Dark aubergine under everything; no pale sections, no boxes, no outlines. */

/* TOKENS: use these custom properties, never raw hex. --line is the ruled-line and touch height. */
:root {
  --ground: #211421;
  --ink: #F7EEF3;
  --ink-dim: #A99CA6;
  --mint: #C9E8D4;
  --mulberry: #613B55;
  --plum: #42283C;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --text: 'Jost', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --edge: clamp(1.1rem, 4vw, 3.5rem);
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --sect: clamp(2.5rem, 9vh, 6.5rem);
  --line: 2.75rem;
  --step: .24s;
  --tab-w: 4.75rem;
  --menu-h: 17rem;
  --blob-a: 58% 42% 47% 53% / 46% 57% 43% 54%;
  --blob-b: 2.5rem 4rem 3rem 5rem / 3rem 2.25rem 4rem 2.5rem;
  --photo-r: 9% 12% 8% 14% / 12% 9% 14% 8%;
}
@media (min-width: 48rem) {
  :root { --tab-w: 9rem; --menu-h: 15rem; }
}

/* BASE: reset, body copy in Jost at reading size */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); }
main { display: block; overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
::selection { background: var(--mint); color: var(--ground); }
:focus-visible { outline: .1875rem solid var(--mint); outline-offset: .1875rem; }
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

/* HEADINGS: Barlow Condensed 800, mixed case, flush left. h1/.h-trade reading size; h2/.h-tall catalogue; .h-mid section; h3/.h-name service name */
h1, h2, h3, .h-trade, .h-tall, .h-mid, .h-name { margin: 0; font-family: var(--display); font-weight: 800; text-align: left; }
h1, .h-trade { font-size: 1.3125rem; line-height: 1.1; letter-spacing: 0; }
h2, .h-tall { font-size: clamp(2.75rem, 1.4rem + 6vw, 7rem); line-height: .92; letter-spacing: -.02em; }
.h-mid { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.75rem); line-height: .96; letter-spacing: -.015em; }
h3, .h-name { font-size: clamp(1.625rem, 1.4rem + .9vw, 2.125rem); line-height: 1; letter-spacing: -.01em; }
@media (min-width: 48rem) { h1, .h-trade { font-size: 1.4375rem; } }

/* STACK: one or two words per line - wrap each line in a span inside .stack */
.stack > span { display: block; }

/* LAYOUT: .wrap side padding and max width; .section vertical rhythm; .split text beside picture (.split--flip swaps sides) */
.wrap { max-width: 96rem; margin-inline: auto; padding-inline: var(--edge); }
.section { padding-block: var(--sect); }
.split { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* LINKS: mint text actions, never boxed. .link inline action with touch height; .call the plain mint phone link */
a { color: var(--mint); text-decoration-thickness: .09em; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .2em; }
.link, .call { display: inline-flex; align-items: center; min-height: var(--line); }
.call { font-size: 1.25rem; }

/* TEXT BUTTON: .btn-text for Previous/Next, toggles and stops; .is-on or aria-pressed/aria-current marks the active one */
.btn-text {
  display: inline-flex; align-items: center; min-height: var(--line); padding: 0;
  background: none; border: 0; border-radius: 0; cursor: pointer;
  color: var(--mint); font: inherit; text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .22em;
}
.btn-text:hover { text-decoration-thickness: .2em; }
.btn-text.is-on, .btn-text[aria-pressed="true"], .btn-text[aria-current="true"] { text-decoration-thickness: .22em; }
.btn-text:disabled { color: var(--ink-dim); text-decoration: none; cursor: default; }

/* SKIP LINK: .skip */
.skip { position: absolute; left: var(--edge); top: 0; z-index: 90; padding: .6rem 1rem; background: var(--mint); color: var(--ground); transform: translateY(-130%); }
.skip:focus { transform: none; outline-color: var(--ground); outline-offset: -.3rem; }

/* MASTHEAD: .masthead holds .brand (.brand__mark + .brand__name) at top left; it scrolls away with the page */
.masthead { max-width: 96rem; margin-inline: auto; padding: 1.1rem calc(var(--edge) + var(--tab-w) + 1rem) .9rem var(--edge); }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: var(--line); color: var(--ink); text-decoration: none; }
.brand__mark { flex: none; width: 2.25rem; height: 2.25rem; }
.brand__name { font: 800 1.25rem/1 var(--display); }
@media (min-width: 48rem) { .brand__name { font-size: 1.5rem; } }

/* BOOKMARK MENU: .bookmark hangs from the top-right edge; .is-open extends it in three steps (.bookmark__btn, .bookmark__list) */
.bookmark {
  position: absolute; top: 0; right: var(--edge); z-index: 60; width: var(--tab-w);
  padding: .9rem 0 1.5rem; background: var(--mint); color: var(--ground);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - .9rem), 0 100%);
}
html:not(.js) .bookmark { width: auto; }
.js .bookmark { position: fixed; }
.bookmark :focus-visible { outline-color: var(--ground); outline-offset: -.3rem; }
.bookmark__btn {
  display: block; width: 100%; min-height: var(--line); padding: 0 .75rem;
  background: none; border: 0; cursor: pointer; color: inherit; text-align: left;
  font: 600 1.0625rem/1 var(--text);
}
.bookmark__list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.js .bookmark__list { max-height: 0; visibility: hidden; transition: max-height var(--step) steps(3, end), visibility 0s linear var(--step); }
.js .bookmark.is-open .bookmark__list { max-height: var(--menu-h); visibility: visible; transition: max-height var(--step) steps(3, end), visibility 0s; }
.bookmark__list a {
  display: flex; align-items: center; min-height: 3.25rem; padding: 0 .75rem;
  color: inherit; font-size: 1.25rem; text-decoration: none; white-space: nowrap;
}
.bookmark__list a:hover, .bookmark__list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: .14em; }
@media (max-width: 47.99rem) {
  .bookmark.is-open { width: min(19rem, 86vw); }
}
@media (min-width: 48rem) {
  .bookmark__btn { padding-inline: .9rem; }
  .bookmark__list a { min-height: var(--line); padding-inline: .9rem; font-size: 1.0625rem; }
}

/* PAGE OPENING: .opening = .opening__text (h1, .opening__say, .opening__lead, .call) then a .farend figure fitted whole; .opening--side puts the figure beside the text on desk; set --opening-used to the height the text takes */
.opening { display: grid; gap: clamp(1rem, 2.5vh, 1.75rem); padding-bottom: var(--sect); }
.opening__text { display: grid; gap: .45rem; justify-items: start; max-width: 36rem; }
.opening__say { margin: .35rem 0 0; font-size: 1.375rem; line-height: 1.25; }
.opening__lead { margin: 0; }
.opening .farend__blob { width: fit-content; max-width: 100%; }
.opening .farend__blob img { width: auto; max-width: 100%; max-height: max(15rem, calc(100svh - var(--opening-used, 21rem))); }
@media (min-width: 56rem) {
  .opening--side { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; --opening-used: 9rem; }
}

/* THE FAR END (recurring device): figure.farend > .farend__blob > img, then .pair; --down / --right / --left choose the side where the pipe end runs past the mulberry blob; add data-farend to step the pair */
.farend { margin: 0; display: grid; gap: var(--gap); }
.farend__blob { position: relative; isolation: isolate; }
.farend__blob::before { content: ""; position: absolute; z-index: -1; inset: -5% -4% 16% -4%; background: var(--mulberry); border-radius: var(--blob-a); }
.farend--right .farend__blob::before { inset: -6% 18% -6% -4%; }
.farend--left .farend__blob::before { inset: -6% -4% -6% 18%; }
.farend__blob img { width: 100%; border-radius: var(--photo-r); }

/* NOTICE / CHECK PAIR: .pair > .pair__item > .pair__label + text; the mint cap sits on "You notice" and snaps to "A plumber checks" when an ancestor gets .is-far */
.pair { display: grid; gap: 1rem var(--gap); margin: 0; padding: 0; list-style: none; }
.pair__item { margin: 0; }
.pair__label { display: flex; align-items: center; gap: .55rem; margin: 0 0 .2rem; font: 800 1.375rem/1.1 var(--display); color: var(--ink); }
.pair__label::before { content: ""; flex: none; width: .8rem; height: .8rem; box-shadow: inset 0 0 0 .14rem var(--ink-dim); }
.pair__item:first-child .pair__label::before,
.is-far .pair__item:last-child .pair__label::before { background: var(--mint); box-shadow: none; }
.is-far .pair__item:first-child .pair__label::before { background: none; box-shadow: inset 0 0 0 .14rem var(--ink-dim); }
@media (min-width: 36rem) { .pair { grid-template-columns: 1fr 1fr; } }

/* PAINT: .paint lays a flat mulberry blob behind a short heading or passage of type */
.paint { position: relative; isolation: isolate; padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3.5vw, 2.75rem); }
.paint::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--mulberry); border-radius: var(--blob-b); }

/* SERVICE ENTRY: unboxed .svc with .svc__name (h3, stacked, linked) and .svc__line */
.svc { display: grid; gap: .4rem; justify-items: start; }
.svc__name a { color: var(--ink); text-decoration: none; }
.svc__name a:hover, .svc__name a:focus-visible { color: var(--mint); }
.svc__line { margin: 0; max-width: 26rem; }

/* FACTS: dl.facts > .facts__row > dt + dd, for specs and ledgers; no rules between rows */
.facts { display: grid; gap: .9rem; margin: 0; }
.facts__row { display: grid; gap: .1rem 1.5rem; }
.facts dt { font: 800 1.25rem/1.15 var(--display); color: var(--mint); }
.facts dd { margin: 0; }
@media (min-width: 40rem) { .facts__row { grid-template-columns: minmax(9rem, 14rem) 1fr; } }

/* FIGURE AND CAPTION: .fig with .fig__cap for a plain photograph outside the device */
.fig { margin: 0; }
.fig img { width: 100%; border-radius: var(--photo-r); }
.fig__cap { margin-top: .6rem; font-size: .95rem; color: var(--ink-dim); }

/* RULE: hr.rule is a short stroke of mulberry paint, not a hairline */
.rule { width: 5.5rem; height: .3rem; margin: var(--gap) 0; border: 0; background: var(--mulberry); border-radius: .3rem .12rem .25rem .1rem; }

/* PROSE: .prose for long reading (policies, legal); headings inside drop to section size */
.prose { max-width: 44rem; }
.prose h2 { margin: 1.4em 0 .35em; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.75rem); line-height: .96; }
.prose h3 { margin: 1.2em 0 .3em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }

/* HAND-OFF: .handoff is the last block before the footer - a .paint with a heading and .handoff__links */
.handoff { display: grid; gap: 1rem; justify-items: start; max-width: 60rem; }
.handoff__links { display: flex; flex-wrap: wrap; gap: 0 2rem; margin: 0; padding: 0; list-style: none; }

/* INDEX CARD: .card > .card__tab + .card__body with ul.card__lines on ruled lines; .card--tilt turns it two degrees; .card__name, .card__dim */
.card { max-width: 64rem; margin-inline: auto; }
.card--tilt { transform: rotate(-2deg); }
.card__tab {
  display: inline-block; margin: 0 0 0 clamp(1rem, 4vw, 2.5rem); padding: .55rem 1.4rem .4rem;
  background: var(--plum); border-radius: .5rem .5rem 0 0;
  font: 800 1.375rem/1.1 var(--display); letter-spacing: 0; color: var(--ink);
}
.card__body {
  padding: calc(var(--line) * .5) clamp(1rem, 3.5vw, 2.25rem) var(--line);
  background-color: var(--plum); border-radius: .375rem;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - .0625rem), rgba(247, 238, 243, .2) calc(var(--line) - .0625rem), rgba(247, 238, 243, .2) var(--line));
  background-position: 0 calc(var(--line) * .5);
  line-height: var(--line);
}
.card__lines { margin: 0; padding: 0; list-style: none; overflow-wrap: anywhere; }
.card__lines a { display: inline-block; }
.card__name { font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.card__dim { color: var(--ink-dim); font-size: .95rem; }

/* FOOTER: .foot holds the tilted Contact card - name, city, phone, Cookie settings and the fold, one to a ruled line,
   and the card stops half a line under its last filled line (no empty ruled line).
   details.foot__more is the card's last line: it keeps the page index and postal details folded away and,
   opened, continues down the card's ruled lines (.foot__more-sum, .foot__more-body, .foot__links, .foot__post) */
.foot { padding: var(--sect) var(--edge) calc(var(--sect) + 3.25rem); overflow-x: clip; }
.foot .card { max-width: 36rem; }
.foot .card__body { padding-bottom: calc(var(--line) * .5); }
.foot__more { margin: 0; }
.foot__more-sum {
  display: flex; align-items: center; width: fit-content; max-width: 100%; min-height: var(--line); cursor: pointer; list-style: none;
  color: var(--mint); text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .22em;
}
.foot__more-sum::-webkit-details-marker { display: none; }
.foot__more-sum:hover, .foot__more[open] .foot__more-sum { text-decoration-thickness: .2em; }
.foot__more-body { padding: 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin: 0; padding: 0; list-style: none; }
.foot__links a { display: inline-flex; align-items: center; min-height: var(--line); }
.foot__post { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 47.99rem) { .has-call .foot { padding-bottom: calc(var(--sect) + 6.5rem); } }
@media (min-width: 48rem) { .foot { padding-bottom: calc(var(--sect) + 1rem); } }

/* CONSENT STRIP: #consent is one thin full-width strip on the bottom edge with two plain-text choices of equal weight */
#consent {
  position: fixed; inset: auto 0 0 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: .25rem 1rem;
  padding: .25rem var(--edge); background: var(--mulberry); color: var(--ink);
  font-size: .95rem; line-height: 1.3;
}
#consent[hidden] { display: none; }
.consent__say { margin: 0; }
.consent__long { display: none; }
.consent__short { white-space: nowrap; }
.consent__choices { display: flex; flex: none; gap: .25rem; }
#consent button {
  min-width: var(--line); min-height: var(--line); padding: 0 .6rem;
  background: none; border: 0; cursor: pointer; color: var(--mint);
  font: inherit; text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .22em;
}
#consent button:hover { text-decoration-thickness: .2em; }
@media (max-width: 47.99rem) { .has-call #consent { bottom: var(--line); } }
@media (min-width: 40rem) {
  .consent__long { display: inline; }
  .consent__short { display: none; }
  .consent__choices { gap: 1rem; }
}

/* OFFER TICKET: #promo drops in three steps from the top edge just left of the bookmark; shown only when site.promo exists */
#promo {
  position: fixed; top: 0; right: calc(var(--edge) + var(--tab-w) + .75rem); z-index: 50;
  display: flex; align-items: flex-start; gap: .25rem;
  width: min(15rem, calc(100vw - var(--edge) * 2 - var(--tab-w) - .75rem));
  padding: 1.5rem .25rem .6rem .9rem; border-radius: 0 0 .25rem .25rem;
  background: radial-gradient(circle at 50% .75rem, var(--ground) 0, var(--ground) .3rem, transparent .34rem) var(--mint);
  color: var(--ground); font-size: .95rem; line-height: 1.3;
  transform: translateY(-105%); opacity: 0;
  transition: transform var(--step) steps(3, end), opacity 0s linear var(--step);
}
#promo[hidden] { display: none; }
#promo.is-in { transform: none; opacity: 1; transition: transform var(--step) steps(3, end), opacity 0s; }
.promo__text { flex: 1; margin: 0; padding-top: .5rem; }
#promo a { color: inherit; }
#promo button { flex: none; width: var(--line); height: var(--line); background: none; border: 0; cursor: pointer; color: inherit; font: 400 1.5rem/1 var(--text); }
#promo :focus-visible { outline-color: var(--ground); outline-offset: -.3rem; }
@media (max-width: 47.99rem) { .has-promo .masthead { padding-top: 7rem; } }

/* CALL DOCK: on phones .calltab is a full-width mint band docked on the bottom edge, one line tall;
   the consent strip sits directly on top of it and the footer reserves the room (see .has-call) */
.calltab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; align-items: center; min-height: var(--line); padding: 0 var(--edge);
  background: var(--mint); color: var(--ground);
  font-weight: 600; text-decoration: none;
}
.calltab:focus-visible { outline-color: var(--ground); outline-offset: -.3rem; }
@media (min-width: 48rem) { .calltab { display: none; } }

/* REVEAL: .reveal snaps in two steps when scrolled to (.is-in); for type below the first window only, never on photographs */
.js .reveal { opacity: 0; transform: translateY(.75rem); transition: opacity .16s steps(2, end), transform .16s steps(2, end); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* VISUALLY HIDDEN: .visually-hidden keeps text for screen readers only */
.visually-hidden { position: absolute; width: .0625rem; height: .0625rem; margin: -.0625rem; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* REDUCED MOTION: every state changes instantly, both pair caps are lit, nothing is held back */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .pair .pair__item .pair__label::before { background: var(--mint); box-shadow: none; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
