/* Extras on top of the base styles (all pages): approved 2026-10-28, first built in prototipo/. */

/* Audience cards: one clear next step per audience (ui-ux-pro-max: path selection) */
.audience__body { display: flex; flex-direction: column; height: 100%; }
.audience { height: 100%; }
.audience__cta { margin-top: auto; padding-top: var(--space-5); }

/* impeccable P2: no orphan word in headings; accent bar never wraps alone on small phones */
h1, h2 { text-wrap: balance; }
@media (max-width: 479px) { .hero h1 .accent-bar { display: none; } }

/* impeccable P1: on phones the 8 service cards become a compact 2-column grid (photo + name) */
@media (max-width: 639px) {
  .services__grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .service-card__media { aspect-ratio: 1 / 1; }
  .service-card__body { padding: var(--space-3) var(--space-3) var(--space-2); gap: 2px; }
  .service-card__body p, .service-card__stripes { display: none; }
  .service-card h3 { font-size: 1rem; line-height: 1.25; }
  .service-card .text-link { padding-top: 0; font-size: .75rem; }
}

/* impeccable P0/P1 on Contact: honest notice before the form, and "what happens next" near Send */
.proto-formwrap { display: grid; gap: var(--space-5); align-content: start; }
.proto-prenotice a { font-weight: 700; color: var(--navy-700); }
.proto-next { display: grid; gap: var(--space-2); margin: var(--space-2) 0 0; padding: var(--space-4) var(--space-5); list-style: none;
  counter-reset: step; background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius-sm); font-size: .9375rem; }
.proto-next li { counter-increment: step; position: relative; padding-left: 32px; line-height: 1.55; }
.proto-next li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; color: var(--red-600); font-weight: 700; }
.proto-next strong { color: var(--ink); }

/* audit B: header shrink without animating height (no layout work on scroll) */
.site-header__inner { transition: none; }

/* Contact card: number shown once, actions as icon buttons (no repeated number) */
.cc-number { display: block; margin-top: var(--space-4); color: var(--white); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.cc-number:hover { text-decoration: underline; text-underline-offset: 6px; }
.cc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin-top: var(--space-5); }
.cc-action {
  display: grid; justify-items: center; gap: 6px; padding: 14px 6px;
  border: 1px solid var(--line-dark); border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--white); font-size: var(--fs-small); font-weight: 700; text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cc-action:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); transform: translateY(-2px); }
.cc-action .cc-icon { width: 22px; height: 22px; color: var(--red-500); }
.cc-list { display: grid; gap: 0; margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.cc-list li { border-top: 1px solid var(--line-dark); }
.cc-list a, .cc-static { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.cc-list a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.cc-list .cc-icon { width: 20px; height: 20px; flex: none; color: var(--mist); }
.cc-static { color: var(--mist); }
@media (prefers-reduced-motion: reduce) { .cc-action:hover { transform: none; } }
/* undo the old .contact-card span label style inside the new card parts */
.contact-card .cc-list span, .contact-card .cc-action span { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 600; color: var(--white); }
.contact-card .cc-action span { font-size: var(--fs-small); font-weight: 700; letter-spacing: .04em; }
.contact-card .cc-static span { color: var(--mist); font-weight: 500; }

/* Compact footer on phones and tablets (same links, less height) */
@media (max-width: 767px) {
  .site-footer { padding-block: var(--space-7) var(--space-5); }
  .site-footer__grid { gap: var(--space-6); }
  .site-footer__brand { display: flex; align-items: center; gap: var(--space-4); }
  .site-footer__brand img { width: 104px; }
  .site-footer__brand p { margin-top: 0; font-size: 1rem; }
  .site-footer h2 { margin-bottom: var(--space-2); }
  .site-footer nav[aria-labelledby="footer-services"] ul { grid-template-columns: 1fr 1fr; column-gap: var(--space-4); }
  .site-footer nav[aria-labelledby="footer-company"] ul { display: flex; flex-wrap: wrap; column-gap: var(--space-5); }
  .site-footer a { font-size: .9375rem; }
  .site-footer__bottom { margin-top: var(--space-6); padding-top: var(--space-4); }
}

/* footer bottom row: copyright and Privacy link on the same line */
.site-footer__bottom { align-items: center; }

/* Final CTA: the 3 direct channels in one row, icon + label (no orphan button) */
.cta__channels { grid-template-columns: repeat(3, 1fr); }
.cta-channel { flex-direction: column; gap: 6px; min-height: 76px; padding: 12px 6px; letter-spacing: .06em; }
.cta-channel .cc-icon { width: 22px; height: 22px; color: var(--red-500); }
@media (min-width: 1024px) {
  .cta-channel { flex-direction: row; gap: 10px; min-height: 52px; }
  .cta-channel .cc-icon { width: 18px; height: 18px; }
}

/* =====================================================================================
   10k-level Home (approved 2026-10-28). Ideas from the 10k-websites skill, built with
   real W4 photos. Journey hero + tape measure + before/after slider + FAQ + background grid.
   ===================================================================================== */

:root { --tshadow: 0 1px 2px rgba(11, 21, 48, .9), 0 3px 12px rgba(11, 21, 48, .7), 0 10px 40px rgba(11, 21, 48, .7); }

/* hidden tab: every loop pauses (animation-play-state is not inherited) */
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }

/* ---------- Journey hero: static composition (default; phones, portrait tablets, reduced motion, no JS) ---------- */
.journey { position: relative; background: var(--navy-950); color: var(--mist); }
.journey__media, .journey__scrim, .tape, .journey__cue { display: none; }
.journey .band:not(.band--intro) { display: none; }
.journey__copy { padding-block: var(--space-8) var(--space-7); }
.journey h1 {
  margin-top: var(--space-5); max-width: 13ch;
  color: var(--white); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.035em;
}
.journey h1 em { color: var(--white); }
.journey__lead { margin-top: var(--space-5); color: var(--mist); }
.journey .hero__actions { margin-top: var(--space-6); }

.jl__tag, .ba__tag {
  position: absolute; z-index: 2;
  padding: 7px 12px 6px;
  background: rgba(11, 21, 48, .72); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-xs);
  color: var(--white); font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  text-shadow: none;
}

.journey__static { position: relative; margin: 0; padding: 0 var(--gutter) var(--space-8); }
.js-after { position: relative; margin-left: 16%; }
.js-after img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 52%; border-radius: var(--radius-sm); box-shadow: var(--depth-dark-2); }
.js-after .jl__tag { right: 12px; top: 12px; }
.js-before {
  position: absolute; left: var(--gutter); bottom: calc(var(--space-8) + 36px); width: 42%;
  border: 4px solid var(--navy-950); border-radius: var(--radius-sm); box-shadow: var(--depth-dark-2);
}
.js-before img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.js-before .jl__tag { left: 8px; top: 8px; }
.journey__static figcaption { margin: var(--space-4) 0 0 16%; color: var(--mist); font-size: var(--fs-small); }

@media (min-width: 1024px) {
  .journey__stage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; min-height: calc(88svh - var(--header-h)); }
  .journey__copy { padding-block: var(--space-10); }
  .journey__static { padding: var(--space-8) var(--gutter) var(--space-8) 0; }
}

/* ---------- Journey hero: the pinned scroll journey (JS adds .journey-on to <html>) ----------
   The five gate strings below must stay identical to GATES in journey.js. */
@media not ((max-width: 720px) or ((orientation: portrait) and (max-width: 1024px)) or ((orientation: portrait) and (pointer: coarse)) or ((orientation: landscape) and (pointer: coarse) and (max-height: 560px)) or (prefers-reduced-motion: reduce)) {
  .journey-on .journey { height: 620vh; }
  .journey-on .journey__stage {
    position: sticky; top: 0; display: block;
    height: 100vh; height: 100svh; min-height: 0; overflow: hidden;
  }
  .journey-on .journey__static { display: none; }

  .journey-on .journey__media {
    display: block; position: absolute; top: 0; right: 0; bottom: 0; width: 66%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
    mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  }
  .jl { position: absolute; inset: 0; opacity: 0; isolation: isolate; }
  .jl[data-layer="0"] { opacity: 1; }
  .jl img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); will-change: transform; }
  .jl[data-layer="0"] img { object-position: 50% 72%; }
  .jl[data-layer="2"] img { object-position: 50% 55%; }
  .jl[data-layer="3"] img { object-position: 50% 35%; }
  .jl[data-layer="4"] img { object-position: 50% 40%; }
  .jl .jl__tag { right: 28px; bottom: 28px; }

  .journey-on .journey__scrim {
    display: block; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(90deg, var(--navy-950) 0, var(--navy-950) 28%, rgba(11, 21, 48, .78) 44%, rgba(11, 21, 48, .2) 68%, rgba(11, 21, 48, 0) 84%),
      linear-gradient(0deg, rgba(11, 21, 48, .5), rgba(11, 21, 48, 0) 28%);
  }

  .journey-on .journey__copy {
    position: absolute; inset: 0; display: grid; align-items: center;
    padding-block: var(--header-h) var(--space-6);
  }
  .journey-on .journey .band {
    grid-area: 1 / 1; display: block; max-width: 34rem;
    opacity: 0; visibility: hidden;
    text-shadow: var(--tshadow);
  }
  .journey-on .band.is-on { visibility: visible; }
  .journey-on .band--intro { opacity: 1; }
  .journey-on .band .btn { text-shadow: none; }

  /* Signature: the tape measure. The red fill and the hook follow the journey (--p, set by journey.js) */
  .journey-on .tape {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: absolute; z-index: 2;
    left: max(12px, calc((100vw - var(--container)) / 2 - 56px));
    top: calc(var(--header-h) + 28px); bottom: 28px; width: 26px;
  }
  .journey-on .journey__cue { display: flex; }
  /* short laptop screens: the intro band must fit between the header and the fold */
  .journey-on .journey h1 { font-size: min(var(--fs-display), 9.5svh); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .journey-on .band { max-width: 30rem; }
  .journey-on .journey__copy { padding-left: 64px; }
}
@media (max-height: 560px) { .journey-on .tape { display: none; } }
@media (max-height: 820px) { .journey-on .journey__cue { display: none; } }

/* Band text: written once by JS as words; --k (0..1) is the scroll-driven assembly */
.band__title {
  margin-top: var(--space-4);
  color: var(--white); font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -.03em;
}
.band__title .w {
  --kc: clamp(0, (var(--k, 1) - var(--th, 0)) * 3, 1);
  display: inline-block; opacity: var(--kc);
  transform: translateY(calc((1 - var(--kc)) * .5em));
}
.band .eyebrow { opacity: clamp(0, var(--k, 1) * 3, 1); }
.band__text {
  --ks: clamp(0, (var(--k, 1) - .45) * 3, 1);
  margin-top: var(--space-5); max-width: 30rem;
  color: var(--mist); font-size: var(--fs-lead); line-height: 1.6;
  opacity: var(--ks); transform: translateY(calc((1 - var(--ks)) * 12px));
}
.band--settle .hero__actions {
  --kb: clamp(0, (var(--k, 1) - .7) * 4, 1);
  opacity: var(--kb); transform: translateY(calc((1 - var(--kb)) * 12px));
}

.journey__cue {
  align-items: center; gap: 14px; margin-top: var(--space-7);
  color: var(--mist); font-size: var(--fs-small); font-weight: 600;
}
.journey__cue::before {
  content: ""; width: 1px; height: 36px; background: linear-gradient(var(--red-500), rgba(229, 72, 77, 0));
  animation: cue 2.4s var(--ease) -1.2s infinite;
}
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.tape__label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: var(--mist); font-size: .625rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; line-height: 1;
}
.tape__blade {
  position: relative; flex: 1; width: 26px; overflow: visible;
  border-radius: var(--radius-xs);
  background:
    repeating-linear-gradient(180deg, var(--ink) 0 1.5px, transparent 1.5px 64px) 0 0 / 13px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 32px) 0 0 / 9px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(11, 21, 48, .5) 0 1px, transparent 1px 8px) 0 0 / 5px 100% no-repeat,
    var(--paper);
  box-shadow: inset -1px 0 0 rgba(11, 21, 48, .15), var(--depth-dark-1);
}
.tape__num {
  position: absolute; right: 3px; transform: translateY(2px);
  color: var(--ink); font-size: 8px; font-weight: 800; line-height: 1; letter-spacing: 0;
}
.tape__fill {
  position: absolute; inset: 0; border-right: 4px solid var(--red-600);
  background: rgba(200, 32, 42, .14);
  transform-origin: top; transform: scaleY(var(--p, 0));
}
.tape__hook {
  position: absolute; left: -6px; right: -6px; top: -3px; height: 6px;
  background: var(--red-600); border-radius: 1px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transform: translateY(calc(var(--p, 0) * var(--tape-h, 0px)));
}

/* ---------- Why W4: the contractor stories, answered ---------- */
.why__grid { display: grid; gap: var(--space-7); }
.why__head h2 { margin-top: var(--space-4); }
.why__head .lead { margin-top: var(--space-5); }
.why__head .text-link { margin-top: var(--space-5); }
.why__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--stone-200); }
.why__row { display: grid; gap: var(--space-2); padding: var(--space-6) 0; border-bottom: 1px solid var(--stone-200); }
.why__pain {
  color: var(--slate-600); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: line-through; text-decoration-color: var(--red-600); text-decoration-thickness: 2px;
}
.why__row h3 { margin-top: var(--space-1); }
.why__row p:last-child { font-size: .9375rem; line-height: 1.65; max-width: 34rem; }
@media (min-width: 768px) {
  .why__row { grid-template-columns: 13rem 1fr; column-gap: var(--space-6); }
  .why__pain { grid-row: span 2; padding-top: 6px; }
}
@media (min-width: 1024px) {
  .why__grid { grid-template-columns: 4fr 7fr; gap: var(--space-9); }
  .why__head { position: sticky; top: calc(var(--header-h) + var(--space-7)); align-self: start; }
}

/* ---------- Proof: before/after drag slider (the one interactive moment) ---------- */
.proof__head { max-width: 40rem; margin-inline: auto; text-align: center; }
.proof__head .eyebrow { justify-content: center; }
.proof__head h2 { margin-top: var(--space-4); }
.ba {
  --pos: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  width: min(100%, 520px, calc(68svh * .8)); aspect-ratio: 4 / 5; margin: var(--space-7) auto 0;
  border-radius: var(--radius-sm); background: var(--navy-900);
  box-shadow: var(--depth-dark-2);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
}
.ba__img { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
/* alignment of the two real photos (different crops of the same shed), tuned by eye */
.ba__img--after { left: var(--ax, 0%); top: var(--ay, 0%); width: var(--aw, 100%); }
.ba__img--before { left: var(--bx, 0%); top: var(--by, 0%); width: var(--bw, 100%); }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag--before { left: 14px; top: 14px; }
.ba__tag--after { right: 14px; top: 14px; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3;
  width: 48px; margin-left: -24px;
  display: flex; align-items: center; justify-content: center;
  outline: none;
}
.ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--white); box-shadow: 0 0 12px rgba(0, 0, 0, .35); }
.ba__knob {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px;
  background: var(--white); color: var(--ink); border-radius: var(--radius-xs);
  box-shadow: var(--depth-dark-2);
  transition: transform var(--dur) var(--ease);
}
.ba__knob svg { width: 22px; height: 22px; }
.ba:hover .ba__knob, .ba.is-dragging .ba__knob { transform: scale(1.06); }
.ba__handle:focus-visible .ba__knob { outline: 2px solid var(--red-500); outline-offset: 3px; }
.proof__foot { display: grid; justify-items: center; gap: var(--space-5); margin-top: var(--space-6); text-align: center; }
.proof__caption { max-width: 34rem; color: var(--mist); }

/* ---------- Section endings: every section points to the estimate ---------- */
.section-end { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); margin-top: var(--space-7); color: var(--slate-600); }
.section--dark .section-end { color: var(--mist); }
.about__links { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin-top: var(--space-6); }
.about__copy .about__links .text-link { margin-top: 0; }
.text-link--quiet { color: var(--slate-600); }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: var(--space-7); }
.faq__head h2 { margin-top: var(--space-4); }
.faq__head .lead { margin-top: var(--space-5); }
.faq__head .lead a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.faq__list { border-top: 1px solid var(--stone-200); }
.faq__item { border-bottom: 1px solid var(--stone-200); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  min-height: 64px; padding: var(--space-4) 0; cursor: pointer; list-style: none;
  color: var(--ink); font-size: 1.0625rem; font-weight: 700; line-height: 1.4;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--red-600), var(--red-600)) center / 14px 2px no-repeat,
              linear-gradient(var(--red-600), var(--red-600)) center / 2px 14px no-repeat;
  transition: transform var(--dur) var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--navy-700); }
.faq__item p { max-width: 40rem; padding-bottom: var(--space-5); }
.faq__cta { margin-top: var(--space-5); }
@media (min-width: 1024px) {
  .faq__grid { grid-template-columns: 5fr 7fr; gap: var(--space-9); }
  .faq__head { position: sticky; top: calc(var(--header-h) + var(--space-7)); align-self: start; }
}

/* ---------- Service area: one-row band ---------- */
.area { background: var(--paper); border-top: 1px solid var(--stone-200); }
.area__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); padding-block: var(--space-7); }
.area__title { flex: 1 1 18rem; font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }

@media (prefers-reduced-motion: reduce) {
  .ba__knob, .ba:hover .ba__knob { transform: none; }
}
.nw { white-space: nowrap; }

/* No sideways scroll from decorations or scroll-driven zooms (e.g. the 1.12 photo curtain at 768 px).
   clip (not hidden) keeps position: sticky working. */
html, body { overflow-x: hidden; overflow-x: clip; }
