/* Local work variant only: shared typography, palette and controls. */
.home-local { width: 100%; }
.home-local__hero,
.home-local__chapter,
.home-local__projects,
.home-local__contact { padding: 64px var(--space-page); }
.home-local__hero { padding-top: calc(var(--header-height) + 48px); padding-bottom: 56px; background: var(--dm-blue-950); color: var(--dm-paper); }
.home-local h1 { font-size: clamp(2.65rem, 10.8vw, 3.35rem); line-height: 1.06; max-width: 15ch; margin-bottom: 32px; letter-spacing: -.035em; }
.home-local h2 { font-size: clamp(2.25rem, 9vw, 3rem); line-height: 1.08; max-width: 19ch; margin-bottom: 24px; }
.home-local .section-label { font-size: .7rem; letter-spacing: .12em; margin-bottom: 28px; overflow-wrap: normal; }
.home-local .section-label span { min-width: 2.4rem; }
.home-local__note { font-size: .72rem; max-width: 30ch; opacity: .75; margin-bottom: 28px; }
.home-local__copy { max-width: 35ch; font-size: 1rem; line-height: 1.65; margin-bottom: 32px; }
.home-local__draft { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px; }
.home-local__chapter--alternate { background: var(--dm-warm); }
.home-local__chapter--alternate .home-local__copy { margin-left: auto; }
.home-local__photo { display: block; margin: 0; width: 100%; aspect-ratio: 4 / 3; background: var(--dm-ice); overflow: hidden; }
.home-local__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-local__projects { background: var(--dm-blue-900); color: var(--dm-paper); }
.home-local .button { min-height: 48px; max-width: 100%; white-space: normal; font-size: .75rem; }
.home-local__contact .sentence-form { margin-top: 40px; }
@media (min-width: 600px) {
  /* Readable provisional single column; desktop art direction is deferred. */
  .home-local > section { padding-left: max(var(--space-page), calc((100% - 640px) / 2)); padding-right: max(var(--space-page), calc((100% - 640px) / 2)); }
  .home-local h1 { font-size: 3.75rem; }
}
/* The long questionnaire must stay visible without an intersection threshold. */
.home-local .request-form.reveal { opacity: 1; transform: none; transition: none; }

/* Final photograph: full viewport on phones, broad undistorted frame above. */
.home-local { --home-local-inset: var(--space-page); }
.home-local #abitare { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.home-local #abitare > .section-label,
.home-local #abitare > h2,
.home-local #abitare > .home-local__copy {
  margin-left: var(--home-local-inset);
  margin-right: var(--home-local-inset);
}
.home-local__copy > p { margin-bottom: 1.4em; }
.home-local__copy > p:last-child { margin-bottom: 0; }
.home-local [data-photo-slot="finished"] {
  width: 100%; height: 100vh; height: 100dvh; aspect-ratio: auto;
}
@media (min-width: 600px) {
  .home-local { --home-local-inset: max(var(--space-page), calc((100% - 640px) / 2)); }
}
@media (min-width: 768px) {
  .home-local [data-photo-slot="finished"] { height: auto; aspect-ratio: 16 / 9; }
}
/* Gallery controls are inside the unchanged photographic frames. */
.home-local__photo { position: relative; --home-local-photo-mode: mobile; }
.home-local__gallery-track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: auto; }
.home-local__gallery-track::-webkit-scrollbar { display: none; }
.home-local__gallery-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; overflow: hidden; }
.home-local__gallery-slide img { position: absolute; inset: 0; }
.home-local__gallery-controls { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 8px; align-items: center; background: var(--dm-paper); color: var(--dm-blue-900); border-radius: var(--dm-radius-action); font-size: .75rem; }
.home-local__gallery-controls button { width: 44px; height: 44px; background: transparent; color: inherit; border: 0; }
.home-local__gallery-controls button:disabled { opacity: .35; cursor: default; }
@media (min-width: 768px) { .home-local__photo { --home-local-photo-mode: desktop; } }

/* Smartphone only: align narrative text inside its existing editorial column. */
@media (width < 768px) {
  .home-local .home-local__chapter > :is(.section-label, h2, .home-local__copy),
  .home-local .home-local__projects > :is(.section-label, h2, .home-local__copy, .button),
  .home-local .home-local__contact > :is(.section-label, h2, .home-local__copy) {
    text-align: center;
  }
}

/* Embed the existing Method number/rule in the approved label line box. */
.home-local__chapter .home-local__phase-number > .method-phase__number {
  display: inline-flex;
  height: 0;
  margin: 0;
  vertical-align: middle;
}

/* Smartphone centring must balance the blocks, not only their text. */
@media (width < 768px) {
  .home-local .home-local__chapter > :is(h2, .home-local__copy),
  .home-local .home-local__projects > :is(h2, .home-local__copy),
  .home-local .home-local__contact > :is(h2, .home-local__copy) {
    margin-inline: auto;
  }
  .home-local #abitare > :is(.section-label, h2) {
    margin-inline: var(--home-local-inset);
  }
  .home-local #abitare > .home-local__copy {
    width: calc(100% - 2 * var(--home-local-inset));
    margin-inline: auto;
  }
  .home-local .home-local__chapter > .section-label {
    display: grid;
    justify-items: center;
    align-content: start;
    grid-auto-rows: max-content;
    /* Preserve the existing 24.34375px line box at the site's 16px root.
       The section name uses the whitespace already before the heading. */
    block-size: 1.521484375rem;
  }
}

/* Desktop editorial composition. The approved smartphone rules remain untouched.
   Match Method's 1180px stacking threshold and its 5rem column gutter. */
@media (min-width: 768px) {
  .home-local > :is(.home-local__hero, .home-local__chapter, .home-local__projects, .home-local__contact) {
    padding-block: 5rem;
  }
  .home-local .home-local__hero {
    padding-top: calc(var(--header-height) + 5rem);
  }
  .home-local .home-local__chapter:not(#abitare) > :is(.section-label, h2, .home-local__copy) {
    margin-inline: auto;
    text-align: center;
  }
  .home-local__chapter .home-local__phase-number { display: block; margin-bottom: 1rem; }
  .home-local__chapter .home-local__phase-number > .method-phase__number {
    height: auto;
    vertical-align: baseline;
  }
  .home-local #abitare { padding-bottom: 0; }
  .home-local #abitare > :is(.section-label, h2, .home-local__copy) {
    margin-inline: auto;
    width: calc(100% - 2 * var(--space-page));
    text-align: center;
  }
  .home-local #abitare > .section-label { max-width: 40rem; }
  .home-local #abitare > h2 { max-width: 22ch; }
  .home-local #abitare > .home-local__copy { max-width: 40ch; margin-bottom: 4rem; }
  .home-local .home-local__projects > :is(.section-label, h2, .home-local__copy) {
    margin-inline: auto;
    text-align: center;
  }
  .home-local .home-local__projects { text-align: center; }
  .home-local .home-local__contact > :is(h2, .home-local__copy) { margin-inline: auto; }
}
@media (min-width: 1181px) {
  .home-local > :is(.home-local__hero, .home-local__chapter:not(#abitare)) {
    padding-inline: var(--space-page);
  }
  .home-local .home-local__hero h1 { max-width: 22ch; font-size: 4.5rem; }
  .home-local .home-local__chapter:not(#abitare) {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    grid-template-rows: 1fr max-content max-content max-content 1fr;
    column-gap: 5rem;
  }
  .home-local .home-local__chapter--alternate:not(#abitare) {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  }
  .home-local .home-local__chapter:not(#abitare) > :is(.section-label, h2, .home-local__copy) {
    grid-column: 1;
    width: 100%;
    max-width: 29rem;
    justify-self: center;
    margin-inline: 0;
    text-align: left;
  }
  .home-local .home-local__chapter--alternate:not(#abitare) > :is(.section-label, h2, .home-local__copy) {
    grid-column: 2;
  }
  .home-local .home-local__chapter:not(#abitare) > .section-label { grid-row: 2; }
  .home-local .home-local__chapter:not(#abitare) > h2 {
    grid-row: 3;
    font-size: 3.5rem;
    line-height: 1.06;
  }
  .home-local .home-local__chapter:not(#abitare) > .home-local__copy {
    grid-row: 4;
    font-size: 1.25rem;
    line-height: 1.5;
    margin-bottom: 0;
  }
  .home-local .home-local__chapter:not(#abitare) > .home-local__photo {
    grid-column: 2;
    grid-row: 1 / 6;
    align-self: center;
    min-width: 0;
  }
  .home-local .home-local__chapter--alternate:not(#abitare) > .home-local__photo { grid-column: 1; }
}

/* ABITARE experiment: all typography and gallery changes start at the existing
   two-column desktop threshold. Inline spans preserve the approved phone text. */
.home-local #abitare .home-local__desktop-break { display: none; }
@media (min-width: 1181px) {
  .home-local #abitare > h2 { font-size: 3.9rem; max-width: 24ch; }
  .home-local__inhabit-title-start,
  .home-local__inhabit-title-end { display: block; }
  .home-local__inhabit-title-end,
  .home-local__inhabit-conclusion {
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
  }
  .home-local #abitare > .home-local__copy { max-width: 50ch; }
  .home-local #abitare > .home-local__copy > p:nth-of-type(-n + 3) { font-size: 1.125rem; }
  .home-local #abitare .home-local__inhabit-conclusion { font-size: 1.5625rem; }
  .home-local #abitare .home-local__desktop-break { display: initial; }
  .home-local__inhabit-last { display: block; margin-top: 1.25rem; font-size: 2rem; line-height: 1.2; }
  .home-local__panorama-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-in-out; }
  .home-local__panorama-slide.is-active { opacity: 1; }
  .home-local__panorama-slide img { position: absolute; inset: 0; }
  .home-local__panorama-bar {
    position: absolute; z-index: 1; inset-inline: var(--space-page); bottom: 1rem;
    display: flex; gap: .5rem;
  }
  .home-local__panorama-bar button {
    position: relative; flex: 1; height: 44px; padding: 0;
    background: transparent; border: 0; cursor: pointer;
  }
  .home-local__panorama-bar button::before,
  .home-local__panorama-bar button > span {
    position: absolute; display: block; inset-inline: 0; top: 21px; height: 3px;
    background: var(--dm-paper); box-shadow: 0 0 0 1px var(--dm-blue-950);
  }
  .home-local__panorama-bar button::before { content: ""; opacity: .6; }
  .home-local__panorama-bar button > span { transform: scaleX(0); transform-origin: left; }
  .home-local__panorama-bar button[aria-pressed="true"]::before { opacity: 1; height: 5px; top: 20px; }
  .home-local__panorama-bar button:focus-visible { outline: 2px solid var(--dm-paper); outline-offset: 2px; }
}
@media (min-width: 1181px) and (prefers-reduced-motion: reduce) {
  .home-local__panorama-slide { transition: none !important; }
}
@media (min-width: 1181px) {
  .home-local__panorama-slide:only-child { transition: none; }
}

/* Same approved photographic corners at every viewport; the frame clips slides. */
.home-local .home-local__chapter:not(#abitare) > .home-local__photo,
.home-local .home-local__chapter:not(#abitare) > .home-local__photo img {
  border-radius: 10px;
}

/* Wider introductory copy in the stacked tablet composition only. */
@media (min-width: 768px) and (max-width: 1180px) {
  .home-local #immaginare > .home-local__copy { max-width: 28rem; }
}
