/* ===== Pacific Air Duct: interactive layer (pv-life) ===== */

/* --- Nothing may push the page sideways (keeps the fixed header full width on phones) --- */
@supports (overflow: clip) { html, body { overflow-x: clip !important; } }
body { max-width: 100%; }
.pv .nav { max-width: none !important; }

/* --- No blue tap flash anywhere; focus rings only for keyboard users --- */
html, body, *, *::before, *::after { -webkit-tap-highlight-color: rgba(0,0,0,0) !important; -webkit-tap-highlight-color: transparent !important; }
:focus:not(:focus-visible) { outline: none !important; }

/* --- Text selection: app-like, but phone, email and address stay copyable --- */
body.pv { -webkit-user-select: none; user-select: none; }
body.pv a[href^="tel:"], body.pv a[href^="mailto:"], body.pv address, body.pv .pv-sel, body.pv .pv-sel *,
body.pv input, body.pv textarea, body.pv select, body.pv [contenteditable] { -webkit-user-select: text; user-select: text; }
body.pv img { -webkit-user-drag: none; }

/* --- Call now pulse (mobile dock) --- */
.pv-dock__call { position: relative; isolation: isolate; }
.pv-dock__call::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2.5px solid #0074b0; background: rgba(0,116,176,.10); opacity: 0; pointer-events: none; }
.pv-dock__call::after { animation: pvCallRing 9s cubic-bezier(.2,.6,.3,1) 2s infinite; }
@keyframes pvCallRing { 0% { transform: scale(1); opacity: .95; } 14% { transform: scale(1.1, 1.34); opacity: 0; } 100% { transform: scale(1.1, 1.34); opacity: 0; } }

/* --- Desktop header phone: the icon gives a short "ring" every 9s --- */
@media (min-width: 900px) {
  .pv .nav__phone::before { transform-origin: 50% 60%; }
  .pv .nav__phone::before { animation: pvPhoneRing 9s ease-in-out 2s infinite; }
}
@keyframes pvPhoneRing { 0%, 6.1%, 100% { transform: rotate(0); } 0.83% { transform: rotate(-16deg); } 1.67% { transform: rotate(14deg); } 2.5% { transform: rotate(-12deg); } 3.33% { transform: rotate(10deg); } 4.17% { transform: rotate(-6deg); } 5% { transform: rotate(3deg); } }

/* --- Toast (phone copied on desktop) --- */
.pv-toast { position: fixed; left: 50%; bottom: 28px; z-index: 10050; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 12px; padding: 13px 20px 13px 14px; border-radius: 14px; background: #102a40; color: #fff; font: 600 15px/1.3 'Archivo', system-ui, sans-serif; box-shadow: 0 16px 40px rgba(16,42,64,.35); transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.3,1); }
.pv-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pv-toast i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #2bb673; display: flex; align-items: center; justify-content: center; }
.pv-toast i svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pv-toast small { display: block; font-weight: 400; font-size: 13px; color: rgba(255,255,255,.7); margin-top: 1px; }

/* --- Helmet tilt (2.5D) --- */
.pv-tilt { position: relative; display: inline-block; line-height: 0; transform-style: preserve-3d; will-change: transform; }
.pv-tilt > img { display: block; margin: 0 !important; }
.pv-tilt__sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 30%), rgba(255,255,255,.75) 0%, rgba(255,255,255,.18) 22%, rgba(255,255,255,0) 46%);
  -webkit-mask: var(--pv-mask) center / contain no-repeat; mask: var(--pv-mask) center / contain no-repeat; mix-blend-mode: soft-light; }
.pv-tilt.is-live .pv-tilt__sheen { opacity: 1; }
.pv-tilt.is-click { cursor: pointer; }
.pv-tilt.is-spin > img { animation: pvSpin .9s cubic-bezier(.3,.1,.2,1); }
@keyframes pvSpin { to { transform: rotateY(360deg); } }
.pv-tilt.pv-float { animation: pvFloat 5.5s ease-in-out infinite; }
@keyframes pvFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-1.2deg); } }

.pv-h3d { position: absolute; left: 50%; top: 50%; width: 200%; height: 200%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.pv-h3d canvas { filter: drop-shadow(0 16px 22px rgba(0,0,0,.42)); }
.pv-tilt.has-3d .pv-h3d { opacity: 1; }
.pv-tilt.has-3d > img { opacity: 0; transition: opacity .2s ease; }
.pv-tilt.has-3d .pv-tilt__sheen { display: none; }
.pv-tilt.has-3d { animation: none !important; transform: none !important; }

/* Section helmets scroll to top */
/* Helmets: real soft shadow, gentle float, a small grow on hover, no tap flash */
.pv-helmet, .pv-final__helmet, .pv-rv-helmet, .pv-tilt, .pv-top, .pv .nav__logo { -webkit-tap-highlight-color: transparent; }
.pv-helmet:focus, .pv-final__helmet:focus, .pv-tilt:focus, .pv-tilt img:focus { outline: none; }
.pv-helmet.pv-up, .pv-final__helmet.pv-up, .pv-rv-helmet.pv-up { cursor: pointer; pointer-events: auto; --hs: rgba(16,42,64,.32); --hs2: rgba(16,42,64,.16);
  animation: pvHelmetFloat 4.8s ease-in-out infinite; transition: scale .35s cubic-bezier(.2,.8,.3,1.2); will-change: translate, filter; }
.pv-final__helmet.pv-up { --hs: rgba(0,0,0,.5); --hs2: rgba(0,0,0,.28); }
@keyframes pvHelmetFloat {
  0%, 100% { translate: 0 0; filter: drop-shadow(0 12px 10px var(--hs)) drop-shadow(0 26px 26px var(--hs2)); }
  50% { translate: 0 -9px; filter: drop-shadow(0 20px 16px var(--hs2)) drop-shadow(0 36px 32px var(--hs2)); }
}
@media (hover: hover) {
  .pv-helmet.pv-up:hover, .pv-final__helmet.pv-up:hover, .pv-rv-helmet.pv-up:hover { scale: 1.07; }
  .pv-tilt.is-click:hover { scale: 1.04; }
  .pv .nav__logo:hover::before { scale: 1.1; }
  .pv-top:hover img { scale: 1.08; }
}
.pv-tilt { transition: scale .35s cubic-bezier(.2,.8,.3,1.2); }
.pv .nav__logo::before { transition: scale .3s cubic-bezier(.2,.8,.3,1.2); filter: drop-shadow(0 3px 3px rgba(16,42,64,.25)); animation: pvLogoFloat 4.8s ease-in-out infinite; }
@keyframes pvLogoFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
/* Second commercial project card */
.pv-project--second { margin-top: 24px; }
.pv-project__photos--2 { grid-template-columns: 1fr 1fr !important; }
.pv-project__photos--2 img:first-child { grid-row: 1 / 3; }
.pv-project__photos--2 img:nth-child(2) { grid-row: 1 / 3; }
@media (min-width: 901px) { .pv-project--second { grid-template-columns: .85fr 1.15fr; } .pv-project--second .pv-project__photos { order: 2; } }

/* Reviews heading helmet */
.pv .pv-reviews .section-head { position: relative; }
.pv-rv-helmet { position: absolute; left: 50%; right: auto; top: -40px; bottom: auto; width: clamp(110px, 9vw, 140px); height: auto; rotate: 8deg; z-index: 2; user-select: none; -webkit-user-drag: none; }
@media (max-width: 899px) { .pv-rv-helmet { width: 128px; left: auto; right: 4px; bottom: auto; top: -18px; } }

/* Hero helmet: a soft shadow all around so it lifts off the background */
.hero .pv-tilt, .sv-hero .pv-tilt { filter: drop-shadow(0 0 22px rgba(0,0,0,.42)) drop-shadow(0 0 6px rgba(0,0,0,.25)); }

/* --- Back to top: helmet + reading-progress ring --- */
.pv-top { position: fixed; right: 26px; bottom: 98px; z-index: 9980; width: 54px; height: 54px; border: 0; padding: 0; border-radius: 50%; background: #fff; box-shadow: 0 10px 26px rgba(16,42,64,.22); cursor: pointer; opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none; transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.3,1); }
.pv-top.on { opacity: 1; transform: none; pointer-events: auto; }
.pv-top:hover { transform: translateY(-3px); }
.pv-top:hover img { transform: rotate(-10deg) translateY(-1px); }
.pv-top { -webkit-tap-highlight-color: transparent; }
.pv-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pv-top circle { fill: none; stroke-width: 3; }
.pv-top .pv-top__track { stroke: rgba(16,42,64,.1); }
.pv-top .pv-top__bar { stroke: #0074b0; stroke-linecap: round; transition: stroke-dashoffset .12s linear; }
.pv-top img { position: absolute; left: 50%; top: 50%; width: 34px; height: auto; margin: -15px 0 0 -17px; transition: transform .25s ease; }
.pv-top:focus-visible { outline: 2px solid #0074b0; outline-offset: 3px; }
@media (max-width: 820px) {
  .pv-top { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 46px; height: 46px; }
  .pv-top img { width: 28px; margin: -12px 0 0 -14px; }
}
body.pv-modal-open .pv-top, #pch.open ~ .pv-top { opacity: 0 !important; pointer-events: none !important; }

/* --- Hero airflow particles --- */
.pv-air { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* --- Before / after slider --- */
.pv-ba-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin: 0 0 clamp(36px, 5vw, 64px); }
.pv-ba-copy h3 { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; text-transform: uppercase; color: #102a40; margin: 0 0 14px; }
.pv-ba-copy p { color: #4a5a68; font-size: 16px; line-height: 1.6; margin: 0 0 18px; max-width: 44ch; }
.pv-ba-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #0074b0; }
.pv-ba-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-ba { --p: 50%; position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #102a40; touch-action: pan-y; cursor: ew-resize; box-shadow: 0 24px 50px rgba(16,42,64,.18); }
.pv-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pv-ba__after { clip-path: inset(0 0 0 var(--p)); }
.pv-ba__line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.35); pointer-events: none; }
.pv-ba__knob { position: absolute; top: 50%; left: var(--p); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; pointer-events: none; transition: transform .2s ease; }
.pv-ba.is-drag .pv-ba__knob { transform: scale(1.08); }
.pv-ba__knob svg { width: 26px; height: 26px; fill: none; stroke: #0074b0; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pv-ba__tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(16,42,64,.78); color: #fff; font: 700 12px/1 'Archivo', sans-serif; letter-spacing: .04em; pointer-events: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pv-ba__tag--b { left: 14px; }
.pv-ba__tag--a { right: 14px; background: rgba(0,116,176,.88); }
.pv-ba:focus-visible { outline: 3px solid #0074b0; outline-offset: 3px; }
@media (max-width: 820px) { .pv-ba-wrap { grid-template-columns: 1fr; } .pv-ba-copy { order: -1; } }

/* --- Camera inspection reveal (home) --- */
.pv-cam { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(48px, 6vw, 88px); padding: clamp(24px, 3.5vw, 48px); border-radius: 24px; background: #102a40; color: #fff; }
.pv-cam__copy h3 { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: clamp(32px, 3.4vw, 48px); line-height: 1; text-transform: uppercase; margin: 0 0 14px; color: #fff; }
.pv-cam__copy p { color: rgba(255,255,255,.75); font-size: 16px; line-height: 1.6; margin: 0 0 22px; max-width: 42ch; }
.pv-cam__btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border: 0; border-radius: 12px; background: #0074b0; color: #fff; font: 700 15px 'Archivo', sans-serif; cursor: pointer; text-decoration: none; }
.pv-cam__btn:hover { background: #0085c8; }
.pv-cam__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-cam__view { --x: 50%; --y: 50%; --r: 92px; position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #000; cursor: crosshair; touch-action: pan-y; }
.pv-cam__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pv-cam__dark { filter: brightness(.16) saturate(.4); }
.pv-cam__lit { clip-path: circle(var(--r) at var(--x) var(--y)); filter: contrast(1.08) saturate(1.05); }
.pv-cam__ring { position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1); border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), inset 0 0 30px rgba(0,0,0,.35); pointer-events: none; }
.pv-cam__ring::before, .pv-cam__ring::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255,255,255,.6); }
.pv-cam__ring::before { width: 18px; height: 1.5px; margin: -.75px 0 0 -9px; }
.pv-cam__ring::after { width: 1.5px; height: 18px; margin: -9px 0 0 -.75px; }
.pv-cam__hud { position: absolute; inset: 14px; pointer-events: none; font: 600 12px/1 ui-monospace, Menlo, monospace; color: rgba(255,255,255,.85); letter-spacing: .06em; }
.pv-cam__hud span { position: absolute; }
.pv-cam__rec { left: 0; top: 0; display: flex; align-items: center; gap: 7px; }
.pv-cam__rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff4b4b; animation: pvRec 1.6s steps(2, start) infinite; }
.pv-cam__lbl { right: 0; top: 0; }
.pv-cam__tip { left: 0; bottom: 0; color: rgba(255,255,255,.65); }
.pv-cam__hud i { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.55); }
.pv-cam__hud i:nth-of-type(1) { left: 0; top: 22px; border-right: 0; border-bottom: 0; }
.pv-cam__hud i:nth-of-type(2) { right: 0; top: 22px; border-left: 0; border-bottom: 0; }
.pv-cam__hud i:nth-of-type(3) { left: 0; bottom: 22px; border-right: 0; border-top: 0; }
.pv-cam__hud i:nth-of-type(4) { right: 0; bottom: 22px; border-left: 0; border-top: 0; }
@keyframes pvRec { to { visibility: hidden; } }
@media (max-width: 820px) { .pv-cam { grid-template-columns: 1fr; } .pv-cam__view { --r: 70px; } }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .pv-helmet, .pv-final__helmet, .pv .nav__logo::before { animation: none !important; }
  .pv-dock__call::after, .pv .nav__phone::before, .pv-tilt, .pv-tilt > img, .pv-cam__rec::before { animation: none !important; }
  .pv-air { display: none !important; }
}

/* commercial quote link (replaces per-card buttons) */
.pv-clients__more { margin: 26px 0 0; text-align: center; font-size: 16px; color: #4a5b68; }
.pv-clients__more a { color: #0074b0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* service page: link to related guide */
.sv-guide-link { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: #eef5fa; border: 1px solid #d3e4ef; color: #102a40; font-weight: 700; text-decoration: none; line-height: 1.35; }
.sv-guide-link span { font-size: 12px; font-weight: 700; color: #0074b0; text-transform: uppercase; letter-spacing: .06em; }
.sv-guide-link:hover { border-color: #0074b0; }
