/*
Theme Name: Slipstream
Theme URI: https://slipstreamfilms.example
Author: Slipstream Films
Author URI: https://slipstreamfilms.example
Description: An independent action-sports film and photography studio — freeride skiing, big-wave surfing, downhill, wingsuit, moto. Fictional studio; not a real company.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: slipstream
*/

/* =========================================================================
   SLIPSTREAM · design tokens
   ---------------------------------------------------------------------
   The studio's whole visual argument is speed: shot on location, cut
   fast, graded warm-to-hot. So the palette leans on a warm near-black
   (not a cold neutral one — this is outdoor and sun-baked, not a server
   room) with a single hot flare colour carrying almost all the signal.
   A cold streak cyan exists too, but it is used the way a real lens
   throws chromatic fringing at speed: as a rare one- or two-pixel edge,
   never as a co-equal second brand colour. Two black+neon duotone
   themes already exist in this project (Wavefront, Refract) — this is
   deliberately NOT a third one.
   ====================================================================== */
:root {
	/* ground: warm graphite, not pure black — this is outdoor light, not a screen */
	--ink:      #17140f;
	--ink-2:    #211c15;
	--ink-3:    #342c21;
	--paper:    #f3ede2;
	--paper-2:  #e7ddc9;

	/* the one accent that matters */
	--flare:      #ff4a1c;
	--flare-2:    #ff8a3d;
	--flare-dim:  #b5330f;

	/* the fringe — used sparingly, at low opacity, never as a fill */
	--streak: #33e6ff;

	--on-dark:  #f3ede2;
	--on-dark-2: rgba(243, 237, 226, 0.68);
	--on-light: #17140f;
	--on-light-2: rgba(23, 20, 15, 0.62);

	--ff-disp: "Anton", "Arial Narrow", sans-serif;
	--ff-body: "Inter", -apple-system, "Segoe UI", sans-serif;
	--ff-mono: "Space Mono", "SFMono-Regular", Consolas, monospace;

	--t-xs: clamp(0.72rem, 0.68rem + 0.15vw, 0.8rem);
	--t-sm: clamp(0.86rem, 0.82rem + 0.15vw, 0.95rem);
	--t-md: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
	--t-lg: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem);
	--t-xl: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);
	--t-2xl: clamp(3.2rem, 2rem + 5.5vw, 7rem);
	--t-3xl: clamp(4.2rem, 2.4rem + 8.5vw, 11rem);

	--wrap: min(1440px, 92vw);
	--gap: clamp(16px, 2.4vw, 32px);

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--slow: cubic-bezier(0.16, 1, 0.3, 1);
	--fast: 220ms;
	--dur: 620ms;

	--rad: 2px; /* this studio does not do rounded corners */
}

@media (prefers-color-scheme: light) {
	:root { color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--ink);
	color: var(--on-dark);
	font-family: var(--ff-body);
	font-size: var(--t-md);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, h3, .disp {
	font-family: var(--ff-disp);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.005em;
	line-height: 0.92;
	text-wrap: balance;
}
h1, .disp-1 { font-size: var(--t-3xl); }
h2, .disp-2 { font-size: var(--t-2xl); }
h3, .disp-3 { font-size: var(--t-xl); }

.eyebrow {
	font-family: var(--ff-mono);
	font-size: var(--t-xs);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--flare);
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
}
.eyebrow::before {
	content: "";
	width: 22px; height: 1px;
	background: var(--flare);
}

.stat {
	font-family: var(--ff-mono);
	font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.9em 1.6em;
	font-family: var(--ff-mono);
	font-size: var(--t-sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid currentColor;
	transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn--solid { background: var(--flare); border-color: var(--flare); color: var(--ink); }
.btn--solid:hover { background: var(--flare-2); border-color: var(--flare-2); }
.btn--ghost:hover { background: var(--on-dark); color: var(--ink); }

/* ---------- Reveals ----------
   Same discipline learned on Saltmarsh: the "rvi" curtain never gets
   observed directly (a fully clip-path-collapsed element reports zero
   intersection area in Chromium and can never re-enter view on its own
   terms) — it rides on its .rv parent's reveal instead. See main.js. */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--slow), transform var(--dur) var(--slow); }
.js .rv.in { opacity: 1; transform: none; }
.js .rvi { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--slow); }
.js .rvi.in { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
	.rv, .rvi { opacity: 1 !important; transform: none !important; clip-path: inset(0) !important; transition: none !important; }
}

/* ---------- Header ---------- */
.site-head {
	position: fixed; inset: 0 0 auto 0; z-index: 40;
	display: flex; align-items: center; justify-content: space-between;
	padding: clamp(16px, 2.4vw, 28px) var(--gap);
	color: var(--on-dark);
	transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
	border-bottom: 1px solid transparent;
}
.site-head.solid { background: rgba(23, 20, 15, 0.88); backdrop-filter: blur(10px); border-color: rgba(243, 237, 226, 0.12); }
.mark { font-family: var(--ff-disp); font-size: 1.4rem; letter-spacing: 0.03em; text-transform: uppercase; }
.mark small { display: block; font-family: var(--ff-mono); font-size: 0.55rem; letter-spacing: 0.2em; color: var(--on-dark-2); text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; gap: clamp(18px, 2vw, 34px); font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.nav a { position: relative; padding-block: 4px; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--flare); transition: right var(--fast) var(--ease); }
.nav a:hover::after, .nav a.current::after { right: 0; }
.hd-r { display: flex; align-items: center; gap: 20px; }

.burger { display: none; width: 28px; height: 20px; position: relative; }
.burger span, .burger::before, .burger::after {
	content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
	transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.burger::before { top: 0; }
.burger span { top: 9px; }
.burger::after { top: 18px; }
@media (max-width: 860px) {
	.nav { display: none; }
	.burger { display: block; }
}

.drawer {
	position: fixed; inset: 0; z-index: 50;
	display: flex; flex-direction: column; justify-content: center; gap: 18px;
	padding: var(--gap);
	background: var(--ink);
	transform: translateY(-100%);
	transition: transform var(--dur) var(--slow);
}
.drawer.open { transform: none; }
.drawer a { font-family: var(--ff-disp); font-size: var(--t-xl); text-transform: uppercase; }

/* ---------- Hero (video-driven, GPU post) ---------- */
.hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	align-items: end;
	overflow: hidden;
	isolation: isolate;
	background: var(--ink);
}
.hero__stage {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
}
.hero__stage canvas, .hero__stage video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
}
.hero__stage video { visibility: hidden; } /* decode source only — canvas paints it */
.hero::after {
	content: "";
	position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(to top, rgba(17,14,10,0.92) 0%, rgba(17,14,10,0.18) 46%, rgba(17,14,10,0.42) 100%);
}
.hero__body { position: relative; z-index: 2; padding: 0 var(--gap) clamp(48px, 7vw, 96px); }
.hero__kicker { display: flex; gap: clamp(20px,4vw,56px); flex-wrap: wrap; margin-bottom: 18px; }
.hero__kicker .stat { font-size: var(--t-sm); color: var(--on-dark-2); }
.hero__kicker .stat b { color: var(--flare); font-size: 1.1em; }
.hero h1 { color: var(--on-dark); }
.hero h1 em { font-style: normal; color: var(--flare); }
.hero p.lede { margin-top: 18px; max-width: 46ch; color: var(--on-dark-2); font-size: var(--t-lg); font-family: var(--ff-disp); text-transform: none; letter-spacing: 0; line-height: 1.2; }
.hero__cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero__scroll {
	position: absolute; right: var(--gap); bottom: 28px; z-index: 2;
	writing-mode: vertical-rl;
	font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase;
	color: var(--on-dark-2);
	display: flex; align-items: center; gap: 10px;
}
.hero__scroll::after { content: ""; width: 1px; height: 46px; background: linear-gradient(var(--flare), transparent); }

/* ---------- Speed-line ambient (all-site GPU layer) ---------- */
.sl { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; }
.sl__gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1200ms var(--slow); mix-blend-mode: screen; }
.sl__gl.on { opacity: 0.55; }
.sl__gl.is-off { opacity: 0; }
/* No WebGL: three diagonal flare-coloured streaks, drifting. Cheaper
   than the shader and reads as the same idea at a glance. */
.sl__wash {
	position: absolute; inset: -20%;
	background:
		linear-gradient(20deg, transparent 44%, rgba(255,74,28,0.10) 49%, transparent 54%),
		linear-gradient(20deg, transparent 64%, rgba(255,74,28,0.07) 68%, transparent 72%),
		linear-gradient(20deg, transparent 20%, rgba(51,230,255,0.05) 23%, transparent 26%);
	mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
	.sl__wash { animation: sl-drift 26s linear infinite; }
	@keyframes sl-drift {
		from { transform: translateX(-6%); }
		to   { transform: translateX(6%); }
	}
}
/* Only the two elements that already sit in normal flow get raised —
   .drawer is fixed with its own z-index, and giving it position:relative
   would drop it into the flow and blow a hole in the page (the exact
   bug this project hit once already, on Saltmarsh). */
main, .site-foot { position: relative; z-index: 1; }

/* ---------- Sections / bands ---------- */
.band { padding-block: clamp(72px, 10vw, 150px); position: relative; }
/* No opaque background here on purpose: body already carries --ink,
   and leaving these transparent is what lets the fixed .sl speed-line
   layer read through the whole scroll instead of just the gaps. */
.band--dark { color: var(--on-dark); }
.band--paper { background: var(--paper); color: var(--on-light); }
.band--paper .eyebrow { color: var(--flare-dim); }
.band--raise { position: relative; z-index: 1; }

.head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
	margin-bottom: clamp(36px, 5vw, 64px); flex-wrap: wrap;
}
.head .eyebrow { display: block; margin-bottom: 14px; }
.head .tl { font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

/* ---------- Reel grid (project cards, hover-to-play) ---------- */
.reel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1100px) { .reel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .reel-grid { grid-template-columns: 1fr; } }

.card { position: relative; }
.card__media {
	position: relative; overflow: hidden; aspect-ratio: 4/5;
	background: var(--ink-2);
}
.card__media img, .card__media video {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transition: transform 900ms var(--slow), opacity var(--fast) var(--ease);
}
.card__media video { opacity: 0; }
.card__media video.on { opacity: 1; }
.card:hover .card__media img { transform: scale(1.06); }
.card__no { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--ff-mono); font-size: var(--t-xs); color: var(--on-dark-2); letter-spacing: 0.1em; }
.card__disc {
	position: absolute; top: 14px; right: 14px; z-index: 2;
	font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase;
	background: rgba(17,14,10,0.72); color: var(--on-dark); padding: 5px 10px; backdrop-filter: blur(4px);
}
.card__scan {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, transparent 0%, rgba(255,74,28,0.0) 40%, rgba(255,74,28,0.16) 50%, rgba(255,74,28,0.0) 60%, transparent 100%);
	transform: translateY(-120%);
	opacity: 0;
	transition: opacity var(--fast) var(--ease);
}
.card:hover .card__scan { opacity: 1; animation: sl-scan 900ms var(--ease) 1; }
@keyframes sl-scan { from { transform: translateY(-120%); } to { transform: translateY(120%); } }

.card__body { padding-top: 16px; display: grid; gap: 6px; }
.card__body h3 { font-size: var(--t-lg); }
.card__meta { font-family: var(--ff-mono); font-size: var(--t-xs); color: var(--on-dark-2); letter-spacing: 0.05em; text-transform: uppercase; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats .stat-i { text-align: left; }
.stats .stat-i .num { font-family: var(--ff-disp); font-size: var(--t-2xl); color: var(--flare); line-height: 1; }
.stats .stat-i .lbl { margin-top: 10px; font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-2); }

/* ---------- Full-bleed reel band (a second big video) ---------- */
.reel-band { position: relative; min-height: min(84svh, 780px); display: grid; place-items: center; overflow: hidden; isolation: isolate; background: var(--ink); }
.reel-band video, .reel-band__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-band__poster { background-size: cover; background-position: center; }
.reel-band::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(17,14,10,0.5), rgba(17,14,10,0.75)); }
.reel-band__cap { position: relative; z-index: 2; text-align: center; padding: 0 var(--gap); }
.reel-band__cap h2 { color: var(--on-dark); }

/* ---------- Journal cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }
.post__media { position: relative; overflow: hidden; aspect-ratio: 16/10; background: var(--ink-2); }
.post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-foot { color: var(--on-dark-2); padding-block: clamp(56px,7vw,96px) 32px; border-top: 1px solid rgba(243,237,226,0.1); }
.site-foot .wrap { display: grid; gap: 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-top .mark { font-size: 2rem; }
.foot-nav { display: flex; gap: 28px; flex-wrap: wrap; font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.04em; padding-top: 24px; border-top: 1px solid rgba(243,237,226,0.08); }
.foot-fiction { max-width: 60ch; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--flare); color: var(--ink); padding: 12px 18px; font-family: var(--ff-mono); }
.skip:focus { left: var(--gap); top: var(--gap); }

/* ---------- Single project / page / post ---------- */
.phead { padding-block: clamp(120px, 16vw, 200px) clamp(40px, 6vw, 72px); color: var(--on-dark); }
.phead .eyebrow { margin-bottom: 16px; }
.phead .eyebrow a:hover { color: var(--flare-2); }
.phead p.lede { color: var(--on-dark-2); margin-top: 16px; max-width: 60ch; }

.pvideo { position: relative; background: var(--ink); overflow: hidden; aspect-ratio: 16/9; }
.pvideo video, .pvideo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.split { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: clamp(32px,5vw,80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.prose { max-width: 68ch; font-size: var(--t-md); }
.prose p { margin-bottom: 1.3em; }
.prose p:last-child { margin-bottom: 0; }

.dl { display: grid; gap: 14px; }
.dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(243,237,226,0.1); padding-bottom: 10px; font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.band--paper .dl div { border-color: rgba(23,20,15,0.12); }
.dl dt { color: var(--on-dark-2); }
.band--paper .dl dt { color: var(--on-light-2); }
.dl dd { margin: 0; }

.nextproj { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 28px; border-top: 1px solid rgba(243,237,226,0.1); border-bottom: 1px solid rgba(243,237,226,0.1); }
.nextproj a { font-family: var(--ff-disp); font-size: var(--t-lg); text-transform: uppercase; }
.nextproj a:hover { color: var(--flare); }
