/*
Theme Name: Darkroom
Theme URI: https://example.com/darkroom
Author: Your Name
Description: A dark, cinematic video portfolio theme for producers of branded, documentary, film and live content. Featured hero video, filterable work categories, branded photography, social links and feed slot, About and Contact templates. Everything is editable from Appearance → Customize and the Projects menu.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: darkroom
*/

:root {
	--bg: #0a090d;
	--bg-2: #121017;
	--bg-3: #1a1722;
	--line: rgba(255, 255, 255, 0.08);
	--text: #ecebf2;
	--muted: #9a97a8;
	--accent: #8b5cf6;
	--accent-2: #c084fc;
	--accent-glow: rgba(139, 92, 246, 0.35);
	--radius: 14px;
	--font-display: "Inter", system-ui, sans-serif;
	--font-body: "Inter", system-ui, sans-serif;
	--wrap: 1320px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 .5em;
}
p { margin: 0 0 1.2em; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { clip: auto; width: auto; height: auto; top: 10px; left: 10px; z-index: 999; background: var(--accent); padding: 8px 14px; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
	color: var(--accent-2);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 26px; border-radius: 999px;
	font-weight: 700; font-size: 14px; letter-spacing: .04em;
	background: var(--accent); color: #fff; border: 1px solid var(--accent);
	cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px var(--accent-glow); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.25); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(139,92,246,.12); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
	position: fixed; inset: 0 0 auto; z-index: 50;
	transition: background .3s, backdrop-filter .3s, border-color .3s;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, body:not(.home) .site-header {
	background: rgba(10, 9, 13, .78);
	backdrop-filter: blur(14px);
	border-color: var(--line);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }
.site-brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.site-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.custom-logo { max-height: 42px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; }
.main-nav a { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--text); }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { width: 100%; }

.header-social { display: flex; gap: 6px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .3s; }

/* ---------- Social icons ---------- */
.social-icons { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-icons a {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	color: var(--muted); border: 1px solid var(--line); transition: all .25s var(--ease);
}
.social-icons a:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }
.social-icons svg { width: 17px; height: 17px; }
.social-icons--lg a { width: 56px; height: 56px; }
.social-icons--lg svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--bg-2) center/cover no-repeat; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media iframe {
	position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none;
	width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
	transform: translate(-50%, -50%);
}
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(10,9,13,.55) 0%, rgba(10,9,13,.1) 35%, rgba(10,9,13,.85) 85%, var(--bg) 100%),
		radial-gradient(ellipse at 15% 90%, rgba(139,92,246,.35), transparent 55%);
}
.hero__content { padding: 130px 0 12vh; max-width: 900px; }
.hero__title { font-size: clamp(44px, 8vw, 112px); margin: 18px 0 20px; }
.hero__title em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: clamp(17px, 1.6vw, 21px); color: #c9c7d4; max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__scroll { position: absolute; right: 32px; bottom: 32px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; }
.hero__scroll::after { content: ""; display: block; width: 1px; height: 60px; margin: 12px auto 0; background: linear-gradient(var(--accent), transparent); }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-title { font-size: clamp(36px, 5vw, 64px); margin: 12px 0 0; }

/* Filter */
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button, .filter a {
	font: 600 13px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
	padding: 11px 18px; border-radius: 999px; cursor: pointer;
	background: transparent; color: var(--muted); border: 1px solid var(--line); transition: all .2s;
}
.filter button:hover, .filter a:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.filter .is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); transition: opacity .35s, transform .35s var(--ease); }
.card.is-hidden { display: none; }
.card__link { display: block; color: inherit; }
.card__media { aspect-ratio: 16/9; overflow: hidden; position: relative; background: linear-gradient(135deg, var(--bg-3), #241d36); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; filter: saturate(.85); }
.card:hover .card__media img { transform: scale(1.06); filter: saturate(1.1); }
.card__play {
	position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; border-radius: 50%;
	display: grid; place-items: center; background: rgba(139,92,246,.9); color: #fff;
	transform: translate(-50%,-50%) scale(.7); opacity: 0; transition: all .35s var(--ease);
	box-shadow: 0 0 40px var(--accent-glow);
}
.card__play svg { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .card__play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.card__body { padding: 18px 20px 22px; }
.card__cat { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); }
.card__title { font-size: 21px; margin: 8px 0 4px; }
.card__meta { font-size: 14px; color: var(--muted); }

/* Photography masonry */
.photo-grid { columns: 3 280px; column-gap: 18px; }
.photo-grid a { display: block; margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; break-inside: avoid; position: relative; }
.photo-grid img { width: 100%; transition: transform .8s var(--ease); }
.photo-grid a:hover img { transform: scale(1.04); }
.photo-grid figcaption {
	position: absolute; inset: auto 0 0; padding: 40px 16px 14px; font-weight: 600; font-size: 14px;
	background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .3s;
}
.photo-grid a:hover figcaption { opacity: 1; }

/* Social section */
.social-block { text-align: center; }
.social-block .social-icons { justify-content: center; margin: 28px 0 48px; }
.social-feed { text-align: left; }

/* CTA */
.cta { text-align: center; padding: 140px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(139,92,246,.22), transparent 60%); z-index: -1; }
.cta h2 { font-size: clamp(40px, 7vw, 96px); }

/* ---------- Page heroes / inner pages ---------- */
.page-hero { padding: 180px 0 60px; }
.page-hero h1 { font-size: clamp(48px, 8vw, 104px); margin-top: 14px; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 19px; }
.entry-content { max-width: 760px; }
.entry-content a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { font-size: 34px; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content .wp-block-gallery, .entry-content .gallery { margin: 2em 0; }
.entry-content .alignwide { max-width: none; width: min(var(--wrap), 100vw - 48px); }
.entry-content figure { margin: 2em 0; }
.entry-content img { border-radius: 10px; }

/* Single project */
.project-player { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px var(--line); }
.project-player iframe, .project-player video { width: 100%; height: 100%; border: 0; }
.project-layout { display: grid; grid-template-columns: 1fr 300px; gap: 60px; margin-top: 60px; }
.project-facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.project-facts li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.project-facts span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; padding-top: 3px; }
.project-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--line); }
.project-nav a { font-family: var(--font-display); font-size: 22px; }
.project-nav small { display: block; font-family: var(--font-body); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
.about-portrait { border-radius: var(--radius); overflow: hidden; position: sticky; top: 110px; }
.about-portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-portrait::after { content: ""; position: absolute; }
.about-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--line); }
.about-lists h3 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); font-family: var(--font-body); }
.about-lists ul { list-style: none; padding: 0; margin: 0; }
.about-lists li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; }
.contact-info dl { margin: 0; }
.contact-info dt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 28px; font-weight: 700; }
.contact-info dd { margin: 6px 0 0; font-size: 20px; font-family: var(--font-display); }
.contact-form { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea,
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
	width: 100%; padding: 14px 16px; border-radius: 10px; font: inherit; color: var(--text);
	background: var(--bg); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.field textarea { min-height: 160px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-weight: 600; }
.notice--ok { background: rgba(139,92,246,.15); border: 1px solid var(--accent); }
.notice--err { background: rgba(239,68,68,.12); border: 1px solid #ef4444; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 40px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(5,4,8,.92); backdrop-filter: blur(6px); padding: 24px; }
.modal.is-open { display: grid; }
.modal__inner { width: min(1200px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.modal__inner iframe, .modal__inner video { width: 100%; height: 100%; border: 0; }
.modal__close { position: absolute; top: 20px; right: 24px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }

.pagination { margin-top: 60px; display: flex; gap: 8px; }
.pagination .page-numbers { padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; }
.pagination .current { background: var(--accent); border-color: var(--accent); }

.empty-state { padding: 60px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.grid { grid-template-columns: repeat(2, 1fr); }
	.about-grid, .contact-grid, .project-layout { grid-template-columns: 1fr; gap: 48px; }
	.about-portrait { position: relative; top: 0; max-width: 480px; }
}
@media (max-width: 820px) {
	.nav-toggle { display: block; }
	.header-social { display: none; }
	.main-nav { position: fixed; inset: 78px 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); padding: 24px; display: none; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 20px; }
	.main-nav a { font-size: 22px; font-family: var(--font-display); text-transform: none; letter-spacing: 0; color: var(--text); }
	.section { padding: 80px 0; }
	.hero__scroll { display: none; }
}
@media (max-width: 600px) {
	.grid, .grid--2, .field-row, .about-lists { grid-template-columns: 1fr; }
	.contact-form { padding: 24px; }
	.admin-bar .site-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: none; }
}
