/* Project sections — the old site's section picker in the McNeil Partners look.
   Loaded only on project pages that use sections (inc/project-sections.php). */

.project--sections .section + .section:not(.section--paper):not(.section--dark) { padding-top: calc(var(--space) * 0.6); }
.project--sections .section--dark h2, .project--sections .section--dark h3 { color: var(--white); }

/* Chapter head: "04 · Kitchen", headline, lede */
.sec-head { max-width: 48rem; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head .eyebrow { margin-bottom: 12px; }
.sec-head__title { font-size: var(--step-3); line-height: 1.15; color: var(--deep); letter-spacing: var(--track); text-wrap: balance; margin: 0; }
.section--dark .sec-head__title { color: var(--white); }
.sec-head__lede { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.45; color: var(--graphite); margin: 16px 0 0; }
.section--dark .sec-head__lede { color: var(--graphite-30); }
.sec-desc__main .sec-head__title { margin-bottom: 20px; }

/* One-sentence problem, with the rust rule */
.sec-problem { max-width: 46rem; margin: 0 0 clamp(20px, 2.5vw, 32px); padding-left: 16px; border-left: 2px solid var(--rust); font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.45; color: var(--deep); }
.section--dark .sec-problem { color: var(--white); }
.sec-body { margin-bottom: clamp(24px, 3vw, 40px); }
.sec-note { max-width: 46rem; margin: 20px 0 0; font-size: var(--step--1); color: var(--muted); }
.section--dark .sec-note { color: var(--graphite-30); }

/* Description: the story beside the facts */
.sec-desc__grid { display: block; }
.sec-desc__grid.has-facts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.sec-facts { border-top: 1px solid var(--line); padding-top: 6px; position: sticky; top: calc(var(--header-h) + 24px); font-size: var(--step--1); line-height: 1.45; }
.sec-facts dl { margin: 0; }
.sec-facts__row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.sec-facts__row:last-child { border-bottom: 0; }
.sec-facts dt { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.sec-facts dd { margin: 0; color: var(--graphite); }
.sec-facts dd p { margin: 0; }
.sec-facts dd a { color: var(--graphite); text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.sec-facts dd a:hover { color: var(--deep); text-decoration-color: var(--rust); }

/* Photos with a tag and a caption */
.sec-grid { display: grid; gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(16px, 2vw, 28px); }
.sec-grid--3, .sec-grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-grid--halves, .sec-grid--offset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sec-grid--offset > :first-child { grid-row: span 2; }
.sec-grid--full { grid-template-columns: minmax(0, 1fr); }
.sec-fig { margin: 0; }
.sec-fig__media { position: relative; overflow: hidden; background: var(--paper-2); }
.sec-fig__media img { width: 100%; height: auto; display: block; }
.sec-grid .sec-fig__media img { aspect-ratio: 3 / 2; object-fit: cover; }
.sec-grid--offset > :first-child .sec-fig__media, .sec-grid--offset > :first-child .sec-fig__media img { height: 100%; aspect-ratio: auto; }
.sec-fig.is-before img { filter: saturate(.55); }
.sec-tag { position: absolute; left: 12px; top: 12px; background: var(--white); color: var(--deep); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: var(--radius); }
.sec-fig.is-built .sec-tag { background: var(--deep); color: var(--white); }
.sec-fig__cap { font-size: var(--step--1); color: var(--muted); padding-top: 10px; line-height: 1.45; }
.section--dark .sec-fig__cap { color: var(--graphite-30); }

/* Before / after slider spacing inside a chapter */
.sec-compare { margin: 0; }

/* Rendering beside the built photo, one row per camera position */
.sec-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.sec-pair + .sec-pair { margin-top: clamp(24px, 3vw, 40px); }
.sec-pair .sec-fig__media img { aspect-ratio: 3 / 2; object-fit: cover; }

/* What changed */
.sec-table-wrap { overflow-x: auto; max-width: 52rem; }
.sec-table th[scope="row"] { font-weight: 600; color: var(--deep); padding-right: 24px; }
.sec-table thead th { white-space: nowrap; }
.sec-table td { color: var(--graphite); }
.sec-table .sec-table__after { font-family: var(--font-serif); font-weight: 700; color: var(--deep); }
.sec-table tr.is-full td { font-family: var(--font-serif); color: var(--deep); }
.section--dark .sec-table th, .section--dark .sec-table td, .section--dark .sec-table .sec-table__after { color: var(--white); border-color: rgba(255,255,255,.18); }

/* Pull quote */
.sec-quote .pull { margin-inline: auto; text-align: left; }
.sec-quote .pull p::before { content: "\201C"; }
.sec-quote .pull p::after { content: "\201D"; }

/* Key features (old Project summary) */
.sec-summary__grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.sec-summary__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sec-summary__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-summary__col { border-top: 2px solid var(--deep); padding-top: 16px; }
.sec-summary__title { font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); margin: 0 0 12px; }
.sec-summary__body { color: var(--muted); }
.sec-summary__body ul { padding-left: 1.1em; }

/* Gallery */
.sec-gallery { display: grid; gap: 12px; }
.sec-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sec-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sec-gallery__item { margin: 0; }
.sec-gallery__item a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.sec-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.sec-gallery__item a:hover img { opacity: .9; }
.sec-gallery__item.is-collapsed { display: none; }
.sec-gallery__actions { margin: clamp(20px, 2.5vw, 32px) 0 0; text-align: center; }

/* Closing invitation */
.sec-cta__inner { display: flex; flex-direction: column; gap: 16px; }
.sec-cta--center .sec-cta__inner { align-items: center; text-align: center; }
.sec-cta__title { font-size: var(--step-3); line-height: 1.15; color: var(--deep); margin: 0; text-wrap: balance; }
.section--dark .sec-cta__title { color: var(--white); }
.sec-cta__body { max-width: 38rem; margin: 0; font-size: var(--step-1); line-height: 1.5; }
.sec-cta__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: 16px 28px; margin-top: 8px; }
.sec-cta--center .sec-cta__actions { justify-content: center; }

@media (max-width: 860px) {
	.sec-desc__grid.has-facts { grid-template-columns: minmax(0, 1fr); }
	.sec-facts { position: static; }
	.sec-grid--3, .sec-grid--thirds, .sec-gallery--3, .sec-gallery--4, .sec-summary__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sec-grid--offset > :first-child { grid-row: auto; grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.sec-grid--3, .sec-grid--thirds, .sec-grid--halves, .sec-grid--offset, .sec-pair, .sec-summary__grid--2, .sec-summary__grid--3 { grid-template-columns: minmax(0, 1fr); }
	.sec-gallery--2, .sec-gallery--3, .sec-gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
