/* Penman Plumbing & Drainage: base system (tokens, type, grid, buttons, header, mega menu, phone sheet, loader, footer, forms) */

:root {
  --ink: #0d0e10;
  --ink-2: #16181b;
  --steel: #2b2f34;
  --silver: #e6e9eb;
  --silver-2: #b9c0c6;
  --mist: #f3f5f6;
  --paper: #ffffff;
  --text: #15171a;
  --muted: #59616a;
  --line: rgba(13, 14, 16, .12);
  --line-dark: rgba(230, 233, 235, .14);
  --drop: #1394cc;
  --blue: #1274b5;
  --navy: #0b61a4;
  --blue-text: #0a5a99;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --wide: 114%;
  --pad: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --gap: clamp(16px, 2vw, 32px);
  --section: clamp(88px, 9vw, 144px);

  --util-h: 38px;
  --bar-h: 84px;
  --bar-h-compact: 68px;
  --header-h: calc(var(--util-h) + var(--bar-h));

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --fs-hero: clamp(2.5rem, 1.1rem + 4.1vw, 5rem);
  --fs-h2: clamp(2rem, 1.25rem + 2.4vw, 3.5rem);
  --fs-h3: clamp(1.3rem, 1.05rem + .75vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1rem + .35vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
}

@media (max-width: 1199px) { :root { --util-h: 0px; --bar-h: 72px; --bar-h-compact: 64px; } }
@media (max-width: 759px) { :root { --bar-h: 64px; --bar-h-compact: 64px; --section: 64px; --fs-body: 1.03125rem; } }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.6; font-weight: 400; font-stretch: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; padding-top: var(--header-h); }
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--drop); outline-offset: 3px; }
::selection { background: var(--drop); color: #fff; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--blue); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.h-hero, .h2, .h3, h1, h2, h3 { font-stretch: var(--wide); font-weight: 600; letter-spacing: -.012em; line-height: 1.06; }
h1, .h-hero { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -.018em; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.16; letter-spacing: -.006em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.measure { max-width: 34em; }
p + p { margin-top: 1em; }

/* Links */
.link { color: var(--blue-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .2s var(--ease); }
.link:hover { color: var(--navy); }
.link-arrow { display: inline-flex; align-items: center; gap: .6em; font-weight: 560; font-stretch: 108%; color: var(--blue-text); padding: .35em 0; border-bottom: 1px solid currentColor; line-height: 1.3; }
.link-arrow::after { content: ""; width: 1.05em; height: .7em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M0 6h16M11 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M0 6h16M11 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--light { color: var(--silver); }
.on-dark .link-arrow { color: var(--silver); }

/* Layout */
.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.surface-brushed { background: var(--ink) url(../brand/brushed-tall.jpg) center / cover no-repeat; color: var(--silver); }
.on-dark { color: var(--silver); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; padding: 0 1.5em; border-radius: 2px; font-weight: 580; font-stretch: 106%; font-size: 1rem; line-height: 1.1; letter-spacing: .005em; border: 1px solid transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); white-space: nowrap; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--navy); }
.btn--line { border-color: rgba(230, 233, 235, .55); color: #fff; }
.btn--line:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn--ink { border-color: rgba(13, 14, 16, .35); color: var(--ink); }
.btn--ink:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn .i-phone { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background-color: var(--ink); transform: translateY(0); transition: transform .45s var(--ease-io); will-change: transform; }
.site-header.is-compact { transform: translateY(calc(var(--util-h) * -1)); }
.site-header.is-away { transform: translateY(calc(-100% - 2px)); }
.utility { height: var(--util-h); background: var(--ink-2); color: #c9cfd4; font-size: .875rem; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.utility__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.utility__note { letter-spacing: .005em; }
.utility__links { display: flex; gap: 28px; }
.utility__links a { color: #e2e6e9; font-variant-numeric: tabular-nums; transition: color .2s; }
.utility__links a:hover { color: #fff; }
.mainbar { position: relative; height: var(--bar-h); background: var(--ink) url(../brand/brushed-black.jpg) center / cover no-repeat; transition: height .45s var(--ease-io); box-shadow: 0 1px 0 rgba(255, 255, 255, .05); }
.site-header.is-compact .mainbar { height: var(--bar-h-compact); }
.mainbar__in { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: block; flex: none; }
.brand img { width: 206px; height: auto; transition: width .45s var(--ease-io); }
.site-header.is-compact .brand img { width: 180px; }
.nav { margin-left: auto; height: 100%; }
.nav__list { display: flex; height: 100%; align-items: stretch; gap: 4px; }
.nav__item { display: flex; align-items: center; }
.nav__link { position: relative; display: flex; align-items: center; height: 100%; padding: 0 14px; color: #e9ecee; font-size: .975rem; font-weight: 500; letter-spacing: .005em; transition: color .2s; }
.nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: calc(50% - 1.05em); height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__link:hover, .nav__link[aria-current="page"] { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after, .nav__item--mega.is-open .nav__trigger::after { transform: scaleX(1); }
.nav__trigger { padding-right: 30px; }
.nav__trigger::before { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
.nav__item--mega.is-open .nav__trigger::before { transform: translateY(-30%) rotate(225deg); }
.nav__trigger::after { right: 30px; }
.mainbar__actions { display: flex; align-items: center; gap: 22px; flex: none; }
.mainbar__phone { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 580; font-stretch: 106%; font-variant-numeric: tabular-nums; font-size: 1.0625rem; letter-spacing: .01em; }
.mainbar__phone .i-phone { width: 17px; height: 17px; fill: var(--drop); }
.mainbar__phone:hover span { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.mainbar__quote { min-height: 46px; }
.mainbar__call, .menu-btn { display: none; }

/* Mega panel */
.nav__item--mega { position: static; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink-2) url(../brand/brushed-tall.jpg) center / cover no-repeat; border-top: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .28s var(--ease), transform .38s var(--ease), visibility 0s linear .38s; }
.nav__item--mega:hover .mega, .nav__item--mega:focus-within .mega, .nav__item--mega.is-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .28s var(--ease), transform .38s var(--ease), visibility 0s; }
.js .nav__item--mega:hover:not(.is-open) .mega { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.js .nav__item--mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: 44px 48px; align-items: start; }
.mega__intro { grid-column: 1 / span 3; color: #c9cfd4; padding-top: 6px; }
.mega__title { color: #fff; font-stretch: var(--wide); font-weight: 600; font-size: 1.5rem; line-height: 1.18; letter-spacing: -.01em; margin-bottom: 14px; }
.mega__text { font-size: .9375rem; line-height: 1.55; margin-bottom: 22px; }
.mega__list { grid-column: 4 / span 5; border-top: 1px solid var(--line-dark); }
.mega__link { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 13px 0 14px; border-bottom: 1px solid var(--line-dark); transition: padding .35s var(--ease); }
.mega__name { color: #fff; font-weight: 580; font-stretch: 108%; font-size: 1.125rem; line-height: 1.3; transition: color .2s; }
.mega__line { color: #aab2b9; font-size: .875rem; line-height: 1.45; }
.mega__link:hover, .mega__link:focus-visible, .mega__link.is-active { padding-left: 12px; }
.mega__link:hover .mega__name, .mega__link.is-active .mega__name { color: #5bb8e6; }
.mega__photos { grid-column: 9 / span 4; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--steel); }
.mega__photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .45s var(--ease), transform .9s var(--ease); }
.mega__photos img.is-on { opacity: 1; transform: none; }

/* Phone and tablet header */
@media (max-width: 1199px) {
  .utility { display: none; }
  .nav, .mainbar__phone, .mainbar__quote { display: none; }
  .mainbar__actions { margin-left: auto; gap: 8px; }
  .brand img, .site-header.is-compact .brand img { width: 168px; }
  .mainbar__call, .menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 14px; color: #fff; font-weight: 560; font-size: .9375rem; border-radius: 2px; }
  .mainbar__call { background: var(--blue); }
  .mainbar__call .i-phone { width: 16px; height: 16px; fill: #fff; }
  .menu-btn { border: 1px solid rgba(230, 233, 235, .35); }
  .menu-btn__bars { position: relative; width: 16px; height: 10px; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
  .menu-btn__bars::before { top: 1px; }
  .menu-btn__bars::after { top: 7.5px; }
  .is-menu-open .menu-btn__bars::before { top: 4.25px; transform: rotate(45deg); }
  .is-menu-open .menu-btn__bars::after { top: 4.25px; transform: rotate(-45deg); }
}
@media (max-width: 759px) {
  .brand img, .site-header.is-compact .brand img { width: 150px; }
  .menu-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-btn { padding: 0; width: 44px; }
}
@media (max-width: 359px) { .brand img, .site-header.is-compact .brand img { width: 128px; } .mainbar__call span { display: none; } }

/* Phone sheet */
.sheet { position: fixed; left: 0; right: 0; top: var(--bar-h); bottom: 0; z-index: 95; background: var(--paper); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s linear .4s; }
.sheet.is-open, .no-js .sheet:target, html:not(.js) .sheet:target { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s; }
.sheet__in { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 22px var(--pad) calc(24px + env(safe-area-inset-bottom)); }
.sheet__nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sheet__nav a { display: flex; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); font-stretch: var(--wide); font-weight: 580; font-size: 1.5rem; letter-spacing: -.01em; }
.sheet__nav a[aria-current="page"] { color: var(--blue-text); }
.sheet__foot { display: grid; gap: 10px; }
.sheet__note { color: var(--muted); font-size: .9375rem; margin-bottom: 4px; }
.sheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .btn--line { border-color: rgba(13, 14, 16, .3); color: var(--ink); }
.sheet__close { position: absolute; top: 12px; right: var(--pad); padding: 10px; color: var(--muted); }
.js .sheet__close { display: none; }
@media (min-width: 1200px) { .sheet { display: none; } }
html.is-menu-open, html.is-menu-open body { overflow: hidden; }

/* Loader (shown only when the head script adds .is-loading; no JS = never shown) */
.loader { display: none; }
.is-loading .loader { display: grid; place-items: center; position: fixed; inset: 0; z-index: 400; background: var(--ink) url(../brand/brushed-tall.jpg) center / cover no-repeat; animation: loader-failsafe .01s linear 4.2s forwards; }
.is-loading body { overflow: hidden; }
.loader__logo { --s: .5; position: relative; width: calc(609px * var(--s)); height: calc(542px * var(--s)); }
@media (max-width: 759px) { .loader__logo { --s: .42; } }
@media (max-height: 520px) { .loader__logo { --s: .36; } }
.loader__part, .loader__ripple { position: absolute; display: block; }
.loader__part img { width: 100%; height: 100%; }
.loader__mark { left: 29.228%; top: 0; width: 41.544%; height: 64.207%; }
.loader__drop { left: 42.365%; top: 25.646%; width: 15.271%; height: 23.801%; }
.loader__word { left: 0; top: 74.170%; width: 100%; height: 14.391%; }
.loader__sub { left: 3.941%; top: 95.203%; width: 92.447%; height: 4.797%; }
.loader__ripple { left: 50%; top: 49.4%; width: 22%; height: 7%; margin-left: -11%; border-radius: 50%; border: 1px solid rgba(91, 184, 230, .7); opacity: 0; }

.is-loading .loader__mark { clip-path: inset(100% 0 0 0); animation: ld-fill .95s var(--ease-io) .1s forwards; }
.is-loading .loader__mark img { animation: ld-sheen 1.3s var(--ease) .1s both; }
.is-loading .loader__drop { opacity: 0; transform: translateY(-46%); animation: ld-drop .5s cubic-bezier(.55, 0, .85, .36) .72s forwards; }
.is-loading .loader__ripple { animation: ld-ripple .85s var(--ease-out) 1.2s forwards; }
.is-loading .loader__word { clip-path: inset(0 100% 0 0); animation: ld-wipe .72s var(--ease-io) 1s forwards; }
.is-loading .loader__sub { clip-path: inset(0 100% 0 0); opacity: .2; animation: ld-wipe-sub .62s var(--ease-io) 1.28s forwards; }

@keyframes ld-fill { to { clip-path: inset(0 0 0 0); } }
@keyframes ld-sheen { from { filter: brightness(.55); } to { filter: brightness(1); } }
@keyframes ld-drop { 0% { opacity: 0; transform: translateY(-46%); } 30% { opacity: 1; } 100% { opacity: 1; transform: translateY(0); } }
@keyframes ld-ripple { 0% { opacity: .85; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes ld-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes ld-wipe-sub { to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.loader.is-leaving { animation: none; transform: translateY(-100%); transition: transform .95s cubic-bezier(.76, 0, .24, 1); }
.loader.is-leaving .loader__logo { transform: translateY(-14vh); opacity: 0; transition: transform .8s cubic-bezier(.76, 0, .24, 1), opacity .5s var(--ease) .1s; }

/* Footer */
.site-footer { background: var(--ink) url(../brand/brushed-tall.jpg) center / cover no-repeat; color: #aab2b9; font-size: .9375rem; }
.footer__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; padding-block: 76px 56px; }
.footer__brand { grid-column: 1 / span 4; }
.brand--footer img { width: 220px; }
.footer__line { margin-top: 22px; max-width: 30em; line-height: 1.6; }
.footer__col { grid-column: span 2; }
.footer__col:first-of-type { grid-column: 6 / span 2; }
.footer__col--contact { grid-column: 10 / span 3; }
.footer__head { color: #fff; font-weight: 600; font-stretch: 108%; font-size: 1rem; margin-bottom: 14px; }
.footer__col li + li { margin-top: 8px; }
.footer__col a { color: #d7dce0; transition: color .2s; }
.footer__col a:hover { color: #fff; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.footer__phone { font-size: 1.25rem; font-weight: 600; font-stretch: 108%; color: #fff !important; font-variant-numeric: tabular-nums; }
.footer__muted { color: #8d969e; }
.footer__legal { border-top: 1px solid var(--line-dark); padding-block: 22px 28px; font-size: .8125rem; color: #8d969e; }
@media (max-width: 1023px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:first-of-type { grid-column: span 4; }
  .footer__col--contact { grid-column: span 4; }
}
@media (max-width: 759px) {
  .footer__in { padding-block: 56px 40px; row-gap: 32px; }
  .footer__col, .footer__col:first-of-type { grid-column: span 6; }
  .footer__col--contact { grid-column: 1 / -1; }
  .brand--footer img { width: 180px; }
  .footer__col li + li { margin-top: 0; }
  .footer__col a { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Forms */
.field { display: grid; gap: 8px; }
.field label, .field__label { font-weight: 560; font-size: .9375rem; color: var(--text); }
.input, .select, .textarea, input[type="text"], input[type="tel"], input[type="email"], select, textarea { width: 100%; min-height: 52px; padding: 13px 14px; font: inherit; font-size: 1rem; color: var(--text); background: var(--paper); border: 1px solid rgba(13, 14, 16, .22); border-radius: 2px; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
textarea, .textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
select, .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2315171a' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; padding-right: 42px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 181, .18); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}

/* Utilities */
@media (max-width: 759px) { .m-hide { display: none !important; } }
@media (min-width: 760px) { .d-hide { display: none !important; } }
.site-footer { border-top: 1px solid rgba(255, 255, 255, .06); }

/* no JS: the phone sheet stays out of the way unless targeted */
html:not(.js) .sheet:not(:target) { display: none; }
