/* ============================================
   ARTIST PORTFOLIO — Main Stylesheet
   White Cube aesthetic for a contemporary artist
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* White Cube palette */
    --color-bg: #ffffff;
    --color-text: #141414;
    --color-text-muted: rgba(0, 0, 0, 0.55);
    --color-accent: #141414;
    --color-border: rgba(0, 0, 0, 0.12);
    --color-surface: #f4f4f4;        /* neutral placeholder for image boxes */
    --color-overlay: rgba(0, 0, 0, 0.18);
    --color-header-bg: rgba(255, 255, 255, 0);
    --color-header-bg-scrolled: rgba(255, 255, 255, 0.92);
    --font-primary: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --transition-speed: 0.4s;
    --header-height: 72px;
    --container-wide: 1400px;
    --container-std: 1200px;
    /* Prose measure for text-primary pages (.content-section.narrow): About /
       Artist Statement / Biography, plus exhibition & silk descriptions, press &
       studio intros. Widened 760 → 990 (v1.5.0) — on laptop/desktop the old column
       felt too narrow, and the extra room lets a side-floated photo sit next to the
       running text without cramping. On phones/tablets the viewport is narrower than
       990px, so the container still fills 100% and the mobile layout is unaffected. */
    --container-narrow: 990px;

    /* AUDIT-FIX #9: spacing scale tokens (4-128). Introduced for consistency;
       applied to the page gutter (#8) and called-out paddings (#19). Not every
       legacy literal is migrated — see report. Verify in browser: edge alignment
       of header/content/footer is unchanged or tighter, no new horizontal scroll. */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 48px;
    --space-9: 64px;
    --space-10: 80px;
    --space-11: 96px;
    --space-12: 128px;

    /* AUDIT-FIX #10: type scale tokens. The theme had ~12 near-identical small
       sizes (0.72–1.0rem) for secondary text; collapsed into 4 tokens, rounding
       to the nearest (max shift ≤ ~0.7px, sub-perceptible). Headings keep their
       clamp() scales untouched. Verify in browser: secondary-text hierarchy
       (nav / captions / meta / labels) still reads the same. */
    --text-xs: 0.75rem;      /* was 0.72 / 0.74 / 0.76 */
    --text-sm: 0.8125rem;    /* was 0.78 / 0.8 / 0.82 / 0.85 */
    --text-base: 0.92rem;    /* was 0.88 / 0.9 / 0.92 / 0.95 */
    --text-lg: 1rem;
    --text-nav: 0.95rem;        /* header menu links (Cormorant runs small — needs a larger size) */
    --caption-title: 1.15rem;   /* card overlay captions: one uniform scale across all sections */
    --caption-meta: 0.95rem;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

a:hover {
    color: var(--color-text-muted);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    /* Cormorant's default digits are old-style (a "1" is x-height, a "3" descends);
       lining figures keep titles like "1" / "3" visually the same size. */
    font-variant-numeric: lining-nums;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--color-header-bg);
    transition: background var(--transition-speed) ease,
                backdrop-filter var(--transition-speed) ease;
    display: flex;
    align-items: center;
}

.site-header.scrolled {
    background: var(--color-header-bg-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.site-header .inner {
    width: 100%;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-6);   /* AUDIT-FIX #8/#9: header gutter via token (32px) */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-logo a {
    font-family: var(--font-heading);
    font-variant-numeric: lining-nums;
    font-size: var(--text-lg);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    transition: opacity var(--transition-speed) ease;
}

.site-logo a:hover {
    opacity: 0.65;
    color: var(--color-text);
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    gap: 36px;
    align-items: center;
}

.main-navigation a {
    font-family: var(--font-heading);
    font-variant-numeric: lining-nums;
    font-size: var(--text-nav);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
    padding: 6px 0;
    transition: opacity var(--transition-speed) ease, color var(--transition-speed) ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-speed) ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after,
.main-navigation li.active > a::after {
    width: 100%;
}

.main-navigation a:hover {
    color: var(--color-text);
    opacity: 0.75;
}

/* Dropdown (About) */
.main-navigation .topnav > li {
    position: relative;
}

.main-navigation .caret {
    display: inline-block;
    font-size: 0.6em;
    margin-left: 6px;
    opacity: 0.55;
    transform: translateY(-1px);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 210px;
    padding: 20px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease,
                transform var(--transition-speed) ease,
                visibility var(--transition-speed) ease;
    z-index: 1100;
}

.main-navigation .sub-menu::before {
    /* Hover bridge so the dropdown doesn't close in the gap between the
       parent link and the menu. It overlaps ~14px up INTO the parent link,
       so it must NOT capture the pointer — otherwise it sits on top of the
       "About" link and the cursor stops showing the clickable hand there
       (and clicks fall through to the bridge instead of the link). */
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    pointer-events: none;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.main-navigation .sub-menu a {
    white-space: nowrap;
    color: var(--color-text);
    font-size: var(--text-nav);
}

.main-navigation .sub-menu a::after {
    background: var(--color-text);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Fullscreen Slideshow --- */
.fullscreen-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;        /* fallback for browsers without dynamic-viewport units */
    height: 100dvh;       /* MOBILE-FIX: tracks the mobile address bar so the hero
                             never gets clipped / leaves a gap on iOS & Android */
    z-index: 0;
    overflow: hidden;
    background: var(--color-surface);
}

.fullscreen-slideshow .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fullscreen-slideshow .slide.active {
    opacity: 1;
}

.fullscreen-slideshow .slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
}

/* Slideshow dots */
.slideshow-nav {
    position: fixed;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 2px;   /* AUDIT-FIX #5: was 14px; reduced to offset the larger 24px hit zones so the visible dot pitch (~26px) ≈ the old 25px */
}

/* AUDIT-FIX #5: the clickable target was 11×11px — far under the 24px minimum.
   The <button> is now a 24×24px transparent hit area; the visible 11px dot is
   painted by ::before, so it looks identical but is much easier to hit (desktop
   and touch). NEEDS-BROWSER-CHECK #5: confirm the dot row still looks balanced
   and that adjacent hit zones don't feel cramped after the gap change. */
.slideshow-nav button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.slideshow-nav button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    transform: translate(-50%, -50%);
    transition: all var(--transition-speed) ease;
}

.slideshow-nav button:hover::before {
    border-color: #fff;
}

.slideshow-nav button.active::before {
    background: #fff;
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Slideshow arrows */
.slideshow-arrows {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 18px;
    pointer-events: none;
}

.slideshow-arrows button {
    pointer-events: all;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity var(--transition-speed) ease;
    padding: 22px 16px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.slideshow-arrows button:hover {
    opacity: 1;
}

/* Hero Title Overlay */
.hero-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    pointer-events: none;
}

.hero-title h1 {
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.hero-title--dark h1 {
    color: var(--color-text);
    text-shadow: none;
}

/* --- Main Content Area --- */
.site-content {
    position: relative;
    z-index: 2;
    background: var(--color-bg);
}

.site-content.page-content {
    padding-top: var(--header-height);
    min-height: 70vh;
}

/* --- Archive Header --- */
.archive-header {
    max-width: var(--container-std);
    margin: 0 auto;
    padding: 36px var(--space-6) 8px;   /* AUDIT-FIX #8/#9: gutter 30→32, now matches header */
    text-align: center;
}

.archive-header h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.3rem);
    margin: 0;
}

.archive-header .archive-intro {
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 14px auto 0;
    font-size: var(--text-base);
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    max-width: var(--container-std);
    margin: 0 auto;
    padding: 30px var(--space-6) 8px;   /* AUDIT-FIX #8/#9: gutter 30→32, now matches header */
}

.filter-bar a {
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 4px 0;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.filter-bar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-speed) ease;
}

.filter-bar a:hover,
.filter-bar a.active {
    color: var(--color-text);
}

.filter-bar a:hover::after,
.filter-bar a.active::after {
    width: 100%;
}

/* --- Page Hero --- */
.page-hero {
    position: relative;
    height: 44vh;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--color-surface);
    opacity: 0.35;
}

.page-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.92));
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 300;
    letter-spacing: 0.25em;
    color: var(--color-text);
    text-shadow: none;
    margin: 0;
}

/* --- Content Sections --- */
.content-section {
    max-width: var(--container-std);
    margin: 0 auto;
    /* SPACING-FIX: adaptive vertical padding (was fixed 80px). 80px stays on a
       large desktop (White Cube airiness), but scales down on laptops/tablets so a
       short block is no longer dominated by whitespace. Horizontal gutter is the
       on-grid token. */
    padding: clamp(48px, 6vw, 80px) var(--space-6);
}

/* SPACING-FIX: collapse stacked sections. Two consecutive .content-section blocks
   (single-exhibition / single-silk: meta+description then gallery; press: PDF grid
   then text) used to double up to 160–232px of dead space because each carried a
   full 80px padding on BOTH touching sides. The section that is FOLLOWED by another
   gives up its bottom padding, and the one that FOLLOWS gives up its top — the
   shared gap becomes one ~48–80px space instead of two. :has() is universally
   supported in 2026 browsers; where it isn't, the rule is simply ignored (falling
   back to the base padding above), so it degrades safely. */
.content-section:has(+ .content-section) {
    padding-bottom: clamp(24px, 3vw, 40px);
}

.content-section + .content-section {
    padding-top: clamp(24px, 3vw, 40px);
}

.content-section.narrow {
    max-width: var(--container-narrow);
}

.content-section.wide {
    max-width: var(--container-wide);
}

/* v1.6.1: text-primary pages (About / Artist Statement / Biography-CV) run the
   full site-frame width — "edge to edge", aligned with the header (logo ↔ menu)
   — instead of the 990px prose column. Scoped to plain page.php pages via the
   `.page` body class; the Press text block (.press-text) and Studio intro
   (.studio-intro) keep the narrow measure, and CPT descriptions
   (single-exhibition / single-silk / 404) are unaffected (not body.page).
   Mobile is untouched: the viewport is < 1400px, so it already fills 100%. */
.page .content-section.narrow:not(.press-text):not(.studio-intro) {
    max-width: var(--container-wide);
}

/* --- Masonry Grid (Artworks / Silk / Exhibition galleries) ---
   True masonry via CSS columns: always 3 equal-width columns. Every work fills
   its column at its own natural proportions — never cropped, never distorted, so
   portrait and landscape pieces simply keep their own height. The horizontal gap
   (column-gap) and the vertical gap (item margin-bottom) are the same value, so
   the spacing between works is identical everywhere. */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

.masonry-grid > * {
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

/* --- Artworks / Silk / Exhibitions: 3-up media grid (centred when not full) ---
   A flex row of three equal thirds with identical horizontal/vertical gaps.
   justify-content: center means a row that isn't full — 1 or 2 works, or the
   leftover tiles of the last row — sits centred instead of clinging to the left.
   Every section that shows media shares this one typed-frame grid: the Artworks
   / Silk / Exhibitions archives, the series-filter pages and the single
   Exhibition / Silk gallery pages. The column gap lives in --grid-gap so the
   tile width and the phone breakpoint stay in sync from one value. */
.post-type-archive-artwork .masonry-grid,
.tax-artwork_series .masonry-grid,
.post-type-archive-silk .masonry-grid,
.tax-silk_type .masonry-grid,
.post-type-archive-exhibition .masonry-grid,
.tax-exhibition_type .masonry-grid,
.single-exhibition .masonry-grid,
.single-silk .masonry-grid,
.the-studio-page .masonry-grid {
    --grid-gap: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Mixed orientations in one row (e.g. two horizontal + one vertical): the
       shorter tiles sit centered against the tallest one instead of stuck to
       the top. Applies to every gallery via the shared selector group above. */
    align-items: center;
    gap: var(--grid-gap);
}

.post-type-archive-artwork .masonry-grid > *,
.tax-artwork_series .masonry-grid > *,
.post-type-archive-silk .masonry-grid > *,
.tax-silk_type .masonry-grid > *,
.post-type-archive-exhibition .masonry-grid > *,
.tax-exhibition_type .masonry-grid > *,
.single-exhibition .masonry-grid > *,
.single-silk .masonry-grid > *,
.the-studio-page .masonry-grid > * {
    flex: 0 0 calc((100% - 2 * var(--grid-gap)) / 3);
    max-width: calc((100% - 2 * var(--grid-gap)) / 3);
    margin: 0;
}

/* Typed frames: the frame carries a per-image aspect-ratio set inline (see
   artist_portfolio_artwork_frame_style) — vertical 4:5, horizontal 3:2 or
   square 1:1 — and the photo fills it without distortion. Cover trims only the
   edges; proportions are never stretched. The tile scales with its column, so
   the whole grid stays responsive. */
.post-type-archive-artwork .artwork-item img,
.tax-artwork_series .artwork-item img,
.post-type-archive-silk .artwork-item img,
.tax-silk_type .artwork-item img,
.post-type-archive-exhibition .artwork-item img,
.tax-exhibition_type .artwork-item img,
.single-exhibition .artwork-item img,
.single-silk .artwork-item img,
.the-studio-page .artwork-item img {
    height: 100%;
    object-fit: cover;
}

/* Placeholder fill when a tile has no image (e.g. an exhibition without a
   cover) — keeps the entry visible at its typed-frame size. */
.artwork-thumb-empty {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
}

/* Artwork card (used in masonry) */
.artwork-item {
    position: relative;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}

/* Wrapper around the image + caption: it's exactly the image's height, so the
   hover caption sits on the image's real bottom edge. */
.artwork-frame {
    position: relative;
    display: block;
    overflow: hidden;
    line-height: 0;
}

.artwork-item img {
    width: 100%;
    height: auto;                  /* keep real proportions, show the whole work */
    display: block;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.artwork-item:hover img {
    transform: scale(1.03);
    opacity: 0.9;
}

/* AUDIT-FIX #3: gallery captions were opacity:0 until hover on desktop — invisible
   to non-hovering visitors, while the Silk archive shows captions permanently and
   touch devices force them on. Unified to ALWAYS-VISIBLE: title + meta show at rest
   on every device (matching Silk and the existing mobile rule); hover now only
   zooms the image. The dark gradient scrim is kept for legibility.
   NEEDS-BROWSER-CHECK #3: on a very light / high-key photo, confirm the white title
   still reads against the 0.78→0 scrim; strengthen the gradient if it washes out. */
.artwork-item .artwork-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 20px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    color: #fff;
    opacity: 0;                    /* desktop: hidden until hover/focus */
    transform: translateY(8px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.artwork-item:hover .artwork-info,
.artwork-item:focus-visible .artwork-info {
    opacity: 1;
    transform: translateY(0);
}

.artwork-info h3 {
    font-size: var(--caption-title);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin: 0 0 4px;
    color: #fff;
}

.artwork-info span {
    display: block;
    font-size: var(--caption-meta);
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* --- The Studio: identical to the Artworks block ---
   Inherits the flex 3-up grid, typed frames and hover-zoom from the shared
   .masonry-grid / .artwork-item rules above (the .the-studio-page selector is
   added to each group). Differences: no series filter and no caption overlay —
   each photo opens in the shared full-screen zoom viewer on click (same one as
   single artworks; see .studio-zoom-trigger below). */
.the-studio-page .studio-intro {
    text-align: center;
    margin-bottom: 28px;
}
.the-studio-page .studio-intro p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* The Studio card is a zoom trigger (a <figure role="button">). It reuses the
   .zoom-hint badge and zoom-in cursor of the single-artwork trigger, without
   pulling in that trigger's image rules (those would fight the grid frame). */
.studio-zoom-trigger {
    cursor: zoom-in;
}
.studio-zoom-trigger:hover .zoom-hint,
.studio-zoom-trigger:focus-visible .zoom-hint {
    opacity: 1;
    transform: scale(1);
}
.studio-zoom-trigger:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

/* --- Press: PDF reader cards + in-site lightbox viewer ---
   Each card shows a PDF.js-rendered cover (first page) and opens a full-screen
   iframe reader on click. White-cube styling: paper card, hairline border,
   faint shadow; the "Read" affordance and title sit beneath the cover. */
.press-pdf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.press-pdf-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: transform var(--transition-speed) ease;
}
.press-pdf-card:hover { transform: translateY(-4px); }

.press-pdf-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f3f3f1;
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.press-pdf-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.press-pdf-card.is-ready .press-pdf-canvas { opacity: 1; }

/* Loading shimmer before the first page is drawn */
.press-pdf-card.is-loading .press-pdf-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, #ececea 30%, #f6f6f4 50%, #ececea 70%);
    background-size: 220% 100%;
    animation: press-pdf-shimmer 1.3s ease-in-out infinite;
}
@keyframes press-pdf-shimmer {
    0% { background-position: 180% 0; }
    100% { background-position: -180% 0; }
}

/* Plain "PDF" badge fallback when a cover can't be rendered */
.press-pdf-fallback {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28%;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: 2px;
    opacity: 0;
}
.press-pdf-card.is-failed .press-pdf-fallback,
.press-pdf-card:not(.is-rendered) .press-pdf-fallback { opacity: 1; }
.press-pdf-card.is-ready .press-pdf-fallback { opacity: 0; }

/* Hover "read" pill over the cover */
.press-pdf-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    z-index: 2;
}
.press-pdf-play::before {
    content: "";
    position: absolute;
    left: 55%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent #111;
    margin-left: 2px;
}
.press-pdf-card:hover .press-pdf-play,
.press-pdf-card:focus-visible .press-pdf-play { opacity: 1; }

.press-pdf-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 4px 4px;
}
.press-pdf-label {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.press-pdf-title {
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Page text block (renders below the gallery) */
.the-press-page .press-text {
    text-align: left;
    margin-top: 0;   /* SPACING-FIX: the section-to-section gap is handled by the
                        stacked-sections collapse rule above; this extra 72px was
                        triple-stacked on top of two 80px paddings (=232px). */
}
.the-press-page .press-text p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* --- In-site PDF reader (lightbox) --- */
.press-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.86);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.press-lightbox.open {
    opacity: 1;
    visibility: visible;
}
.press-lb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #111;
    color: #fff;
    flex-shrink: 0;
}
.press-lb-title {
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.press-lb-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}
.press-lb-download {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1px;
}
.press-lb-download:hover { color: #fff; border-bottom-color: #fff; }
.press-lb-close {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}
.press-lb-close:hover { opacity: 1; }
.press-lb-body {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #525659;
}
.press-lb-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #525659;
    display: block;
}

/* --- Exhibitions: symmetric card grid --- */
.exhibition-group {
    margin-bottom: clamp(40px, 5vw, 64px);   /* SPACING-FIX: was 80px — it sits inside an 80px-padded section, so 80 was double-spacing the group separation */
}

.exhibition-group:last-child {
    margin-bottom: 0;
}

.exhibition-group-title {
    font-size: var(--text-xs);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 40px;
}

/* --- Exhibition gallery on single page --- */
.exhibition-gallery-item {
    cursor: pointer;
}

/* --- Single Artwork / Video / Silk page --- */
.single-artwork {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Fallback (video without embed): centered single column */
.single-artwork .artwork-image {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 50px;
}

/* Fallback only (video poster, no split): full-width centered image.
   The split layout is excluded so it can scale by its longest side instead. */
.single-artwork:not(.artwork-split) .artwork-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-artwork .artwork-details {
    max-width: 680px;
    margin: 0 auto;
    /* SPACING-FIX: was a fixed 80px bottom. A short video block (title + year, no
       description) floated in 80px of whitespace; clamp scales it to the content. */
    padding: 0 var(--space-6) clamp(32px, 5vw, 56px);
    text-align: center;
}

.single-artwork .artwork-details h1 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: 14px;
    letter-spacing: 0.14em;
}

.single-artwork .artwork-meta {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    margin-bottom: 32px;
    line-height: 1.9;
    letter-spacing: 0.03em;
}

.single-artwork .artwork-meta > div + div {
    margin-top: 2px;
}

.single-artwork .artwork-description {
    font-weight: 300;
    line-height: 1.85;
    text-align: left;
}

/* --- Split layout: text left, image right --- */
.artwork-split .artwork-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(30px, 4vw, 70px);
    align-items: start;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 clamp(22px, 4vw, 50px);
}

/* Single column when the work has no image */
.artwork-split.no-image .artwork-layout {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.artwork-split .artwork-details {
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
    position: sticky;
    top: calc(var(--header-height) + 40px);
}

.artwork-split .artwork-details h1 {
    text-align: left;
}

.artwork-split .artwork-description {
    text-align: left;
}

/* Image column — fits within the viewport, click to zoom */
.artwork-split .artwork-image {
    width: auto;
    max-width: none;
    margin: 0;
    position: sticky;
    top: calc(var(--header-height) + 40px);
}

.artwork-zoom-trigger {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    line-height: 0;
}

.artwork-zoom-trigger img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - var(--header-height) - 90px);
    margin: 0 auto;
    display: block;
}

.zoom-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.55);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    pointer-events: none;
}

.artwork-zoom-trigger:hover .zoom-hint,
.artwork-zoom-trigger:focus-visible .zoom-hint {
    opacity: 1;
    transform: scale(1);
}

/* Show the zoom hint permanently on touch devices (no hover) */
@media (hover: none) {
    .zoom-hint {
        opacity: 1;
        transform: scale(1);
    }
}

/* Collapse the split layout on narrow screens: image first, then text */
@media screen and (max-width: 900px) {
    .artwork-split .artwork-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .single-artwork.artwork-split .artwork-details {
        position: static;
        top: auto;
        padding: 0;
        order: 2;
    }

    .artwork-split .artwork-image {
        position: static;
        top: auto;
        order: 1;
    }

    .artwork-split .artwork-zoom-trigger img {
        max-height: 78vh;
        width: auto;
    }
}

/* Prev / Next / All navigation */
.artwork-nav,
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px var(--space-6) clamp(40px, 5vw, 64px);   /* SPACING-FIX #8/#9 + spacing: bottom 80→adaptive — less dead air at the bottom of a work page */
    border-top: 1px solid var(--color-border);
}

/* AUDIT-FIX #6: links were dimmed with opacity (a:0.6, nav-all:0.4) which crushes
   contrast on white (0.4 ≈ 2.4:1, fails WCAG). Switched to a solid color token:
   --color-text-muted = #737373 = 4.74:1 (passes 4.5:1), darkening to full text on
   hover/focus. Verify in browser: Prev/Next/All read clearly, not ghosted. */
.artwork-nav a,
.post-navigation a {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color var(--transition-speed) ease;
}

.artwork-nav a:hover,
.post-navigation a:hover {
    color: var(--color-text);
}

.artwork-nav .nav-all {
    color: var(--color-text-muted);   /* AUDIT-FIX #6: was opacity:0.4 (~2.4:1) */
}

/* Exhibition detail meta + back link */
.exhibition-meta {
    margin-bottom: 44px;
    color: var(--color-text-muted);
    text-align: center;
}

.exhibition-meta > div {
    font-size: var(--text-base);
    letter-spacing: 0.08em;
    margin-bottom: 5px;
}

.back-link {
    display: inline-block;
    margin-top: clamp(32px, 4vw, 48px);   /* SPACING-FIX: was 60px — it already sits inside a padded section, so this is the only separation it needs */
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);   /* AUDIT-FIX #6: was opacity:0.5 (~3.0:1), now 4.74:1 */
    transition: color var(--transition-speed) ease;
}

.back-link:hover {
    color: var(--color-text);
}

/* Small underlined action link */
.btn-link {
    display: inline-block;
    margin-top: 22px;
    font-size: var(--text-sm);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 2px;
    color: var(--color-text);
    transition: opacity var(--transition-speed) ease;
}

.btn-link:hover {
    opacity: 0.6;
    color: var(--color-text);
}

/* Sub-section within a single page (extra top spacing) */
.subsection {
    margin-top: clamp(40px, 5vw, 64px);   /* SPACING-FIX: was 64px fixed — now scales; still separates a gallery from "Works in this Exhibition" */
}

.subsection-title {
    font-size: var(--text-lg);
    font-weight: 400;
    letter-spacing: 0.16em;
    margin-bottom: 30px;
}

/* Sold marker on a single artwork */
.sold-tag {
    margin-top: 12px;
    opacity: 0.5;
}

/* Outlined button (404 / CTA) */
.btn-outline {
    display: inline-block;
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-6);   /* AUDIT-FIX #19: 13px→12px (on-grid); height now ~40px */
    color: var(--color-text);
    transition: border-color var(--transition-speed) ease, background var(--transition-speed) ease;
}

.btn-outline:hover {
    border-color: var(--color-text);
    background: var(--color-surface);
    color: var(--color-text);
}

/* 404 layout */
.error-page {
    text-align: center;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-page .error-code {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 16px;
    opacity: 0.22;
}

/* AUDIT-FIX #18: 404.php inline styles → classes (token-based) */
.error-page .error-title {
    font-size: var(--text-lg);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-6);
}

.error-page .error-text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

/* --- Video grid --- */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;   /* center shorter (horizontal) cards against taller (portrait) ones */
    gap: 48px 28px;
}

.video-card {
    flex: 0 0 calc((100% - 56px) / 3);
    max-width: calc((100% - 56px) / 3);
    position: relative;
}

/* Portrait cards are ~20% smaller so they don't dominate a row next to horizontal ones */
.video-card--portrait {
    flex: 0 0 calc((100% - 56px) / 3 * 0.8);
    max-width: calc((100% - 56px) / 3 * 0.8);
}

.video-card .video-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
}

.video-card .video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.04);
    opacity: 0.92;
}

.video-card .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.video-card:hover .play-btn {
    background: rgba(0, 0, 0, 0.82);
    transform: translate(-50%, -50%) scale(1.08);
}

.video-card .play-btn::after {
    content: '';
    display: block;
    margin-left: 4px;
    border-style: solid;
    border-width: 10px 0 10px 17px;
    border-color: transparent transparent transparent #fff;
}

.video-card .video-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 20px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    opacity: 0;                    /* desktop: hidden until hover/focus */
    transform: translateY(8px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.video-card:hover .video-meta,
.video-card:focus-visible .video-meta {
    opacity: 1;
    transform: translateY(0);
}

.video-card .video-meta h3 {
    font-size: var(--caption-title);
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: none;
    margin-bottom: 6px;
    color: #fff;
}

/* AUDIT-FIX #18 + #6: year suffix was inline opacity:0.5 (~3:1); muted color = 4.74:1 */
.video-card .video-meta h3 .video-year {
    color: rgba(255, 255, 255, 0.78);
}

.video-card .video-meta p {
    font-size: var(--caption-meta);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin: 0;
}

/* Responsive 16:9 video embed */
.video-embed {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 50px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Self-hosted video fills the 16:9 box without cropping the frame */
.video-embed video {
    object-fit: contain;
    background: #000;
}

/* --- Pagination --- */
.pagination-wrapper {
    text-align: center;
    margin-top: 64px;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination .page-numbers {
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding: 8px 12px;
    border: 1px solid transparent;
    transition: all var(--transition-speed) ease;
}

.pagination a.page-numbers:hover {
    color: var(--color-text);
    border-color: var(--color-border);
}

.pagination .page-numbers.current {
    color: var(--color-text);
    border-color: var(--color-text);
}

.pagination .page-numbers.dots {
    border: none;
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 90px 30px;
}

.empty-state p {
    color: var(--color-text-muted);
}

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: start;
}

.contact-info h3 {
    font-size: var(--text-sm);
    letter-spacing: 0.16em;
    margin-bottom: 22px;
    color: var(--color-text);
}

.contact-info p,
.contact-info a {
    color: var(--color-text-muted);
    font-weight: 300;
    line-height: 2;
}

.contact-info a:hover {
    color: var(--color-text);
}

.social-links {
    display: flex;
    gap: 22px;
    margin-top: 30px;
}

.social-links a {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--color-text);
}

/* AUDIT-FIX #18: extra page content under the contact details (was inline
   style="margin-top:40px" in page-contact.php). 40px = --space-7. */
.contact-info .contact-extra {
    margin-top: var(--space-7);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* AUDIT-FIX #1: font-size 0.9rem (14.4px) → var(--text-lg)=1rem (16px) on form
   controls. Below 16px iOS Safari auto-zooms the viewport on focus; 16px stops it.
   AUDIT-FIX #19: padding 15px → var(--space-4)=16px (on-grid; field height now even).
   Verify in browser/iOS: tapping a field does NOT zoom the page. */
.contact-form input,
.contact-form textarea,
.contact-form select {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: var(--space-4);
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: 300;
    transition: border-color var(--transition-speed) ease;
    outline: none;
    border-radius: 0;
}

/* AUDIT-FIX #2: placeholder contrast rgba(0,0,0,0.38) (~2.6:1, fails WCAG) →
   rgba(0,0,0,0.6) (#666 ≈ 5.7:1, passes 4.5:1). Real <label>s now carry the
   meaning (see page-contact.php); the placeholder is a secondary hint.
   Verify in browser: placeholder text is legible, not washed out. */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

/* AUDIT-FIX #2: visible, associated field labels (markup in page-contact.php). */
.contact-form .form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact-form label {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-text);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    padding: 16px 42px;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition-speed) ease, background var(--transition-speed) ease;
    align-self: flex-start;
}

.contact-form button:hover {
    opacity: 0.82;
}

.contact-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-status {
    margin-top: 16px;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
}

/* --- Press items (used inside page content) --- */
.press-item {
    padding: 30px 0;
    border-bottom: 1px solid var(--color-border);
}

.press-item:first-child {
    border-top: 1px solid var(--color-border);
}

.press-item h3 {
    font-size: var(--text-lg);
    font-weight: 400;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.press-item .press-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.press-item p {
    color: var(--color-text-muted);
    font-size: var(--text-base);
}

.press-item a {
    display: inline-block;
    margin-top: 10px;
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 2px;
}

/* --- Content pages (About / Statement / CV) --- */
.entry-content h2,
.entry-content h3 {
    margin-top: 2.4rem;
}

.entry-content a {
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 1px;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.4rem 0;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

.about-subnav {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.about-subnav a {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.about-subnav a.active,
.about-subnav a:hover {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 2px;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 2;
    padding: 44px var(--space-6);   /* AUDIT-FIX #8/#9: gutter 30→32, now matches header */
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.site-footer p {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    margin: 0;
}

.site-footer a {
    color: var(--color-text-muted);
}

.site-footer a:hover {
    color: var(--color-text);
}

/* --- Scroll to Top --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 46px;
    height: 46px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    font-size: 1.1rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-surface);
    border-color: var(--color-text);
}

/* --- Loading --- */
.site-loading {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

.site-loading.loaded {
    opacity: 0;
    pointer-events: none;
}

.site-loading .loader-text {
    font-size: var(--text-sm);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Full-screen artwork zoom overlay --- */
.artwork-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(12, 12, 12, 0.97);
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    overscroll-behavior: contain;
}

.artwork-zoom-overlay.open {
    display: block;
}

.artwork-zoom-overlay.visible {
    opacity: 1;
}

.artwork-zoom-overlay .zoom-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: zoom-in;
    touch-action: none;
}

.artwork-zoom-overlay.is-zoomed .zoom-stage {
    cursor: grab;
}

.artwork-zoom-overlay.is-panning .zoom-stage {
    cursor: grabbing;
}

/* Absolute centering (not flex) so max-width/max-height shrink the image
   proportionally and never distort its aspect ratio. */
.artwork-zoom-overlay .zoom-img {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transform: translate(0, 0) scale(1);
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.artwork-zoom-overlay .zoom-img.animate {
    transition: transform 0.18s ease-out;
}

.zoom-close {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 11002;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.zoom-close:hover {
    opacity: 1;
}

/* Prev / Next — circular glass buttons flanking the photo. Hidden for a solo
   photo (gallery length 1) via .artwork-zoom-overlay.solo below. */
.zoom-prev,
.zoom-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.zoom-prev svg,
.zoom-next svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.zoom-prev:hover,
.zoom-next:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    color: #fff;
}

.zoom-prev { left: max(22px, calc(env(safe-area-inset-left) + 14px)); }
.zoom-next { right: max(22px, calc(env(safe-area-inset-right) + 14px)); }

/* "3 / 12" position counter, top-left. */
.zoom-counter {
    position: fixed;
    top: max(34px, calc(env(safe-area-inset-top) + 20px));
    left: max(28px, calc(env(safe-area-inset-left) + 16px));
    z-index: 11002;
    font-size: var(--text-xs);
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: lining-nums tabular-nums;
    user-select: none;
    -webkit-user-select: none;
}

/* Caption bar above the zoom controls. pointer-events:none so it never
   blocks the backdrop tap-to-close or the image pan/drag. */
.zoom-caption {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(86px, calc(env(safe-area-inset-bottom) + 74px));
    z-index: 11001;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    pointer-events: none;
}

.zoom-caption:empty {
    display: none;
}

/* Solo photo: nothing to flip — hide the nav buttons and counter. */
.artwork-zoom-overlay.solo .zoom-prev,
.artwork-zoom-overlay.solo .zoom-next,
.artwork-zoom-overlay.solo .zoom-counter {
    display: none;
}

/* Loading spinner — delayed so cached images don't flash it. */
.artwork-zoom-overlay .zoom-stage::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease 0.15s;
}

.artwork-zoom-overlay.is-loading .zoom-stage::after {
    opacity: 1;
    animation: viewerSpin 0.8s linear infinite;
}

@keyframes viewerSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
    .zoom-prev,
    .zoom-next {
        width: 40px;
        height: 40px;
        background: rgba(20, 20, 20, 0.45);
        border-color: rgba(255, 255, 255, 0.14);
    }
    .zoom-prev { left: max(10px, calc(env(safe-area-inset-left) + 8px)); }
    .zoom-next { right: max(10px, calc(env(safe-area-inset-right) + 8px)); }

    .zoom-counter {
        top: max(28px, calc(env(safe-area-inset-top) + 16px));
        left: max(18px, calc(env(safe-area-inset-left) + 12px));
    }

    .zoom-caption { font-size: 1rem; }
}

.zoom-controls {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11002;
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 6px;
}

.zoom-controls button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.zoom-controls button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

/* UI hide/show toggle — a small, unobtrusive corner button. Fades the rest of
   the chrome away for a clean full-bleed view; the toggle itself stays put so
   the controls can be brought back without covering the photo. */
.zoom-toggle-ui {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 11003;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.25s ease, background 0.25s ease;
}
.zoom-toggle-ui:hover,
.zoom-toggle-ui:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.65);
    outline: none;
}
.zoom-toggle-ui svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.zoom-toggle-ui .ico-eye-off { display: none; }

/* Chrome hidden: only the toggle button remains; the rest fades out and stops
   intercepting clicks so the photo can be panned/zoomed edge to edge. */
.artwork-zoom-overlay.ui-hidden .zoom-close,
.artwork-zoom-overlay.ui-hidden .zoom-counter,
.artwork-zoom-overlay.ui-hidden .zoom-prev,
.artwork-zoom-overlay.ui-hidden .zoom-next,
.artwork-zoom-overlay.ui-hidden .zoom-caption,
.artwork-zoom-overlay.ui-hidden .zoom-controls {
    opacity: 0 !important;
    pointer-events: none !important;
}
.artwork-zoom-overlay.ui-hidden .zoom-toggle-ui { opacity: 0.75; }
.artwork-zoom-overlay.ui-hidden .zoom-toggle-ui .ico-eye { display: none; }
.artwork-zoom-overlay.ui-hidden .zoom-toggle-ui .ico-eye-off { display: block; }

body.zoom-open {
    overflow: hidden;
}

/* ============================================
   Lone media centering — all post content
   Works for BOTH the Classic editor (bare <img>,
   [caption] shortcode) and the block editor
   (Gutenberg). Any image / video / PDF / embed
   that doesn't span the full content width is
   horizontally centered. Explicitly floated
   (alignleft/alignright) media keeps wrapping.
   ============================================ */

/* Classic editor: any block media element in content → center it.
   (img is display:block globally, so margin auto centers it) */
.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object,
.artwork-description img,
.artwork-description iframe,
.artwork-description video,
.artwork-description embed,
.artwork-description object {
    margin-left: auto;
    margin-right: auto;
}

/* Classic editor caption shortcode (figure.wp-caption) → centered */
.entry-content .wp-caption,
.artwork-description .wp-caption {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Block editor (Gutenberg) media blocks centered unless floated */
.entry-content .wp-block-image:not(.alignleft):not(.alignright),
.entry-content .wp-block-embed:not(.alignleft):not(.alignright),
.entry-content .wp-block-video:not(.alignleft):not(.alignright),
.entry-content .wp-block-file:not(.alignleft):not(.alignright),
.entry-content .wp-audio-shortcode:not(.alignleft):not(.alignright),
.entry-content .wp-video-shortcode:not(.alignleft):not(.alignright),
.artwork-description .wp-block-image:not(.alignleft):not(.alignright),
.artwork-description .wp-block-embed:not(.alignleft):not(.alignright),
.artwork-description .wp-block-video:not(.alignleft):not(.alignright),
.artwork-description .wp-block-file:not(.alignleft):not(.alignright),
.artwork-description .wp-audio-shortcode:not(.alignleft):not(.alignright),
.artwork-description .wp-video-shortcode:not(.alignleft):not(.alignright) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Captions span media width so long text wraps normally */
.entry-content figcaption,
.entry-content .wp-caption-text,
.artwork-description figcaption,
.artwork-description .wp-caption-text {
    text-align: center;
    width: 100%;
    max-width: 100%;
}

/* Floated media: keep text wrapping instead of centering */
.entry-content .alignleft,
.artwork-description .alignleft {
    float: left;
    margin-left: 0;
    margin-right: 1.6em;
}

.entry-content .alignright,
.artwork-description .alignright {
    float: right;
    margin-right: 0;
    margin-left: 1.6em;
}

.entry-content .alignleft img,
.entry-content .alignright img,
.artwork-description .alignleft img,
.artwork-description .alignright img {
    margin: 0;
}

/* Emojis / inline smilies: stay inline, not centered */
.entry-content .wp-smiley,
.artwork-description .wp-smiley {
    display: inline;
    margin: 0 .1em;
    vertical-align: middle;
}

/* Reset base image-block margin handled by the centering above */
.wp-block-image {
    margin: 0;
}

/* ============================================================
   v1.5.0 — Word-style photo + text on TEXT pages only.
   The Classic editor "Style" dropdown (see functions.php
   style_formats) tags a selected photo with a width preset
   and/or a float; these rules render it. Scoped to
   .entry-content (About / Artist Statement / Biography, etc.)
   — CPT descriptions (.artwork-description) are intentionally
   left alone, they keep the simple centered upload.
   ============================================================ */

/* Width presets. The % width overrides the editor's width="…"
   attribute; global img{max-width:100%} keeps them responsive.
   Combine with .alignleft / .alignright (above) so running text
   wraps beside the photo — the "photo next to text" case. */
.entry-content img.w-25  { width: 25%; }
.entry-content img.w-33  { width: 33.333%; }
.entry-content img.w-50  { width: 50%; }
.entry-content img.w-66  { width: 66.666%; }
.entry-content img.w-75  { width: 75%; }
.entry-content img.w-100 { width: 100%; }

/* Explicit center — clears any lingering float (also makes the editor's
   native "center" button reliable). */
.entry-content img.aligncenter {
    float: none;
    margin-left: auto;
    margin-right: auto;
}

/* Two photos in a row (wraps the pair) — even halves with a gap.
   Reliable side-by-side without fighting float margins. */
.entry-content .side-by-side {
    display: flex;
    gap: 1.2em;
    align-items: flex-start;
    margin: 1.6em auto;
    clear: both;
}
.entry-content .side-by-side img {
    width: 100%;
    margin: 0;
}

/* Phone: never force a cramped side column. Full-width stack —
   protects the v1.4.0 mobile layout. */
@media screen and (max-width: 600px) {
    .entry-content img.w-25,
    .entry-content img.w-33,
    .entry-content img.w-50,
    .entry-content img.w-66,
    .entry-content img.w-75 {
        width: 100% !important;
    }
    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
    }
    .entry-content .side-by-side {
        flex-direction: column;
    }
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.wp-caption-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 10px;
}

/* ============================================
   HOMEPAGE: header legibility over the slideshow
   ============================================ */
.home .site-header:not(.scrolled):not(.nav-open) .site-logo a,
.home .site-header:not(.scrolled):not(.nav-open) .main-navigation > ul > li > a,
.home .site-header:not(.scrolled):not(.nav-open) .main-navigation > ul > li > a .caret {
    color: #fff;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.home .site-header:not(.scrolled):not(.nav-open) .main-navigation a::after {
    background: #fff;
}

.home .site-header:not(.scrolled):not(.nav-open) .menu-toggle span {
    background: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media screen and (max-width: 1024px) {
    .video-card {
        flex-basis: calc((100% - 28px) / 2);
        max-width: calc((100% - 28px) / 2);
    }

    .contact-grid {
        gap: 50px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 62px;
    }

    .site-header .inner {
        /* AUDIT-FIX #8/#9: mobile gutter 22→24 (on-grid).
           MOBILE-FIX: keep the logo/burger clear of a landscape notch via safe-area. */
        padding-top: 0;
        padding-bottom: 0;
        padding-left: max(var(--space-5), env(safe-area-inset-left));
        padding-right: max(var(--space-5), env(safe-area-inset-right));
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;        /* fallback */
        height: 100dvh;       /* MOBILE-FIX: full-height menu that tracks the address bar */
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(6px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
        z-index: 1000;
    }

    .main-navigation.open {
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 26px;
        text-align: center;
    }

    .main-navigation a {
        font-size: 1.15rem;
    }

    /* Press: two PDF cards per row on tablets */
    .press-pdf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    /* Dropdown becomes a static, centered sub-list */
    .main-navigation .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        padding: 18px 0 0;
        gap: 18px;
        background: none;
        border: none;
        box-shadow: none;
    }

    .main-navigation .sub-menu a {
        font-size: var(--text-base);
        color: var(--color-text-muted);
    }

    /* Responsive grids */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .video-card {
        flex-basis: 100%;
        max-width: 100%;
    }

    .video-grid {
        gap: 34px;
    }

    /* MOBILE-FIX: tablet gallery ladder — Artworks / Silk / Exhibitions / Studio
       drop from 3-up to 2-up here; phones collapse to a single column at ≤600px. */
    .post-type-archive-artwork .masonry-grid > *,
    .tax-artwork_series .masonry-grid > *,
    .post-type-archive-silk .masonry-grid > *,
    .tax-silk_type .masonry-grid > *,
    .post-type-archive-exhibition .masonry-grid > *,
    .tax-exhibition_type .masonry-grid > *,
    .single-exhibition .masonry-grid > *,
    .single-silk .masonry-grid > *,
    .the-studio-page .masonry-grid > * {
        flex-basis: calc((100% - var(--grid-gap)) / 2);
        max-width: calc((100% - var(--grid-gap)) / 2);
    }

    .content-section {
        padding: 56px var(--space-5);   /* AUDIT-FIX #8/#9: mobile gutter 22→24 */
    }

    .archive-header {
        padding: 28px var(--space-5) 6px;   /* AUDIT-FIX #8/#9: mobile gutter 22→24 */
    }

    .filter-bar {
        padding: 24px var(--space-5) 6px;   /* AUDIT-FIX #8/#9: mobile gutter 22→24 */
    }

    .slideshow-arrows {
        display: none;
    }

    /* Always show captions on touch devices — Artworks / Exhibitions / Silk / Video */
    .artwork-item .artwork-info,
    .video-card .video-meta {
        opacity: 1 !important;
        transform: translateY(0) !important;
        z-index: 10;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 72%, transparent 100%) !important;
    }
}

@media screen and (max-width: 600px) {
    .hero-title h1 {
        font-size: 1.8rem;
        letter-spacing: 0.18em;
    }

    /* MOBILE-FIX: classic single-column gallery on phones. A column-based masonry
       collapses to one full-width column so each piece is shown as large as the
       screen allows. */
    .masonry-grid {
        column-count: 1;
        column-gap: 0;
    }

    .masonry-grid > * {
        margin-bottom: 22px;
    }

    /* Artworks / Silk / Exhibitions / Studio: one work per row, full screen width
       (tap → full-screen zoom). The single gap value drives the vertical rhythm. */
    .post-type-archive-artwork .masonry-grid,
    .tax-artwork_series .masonry-grid,
    .post-type-archive-silk .masonry-grid,
    .tax-silk_type .masonry-grid,
    .post-type-archive-exhibition .masonry-grid,
    .tax-exhibition_type .masonry-grid,
    .single-exhibition .masonry-grid,
    .single-silk .masonry-grid,
    .the-studio-page .masonry-grid {
        --grid-gap: 22px;
    }

    .post-type-archive-artwork .masonry-grid > *,
    .tax-artwork_series .masonry-grid > *,
    .post-type-archive-silk .masonry-grid > *,
    .tax-silk_type .masonry-grid > *,
    .post-type-archive-exhibition .masonry-grid > *,
    .tax-exhibition_type .masonry-grid > *,
    .single-exhibition .masonry-grid > *,
    .single-silk .masonry-grid > *,
    .the-studio-page .masonry-grid > * {
        flex-basis: 100%;
        max-width: 100%;
    }

    /* Press: single column on phones */
    .press-pdf-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* MOBILE-FIX: comfortable tap targets (~44px) for the small text links that
       are otherwise hard to hit on touch (series filter, sub-nav, pagination). */
    .filter-bar {
        gap: 2px 20px;
    }
    .filter-bar a {
        padding: 11px 0;
    }
    .about-subnav a {
        padding: 8px 0;
    }
    .pagination .page-numbers {
        padding: 11px 14px;
    }

    .single-artwork .artwork-details,
    .artwork-nav,
    .post-navigation {
        padding-left: var(--space-5);    /* AUDIT-FIX #8/#9: mobile gutter 22→24 */
        padding-right: var(--space-5);
    }
}

@media screen and (max-width: 480px) {
    /* MOBILE-FIX: small-phone tuning (iPhone SE / mini class). Tighter gutters and
       slightly smaller display type so headings and the hero name don't crowd the
       ~320–375px viewport. */
    .content-section {
        padding: 44px var(--space-4);
    }

    .hero-title h1 {
        font-size: 1.5rem;
        letter-spacing: 0.14em;
    }

    .archive-header h1 {
        font-size: clamp(1.3rem, 6vw, 1.7rem);
    }

    .artwork-nav,
    .post-navigation {
        gap: 12px;
    }
}

/* ============================================
   MOBILE-FIX: keep wide tables (e.g. the CV/Biography page) from forcing the whole
   page to scroll sideways — the table itself scrolls within the content column.
   ============================================ */
.entry-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   MOBILE-FIX: keep fixed / floating controls clear of the iOS home indicator and
   notch. env(safe-area-inset-*) resolves to 0 on devices without insets, so these
   are no-ops on ordinary screens.
   ============================================ */
.scroll-to-top {
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 12px));
    right: max(30px, calc(env(safe-area-inset-right) + 12px));
}
.slideshow-nav {
    bottom: max(42px, calc(env(safe-area-inset-bottom) + 24px));
}
.zoom-controls {
    bottom: max(22px, calc(env(safe-area-inset-bottom) + 10px));
}
.zoom-close {
    top: max(18px, calc(env(safe-area-inset-top) + 8px));
    right: max(22px, calc(env(safe-area-inset-right) + 10px));
}
.press-lb-bar {
    padding-top: max(14px, env(safe-area-inset-top));
}

/* ============================================
   AUDIT-FIX #15: visible keyboard focus ring.
   A clear focus indicator for keyboard / assistive-tech users on every interactive
   control — especially the small targets (slideshow dots, filter links). Uses
   :focus-visible, so it shows for keyboard focus but NOT on mouse click, leaving the
   existing hover/click look untouched. The contact inputs keep outline:none for the
   mouse but regain a ring on keyboard focus here.
   Verify in browser: Tab through nav → filters → dots → form → viewer controls;
   each should show a ring, and it should be visible over imagery too.
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
    border-radius: 1px;
}

/* Controls sitting on imagery / dark overlays: a white ring + dark halo so the
   indicator reads on any background. */
.slideshow-arrows button:focus-visible,
.zoom-prev:focus-visible,
.zoom-next:focus-visible,
.zoom-close:focus-visible,
.zoom-controls button:focus-visible,
.press-lb-close:focus-visible,
.artwork-zoom-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45);
}

/* The dot's 24px hit area is transparent — ring the visible 11px dot (::before). */
.slideshow-nav button:focus-visible {
    outline: none;
}
.slideshow-nav button:focus-visible::before {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   AUDIT-FIX #13: reduced-motion fallback. For visitors whose OS requests reduced
   motion, near-instant transitions/animations and no smooth scrolling. The JS
   honours the same setting (parallax / fade-ins / smooth scroll guarded separately).
   Verify with the OS "reduce motion" setting on: no parallax, instant reveals.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
