/*
Theme Name: herearemyphotos
Theme URI: https://herearemyphotos.com
Author: Carter Wolfe
Description: Dark, grid-first photography portfolio theme with hover video previews, an 18+ age gate, smooth scroll and a custom cursor. Built to replicate the herearemyphotos Framer layout.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: herearemyphotos
*/

/* ---------- Fonts ---------- */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("assets/fonts/figtree-latin-300-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/figtree-latin-400-normal.woff2") format("woff2");
}
/* Switzer is not bundled. Add the files below (Fontshare download) to use it;
   until then headings and nav render in Figtree. See README.txt. */
@font-face {
	font-family: "Switzer";
	font-style: normal;
	font-weight: 200;
	font-display: swap;
	src: url("assets/fonts/Switzer-Extralight.woff2") format("woff2");
}
@font-face {
	font-family: "Switzer";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("assets/fonts/Switzer-Light.woff2") format("woff2");
}

/* ---------- Tokens (taken from the Framer project) ---------- */
:root {
	--bg: #0e1011;
	--bg-hover: #000;
	--bg-muted: rgba(255, 255, 255, 0.05);
	--bg-muted-hover: rgba(255, 255, 255, 0.11);
	--bg-glass: rgba(12, 14, 15, 0.5);
	--bg-glass-hover: rgba(12, 14, 15, 0.7);
	--text: #fff;
	--text-muted: #b5b5b5;
	--text-inverse: #0e1011;
	--primary: #fff;
	--primary-hover: #f6f6f6;

	--font-display: "Switzer", "Figtree", system-ui, sans-serif;
	--font-body: "Figtree", system-ui, sans-serif;

	--gap: 6px;
	--cols: 8;
	--tile-ratio: 0.755;
	--header-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-weight: 300;
	font-size: 15px;
	line-height: 1.6;
	letter-spacing: 0.2px;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-muted); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; left: 12px; top: 12px; z-index: 2000; width: auto; height: auto;
	margin: 0; clip: auto; padding: 10px 14px; background: var(--primary); color: var(--text-inverse);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 200; line-height: 1.1; margin: 0 0 0.6em; }
h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; font-weight: 300; letter-spacing: 0.25px; }
h6 { font-size: 16px; font-weight: 300; letter-spacing: 0.15px; }

.meta, .nav-text, .button {
	font-family: var(--font-display);
	font-weight: 300;
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: 0.25px;
	text-transform: uppercase;
}

/* ---------- Header ---------- */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 100;
	display: flex; align-items: center; justify-content: space-between;
	height: var(--header-h); padding: 0 20px;
	background: var(--bg-glass);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-logo { font-family: var(--font-display); font-weight: 200; font-size: 20px; letter-spacing: 0.25px; }
.site-logo img { max-height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav a { font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: 0.25px; text-transform: uppercase; }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--text-muted); }
.menu-toggle {
	display: none; background: none; border: 0; padding: 10px; margin: -10px;
	color: var(--text); font: inherit; cursor: pointer;
}
.menu-toggle .bars { display: grid; gap: 6px; width: 24px; }
.menu-toggle .bars i { display: block; height: 1px; background: currentColor; transition: transform 0.25s ease; }
.menu-open .menu-toggle .bars i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-toggle .bars i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav-notice { font-size: 12px; color: var(--text-muted); }

/* ---------- Main ---------- */
.site-main { min-height: 100vh; padding-top: var(--header-h); }
.container { width: min(100% - 40px, 1200px); margin-inline: auto; }
.page-wrap { padding: 80px 0 140px; }
.page-wrap .entry-content { max-width: 70ch; }

/* ---------- Work grid ---------- */
.work-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: var(--gap);
	padding: var(--gap) 0 120px;
}
.tile { position: relative; aspect-ratio: var(--tile-ratio); background: var(--bg-muted); overflow: hidden; }
.tile[hidden] { display: none; }
.tile__link { position: absolute; inset: 0; display: block; }
.tile__img { width: 100%; height: 100%; object-fit: cover; }
.tile__placeholder {
	position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center;
	color: var(--text-muted); font-size: 11px;
}
.tile__media { position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s ease; pointer-events: none; overflow: hidden; }
.tile.is-playing .tile__media { opacity: 1; }
.tile__media video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile__media iframe {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	border: 0; max-width: none; pointer-events: none;
}
.work-empty { padding: 120px 20px; text-align: center; color: var(--text-muted); grid-column: 1 / -1; }

/* Floating category filter */
.filter {
	position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 90;
	display: flex; gap: 4px; max-width: calc(100vw - 24px); overflow-x: auto; padding: 4px;
	background: var(--bg-glass); border-radius: 999px;
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.filter button {
	flex: none; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
	background: transparent; color: var(--text); font-family: var(--font-display);
	font-weight: 300; font-size: 12px; letter-spacing: 0.25px; text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}
.filter button:hover { background: var(--bg-muted-hover); }
.filter button[aria-pressed="true"] { background: var(--primary); color: var(--text-inverse); }

/* ---------- Single work ---------- */
.work-single { padding: 56px 0 140px; }
.work-single__head { margin-bottom: 40px; }
.work-single__cats { color: var(--text-muted); }
.work-single__cats a:hover { color: var(--text); }
.work-video { margin: 0 0 var(--gap); background: var(--bg-muted); }
.work-video iframe { width: 100%; height: 100%; border: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content figure { margin: 0 0 var(--gap); }
.entry-content img { width: 100%; height: auto; cursor: zoom-in; }
.entry-content .wp-block-gallery {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap); align-items: start; margin: 0 0 var(--gap); padding: 0;
}
.entry-content .wp-block-gallery figure { margin: 0; }
.entry-content figcaption { color: var(--text-muted); font-size: 13px; padding: 6px 0; }
.work-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 80px; }
.work-nav a { display: block; }
.work-nav__label { color: var(--text-muted); }
.work-nav__title { font-family: var(--font-display); font-weight: 200; font-size: 24px; line-height: 1.1; }
.work-nav .next { text-align: right; margin-left: auto; }

/* Patreon buttons */
.site-cta { padding: 10px 18px; }
.work-cta { margin: 0 0 24px; }
.work-cta--bottom { margin: 40px 0 0; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 20px 100px; color: var(--text-muted); text-align: center; font-size: 13px; }

/* ---------- Age gate ---------- */
.age-gate {
	position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
	padding: 24px; background: var(--bg);
}
html.age-ok .age-gate { display: none; }
html:has(.age-gate):not(.age-ok) { overflow: hidden; }
.age-gate__box { max-width: 460px; text-align: center; }
.age-gate__box h1 { font-size: 40px; }
.age-gate__box p { color: var(--text-muted); margin: 0 0 28px; }
.age-gate__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.button {
	display: inline-block; border: 0; border-radius: 999px; padding: 14px 24px; cursor: pointer;
	background: var(--primary); color: var(--text-inverse); transition: background 0.2s ease;
}
.button:hover { background: var(--primary-hover); color: var(--text-inverse); }
.button--ghost { background: var(--bg-muted); color: var(--text); }
.button--ghost:hover { background: var(--bg-muted-hover); color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
	position: fixed; inset: 0; z-index: 2500; display: none; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, 0.94); padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button {
	position: absolute; background: none; border: 0; color: var(--text); cursor: pointer;
	font-family: var(--font-display); font-size: 12px; letter-spacing: 0.25px; text-transform: uppercase; padding: 14px;
}
.lightbox .lb-close { top: 8px; right: 8px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Custom cursor ---------- */
.cursor {
	position: fixed; left: 0; top: 0; z-index: 4000; width: 14px; height: 14px; margin: -7px 0 0 -7px;
	border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none;
	opacity: 0; transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
	will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
@media (hover: hover) and (pointer: fine) {
	html.cursor-on, html.cursor-on a, html.cursor-on button { cursor: none; }
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) { :root { --cols: 5; } }
@media (max-width: 809px) {
	:root { --cols: 3; --header-h: 56px; }
	h1 { font-size: 32px; }
	.menu-toggle { display: block; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 0 0; display: none; padding: 40px 20px;
		background: var(--bg);
	}
	.menu-open .site-nav { display: flex; }
	.site-nav ul { flex-direction: column; gap: 22px; }
	.site-nav { flex-direction: column; align-items: flex-start; gap: 32px; }
	.site-nav a { font-size: 20px; text-transform: none; font-weight: 200; }
	.filter { bottom: 20px; }
}
@media (max-width: 480px) { :root { --cols: 2; } }

@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
