/* Jaluwork theme styles. Colors and type come from theme.json presets.
   Direction: plaster and ink with one brass accent, square corners, hairline rules. */

:root {
  --jw-ink: var(--wp--preset--color--ink);
  --jw-plaster: var(--wp--preset--color--linen);
  --jw-stone: var(--wp--preset--color--stone);
  --jw-rule: var(--wp--preset--color--rule);
  --jw-graphite: var(--wp--preset--color--slate);
  --jw-brass: var(--wp--preset--color--brass);
  --jw-brass-light: var(--wp--preset--color--brass-light);
  --jw-tape: var(--wp--preset--color--tape);
  --jw-display: var(--wp--preset--font-family--display);
  --jw-radius: 2px;
  --jw-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Base */
h1, h2, h3, h4 { text-wrap: balance; }
h1 { letter-spacing: -0.01em; }
:where(a):focus-visible, :where(button):focus-visible, :where(summary):focus-visible { outline: 2px solid var(--jw-brass); outline-offset: 3px; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks > main > :first-child { margin-block-start: 0; }

.jw-eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--jw-brass); margin: 0; }
.has-ink-background-color .jw-eyebrow { color: var(--jw-brass-light); }
.has-ink-background-color a:not(.wp-element-button) { color: inherit; }
.jw-sec-head { display: flex; flex-direction: column; gap: 0.75rem; max-width: 46rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.jw-sec-head > * { margin: 0 !important; max-width: none !important; }
.is-layout-constrained > .jw-sec-head, .is-layout-constrained > .jw-review-single { margin-left: 0 !important; margin-right: auto !important; }
.jw-sec-head p:not(.jw-eyebrow) { color: var(--jw-graphite); font-size: var(--wp--preset--font-size--large); }
.has-ink-background-color .jw-sec-head p:not(.jw-eyebrow) { color: #c9ccc8; }
.jw-textlink a, a.jw-link { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: inherit; border-bottom: 1px solid currentColor; padding-bottom: 0.35rem; }
.jw-textlink a:hover, a.jw-link:hover { color: var(--jw-brass); }
.has-ink-background-color .jw-textlink a:hover { color: var(--jw-brass-light); }

/* Buttons */
.wp-element-button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; box-sizing: border-box; white-space: nowrap; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.wp-block-button__link.has-brass-light-background-color { border-color: var(--jw-brass-light); }
.wp-block-button__link.has-brass-light-background-color:hover { background-color: var(--wp--preset--color--white) !important; border-color: var(--wp--preset--color--white); color: var(--jw-ink) !important; }

/* Header */
.jw-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--jw-rule); padding-block: 0.9rem; }
.jw-wordmark { display: inline-flex; flex-direction: column; gap: 0.3rem; text-decoration: none; color: var(--jw-ink); }
.jw-wordmark b { font-weight: 700; font-size: 1.25rem; line-height: 1; letter-spacing: 0.3em; margin-right: -0.3em; }
.jw-wordmark span { font-weight: 600; font-size: 0.58rem; line-height: 1; letter-spacing: 0.42em; margin-right: -0.42em; text-transform: uppercase; color: var(--jw-brass); border-top: 1px solid var(--jw-brass); padding-top: 0.35rem; }
.jw-header__right { gap: 1.5rem; }
.jw-header .wp-block-navigation { gap: 1.6rem; }
.jw-header .wp-block-navigation .wp-block-navigation__container { gap: 1.6rem; }
.jw-header .wp-block-navigation a { color: var(--jw-ink); white-space: nowrap; text-decoration: none; padding-block: 0.4rem; border-bottom: 1px solid transparent; }
.jw-header .wp-block-navigation a:hover, .jw-header .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--jw-brass); }
.jw-phone { font-weight: 600; white-space: nowrap; text-decoration: none; color: inherit; font-variant-numeric: tabular-nums; }
.jw-header .wp-block-buttons { flex-wrap: nowrap; }
.jw-header .wp-block-navigation__responsive-container-open { width: 48px; height: 48px; align-items: center; justify-content: center; border: 1px solid var(--jw-rule); border-radius: var(--jw-radius); color: var(--jw-ink); }
.jw-header .wp-block-navigation__responsive-container-close { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--jw-radius); color: #fff; top: 0.9rem; right: 0; }

/* Fold the links into the menu button before they can wrap. Core only does this under 600px. */
@media (min-width: 600px) and (max-width: 1139px) {
  .jw-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .jw-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (max-width: 1139px) {
  .jw-header .wp-block-navigation { order: 3; }
}
@media (max-width: 599px) {
  .jw-header .jw-phone, .jw-header .wp-block-buttons { display: none; }
}

/* Open menu: solid, full screen, large links. */
.jw-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--jw-ink); color: #fff; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 6rem max(1.25rem, env(safe-area-inset-left, 0px)); }
.jw-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 5rem; align-items: stretch !important; width: 100%; }
.jw-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0; width: 100%; }
.jw-header .is-menu-open .wp-block-navigation-item { align-items: stretch !important; width: 100%; }
.jw-header .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; font-family: var(--jw-display); font-size: 2rem; line-height: 1.1; font-weight: 400; letter-spacing: 0; text-transform: none; color: #fff; padding: 0.85rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.jw-header .is-menu-open .wp-block-navigation-item__content:hover { border-bottom-color: var(--jw-brass-light); color: var(--jw-brass-light); }

/* Call and quote bar, phones only */
.jw-callbar { display: none; }
@media (max-width: 599px) {
  .jw-callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; inset: auto 0 0 0; z-index: 100001; background: var(--wp--preset--color--white); border-top: 1px solid var(--jw-rule); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .jw-callbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--jw-ink); white-space: nowrap; }
  .jw-callbar a + a { background: var(--jw-ink); color: #fff; }
  .jw-callbar--solo { grid-template-columns: 1fr; }
  .wp-site-blocks { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

/* Hero */
.jw-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0 !important; }
.jw-hero > * { margin: 0 !important; max-width: none !important; }
.jw-hero__text { padding: clamp(2.5rem, 5vw, 4.25rem) clamp(1.25rem, 4.4vw, 4rem) !important; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.jw-hero__text > * { margin: 0 !important; }
.jw-hero h1 { font-size: clamp(2.4rem, 3.9vw, 3.5rem); color: #fff; }
.jw-hero__lede { color: #c9ccc8; font-size: 1.0625rem; max-width: 44ch; }
.jw-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.jw-hero__cta > * { margin: 0 !important; }
.jw-hero__media { position: relative; min-height: 440px; background: #1d2023; }
.jw-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.jw-hero__media figcaption { position: absolute; left: 0; bottom: 0; background: var(--wp--preset--color--white); color: var(--jw-ink); padding: 0.7rem 1rem; font-size: 0.8rem; display: flex; gap: 0.75rem; align-items: baseline; }
.jw-hero__media figcaption a { color: inherit; }
@media (max-width: 860px) {
  .jw-hero { grid-template-columns: 1fr; }
  .jw-hero__media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
}

/* Quote starter: two fields in the hero that open the full form */
.jw-start { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 0.75rem 0.5rem; padding-top: 1.5rem; border-top: 1px solid #3a3e41; max-width: 30rem; }
.jw-start label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #a9adaa; min-width: 0; }
.jw-start input, .jw-start select { box-sizing: border-box; height: 48px; width: 100%; min-width: 0; background: #1d2023; border: 1px solid #454a4e; color: #fff; padding: 0 0.75rem; font: inherit; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; border-radius: var(--jw-radius); }
.jw-start input:focus-visible, .jw-start select:focus-visible { outline: 2px solid var(--jw-brass-light); outline-offset: 2px; }
.jw-start button { grid-column: 1 / -1; background: var(--jw-brass-light); border: 1px solid var(--jw-brass-light); color: var(--jw-ink); }
.jw-start button:hover { background: #fff; border-color: #fff; color: var(--jw-ink); }

/* Fact strip */
.jw-facts-band { border-bottom: 1px solid var(--jw-rule); }
.jw-facts-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jw-facts-strip li { padding: 1.75rem clamp(1rem, 2.5vw, 2.5rem); border-left: 1px solid var(--jw-rule); display: flex; flex-direction: column; gap: 0.35rem; }
.jw-facts-strip li:first-child { border-left: 0; padding-left: 0; }
.jw-facts-strip b { font-family: var(--jw-display); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1; }
.jw-facts-strip span { font-size: 0.9rem; color: var(--jw-graphite); }
@media (max-width: 760px) {
  .jw-facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jw-facts-strip li { padding: 1.25rem 1rem; }
  .jw-facts-strip li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .jw-facts-strip li:nth-child(n+3) { border-top: 1px solid var(--jw-rule); }
}

/* Forms */
.jw-form-card { background: var(--wp--preset--color--white); color: var(--jw-ink); border-radius: var(--jw-radius); padding: clamp(1.25rem, 3vw, 2rem); }
.jw-form-card h3 { margin-top: 0; }
.jw-form p { margin: 0 0 1rem; }
.jw-form label, .jw-form__radios legend { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--jw-graphite); margin-bottom: 0.4rem; }
.jw-form input[type="text"],
.jw-form input[type="tel"],
.jw-form input[type="email"],
.jw-form select,
.jw-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid #a6aaa5;
  border-radius: var(--jw-radius);
  background: var(--wp--preset--color--white);
  color: var(--jw-ink);
}
.jw-form input:focus-visible,
.jw-form select:focus-visible,
.jw-form textarea:focus-visible,
.jw-form button:focus-visible { outline: 2px solid var(--jw-brass); outline-offset: 2px; }
.jw-form button { width: 100%; }
.jw-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.jw-form__error { background: #fbeaea; color: #7a1f1f; padding: 0.6rem 0.8rem; border-radius: var(--jw-radius); }
.jw-form__note { font-size: 0.85rem; color: var(--jw-graphite); text-align: center; margin: 0; }
.jw-form__radios { border: 0; padding: 0; margin: 0 0 1rem; display: flex; gap: 0.5rem 1.5rem; flex-wrap: wrap; }
.jw-form__radios label, .jw-form__consent label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--jw-ink); margin: 0; }
.jw-form__radios input, .jw-form__consent input { width: 1.15rem; height: 1.15rem; accent-color: var(--jw-ink); }
.jw-form--full { max-width: 760px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.jw-form--full > * { grid-column: 1 / -1; }
.jw-form--full > p:has(input[type="text"]), .jw-form--full > p:has(input[type="tel"]), .jw-form--full > p:has(input[type="email"]) { grid-column: auto; }
@media (max-width: 560px) { .jw-form--full > p { grid-column: 1 / -1 !important; } }

/* The Distinction page already has the word as its title; hide the repeated section heading there. */
.jw-page-distinction .jw-distinction-heading { display: none; }

/* Distinction points */
.jw-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 3rem); }
.jw-points > * { margin: 0 !important; border-top: 1px solid var(--jw-ink); padding-top: 1.1rem; }
.jw-points h3 { margin: 0 0 0.5rem; }
.jw-points p { margin: 0; color: var(--jw-graphite); }
@media (max-width: 960px) { .jw-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .jw-points { grid-template-columns: 1fr; } }

/* Services showcase: a list of trades, each with a photo of that trade */
.jw-svc { --jw-svc-gap: clamp(1.5rem, 4vw, 4rem); position: relative; display: grid; grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); gap: var(--jw-svc-gap); align-items: start; }
.jw-svc__list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--jw-rule); }
.jw-svc__row { border-top: 1px solid var(--jw-rule); }
.jw-svc__row a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: baseline; padding: 1.15rem 0 1.15rem 1rem; border-left: 2px solid transparent; text-decoration: none; color: var(--jw-ink); transition: border-color 0.25s, background-color 0.25s; }
.jw-svc__name { font-family: var(--jw-display); font-size: clamp(1.35rem, 2.3vw, 1.9rem); line-height: 1.15; }
.jw-svc__go { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--jw-graphite); }
.jw-svc__desc { grid-column: 1 / -1; color: var(--jw-graphite); font-size: 0.97rem; }
.jw-svc__row a:hover, .jw-svc__row a:focus-visible, .jw-svc__row.is-active a { border-left-color: var(--jw-brass); background: var(--wp--preset--color--white); }
.jw-svc__row a:hover .jw-svc__go { color: var(--jw-brass); }
.jw-svc__spacer { aspect-ratio: 4 / 5; background: var(--jw-stone); }
.jw-svc__fig { position: absolute; top: 0; right: 0; width: calc((100% - var(--jw-svc-gap)) * 0.46); margin: 0; opacity: 0; transition: opacity 0.45s var(--jw-ease); pointer-events: none; }
.jw-svc__fig img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.jw-svc__fig figcaption { margin-top: 0.6rem; font-size: 0.82rem; color: var(--jw-graphite); }
.jw-svc__row.is-active .jw-svc__fig { opacity: 1; }
@media (max-width: 860px) {
  .jw-svc { grid-template-columns: 1fr; }
  .jw-svc__spacer { display: none; }
  .jw-svc__row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: center; gap: 0 1rem; }
  .jw-svc__row a { padding-left: 0; border-left: 0; background: none !important; }
  .jw-svc__fig { position: static; width: 84px; opacity: 1; }
  .jw-svc__fig img { aspect-ratio: 1; }
  .jw-svc__fig figcaption { display: none; }
  .jw-svc__row:not(:has(.jw-svc__fig)) { grid-template-columns: 1fr; }
}

/* Project cards */
.jw-card { margin: 0; }
.jw-card a { display: flex; flex-direction: column; gap: 0.55rem; color: inherit; text-decoration: none; }
.jw-card__media { position: relative; margin: 0 0 0.25rem; overflow: hidden; background: var(--jw-stone); }
.jw-card__media img, .jw-card__placeholder { display: block; width: 100%; height: auto; }
.jw-card__placeholder { aspect-ratio: 4 / 5; }
.jw-card__tags { position: absolute; left: 0.6rem; top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.jw-card__tags i { font-style: normal; font-size: 0.62rem; font-weight: 600; line-height: 1; letter-spacing: 0.13em; text-transform: uppercase; background: var(--wp--preset--color--white); color: var(--jw-ink); padding: 0.4rem 0.5rem; border-radius: var(--jw-radius); }
.jw-card__tags i.is-wip { background: var(--jw-tape); color: #fff; }
.jw-card h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.jw-card p { margin: 0; color: var(--jw-graphite); font-size: 0.875rem; }
.jw-card a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Rows of three keep one shape so the row stays level */
.jw-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.jw-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.jw-grid--3 .jw-card__media img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 820px) { .jw-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .jw-grid--3 { grid-template-columns: 1fr; } }
.jw-related h2 { margin: 0 0 1.75rem; }
.jw-related > p { margin: 2rem 0 0; }

/* The gallery: every photo keeps its own shape */
.jw-masonry { column-count: 3; column-gap: 1.5rem; }
.jw-masonry .jw-card { break-inside: avoid; margin-bottom: 2.5rem; }
@media (max-width: 900px) { .jw-masonry { column-count: 2; } }
@media (max-width: 560px) { .jw-masonry { column-count: 1; } }
.jw-masonry.is-laid { column-count: auto; display: flex; gap: 1.5rem; align-items: flex-start; }
.jw-masonry__col { flex: 1 1 0; min-width: 0; }
.jw-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.jw-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--jw-rule); border-radius: var(--jw-radius); padding: 0 0.75rem; }
.jw-pagination .page-numbers.current { background: var(--jw-ink); border-color: var(--jw-ink); color: #fff; }

/* Filters as text tabs */
.jw-filters { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin: 0 0 2rem; border-bottom: 1px solid var(--jw-rule); }
.jw-filters a { display: inline-flex; align-items: center; min-height: 48px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--jw-graphite); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.jw-filters a:hover { color: var(--jw-ink); }
.jw-filters a[aria-current="page"] { color: var(--jw-ink); border-bottom-color: var(--jw-ink); }
.jw-meta-line { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--jw-graphite); margin: 0; }
.jw-meta-line a { color: inherit; text-underline-offset: 3px; }

/* Project page: title and facts stay in view while the photos scroll */
.jw-project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.jw-project > * { margin-block-start: 0 !important; }
.jw-project__aside { position: sticky; top: 7rem; display: flex; flex-direction: column; gap: 1.4rem; }
.jw-project__aside > * { margin: 0 !important; }
.jw-project__aside h1 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
.jw-project__main > :first-child { margin-top: 0; }
.jw-project__main .wp-block-post-content > * { max-width: none; }
@media (max-width: 900px) {
  .jw-project { grid-template-columns: 1fr; }
  .jw-project__aside { position: static; }
}

/* Before and after */
.jw-ba { margin: 0 0 1.5rem; --jw-pos: 50%; }
.jw-ba__frame { position: relative; overflow: hidden; border-radius: var(--jw-radius); background: var(--jw-stone); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.jw-ba__frame img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.jw-ba__frame .jw-ba__before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--jw-pos)) 0 0); }
.jw-ba__divider { position: absolute; top: 0; bottom: 0; left: var(--jw-pos); width: 2px; margin-left: -1px; background: var(--wp--preset--color--white); box-shadow: 0 0 6px rgba(0, 0, 0, 0.35); pointer-events: none; }
.jw-ba__handle { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--wp--preset--color--white); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.jw-ba__handle::before, .jw-ba__handle::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border-block: 6px solid transparent; margin-top: -6px; }
.jw-ba__handle::before { left: 10px; border-right: 8px solid var(--jw-ink); }
.jw-ba__handle::after { right: 10px; border-left: 8px solid var(--jw-ink); }
.jw-ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.jw-ba__range:focus-visible + .jw-ba__divider .jw-ba__handle { outline: 3px solid var(--jw-brass-light); outline-offset: 2px; }
.jw-ba__tag { position: absolute; bottom: 0.6rem; padding: 0.4rem 0.5rem; border-radius: var(--jw-radius); background: var(--wp--preset--color--white); color: var(--jw-ink); font-size: 0.62rem; font-weight: 600; line-height: 1; letter-spacing: 0.13em; text-transform: uppercase; pointer-events: none; }
.jw-ba__tag--before { left: 0.6rem; }
.jw-ba__tag--after { right: 0.6rem; }
.jw-ba--single img { width: 100%; height: auto; border-radius: var(--jw-radius); }
.wp-block-heading + .jw-ba { margin-top: 1rem; }

/* Project video */
.jw-video { margin: 0 0 1.5rem; }
.jw-video video { display: block; width: 100%; height: auto; border-radius: var(--jw-radius); background: var(--jw-ink); }
.jw-video figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--jw-graphite); }

/* Video row on a service's projects page */
.jw-video-row { margin: 0 0 3rem; }
.jw-video-row h2 { margin: 0 0 1.25rem; font-size: 1.9rem; }
.jw-video-row__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 300px)); }
.jw-video--tile { margin: 0; }
.jw-video--tile video { aspect-ratio: 9 / 16; object-fit: cover; }
.jw-video--tile figcaption { display: grid; gap: 0.15rem; }
.jw-video--tile figcaption strong { color: var(--jw-ink); font-family: var(--jw-display); font-weight: 400; font-size: 1.2rem; }

/* Before-and-after row on the homepage */
.jw-ba-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .jw-ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .jw-ba-grid { grid-template-columns: 1fr; } }
.jw-ba-item .jw-ba { margin-bottom: 0.9rem; }
.jw-ba--tile .jw-ba__frame { aspect-ratio: 3 / 4; }
.jw-ba--tile .jw-ba__frame .jw-ba__after { height: 100%; object-fit: cover; }
.jw-ba-item h3 { margin: 0 0 0.2rem; font-size: 1.35rem; }
.jw-ba-item h3 a { color: inherit; text-decoration: none; }
.jw-ba-item h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.jw-ba-item p { margin: 0; color: var(--jw-graphite); font-size: 0.875rem; }

/* Facts table, FAQ, quote */
.jw-facts { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); margin: 0; border-top: 1px solid var(--jw-ink); }
.jw-facts > div { display: contents; }
.jw-facts dt, .jw-facts dd { margin: 0; padding: 0.75rem 0; border-bottom: 1px solid var(--jw-rule); }
.jw-facts dt { font-size: 0.68rem; font-weight: 600; line-height: 2.2; letter-spacing: 0.14em; text-transform: uppercase; color: var(--jw-graphite); }
.jw-facts dd { font-size: 0.97rem; }
.jw-quote { border-left: 1px solid var(--jw-brass); margin: 0; padding: 0.25rem 0 0.25rem 1.25rem; font-family: var(--jw-display); font-size: 1.35rem; line-height: 1.35; }
.jw-quote p { margin: 0; }
.jw-faq details { border-bottom: 1px solid var(--jw-rule); }
.jw-faq summary { cursor: pointer; font-weight: 500; padding: 0.95rem 0; min-height: 44px; box-sizing: border-box; }
.jw-faq p { margin: 0 0 1rem; color: var(--jw-graphite); }
.jw-included { columns: 2; column-gap: 2.5rem; padding-left: 1.1rem; }
.jw-included li { margin-bottom: 0.4rem; break-inside: avoid; }
@media (max-width: 640px) { .jw-included { columns: 1; } }
.jw-tagline { font-size: var(--wp--preset--font-size--large); color: var(--jw-graphite); margin: 0; max-width: 40ch; }

/* Service page */
.jw-service-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.jw-service-head > * { margin: 0 !important; }
.jw-service-head__text { display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; }
.jw-service-head__text > * { margin: 0 !important; }
.jw-service-fig { margin: 0; }
.jw-service-fig img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.jw-service-fig--tall { max-width: 460px; justify-self: end; width: 100%; }
.jw-service-fig--tall img { aspect-ratio: 4 / 5; }
@media (max-width: 860px) { .jw-service-fig--tall { justify-self: start; } }
.jw-service-fig figcaption { margin-top: 0.6rem; font-size: 0.82rem; color: var(--jw-graphite); }
.jw-service-fig figcaption a { color: inherit; }
@media (max-width: 860px) { .jw-service-head { grid-template-columns: 1fr; } }
.jw-service-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: var(--wp--preset--spacing--60); }
.jw-service-layout > * { margin-block-start: 0; }
.jw-service-main { max-width: 800px; }
.jw-service-main h2 { font-size: 1.9rem; margin-top: 2.75rem; }
.jw-service-aside { position: sticky; top: 7rem; border: 1px solid var(--jw-rule); }
@media (max-width: 900px) {
  .jw-service-layout { grid-template-columns: 1fr; }
  .jw-service-aside { position: static; }
}

/* Towns, contact */
.jw-towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0; font-family: var(--jw-display); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.25; }
.jw-towns li:not(:last-child)::after { content: "/"; color: var(--jw-brass); margin: 0 0.9rem; }
.jw-contact { line-height: 1.9; }
.jw-area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.jw-area > * { margin: 0 !important; }
@media (max-width: 860px) { .jw-area { grid-template-columns: 1fr; } }

/* Footer */
.jw-footer { padding-block: clamp(3rem, 6vw, 5rem) 2rem; font-size: 0.95rem; }
.jw-footer a { color: inherit; text-underline-offset: 3px; }
.jw-footer a:hover { color: var(--jw-brass-light); }
.jw-footer h3 { font-family: var(--wp--preset--font-family--body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--jw-brass-light); margin: 0 0 1rem; }
.jw-footer ul { list-style: none; margin: 0; padding: 0; }
.jw-footer li a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.jw-footer__logo img { display: block; width: min(100%, 320px); height: auto; -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); }
.jw-footer__legal { color: #a9adaa; font-size: 0.82rem; border-top: 1px solid #2c3033; padding-top: 1.5rem; margin-top: 2.5rem; }
.jw-footer .jw-contact a { text-decoration: none; }

/* Review */
.jw-review-single { max-width: 60rem; }
.jw-review-single blockquote { margin: 0; padding: 0; border: 0; }
.jw-review-single blockquote p { font-family: var(--jw-display); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.3; margin: 0 0 1.25rem; text-wrap: balance; }
.jw-review-single cite { font-style: normal; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--jw-graphite); }

/* Process steps */
.jw-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem clamp(1.5rem, 3vw, 3rem); grid-template-columns: repeat(4, minmax(0, 1fr)); color: var(--jw-graphite); }
.jw-steps li { counter-increment: step; border-top: 1px solid var(--jw-ink); padding-top: 1rem; }
.jw-steps li::before { content: counter(step); display: block; font-family: var(--jw-display); color: var(--jw-brass); font-size: 2.25rem; line-height: 1; margin-bottom: 0.9rem; }
.jw-steps strong { display: block; font-family: var(--jw-display); font-weight: 400; font-size: 1.4rem; line-height: 1.2; color: var(--jw-ink); margin-bottom: 0.4rem; }
@media (max-width: 960px) { .jw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .jw-steps { grid-template-columns: 1fr; } }

/* Closing quote band */
.jw-cta .wp-block-columns { gap: clamp(2rem, 5vw, 5rem); }
.jw-cta h2 { color: #fff; }
.jw-cta p { color: #c9ccc8; }
.jw-cta .jw-phone { color: #fff; }

/* Plain pages */
.jw-page-head { max-width: 46rem; }

/* Motion: small, slow, and off for visitors who ask for less */
@media (prefers-reduced-motion: no-preference) {
  .jw-card__media img { transition: transform 0.7s var(--jw-ease); }
  .jw-card a:hover .jw-card__media img { transform: scale(1.035); }
  .jw-js .jw-rise { opacity: 0; transform: translateY(14px); }
  .jw-js .jw-rise.is-in { opacity: 1; transform: none; transition: opacity 0.6s var(--jw-ease), transform 0.6s var(--jw-ease); }
}

/* Tap targets: text links and footer links get a full-height hit area */
.jw-textlink { margin: 0; }
.jw-textlink a, a.jw-link { display: inline-flex; align-items: flex-end; min-height: 44px; box-sizing: border-box; }
.jw-hero__media figcaption a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -0.7rem; }
.jw-footer li a { min-height: 44px; }
.jw-footer .jw-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.jw-footer .jw-contact { line-height: 1.5; }
.jw-footer .jw-contact > span { display: inline-block; padding-block: 0.3rem; }
.jw-footer__legal a { display: inline-block; padding-block: 0.8rem; }

/* Phones: keep the home page short. Two comparisons, two recent projects, steps in pairs. */
@media (max-width: 560px) {
  .jw-home .jw-ba-grid .jw-ba-item:nth-child(n+3) { display: none; }
  .jw-home .jw-related .jw-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .jw-home .jw-related .jw-grid--3 .jw-card:nth-child(n+3) { display: none; }
  .jw-home .jw-related .jw-card h3 { font-size: 1.1rem; }
  .jw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .jw-steps strong { font-size: 1.2rem; }
  .jw-points { gap: 1.25rem; }
}

/* Plain pages: the title and text share the left edge of the wide sections */
.jw-page .wp-block-post-content > :where(:not(.alignwide):not(.alignfull)) { margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important; margin-right: auto !important; }
.jw-page > .wp-block-post-title { margin-bottom: 1.5rem; }
.jw-page:has(.wp-block-post-content > .jw-cta:last-child) { padding-bottom: 0 !important; }

/* Quote and contact page: the form on the right, what happens next and how to reach us on the left.
   On phones the order is title, form, then the rest. */
.jw-quote-page { background: var(--jw-ink); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head form" "aside form"; grid-template-rows: auto 1fr; }
.jw-quote-page > * { margin: 0 !important; max-width: none !important; }
.jw-quote-page__head { grid-area: head; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4.4vw, 4rem) 0; display: flex; flex-direction: column; gap: 1rem; }
.jw-quote-page__head > * { margin: 0 !important; }
.jw-quote-page__head h1 { color: #fff; font-size: clamp(2.4rem, 4.2vw, 3.75rem); }
.jw-quote-page__aside { grid-area: aside; padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4.4vw, 4rem) clamp(2.5rem, 5vw, 4.5rem); display: flex; flex-direction: column; gap: 1.25rem; }
.jw-quote-page__aside > * { margin: 0 !important; }
.jw-quote-page__aside h2.jw-eyebrow { font-family: var(--wp--preset--font-family--body); line-height: 1.4; }
.jw-quote-page__aside .jw-contact-panel { margin-bottom: 0 !important; }
.jw-quote-page__form { grid-area: form; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4.4vw, 4rem); }
.jw-quote-page__form .wp-block-post-content > :first-child { margin-top: 0; }
.jw-quote-page__form .wp-block-post-content > p { font-size: var(--wp--preset--font-size--large); max-width: 34rem; margin-bottom: 2rem; }
.jw-steps--stack { grid-template-columns: 1fr !important; gap: 0; color: #a9adaa; margin-bottom: 1.5rem !important; }
.jw-steps--stack li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 0.5rem; border-top: 1px solid #2c3033; padding: 0.9rem 0; font-size: 0.95rem; }
.jw-steps--stack li::before { grid-row: span 2; font-size: 1.5rem; line-height: 1.15; margin: 0; color: var(--jw-brass-light); }
.jw-steps--stack strong { font-family: var(--wp--preset--font-family--body); font-weight: 600; font-size: 1.0625rem; color: #fff; margin-bottom: 0.1rem; }
.jw-contact-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; margin: 0; border-top: 1px solid #2c3033; padding-top: 1.25rem; }
.jw-contact-panel dt { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #a9adaa; margin-bottom: 0.2rem; }
.jw-contact-panel dd { margin: 0; overflow-wrap: anywhere; }
.jw-contact-panel a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.jw-contact-panel a:hover { color: var(--jw-brass-light); }
.jw-contact-panel .is-large a { font-family: var(--jw-display); font-size: 1.6rem; }
@media (max-width: 900px) {
  .jw-quote-page { grid-template-columns: 1fr; grid-template-areas: "head" "form" "aside"; grid-template-rows: auto; }
  .jw-quote-page__head { padding-bottom: clamp(2rem, 5vw, 3rem); }
}
@media (max-width: 560px) { .jw-contact-panel { grid-template-columns: 1fr; gap: 1rem; } }
