/* Preserve the opening portrait as its own native chapter. */
html.agency-scroll .agency-chapter {
  min-height: var(--chapter-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
html.agency-scroll .studio-portrait {
  height: var(--chapter-height);
  display: flex;
  flex-direction: column;
  padding-block: clamp(22px, 3.3svh, 42px);
}
html.agency-scroll .studio-portrait::after { display: none; }
html.agency-scroll .studio-portrait .page-media {
  flex: 1;
  min-height: 0;
  width: 100%;
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.agency-scroll .studio-portrait .page-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
html.agency-scroll .studio-portrait .page-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgb(0 0 0 / .7));
  pointer-events: none;
}
html.agency-scroll .studio-portrait__statement {
  left: clamp(20px, 3.5vw, 60px);
  bottom: clamp(22px, 3.5svh, 48px);
  font-size: clamp(38px, min(6vw, 8svh), 88px);
}
html.agency-scroll .agency-portrait-caption {
  flex-shrink: 0;
  margin: 0;
  padding-top: 14px;
  padding-bottom: 0;
  font-size: 11px;
  line-height: 1.6;
  color: #606060;
}

/* Independent editorial chapters share the same native page rhythm.
   Long responsive fallbacks retain ordinary reading within each chapter. */
.agency-editorial {
  position: relative;
  padding-block: clamp(28px, 4svh, 48px) clamp(40px, 6svh, 72px);
  background: var(--paper);
}
html.agency-scroll .agency-editorial {
  min-height: var(--chapter-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.agency-editorial__start, .agency-editorial__end { display: none; }
html.agency-scroll .agency-editorial__start,
html.agency-scroll .agency-editorial__end {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--chapter-height);
  pointer-events: none;
  scroll-snap-stop: always;
}
html.agency-scroll .agency-editorial__start { top: 0; scroll-snap-align: start; }
html.agency-scroll.agency-editorial-active .agency-editorial__start { height: 1px; }
html.agency-scroll .agency-editorial__end { bottom: 0; scroll-snap-align: end; }
/* One column rhythm carries the masthead, lead story and supporting columns. */
.agency-editorial { --editorial-gap: clamp(24px, 2.7vw, 42px); --editorial-space: clamp(40px, 4.5vw, 64px); }
.agency-editorial .section-topline { align-items: baseline; padding-bottom: 24px; }
.agency-editorial .section-topline > p { margin: 0; }
.agency-editorial .agency-editorial__masthead {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--editorial-gap);
  margin-bottom: var(--editorial-space);
}
.agency-editorial .agency-editorial__masthead > h2 {
  font-size: clamp(46px, 5.3vw, 82px);
  line-height: 1.05;
  letter-spacing: -.06em;
  margin: 0;
}
.agency-editorial__masthead h2 > span { color: var(--coral); }
.agency-editorial .agency-editorial__masthead > p {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.6;
  text-wrap: pretty;
}
.agency-editorial .agency-editorial__masthead:not(:has(> p)) { grid-template-columns: minmax(0, 1fr); }
.agency-editorial__lead {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--editorial-gap);
  align-items: start;
}
.agency-editorial__lead:not(:has(> figure)) { grid-template-columns: minmax(0, 1fr); }
.agency-editorial__lead:not(:has(> article)) { grid-template-columns: minmax(0, 1fr); }
.agency-editorial .agency-editorial__article { padding: 0; border: 0; }
.agency-editorial .agency-editorial__article > .eyebrow {
  margin: 0 0 16px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--coral);
}
.agency-editorial .agency-editorial__article > h3 {
  margin: 0 0 18px;
  font-size: clamp(27px, 2.6vw, 38px);
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.agency-editorial .agency-editorial__lead > article > h3 { font-size: clamp(34px, 3.2vw, 48px); }
.agency-editorial__lead > article { align-self: center; }
.agency-editorial .agency-editorial__article > p:last-child {
  margin: 0;
  max-width: 48ch;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
  text-wrap: pretty;
}
.agency-editorial__principles,
.agency-editorial__values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px var(--editorial-gap);
  margin-top: var(--editorial-space);
}
.agency-editorial__principles:has(> article:only-child),
.agency-editorial__values:has(> article:only-of-type) { grid-template-columns: minmax(0, 1fr); }
.agency-editorial__principles:has(> article:nth-child(2):last-child),
.agency-editorial__values:has(> article:nth-of-type(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agency-editorial .agency-editorial__culture-label { grid-column: 1 / -1; margin: 0; }
/* Subgrid aligns article headings and body starts without fixed text heights. */
.agency-editorial__principles { row-gap: 16px; }
.agency-editorial__values { row-gap: 18px; }
.agency-editorial__principles > article,
.agency-editorial__values > article { display: grid; grid-template-rows: subgrid; }
.agency-editorial__principles > article { grid-row: span 3; }
.agency-editorial__values > article { grid-row: span 2; }
.agency-editorial .agency-editorial__principles > article > :is(h3, p),
.agency-editorial .agency-editorial__values > article > :is(h3, p) { margin: 0; }
.agency-editorial__photographs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--editorial-gap);
  align-items: start;
  margin-top: var(--editorial-space);
}
.agency-editorial__photographs:has(> figure:only-child) { grid-template-columns: minmax(0, 1fr); }
.agency-editorial__photo { min-width: 0; margin: 0; }
.agency-editorial__photo img { display: block; width: 100%; height: auto; }
.agency-editorial__photo figcaption { margin-top: 10px; font-size: 11px; line-height: 1.55; color: var(--muted); }

/* Alternating photographs and paired ideas create a continuous reading path.
   The compact heading leaves room for full-size 16:9 photographs below. */
.agency-editorial__spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.4svh, 28px) clamp(24px, 3vw, 48px);
  align-content: start;
}
.agency-editorial .agency-editorial__spread > .agency-editorial__masthead { margin: 0; }
.agency-editorial .agency-editorial__spread > .agency-editorial__masthead > h2 {
  font-size: clamp(36px, min(4.4vw, 6svh), 68px);
}
.agency-editorial__features {
  grid-column: 1 / -1;
  display: grid;
  gap: clamp(24px, 2.6svh, 32px);
}
.agency-editorial__feature {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  grid-template-areas: "photo copy";
  gap: clamp(32px, 4.5vw, 76px);
  align-items: center;
}
.agency-editorial__feature--right {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  grid-template-areas: "copy photo";
}
.agency-editorial__feature > figure { grid-area: photo; }
.agency-editorial__copy {
  grid-area: copy;
  display: grid;
  gap: clamp(22px, 2.8svh, 30px);
}
.agency-editorial__spread .agency-editorial__photo img,
.agency-editorial__culture .agency-editorial__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.agency-editorial__feature .agency-editorial__photo figcaption { margin-top: 8px; line-height: 1.4; }
.agency-editorial__spread .agency-editorial__article { min-width: 0; }
.agency-editorial__spread .agency-editorial__article > .eyebrow { margin-bottom: 8px; }
.agency-editorial .agency-editorial__spread .agency-editorial__article > h3 {
  margin-bottom: 10px;
  font-size: clamp(26px, min(2.1vw, 3.5svh), 34px);
  line-height: 1.13;
}
.agency-editorial .agency-editorial__spread .agency-editorial__article > p:last-child {
  max-width: 72ch;
  font-size: clamp(15px, min(1.05vw, 1.9svh), 17px);
  line-height: 1.6;
}

/* Equal-sized photographs alternate with two complete culture stories.
   This section follows the final principle without a viewport-sized spacer. */
.agency-editorial__culture { margin-top: clamp(40px, 5svh, 56px); }
.agency-page > .agency-editorial__culture { margin-top: 0; }
.agency-editorial__culture-heading { margin-bottom: clamp(28px, 4svh, 42px); }
.agency-editorial .agency-editorial__culture-heading > h2 {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.06em;
}
.agency-editorial__culture-heading > h2 > span { color: var(--coral); }
.agency-editorial__culture-stories { display: grid; gap: clamp(28px, 4svh, 44px); }
.agency-editorial__culture-story {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  grid-template-areas: "copy photo";
  gap: clamp(32px, 4.5vw, 76px);
  align-items: center;
}
.agency-editorial__culture-story--reverse {
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  grid-template-areas: "photo copy";
}
.agency-editorial__culture-story > figure { grid-area: photo; }
.agency-editorial .agency-editorial__culture-story > article { grid-area: copy; min-width: 0; display: block; }
.agency-editorial .agency-editorial__culture-story > article > h3 {
  margin: 0 0 12px;
  max-width: none;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.15;
  text-wrap: pretty;
}
.agency-editorial .agency-editorial__culture-story > article > p:last-child {
  max-width: 64ch;
  margin: 0;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.65;
}
/* Each desktop chapter fills the available screen below the fixed header.
   Flexible story rows distribute the content through the frame; photo columns
   scale with both viewport dimensions while retaining their 16:9 source ratio. */
@media (min-width: 1100px) and (min-height: 740px) and (prefers-reduced-motion: no-preference) {
  html.agency-scroll main.agency-page > .agency-editorial {
    --editorial-frame-title: clamp(36px, min(4.4vw, 6svh), 68px);
    --editorial-frame-gap: clamp(20px, 2.4svh, 28px);
    --editorial-row-gap: clamp(24px, 2.6svh, 32px);
    --editorial-column-gap: clamp(32px, 4.5vw, 76px);
    --editorial-photo-share: .48;
    --editorial-photo-width: calc((100svh - var(--header-clearance) - var(--section-space) - var(--editorial-frame-title) * 1.05 - var(--editorial-frame-gap) - var(--editorial-row-gap) - 52px) * 8 / 9);
    height: 100svh;
    min-height: 100svh;
  }
  .agency-editorial--principles > .agency-editorial__spread {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--editorial-frame-gap);
  }
  html.agency-scroll main.agency-page > .agency-editorial__culture {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--editorial-frame-gap);
  }
  .agency-editorial__culture > .agency-editorial__culture-heading { margin-bottom: 0; }
  .agency-page > .agency-editorial .agency-editorial__masthead > h2,
  .agency-page > .agency-editorial .agency-editorial__culture-heading > h2 { font-size: var(--editorial-frame-title); }
  .agency-editorial--principles .agency-editorial__features,
  .agency-editorial__culture > .agency-editorial__culture-stories {
    min-height: 0;
    height: 100%;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: var(--editorial-row-gap);
  }
  .agency-page > .agency-editorial .agency-editorial__feature,
  .agency-page > .agency-editorial .agency-editorial__culture-story--reverse {
    grid-template-columns: minmax(0, min(calc((100% - var(--editorial-column-gap)) * var(--editorial-photo-share)), var(--editorial-photo-width))) minmax(0, 1fr);
    gap: var(--editorial-column-gap);
  }
  .agency-page > .agency-editorial .agency-editorial__feature--right,
  .agency-page > .agency-editorial .agency-editorial__culture-story:not(.agency-editorial__culture-story--reverse) {
    grid-template-columns: minmax(0, 1fr) minmax(0, min(calc((100% - var(--editorial-column-gap)) * var(--editorial-photo-share)), var(--editorial-photo-width)));
  }
  .agency-page > .agency-editorial .agency-editorial__photo { width: 100%; }
  .agency-page > .agency-editorial .agency-editorial__photo figcaption { margin-top: 8px; line-height: 1.4; }
  .agency-editorial--principles .agency-editorial__copy { gap: clamp(18px, 2.3svh, 26px); }
}
/* Compact desktop frames reserve enough width for the paired paragraphs. */
@media (min-width: 1100px) and (max-width: 1279px) and (min-height: 740px) and (max-height: 849px) and (prefers-reduced-motion: no-preference) {
  html.agency-scroll main.agency-page > .agency-editorial { --editorial-photo-share: .34; }
  .agency-editorial--principles .agency-editorial__copy { gap: 14px; }
  .agency-editorial--principles .agency-editorial__article > .eyebrow { margin-bottom: 6px; }
  .agency-editorial .agency-editorial__spread .agency-editorial__article > h3 { margin-bottom: 8px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .agency-editorial__feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; }
  .agency-editorial__feature--right { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .agency-editorial .agency-editorial__spread .agency-editorial__article > h3 { font-size: 27px; }
}

@media (max-width: 1000px) and (min-width: 768px) {
  .agency-editorial .agency-editorial__masthead { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .agency-editorial .agency-editorial__masthead > h2 { font-size: clamp(40px, 5.2vw, 52px); }
  .agency-editorial__lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .agency-editorial .agency-editorial__lead > article > h3 { font-size: 32px; }
  .agency-editorial .agency-editorial__article > h3 { font-size: 27px; }
}
@media (max-width: 767px) {
  html.agency-scroll .studio-portrait__statement { font-size: clamp(34px, 8.5vw, 52px); left: 20px; bottom: 25px; }
  .agency-editorial { --editorial-gap: 24px; --editorial-space: 38px; }
  .agency-editorial .section-topline { gap: 18px; }
  .agency-editorial .section-topline > span { max-width: 140px; text-align: right; }
  .agency-editorial .agency-editorial__masthead,
  .agency-editorial__lead,
  .agency-editorial__principles,
  .agency-editorial__values,
  .agency-editorial__principles:has(> article:nth-child(2):last-child),
  .agency-editorial__values:has(> article:nth-of-type(2):last-child),
  .agency-editorial__photographs { grid-template-columns: minmax(0, 1fr); }
  .agency-editorial .agency-editorial__masthead { gap: 24px; }
  .agency-editorial .agency-editorial__masthead > h2 { font-size: clamp(38px, 9.2vw, 62px); }
  .agency-editorial .agency-editorial__masthead > p { max-width: 38ch; font-size: 17px; }
  .agency-editorial .agency-editorial__article > h3 { font-size: clamp(28px, 7.6vw, 36px); }
  .agency-editorial .agency-editorial__lead > article > h3 { font-size: clamp(32px, 8.5vw, 42px); }
  .agency-editorial .agency-editorial__article > p:last-child { font-size: 16px; }
  .agency-editorial__principles,
  .agency-editorial__values { row-gap: 32px; }
  .agency-editorial__principles > article,
  .agency-editorial__values > article { display: block; grid-row: auto; }
  .agency-editorial .agency-editorial__principles > article > h3,
  .agency-editorial .agency-editorial__values > article > h3 { margin-bottom: 18px; }
  .agency-editorial .agency-editorial__principles > article > .eyebrow { margin-bottom: 16px; }
  .agency-editorial__spread { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .agency-editorial__features { gap: 44px; }
  .agency-editorial__feature,
  .agency-editorial__feature--right {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "copy";
    gap: 28px;
  }
  .agency-editorial__copy { gap: 30px; }
  .agency-editorial .agency-editorial__spread .agency-editorial__article > h3 { font-size: clamp(28px, 7.6vw, 36px); }
  .agency-editorial .agency-editorial__spread .agency-editorial__article > p:last-child { font-size: 16px; }
  .agency-editorial__culture { margin-top: 40px; }
  .agency-editorial__culture-stories { gap: 40px; }
  .agency-editorial__culture-story,
  .agency-editorial__culture-story--reverse {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "copy";
    gap: 26px;
  }
  .agency-editorial .agency-editorial__culture-story > article > h3 { font-size: clamp(28px, 7.6vw, 36px); }
  .agency-editorial .agency-editorial__culture-story > article > p:last-child { font-size: 16px; }

}

/* Short views and reduced motion retain ordinary document reading. */
@media (max-height: 600px), (prefers-reduced-motion: reduce) {
  html.agency-scroll .agency-chapter,
  html.agency-scroll .agency-editorial { min-height: 0; height: auto; scroll-snap-align: none; }
  html.agency-scroll .studio-portrait { display: block; }
  html.agency-scroll .studio-portrait .page-media { aspect-ratio: 16 / 9; }
  html.agency-scroll .agency-editorial__start,
  html.agency-scroll .agency-editorial__end { display: none; }
}
