/*
Theme Name:  Alden Wallace — Motion
Theme URI:   https://aldenwallace.co
Author:      Alden Wallace Studio
Description: Minimal standalone theme for aldenwallace.co — a director's single-page portfolio. Full-bleed Vimeo hero, eleven-piece work index, in-page player overlay. No parent theme, no page builder. The "marquee" redesign, built pixel-accurately from the design handoff.
Version:     1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aw-motion
*/

/* ==========================================================================
   Self-hosted Archivo (variable — weight 400..900, width 62..125).
   The width axis is load-bearing here: font-stretch on the wordmark, titles,
   H1 and contact email silently no-ops without a variable font that ships it.
   ========================================================================== */
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-weight: 400 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url('assets/fonts/archivo-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-weight: 400 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url('assets/fonts/archivo-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-weight: 400 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url('assets/fonts/archivo-vietnamese.woff2') format('woff2');
	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	--aw-ink: #0A0A0A;          /* page background */
	--aw-row: #101010;          /* project row base, behind thumbnail */
	--aw-accent: #FF4A1C;       /* eyebrow, meta line, all hovers */
	--aw-text: #FFFFFF;
	--aw-text-72: rgba(255,255,255,.72);
	--aw-text-62: rgba(255,255,255,.62);
	--aw-text-60: rgba(255,255,255,.6);
	--aw-text-50: rgba(255,255,255,.5);
	--aw-text-45: rgba(255,255,255,.45);
	--aw-text-35: rgba(255,255,255,.35);
	--aw-text-32: rgba(255,255,255,.32);
	--aw-text-30: rgba(255,255,255,.3);
	--aw-hair: rgba(255,255,255,.12);
	--aw-hair-nav: rgba(255,255,255,.1);
	--aw-nav-surface: rgba(10,10,10,.72);

	--aw-gutter: clamp(16px, 4vw, 44px);
	--aw-nav-h: 62px;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--aw-ink);
	color: var(--aw-text);
	font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
	text-wrap: pretty;
	min-height: 100vh;
}

/* Body scroll-lock while the overlay is open (set by app.js). */
body.aw-noscroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--aw-accent); }

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

::selection { background: var(--aw-accent); color: #fff; }

/* Accessible skip link. */
.aw-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	padding: 10px 16px;
	background: var(--aw-accent);
	color: #fff;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.aw-skip:focus { left: 8px; top: 8px; color: #fff; }

:focus-visible {
	outline: 2px solid var(--aw-accent);
	outline-offset: 3px;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes awFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes awRise { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes awCue  { 0%,100% { transform: translateY(0); opacity: .5 } 50% { transform: translateY(7px); opacity: 1 } }

/* ==========================================================================
   Nav (fixed)
   ========================================================================== */
.aw-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 40;
	height: var(--aw-nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 var(--aw-gutter);
	background: var(--aw-nav-surface);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--aw-hair-nav);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.aw-nav__mark {
	font-weight: 800;
	font-stretch: 118%;
	letter-spacing: .06em;
	font-size: 13px;
}
.aw-nav__links {
	display: flex;
	gap: clamp(14px, 3vw, 30px);
	align-items: center;
	color: var(--aw-text-62);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.aw-hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 0 var(--aw-gutter) clamp(28px, 6vh, 64px);
	overflow: hidden;
	/* Poster fallback beneath the iframe: mobile Safari can refuse autoplay,
	   and prefers-reduced-motion skips the video entirely. Set by front-page. */
	background-color: var(--aw-ink);
	background-size: cover;
	background-position: center;
}
.aw-hero__video {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.aw-hero__video iframe {
	position: absolute;
	top: 50%; left: 50%;
	width: 177.78vh;   /* 16:9 cover trick */
	height: 56.25vw;
	min-width: 100%;
	min-height: 100%;
	transform: translate(-50%, -50%);
	border: 0;
}
.aw-hero__scrim {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(10,10,10,.35) 0%, rgba(10,10,10,.9) 78%),
		linear-gradient(180deg, rgba(10,10,10,.5), rgba(10,10,10,.2) 40%, #0A0A0A 100%);
}
.aw-hero__content {
	position: relative;
	animation: awRise .8s cubic-bezier(.2,.8,.2,1) both;
}
.aw-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--aw-accent);
	margin-bottom: clamp(12px, 2vh, 22px);
}
.aw-h1 {
	margin: 0;
	font-weight: 900;
	font-stretch: 125%;
	font-size: clamp(46px, 11.5vw, 196px);
	line-height: .82;
	letter-spacing: -.035em;
	text-transform: uppercase;
}
.aw-clients {
	margin-top: clamp(16px, 3vh, 30px);
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	font-size: clamp(11px, 1.2vw, 13px);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--aw-text-50);
}
.aw-hero__cue {
	position: relative;
	margin-top: clamp(24px, 5vh, 54px);
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--aw-text-45);
	animation: awCue 2.4s ease-in-out infinite;
}

/* ==========================================================================
   Selected Work
   ========================================================================== */
.aw-work { padding: clamp(48px, 9vh, 110px) 0 0; }
.aw-work__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding: 0 var(--aw-gutter) clamp(20px, 4vh, 40px);
	border-bottom: 1px solid var(--aw-hair);
}
.aw-work__title {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--aw-text-60);
}
.aw-work__count {
	font-size: 11px;
	letter-spacing: .2em;
	color: var(--aw-text-30);
}

.aw-row {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--aw-hair);
	background: var(--aw-row);
	height: clamp(240px, 64vh, 620px);
	overflow: hidden;
	cursor: pointer;
	text-align: left;
	color: #fff;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.aw-row__thumb {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: .68;
	filter: saturate(.9);
	/* background-image is applied inline (eager for first rows) or lazily via
	   data-bg + IntersectionObserver in app.js. */
}
.aw-row__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,10,10,.15) 0%, rgba(10,10,10,.82) 100%);
}
.aw-row__caption {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: clamp(18px, 4vw, 48px);
}
.aw-row__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}
.aw-row__meta {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--aw-accent);
	margin-bottom: 8px;
}
.aw-row__name {
	font-weight: 800;
	font-stretch: 118%;
	font-size: clamp(24px, 5.4vw, 84px);
	line-height: .92;
	letter-spacing: -.025em;
	text-transform: uppercase;
}
.aw-row__play {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(255,255,255,.5);
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 9px;
	color: var(--aw-text-72);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.aw-contact {
	min-height: 78vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: clamp(22px, 5vh, 50px);
	padding: clamp(56px, 12vh, 130px) var(--aw-gutter);
}
.aw-contact__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--aw-text-50);
}
.aw-contact__email {
	font-weight: 900;
	font-stretch: 120%;
	font-size: clamp(24px, 6.2vw, 104px);
	line-height: .92;
	letter-spacing: -.03em;
	word-break: break-word;
	width: fit-content;
}
.aw-contact__ig {
	font-size: clamp(14px, 2.4vw, 30px);
	letter-spacing: .04em;
	color: var(--aw-text-62);
	width: fit-content;
}
.aw-footer {
	margin-top: clamp(24px, 6vh, 60px);
	padding-top: 20px;
	border-top: 1px solid var(--aw-hair);
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--aw-text-32);
}

/* ==========================================================================
   Player overlay
   ========================================================================== */
.aw-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: #000;
	display: flex;
	flex-direction: column;
	animation: awFade .28s ease both;
}
.aw-overlay[hidden] { display: none; }
.aw-overlay__bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px clamp(14px, 3vw, 28px);
	color: var(--aw-text-72);
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.aw-overlay__close {
	background: transparent;
	border: 1px solid rgba(255,255,255,.35);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	font-family: inherit;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	line-height: 1;
}
.aw-overlay__close:hover {
	background: var(--aw-accent);
	border-color: var(--aw-accent);
	color: #fff;
}
.aw-overlay__stage {
	flex: 1 1 auto;
	display: grid;
	place-items: center;
	padding: 0 clamp(8px, 2vw, 24px) clamp(14px, 3vh, 28px);
}
.aw-overlay__box {
	/* calc caps width by available height so the player never clips in phone
	   landscape. 132px is the bar + padding budget — recompute if those change. */
	width: min(100%, 1600px, calc((100dvh - 132px) * 16 / 9));
	aspect-ratio: 16 / 9;
	height: auto;
	background: #000;
}
.aw-overlay__box iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.aw-overlay__missing {
	max-width: 460px;
	text-align: center;
	color: var(--aw-text-66, rgba(255,255,255,.66));
	font-size: 14px;
	line-height: 1.6;
}
.aw-overlay__missing h3 {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--aw-accent);
	margin: 0 0 12px;
}

/* ==========================================================================
   Reduced motion — skip entrance/idle animations; the hero shows its poster
   (app.js declines to inject the autoplaying iframe under this preference).
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.aw-hero__content { animation: none; }
	.aw-hero__cue { animation: none; opacity: .5; }
	.aw-overlay { animation: none; }
}
