/* Shared typography and spacing for every public page, in both colour schemes. */
:root {
    --text-small: .875rem;
    --text-ui: 1rem;
    --text-body: 1.125rem;
    --text-lead: 1.25rem;
    --page-title-size: clamp(2.75rem, 7.2vw, 5.5rem);
    --section-title-size: clamp(2.125rem, 4.05vw, 3.375rem);
    --card-title-size: clamp(1.6875rem, 2.7vw, 2.125rem);
    --reading-width: 760px;
    --heading-space: clamp(48px, 5.6vw, 72px);
    --intro-space: clamp(28px, 3.6vw, 48px);
    --section-space: clamp(48px, 7.2vw, 96px);
    --grid-gap: clamp(24px, 3.2vw, 40px);
    --panel-space: clamp(32px, 4.8vw, 64px);
}

h2 { font-size:var(--section-title-size); }
h3 { font-size:var(--card-title-size); }
.error-page h1 { font-size:var(--page-title-size); }

.page-heading {
    position: relative;
    padding-block: var(--heading-space) var(--intro-space);
}
.page-heading .eyebrow {
    position: absolute;
    top: calc(var(--heading-space) - 28px);
    max-width: 80%;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.page-heading h1 {
    max-width: 1000px;
    font-size:var(--page-title-size);
    line-height: 1.08;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.page-heading .lead {
    max-width: 640px;
    min-height: 3.7em;
    margin: 18px 0 0;
    font-size:var(--text-lead);
    line-height: 1.75;
    color: var(--secondary);
}

.section-bottom,
.catalogue,
.work-detail,
.contact-page { padding-bottom: var(--section-space); }
.selected-works { padding-top: var(--section-space); }
.section-heading { margin-bottom: var(--intro-space); }
.section-heading h2,
.image-text h2,
.prose h2,
.contact-callout h2 { font-size:var(--section-title-size); }
.prose h3,
.contact-technical h2 { font-size:var(--card-title-size); }
.work-information h1 { font-size:clamp(2.25rem, 4.95vw, 4.5rem); }

.work-grid,
.news-grid,
.category-grid,
.photo-grid { gap: var(--grid-gap); }
.work-card :is(h2, h3),
.news-card :is(h2, h3),
.category-card h2 {
    font-size:var(--card-title-size);
    line-height: 1.2;
    letter-spacing: -.02em;
}
.news-card .eyebrow { margin-bottom: 14px; }
.news-card-image { margin-bottom: 24px; }

.atelier-section,
.artist-profile {
    padding-block: var(--panel-space);
    margin-bottom: var(--section-space);
}
.image-text { column-gap: clamp(32px, 6vw, 88px); }
.image-text-copy .prose { font-size:var(--text-body); line-height: 1.75; }

.reading-copy {
    max-width: var(--reading-width);
    margin-inline: 0;
    padding: 0;
}
.prose { font-size:var(--text-body); line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }
.legal-copy :is(h2, h3):first-child { margin-top: 0; }
.article-cover { margin-bottom: var(--intro-space); }
.article-cover-frame { margin-inline: 0; }
.pagination { margin-top: var(--intro-space); }

.button { min-height: 48px; }
.text-link { min-height: 44px; align-items: center; }
.text-link:hover { color: var(--accent); }

@media (max-width: 599px) {
    .work-information h1 { font-size:var(--page-title-size); }
    .page-heading .lead { font-size:var(--text-body); }
    .work-grid,
    .news-grid { row-gap: 36px; }
    .section-heading { flex-wrap: wrap; }
    .section-heading .text-link {
        margin-top: 0;
        font-size:var(--text-ui);
    }
}
@media (max-width: 359px) {
    :root { --page-title-size: 2.25rem; }
    .site-header .brand { max-width: calc(100% - 104px); }
    .site-header .brand :is(img, svg) { max-width: 100%; }
}

/* The original logo has a tall transparent canvas. Fit it to the wide brand
   frame using ordinary theme styling; the asset stays in native EmDash media. */
.brand { width: clamp(230px, 27vw, 300px); }
.brand img,
.footer-brand img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 280 / 73;
    object-fit: cover;
    object-position: center;
}
.footer-brand { width: 260px; }
.site-header nav a { min-height: 44px; }
.work-meta { flex-wrap: wrap; }
@media (max-width: 799px) {
    .brand { width: clamp(180px, 58vw, 218px); }
}

/* Native EmDash repeater images, presented as selectable main views plus a
   complete gallery. Selecting a variant never hides an overview photograph. */
.work-primary-photo [hidden] { display: none; }
.work-photo-section h2 { margin: 28px 0 18px; font: var(--text-ui)/1.5 var(--sans); }
.work-photo-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.work-photo-overview figure { margin: 0; padding: 14px; }
.work-photo-overview img { width: 100%; height: 230px; object-fit: contain; }
.work-photo-overview figcaption { margin-top: 10px; }
.variant-selector { margin-block: 28px; }
.variant-selector label { display: block; margin-bottom: 9px; font-size: var(--text-ui); }
.variant-selector select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font: var(--text-ui)/1.5 var(--sans); }
.variant-selector select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media(max-width:599px) { .work-photo-overview img { height: 190px; } }
.article-cover .image-fit-contain { aspect-ratio: auto; }
.article-cover .image-fit-contain img { height: auto; max-height: 720px; }
@media(max-width:599px) {
    .work-detail .work-information { order: -1; }
    .work-detail .work-photo-overview figure:not(:first-child) { margin-top: 0; }
}
