/*
Theme Name: Percy Screen Archive
Description: A film and photography archive for Percy Hynes White.
Version: 1.2.1
Requires at least: 6.3
Requires PHP: 8.0
*/
@font-face {
    font-family: Inter;
    src: url("fonts/inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
:root {
    --paper: #fff;
    --ink: #0a0a0c;
    --gutter: clamp(.8rem, 2vw, 2rem);
    --section-gap: clamp(4.5rem, 10vw, 9rem);
    --small: .75rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 Inter, Arial, sans-serif; }
button { color: inherit; font: inherit; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img, video { display: block; width: 100%; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 3; top: 3rem; left: var(--gutter); padding: .75rem; color: var(--paper); background: var(--ink); }
.top-nav, .masthead, .film-header, figcaption, .footer-base {
    font-size: var(--small);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .025em;
}
.top-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    border-bottom: 1px solid;
    text-align: center;
}
.top-nav a {
    display: block;
    padding: .78rem .15rem;
    text-decoration: none;
}
.top-nav a:hover, .top-nav [aria-current] { text-decoration: underline; }
.masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: .65rem var(--gutter);
    border-bottom: 1px solid;
}
.masthead-label:last-child { text-align: right; }
.monogram {
    color: inherit;
    font-size: 1.42rem;
    line-height: 1;
    font-weight: 760;
    letter-spacing: -.13em;
    text-decoration: none;
    padding-inline: .3em .42em;
}
.cinema-hero { position: relative; isolation: isolate; background: var(--ink); }
.cinema-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    margin-bottom: -100vh;
    margin-bottom: -100svh;
}
.cinema-media, .cinema-media img, .cinema-media video { position: absolute; inset: 0; height: 100%; width: 100%; }
.cinema-media img, .cinema-media video { object-fit: cover; object-position: center; }
.cinema-media video { opacity: 0; }
.cinema-media video.is-playing { opacity: 1; }
.cinema-title { position: relative; z-index: 1; pointer-events: none; }
.cinema-title svg { display: block; width: 100%; height: min(45vw, calc(100svh - 100px)); }
.cinema-title text { font: 400 160px Inter, Arial, sans-serif; letter-spacing: -.055em; }
.cinema-reveal { height: 100vh; height: 100svh; pointer-events: none; }
.cinema-controls {
    position: absolute;
    inset: auto var(--gutter) 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: var(--paper);
    mix-blend-mode: difference;
    font-size: .85rem;
}
.cinema-controls button { border: 0; border-bottom: 1px solid; background: transparent; padding: .35rem 0; cursor: pointer; }
.film-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
    padding: .35rem var(--gutter);
    border-block: 1px solid;
    min-height: 2.8rem;
}
.film-header a { grid-column: 3; justify-self: end; }
.viewer-toolbar button {
    border: 1px solid;
    padding: .35rem .6rem;
    background: transparent;
    cursor: pointer;
    text-transform: uppercase;
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: .55em;
    font-size: var(--small);
    text-transform: uppercase;
    letter-spacing: .055em;
}
.eyebrow::before { content: ""; width: .48em; height: .48em; background: currentColor; flex: none; }
.section, .manifesto, .interior {
    padding: .8rem var(--gutter) 0;
    border-top: 1px solid;
}
.section, .manifesto, .plate-section { margin-block: var(--section-gap); }
.manifesto h2 {
    margin: clamp(2rem, 6vw, 6rem) 0 clamp(2rem, 6vw, 6rem);
    font-size: clamp(2.7rem, 11.7vw, 14rem);
    font-weight: 350;
    line-height: .88;
    letter-spacing: -.072em;
    text-transform: uppercase;
}
.manifesto h2 span { display: block; }
.manifesto h2 span:nth-child(2) { text-align: center; }
.manifesto h2 span:nth-child(3) { text-align: right; }
.editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(1.5rem, 6vw, 8rem);
}
.editorial figure img { width: 100%; max-height: 46rem; object-fit: cover; }
.manifesto figure { max-width: 31rem; margin-inline: auto; width: 100%; }
.manifesto figure img { aspect-ratio: 4/5; }
.editorial figcaption { margin-top: .65rem; }
.prose { max-width: 44rem; font-size: clamp(1rem, 1.5vw, 1.24rem); }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { font-size: clamp(1.6rem, 4vw, 3.25rem); line-height: 1.04; font-weight: 400; letter-spacing: -.05em; }
.text-link { display: inline-block; font-size: .9rem; }
.text-link span { padding-left: .25em; }
.photo-panel {
    display: grid;
    align-items: center;
    overflow: hidden;
    position: relative;
    min-height: clamp(19rem, 52vw, 56rem);
    text-decoration: none;
    color: var(--paper);
    background: var(--ink);
}
.photo-panel img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 60% 44%; filter: grayscale(1) brightness(.52); }
.photo-panel > span {
    position: relative;
    padding: var(--gutter);
    font-size: clamp(3rem, 9vw, 10rem);
    font-weight: 350;
    line-height: .9;
    letter-spacing: -.07em;
    text-transform: uppercase;
}
.photo-panel > span span { display: inline-block; font-size: .5em; vertical-align: top; transition: transform .65s cubic-bezier(.65,.01,.05,.99); }
.photo-panel:hover > span span { transform: translate(.15em, -.15em); }
.section-title, .interior h1 {
    margin-block: clamp(1.25rem, 4vw, 3.5rem);
    font-size: clamp(3.4rem, 10vw, 12rem);
    font-weight: 350;
    line-height: .9;
    letter-spacing: -.075em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    justify-items: center;
    gap: clamp(3rem, 13vw, 13rem) .65rem;
    padding-block: clamp(2.4rem, 8vw, 8rem);
}
.gallery-grid a { display: block; width: min(100%, 6.3rem); }
.gallery-grid img { aspect-ratio: 98/135; object-fit: cover; }
.gallery-grid a:hover { outline: 1px solid; outline-offset: 5px; }
.gallery-page { padding: 1rem var(--gutter) var(--section-gap); }
.gallery-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2em 1em; margin-block: 1.5rem 2.5rem; font-size: clamp(3.5rem, 10vw, 12rem); font-weight: 350; line-height: .95; letter-spacing: -.075em; }
.gallery-page > .prose { max-width: 64rem; font-size: .95rem; }
.gallery-page > .prose h2 { font-size: 1.35rem; letter-spacing: -.035em; }
.gallery-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.gallery-categories { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.gallery-tools button { border: 0; padding: .3rem 0; background: transparent; cursor: pointer; }
.gallery-categories button { font-size: clamp(1rem, 2vw, 1.5rem); }
.gallery-categories button[aria-pressed="true"], .gallery-tools button:hover { text-decoration: underline; text-underline-offset: .2em; }
[data-gallery-reset] { font-size: .8rem; }
.gallery-board { display: block; position: relative; column-count: 3; column-gap: 1rem; padding-block: 1.2rem 2rem; }
.gallery-board > a { display: block; width: 100%; position: relative; break-inside: avoid; margin-bottom: 1rem; transform: translate(var(--drag-x, 0px), var(--drag-y, 0px)); cursor: grab; }
.gallery-board img { width: 100%; height: auto; aspect-ratio: var(--photo-ratio, auto); user-select: none; }
.gallery-board a:hover { outline: 0; }
.gallery-board a:focus-visible { outline: 2px solid; outline-offset: 5px; }
.gallery-board > a.is-dragging { cursor: grabbing; }
.gallery-help { font-size: .75rem; text-transform: uppercase; letter-spacing: .025em; padding-top: .75rem; border-top: 1px solid; }
.image-viewer { background: var(--ink); color: var(--paper); border: 1px solid; padding: 1rem; width: min(92vw, 65rem); max-height: 92vh; }
.image-viewer::backdrop { background: rgba(10, 10, 12, .85); }
.viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; font-size: .75rem; }
.image-viewer img { max-height: 74vh; object-fit: contain; }
.interior { border-top: 0; padding-block: 1rem var(--section-gap); min-height: 45vh; }
.interior h1 { margin-block: 1.5rem 2rem; font-size: clamp(3.4rem, 8vw, 10rem); }
.interior:has(> h1 + .prose) {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 2rem clamp(1.5rem, 5vw, 6rem);
    align-items: start;
}
.interior:has(> h1 + .prose) > * { grid-column: 1 / -1; }
.interior:has(> h1 + .prose) > h1 { grid-column: 1; grid-row: 2; margin: 0; }
.interior:has(> h1 + .prose) > .prose { grid-column: 2; grid-row: 2; max-width: none; }
.interior:has(> .filters) > .prose h3 { font-size: 1rem; line-height: 1.5; letter-spacing: 0; }
.interior:has(> h1 + .prose) > .filters,
.interior:has(> h1 + .prose) > .press-list { margin-top: 0; }
.interior .editorial, .clips, .press-list { margin-top: 2.4rem; }
.interior .project + .project { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2.5rem; }
.filters button { border: 1px solid; background: var(--paper); padding: .5rem .85rem; cursor: pointer; }
.filters button[aria-pressed="true"], .filters button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.credit-list, .press-list { padding: 0; list-style: none; border-top: 1px solid; }
.credit-list li, .press-list li {
    display: grid;
    grid-template-columns: minmax(5rem, .28fr) 1fr;
    gap: clamp(.75rem, 3vw, 3rem);
    border-bottom: 1px solid;
    padding: clamp(1rem, 3vw, 2rem) 0;
}
.credit-year, .press-list time, .source { font-size: var(--small); text-transform: uppercase; }
.credit-list h2, .press-list h2 { font-weight: 400; font-size: clamp(1.2rem, 3vw, 2.6rem); line-height: 1.13; letter-spacing: -.045em; }
.credit-list p, .source { margin-top: .45rem; }
.press-list h2 a, .credit-link { text-decoration: none; }
.press-list h2 a:hover, .credit-link:hover { text-decoration: underline; }
.clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 4rem); margin-bottom: 2rem; }
.clips video { width: 100%; aspect-ratio: 16/9; background: var(--ink); }
.clips figcaption { margin-top: .7rem; }
.archive-links { margin-top: 4rem; padding-top: .75rem; border-top: 1px solid; }
.archive-links ul { display: flex; gap: .8rem 1.7rem; flex-wrap: wrap; padding: 0; list-style: none; }
.site-footer { background: var(--ink); color: var(--paper); padding-inline: var(--gutter); }
.footer-lead {
    display: grid;
    grid-template-columns: 1fr .4fr;
    align-items: end;
    gap: 2rem;
    min-height: clamp(16rem, 32vw, 31rem);
    padding-block: 2rem;
}
.footer-wordmark { text-decoration: none; font-size: clamp(2.5rem, 8vw, 10rem); line-height: .85; letter-spacing: -.08em; font-weight: 350; text-transform: uppercase; }
.footer-lead p { font-size: clamp(1.5rem, 3vw, 3rem); letter-spacing: -.06em; line-height: 1; margin-bottom: .5rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1.15rem; padding-block: 1rem; border-top: 1px solid; }
.footer-base div { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
@media (max-width: 660px) {
    .gallery-page .gallery-board { column-count: 2; column-gap: .65rem; }
    .gallery-page .gallery-board > a { width: 100%; cursor: pointer; }
    .gallery-heading { font-size: clamp(3rem, 11vw, 4.5rem); gap: .2em; }
    .desktop-gallery-help { display: none; }
    .interior:has(> h1 + .prose) { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .interior:has(> h1 + .prose) > .prose { grid-column: 1; grid-row: 3; }
    .top-nav .social-nav { display: none; }
    .masthead-label { font-size: .61rem; }
    .film-header { font-size: .65rem; }
    .editorial, .clips, .footer-lead { grid-template-columns: 1fr; }
    .manifesto h2 { font-size: 12vw; }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .gallery-grid a { width: min(100%, 4.4rem); }
    .credit-list li, .press-list li { grid-template-columns: minmax(3.5rem, .23fr) 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; }
}
