/* ==========================================================================
   Inner pages: services, about and gallery (plus the kept "version 3" layout)
   Loads after styles.css and reuses its tokens, buttons, header, FAQ, process,
   quote form and footer. Scoped blocks: .service, .about, .policy-page, .gallery-page, .v3-*
   ========================================================================== */

/* ---------- Shared ---------- */
.svc-lead { font: 400 var(--step-1)/1.5 var(--font-display); color: var(--deep); }
.svc-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.svc-item h3 { margin-bottom: .45em; }
.svc-item p { margin: 0; color: var(--ink-soft); }
.svc-close p { font: 450 var(--step-2)/1.25 var(--font-display); letter-spacing: var(--h-ls); color: var(--deep); max-width: 36ch; margin: 0; }

/* Photo buttons: every example photo opens in the lightbox */
.svc-photo { display: block; position: relative; width: 100%; padding: 0; margin: 0; border: 0; background: var(--bone); overflow: hidden; cursor: zoom-in; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); -webkit-user-drag: none; }
.svc-photo:hover img { transform: scale(1.04); }
.svc-photo:focus-visible { outline-offset: -4px; outline-color: var(--hamstone); }

/* Hero entrance for the dark text heroes (the photo hero uses the homepage .hero) */
.js .svc-hero [data-reveal] { opacity: 0; transform: translateY(18px); animation: settle .9s cubic-bezier(.2,.7,.2,1) forwards; }
.js .svc-hero [data-reveal]:nth-child(1) { animation-delay: .15s; }
.js .svc-hero [data-reveal]:nth-child(2) { animation-delay: .35s; }
.js .svc-hero [data-reveal]:nth-child(3) { animation-delay: .55s; }
@media (prefers-reduced-motion: reduce) {
  .js .svc-hero [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Service pages: photograph first
   The homepage hero at a shorter height, a quiet text page, a bone band of items,
   and a coursed mosaic of work.
   ========================================================================== */
.service .hero, .about .hero { min-height: min(78svh, 700px); }
.service .hero__content, .about .hero__content { padding-bottom: clamp(44px, 5vw, 72px); }
@media (min-width: 761px) { .service .trust__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.svc-a { padding-block: clamp(24px, 3vw, 40px) var(--section); }
.svc-a__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 7vw, 110px); align-items: start; }
.svc-a__grid h2 { position: sticky; top: 110px; max-width: 14ch; }
.svc-a__text p { color: var(--ink-soft); }
.svc-a__text .svc-lead { color: var(--deep); }

.svc-b { background: var(--bone); padding-block: var(--section); }
.svc-b--plain { background: transparent; }
.svc-b__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(24px, 6vw, 90px); align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.svc-b__head p { margin: 0; color: var(--ink-soft); padding-bottom: .4em; }
.svc-b__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 90px); }
.svc-b__items .svc-item { padding-block: 26px 36px; border-top: 1.5px solid rgba(43, 31, 26, .3); }
.svc-b__close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(16px, 2vw, 28px); padding-top: clamp(28px, 4vw, 44px); border-top: 1.5px solid rgba(43, 31, 26, .3); }

.svc-work { padding-block: var(--section); }
.svc-gallery-stacks { display: grid; gap: 14px; }
.svc-mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 14px; }
.svc-mosaic > :nth-child(1) { grid-column: 1 / span 5; grid-row: 1 / span 2; }
.svc-mosaic > :nth-child(2) { grid-column: 6 / span 3; grid-row: 1 / span 2; }
.svc-mosaic > :nth-child(3) { grid-column: 9 / span 4; grid-row: 1 / span 2; }
.svc-mosaic > :nth-child(4) { grid-column: 1 / span 3; grid-row: 3 / span 2; }
.svc-mosaic > :nth-child(5) { grid-column: 4 / span 5; grid-row: 3 / span 2; }
.svc-mosaic > :nth-child(6) { grid-column: 9 / span 4; grid-row: 3 / span 2; }
.svc-mosaic > :nth-child(7) { grid-column: 1 / span 7; grid-row: 5 / span 2; }
.svc-mosaic > :nth-child(8) { grid-column: 8 / span 5; grid-row: 5 / span 2; }
/* two photos: one broad project view and one supporting detail */
.svc-mosaic--2 > :nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.svc-mosaic--2 > :nth-child(2) { grid-column: 8 / span 5; grid-row: 1 / span 2; }
/* four photos: two balanced pairs */
.svc-mosaic--4 > :nth-child(1) { grid-column: 1 / span 6; grid-row: 1 / span 2; }
.svc-mosaic--4 > :nth-child(2) { grid-column: 7 / span 6; grid-row: 1 / span 2; }
.svc-mosaic--4 > :nth-child(3) { grid-column: 1 / span 6; grid-row: 3 / span 2; }
.svc-mosaic--4 > :nth-child(4) { grid-column: 7 / span 6; grid-row: 3 / span 2; }
/* five photos: three on the first row, two wide on the second */
.svc-mosaic--5 > :nth-child(4) { grid-column: 1 / span 7; grid-row: 3 / span 2; }
.svc-mosaic--5 > :nth-child(5) { grid-column: 8 / span 5; grid-row: 3 / span 2; }

/* ==========================================================================
   Gallery: a justified wall. Every photo keeps its own proportions and every row
   fills the width, so nothing is cropped and the edges stay flush.
   ========================================================================== */
.wall-section { padding-block: var(--section); }
.wall { --row: clamp(170px, 19vw, 280px); display: flex; flex-wrap: wrap; gap: 14px; }
.wall::after { content: ""; flex-grow: 1000; }
.wall.wall--more::after { display: none; } /* more photos are waiting, so the last row fills the width */
.wall__item { margin: 0; flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row)); min-width: 0; }
.wall__item .svc-photo { height: auto; aspect-ratio: var(--ar); }
/* photos fade in as they arrive, so lazy loading never pops */
.js .wall img { opacity: 0; transition: opacity .9s var(--ease), transform .6s var(--ease); }
.js .wall img.is-loaded { opacity: 1; }

/* ==========================================================================
   Version 3 layout (kept for later pages): dark stone
   Textured hero with the trade mark, two columns of text on bone, a bark band with
   staggered items, an offset gallery. The hero is also used by the gallery page.
   ========================================================================== */
.v3-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); color: var(--linen); padding: calc(var(--header-h) + clamp(56px, 8vw, 120px)) 0 clamp(48px, 6vw, 88px); }
.v3-hero__bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(43,31,26,.9), rgba(43,31,26,.95)), url("../assets/img/stone-texture.webp") center / cover; }
.v3-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 230px); gap: 24px clamp(32px, 7vw, 110px); align-items: end; }
.v3-hero h1 { font-size: var(--step-4); line-height: 1.02; max-width: 10ch; margin-bottom: .4em; }
.v3-hero__lede { font-size: var(--step-1); line-height: 1.5; color: rgba(236, 230, 218, .9); max-width: 34ch; margin-bottom: clamp(24px, 3vw, 36px); }
.v3-hero__mark { width: 100%; height: auto; }
.v3-hero .facts { margin-top: clamp(40px, 6vw, 80px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid rgba(236, 230, 218, .25); }

.v3-a { background: var(--bone); padding-block: var(--section); }
.v3-a h2 { max-width: 16ch; margin-bottom: clamp(24px, 3.5vw, 44px); }
.v3-a__cols { columns: 2; column-gap: clamp(40px, 7vw, 110px); column-rule: 1px solid rgba(43, 31, 26, .22); }
.v3-a__cols p { color: var(--ink-soft); break-inside: avoid; max-width: none; }
.v3-a__cols p:last-child { margin-bottom: 0; }

.v3-b { background: var(--bark); color: var(--linen); padding-block: var(--section); }
.v3-b__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(24px, 6vw, 90px); align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.v3-b__head p { margin: 0; color: rgba(236, 230, 218, .85); padding-bottom: .4em; }
.v3-b__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) clamp(32px, 6vw, 90px); padding-bottom: clamp(32px, 4vw, 56px); }
.v3-b__items .svc-item { padding-top: 24px; border-top: 1.5px solid rgba(236, 230, 218, .3); }
.v3-b__items .svc-item:nth-child(even) { translate: 0 clamp(28px, 4vw, 56px); }
.v3-b__items h3 { color: var(--hamstone-tint); }
.v3-b__items .svc-item p { color: rgba(236, 230, 218, .88); }
.v3-b__close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.v3-b__close p { color: var(--linen); }

.v3-work { padding-block: var(--section) calc(var(--section) * .6); }
.v3-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; padding-bottom: 56px; }
.v3-gallery .svc-photo { aspect-ratio: 4 / 5; }
.v3-gallery .svc-photo:nth-child(even) { aspect-ratio: 1 / 1; translate: 0 56px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .svc-a__grid, .svc-b__head, .v3-b__head { grid-template-columns: minmax(0, 1fr); }
  .svc-a__grid h2 { position: static; }
  .v3-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .v3-hero__mark { width: 150px; grid-row: 1; }
}
@media (max-width: 860px) {
  .svc-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
  .svc-mosaic > :nth-child(n) { grid-column: auto; grid-row: auto; }
  .svc-mosaic > :nth-child(1), .svc-mosaic > :nth-child(7) { grid-column: 1 / -1; grid-row: span 2; }
  .svc-b__items, .v3-b__items { grid-template-columns: minmax(0, 1fr); }
  .v3-b__items .svc-item:nth-child(even) { translate: none; }
  .v3-a__cols { columns: 1; }
  .v3-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-gallery .svc-photo:nth-child(even) { translate: 0 32px; }
}
@media (max-width: 640px) {
  .service .hero__content, .about .hero__content { padding-top: 110px; }
  .v3-hero .svc-btns, .v3-hero .svc-btns .btn, .svc-close .svc-btns, .svc-close .svc-btns .btn { width: 100%; }
  .wall { --row: 170px; gap: 10px; }
  .wall::after { display: none; }
}

/* About: let the hero breathe before the story band */
.about .split { margin-top: clamp(48px, 7vw, 104px); }

/* Contact: the phone and email lead each column */
.also__big { font: 500 var(--step-2)/1.15 var(--font-display); letter-spacing: var(--h-ls); color: var(--deep); text-decoration: none; margin-top: 4px; }
.also__big:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.also__big--sm { font-size: var(--step-1); overflow-wrap: anywhere; }

/* Privacy policy: a ruled list of short sections, heading left and text right */
.policy-page .v3-hero h1 { max-width: none; }
.policy { padding-block: var(--section); }
.policy__intro { max-width: 62ch; margin: 0 0 clamp(28px, 4vw, 48px); color: var(--ink-soft); }
.policy__sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px clamp(24px, 6vw, 90px); padding-block: clamp(28px, 4vw, 44px); border-top: 1.5px solid rgba(43, 31, 26, .3); }
.policy__sec:last-child { border-bottom: 1.5px solid rgba(43, 31, 26, .3); }
.policy__sec h2 { font-size: var(--step-2); }
.policy__body { max-width: 62ch; }
.policy__body > :first-child { margin-top: 0; }
.policy__body > :last-child { margin-bottom: 0; }
.policy__body p, .policy__body li { color: var(--ink-soft); }
.policy__body ul { margin: 0 0 1em; padding-left: 1.2em; }
.policy__body li { margin-bottom: .4em; }
.policy__body a { color: var(--deep); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
@media (max-width: 860px) { .policy__sec { grid-template-columns: minmax(0, 1fr); } }

/* About: the history list uses years where "How it works" uses step numbers */
.steps--years li { grid-template-columns: clamp(92px, 9vw, 124px) minmax(0, 1fr); }
.steps--years li::before { content: none; }
.steps__year { grid-row: 1 / span 2; font: 500 var(--step-2)/1.15 var(--font-display); color: var(--hamstone-tint); letter-spacing: var(--h-ls); }
@media (max-width: 560px) { .steps--years li { grid-template-columns: minmax(0, 1fr); } .steps__year { grid-row: auto; margin-bottom: 6px; } }
