/*
Theme Name: Will Chase
Theme URI: https://willchasefilm.com/
Author: Will Chase
Description: Lightweight portfolio theme for willchasefilm.com. Needs the Will Chase Films plugin.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: willchase
*/

:root {
	--bg: #ffffff;
	--text: #161616;
	--muted: #6b6b6b;
	--rule: #e4e4e4;
	--placeholder: #ededed;
	--sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
	--serif: 'Instrument Serif', Georgia, serif;
}
body.is-dark {
	--bg: #111111;
	--text: #f2f2f2;
	--muted: #a3a3a3;
	--rule: #2c2c2c;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.4;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus {
	position: absolute; left: 16px; top: 16px; z-index: 100;
	width: auto; height: auto; clip: auto; clip-path: none;
	padding: 12px 16px; background: var(--bg); color: var(--text);
}

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 28px 0 24px;
}
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand__name { font-size: 22px; font-weight: 500; letter-spacing: .06em; }
.brand__tag { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.site-nav { display: flex; gap: 28px; align-items: center; font-size: 13px; letter-spacing: .12em; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a[aria-current="page"] span { border-bottom: 1px solid var(--text); padding-bottom: 3px; }
.site-nav .icon-link { min-width: 44px; justify-content: center; }

/* Footer */
.site-footer {
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
	padding: 28px 0 40px;
	border-top: 1px solid var(--rule);
	font-size: 12px; letter-spacing: .1em; color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--text); }

/* Reel band */
.reel { position: relative; margin-bottom: 56px; height: 520px; background: #222; overflow: hidden; }
.reel__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* A 16:9 iframe sized to cover the band whatever its shape. */
.reel__video {
	position: absolute; top: 50%; left: 50%;
	width: max(100%, calc(520px * 16 / 9));
	height: max(520px, calc(100vw * 9 / 16));
	transform: translate(-50%, -50%);
	border: 0; pointer-events: none;
	opacity: 0; transition: opacity .6s ease;
}
.reel__video.is-ready { opacity: 1; }
.reel__overlay {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 32px;
	display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
	color: #fff;
	background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}
.reel__text { display: flex; flex-direction: column; gap: 6px; }
.reel__kicker { font-size: 12px; letter-spacing: .16em; }
.reel__title { font-family: var(--serif); font-size: 44px; line-height: 1; }
.reel__play {
	display: inline-flex; align-items: center; gap: 10px;
	color: #fff; font: inherit; font-size: 13px; letter-spacing: .12em;
	border: 1px solid rgba(255,255,255,.8); background: transparent;
	padding: 12px 18px; min-height: 44px; cursor: pointer; white-space: nowrap;
}
.reel__play:hover { color: #fff; background: rgba(255,255,255,.12); }

/* Lightbox */
.lightbox {
	width: min(1200px, 92vw); max-width: none; padding: 0; border: 0; background: #000;
}
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox__frame { position: relative; aspect-ratio: 16 / 9; }
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__close {
	position: absolute; right: 0; top: -48px;
	width: 44px; height: 44px;
	color: #fff; background: transparent; border: 0; font-size: 28px; line-height: 1; cursor: pointer;
}
dialog.lightbox[open] { overflow: visible; }

/* Film grid */
.film-grid {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px; row-gap: 48px;
	padding-bottom: 96px;
}
.card { display: flex; flex-direction: column; gap: 14px; }
.card__img {
	display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
	background: var(--placeholder);
	transition: opacity .25s ease;
}
.card:hover .card__img { opacity: .85; }
.card:hover { color: var(--text); }
.card__meta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card__text { display: flex; flex-direction: column; gap: 4px; }
.card__title { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.card__medium { font-size: 15px; }
.card__year { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Film page */
.film { max-width: 1120px; margin: 0 auto; padding: 24px 0 96px; display: flex; flex-direction: column; gap: 36px; }
.back {
	font-size: 12px; letter-spacing: .14em; color: var(--muted);
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; align-self: flex-start;
}
.film__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.film__titles { display: flex; flex-direction: column; gap: 10px; }
.page-title {
	margin: 0; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1;
}
.film__sub { font-size: 16px; color: #3d3d3d; }
.credits {
	margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, auto));
	column-gap: 32px; row-gap: 10px; font-size: 13px;
}
.credits dt { letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.credits dd { margin: 0; }

.player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #111; padding: 0; border: 0; cursor: pointer; }
.player img { display: block; width: 100%; height: 100%; object-fit: cover; }
.player__btn {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 84px; height: 84px; border-radius: 50%; background: rgba(0,0,0,.55);
	display: flex; align-items: center; justify-content: center;
	transition: background .2s ease;
}
.player:hover .player__btn { background: rgba(0,0,0,.75); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.film__desc { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.6; }
.film__desc p { margin: 0 0 1em; }
.film__desc p:last-child { margin-bottom: 0; }

.stills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stills img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--placeholder); }

.next {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding-top: 28px; border-top: 1px solid var(--rule); min-height: 44px;
}
.next__label { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.next__title { font-family: var(--serif); font-size: 30px; text-align: right; }

/* Photography */
.photo-head {
	padding: 40px 0 24px;
	display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
}
.series-tabs { display: flex; flex-wrap: wrap; column-gap: 22px; font-size: 12px; letter-spacing: .12em; }
.series-tabs a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; text-transform: uppercase; }
.series-tabs a[aria-current="true"] { color: var(--text); }
.series-tabs a[aria-current="true"] span { border-bottom: 1px solid var(--text); padding-bottom: 3px; }

.series { padding: 40px 0 120px; }
.js .series[hidden] { display: none; }
.series__title { font-size: 12px; letter-spacing: .14em; color: var(--muted); margin: 0 0 32px; font-weight: 400; text-transform: uppercase; }
.js .series__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stagger {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px; row-gap: 72px; align-items: start;
}
.stagger figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.stagger img { display: block; width: 100%; height: auto; }
.stagger figcaption { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
/* The mockup's 5-slot rhythm, repeated. */
.stagger figure:nth-child(5n+1) { grid-column: 1 / span 7; }
.stagger figure:nth-child(5n+2) { grid-column: 9 / span 4; margin-top: 160px; }
.stagger figure:nth-child(5n+3) { grid-column: 2 / span 4; }
.stagger figure:nth-child(5n+4) { grid-column: 7 / span 6; margin-top: 120px; }
.stagger figure:nth-child(5n+5) { grid-column: 1 / span 12; }

/* Contact */
.contact {
	max-width: 1120px; margin: 0 auto; padding: 72px 0 120px;
	display: flex; flex-wrap: wrap; gap: 72px; align-items: flex-start;
}
.contact__about { flex: 1 1 360px; display: flex; flex-direction: column; gap: 28px; }
.contact__portrait { display: block; width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; }
.contact__bio { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.contact__bio p { margin: 0; font-size: 17px; line-height: 1.6; }
.label { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.contact__main { flex: 1 1 420px; display: flex; flex-direction: column; gap: 40px; }
.contact__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; font-size: 15px; }
.contact__links > div { display: flex; flex-direction: column; gap: 6px; }
.contact__links a { overflow-wrap: anywhere; }

.form { display: flex; flex-direction: column; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.form input, .form textarea {
	font: inherit; color: var(--text); background: transparent;
	border: 0; border-bottom: 1px solid #4a4a4a; border-radius: 0;
	padding: 10px 0; min-height: 44px; outline: none; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { border-bottom-color: var(--text); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.button {
	align-self: flex-start; font: inherit; font-size: 13px; letter-spacing: .14em;
	color: var(--bg); background: var(--text); border: 0;
	padding: 14px 28px; min-height: 44px; cursor: pointer;
}
.button:hover { opacity: .85; }
.notice { margin: 0; padding: 14px 16px; border: 1px solid var(--rule); font-size: 15px; }
.notice--ok { border-color: #5a8f5a; }
.notice--err { border-color: #b35a5a; }

/* Fallback pages */
.basic { max-width: 1120px; margin: 0 auto; padding: 40px 0 120px; }
.basic .entry { max-width: 680px; font-size: 18px; line-height: 1.6; }

/* Responsive */
@media (max-width: 960px) {
	.film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.site-header { flex-direction: column; align-items: flex-start; }
	.site-nav { gap: 20px; flex-wrap: wrap; }
	.film__head { flex-direction: column; align-items: flex-start; }
	.page-title { font-size: 44px; }
	.stills { grid-template-columns: minmax(0, 1fr); }
	.stagger { display: flex; flex-direction: column; gap: 20px; }
	.stagger figure { margin-top: 0 !important; }
	.contact { padding-top: 32px; gap: 48px; }
	.contact__links { grid-template-columns: minmax(0, 1fr); }
	.next__title { font-size: 24px; }
}
@media (max-width: 620px) {
	.wrap { padding: 0 16px; }
	/* Keep the three links and the Instagram icon on one line at 360px+. */
	.site-nav { gap: 12px; font-size: 12px; letter-spacing: .1em; flex-wrap: nowrap; }
	.site-nav .icon-link { min-width: 44px; margin-left: -8px; }
	.site-header { gap: 8px; padding: 20px 0 16px; }
	.film-grid { grid-template-columns: minmax(0, 1fr); }
	.reel { height: 240px; }
	.reel__overlay { padding: 16px; flex-direction: column; align-items: flex-start; }
	.reel__title { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
