/*
Theme Name: Legends of Tolria
Theme URI:
Author: Torin Vandenbulk
Author URI:
Description: The Legends of Tolria site: an upright infinity of twin singularities on the home page, eclipse-lit pages beyond it.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: legends-of-tolria
*/

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
	--lot-black: #100d0f;
	--lot-dark: #100d0f;
	--lot-panel: #1a1519;
	--lot-panel-light: #241e22;
	--lot-text: #e8e4d9;
	--lot-text-muted: #a09b8c;
	--lot-gold: #c4a35a;
	--lot-gold-light: #dcc477;
	--lot-gold-dark: #9a7d3a;
	--lot-brass: #b08d3e;
	--lot-cream: #f0e6c8;

	/* Richer metallic with shine highlights */
	--lot-metallic: linear-gradient(
		135deg,
		#8a6d2a 0%,
		#dcc477 20%,
		#f0d888 35%,
		#c4a35a 50%,
		#f0d888 65%,
		#dcc477 80%,
		#8a6d2a 100%
	);
	--lot-metallic-border: linear-gradient(
		90deg,
		transparent 0%,
		#8a6d2a 10%,
		#dcc477 25%,
		#f0d888 40%,
		#c4a35a 50%,
		#f0d888 60%,
		#dcc477 75%,
		#8a6d2a 90%,
		transparent 100%
	);

	/* Hairline deco capitals for titles; a 1920s geometric sans for reading and, in
	   tracked capitals, for controls and labels. */
	--lot-font-display: "Poiret One", "Josefin Sans", Futura, "Century Gothic", sans-serif;
	--lot-font-body: "Jost", Futura, "Avenir Next", "Century Gothic", system-ui, sans-serif;
	--lot-font-ui: var(--lot-font-body);

	/* Polished gold, lit from above: bright crown, a dark horizon band, a warm reflected base. */
	--lot-shine: linear-gradient(180deg, #fff6d6 0%, #f3da95 26%, #c99b47 50%, #7d5c25 54%, #b88a3e 66%, #ecd08a 86%, #fff0c2 100%);
	/* The same metal seen edge-on, for hairlines and plate rims. */
	--lot-edge: linear-gradient(135deg, #6e5222 0%, #ead08a 28%, #8a6a2d 52%, #f5df9f 78%, #6e5222 100%);
	--lot-ink: #0f0c11;
	--lot-plate: #151117;

	/* Hover line decoration: fading metallic lines from center outward */
	--lot-hover-line:
		linear-gradient(90deg, transparent 0%, #8a6d2a 15%, #dcc477 35%, #f0d888 50%, #dcc477 65%, #8a6d2a 85%, transparent 100%) center / 100% 1px no-repeat;

	--lot-gap: 2rem;
	--lot-container: 1100px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

html {
	height: 100%;
}

body {
	font-family: var(--lot-font-body);
	font-weight: 400;
	line-height: 1.7;
	color: var(--lot-text);
	background-color: var(--lot-black);
	-webkit-font-smoothing: antialiased;
	min-height: 100%;
	display: flex;
	flex-direction: column;
}

.deco-bg-wrapper {
	flex: 1;
}

/* ========================================
   DEFAULT PAGE BACKGROUND (deco-bg)
   ======================================== */
.deco-bg-wrapper {
	position: relative;
}

/* Fixed centered background via pseudo-element — avoids cover/fixed quirks.
   The URL comes in as a custom property so PHP can route it through the image
   CDN; see legends_of_tolria_inline_asset_vars(). The url() fallback is what
   renders if the stylesheet is ever loaded without the theme's inline block. */
.deco-bg-wrapper::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image: var(--lot-bg-image, url('assets/elysian/ascendant-aurelion-display.jpg'));
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	z-index: -2;
	pointer-events: none;
}

/* Dark overlay */
.deco-bg-wrapper::after {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(16, 13, 15, 0.8);
	z-index: -1;
	pointer-events: none;
}

.deco-bg-wrapper > * {
	position: relative;
	z-index: 1;
}

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

a {
	color: var(--lot-gold);
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: var(--lot-gold-light);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--lot-font-display);
	font-weight: 400;
	line-height: 1.2;
	color: var(--lot-cream);
}

/* ========================================
   ART DECO DECORATIVE ELEMENTS
   ======================================== */
.deco-rule {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 2.5rem 0;
}

.deco-rule::before,
.deco-rule::after {
	content: "";
	flex: 1;
	height: 2px;
	background: var(--lot-metallic-border);
	box-shadow: 0 0 4px rgba(196, 163, 90, 0.2);
}

.deco-rule .diamond {
	width: 10px;
	height: 10px;
	background: var(--lot-gold);
	transform: rotate(45deg);
	flex-shrink: 0;
}

.deco-panel {
	position: relative;
	border: 1px solid var(--lot-gold-dark);
	padding: 2.5rem;
	background: var(--lot-panel);
}

.deco-panel::before,
.deco-panel::after {
	content: "";
	position: absolute;
	width: 30px;
	height: 30px;
	border-color: var(--lot-gold);
	border-style: solid;
}

.deco-panel::before {
	top: 8px;
	left: 8px;
	border-width: 2px 0 0 2px;
}

.deco-panel::after {
	bottom: 8px;
	right: 8px;
	border-width: 0 2px 2px 0;
}

/* ========================================
   THE SKY — masthead and footer starfield

   A deep violet night confined to the two bars. Two tiled star layers drift at
   different rates for parallax; each travels exactly one tile width, so the
   pattern lands back on itself and the loop is invisible, and each carries that
   much slack on its right so it never slides clear and opens a bare band.

   The violet is what makes the stars legible. Against the near-black page colour
   they disappeared; a purple ground gives them something to sit on.
   ======================================== */
.sky {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(ellipse 70% 90% at 50% 34%, rgba(124, 76, 196, 0.30), transparent 72%),
		radial-gradient(ellipse 46% 60% at 22% 78%, rgba(74, 44, 132, 0.24), transparent 70%),
		linear-gradient(180deg, #17102b 0%, #241740 42%, #140d24 100%);
}

/* Melt the sky into the bar it meets.

   The masthead's violet ran straight into the near-black nav strip and left a
   hard seam across the page. This fades the last third of the band down to the
   nav colour so the two meet in shadow rather than at an edge.

   It has to be a pseudo-element rather than another layer in the `background`
   shorthand above: the star layers are children, so a background on .sky paints
   *under* them and the stars would carry on straight through the fade. ::after
   is the last child, so it paints over all of them. */
.sky::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		transparent 0%,
		transparent 52%,
		rgba(16, 13, 15, 0.35) 74%,
		rgba(16, 13, 15, 0.78) 89%,
		var(--lot-dark) 100%
	);
}

/* In the footer the sky meets the page above it, so the fade runs the other way
   and the metallic rule sits on top of the join. */
.site-footer .sky::after {
	background: linear-gradient(
		0deg,
		transparent 0%,
		transparent 58%,
		rgba(16, 13, 15, 0.32) 78%,
		rgba(16, 13, 15, 0.72) 91%,
		var(--lot-dark) 100%
	);
}

/* The footer's gradient is flipped so the deepest violet sits against the page
   rather than at the outer edge, and the two bars mirror each other. */
.site-footer .sky {
	background:
		radial-gradient(ellipse 70% 90% at 50% 66%, rgba(124, 76, 196, 0.30), transparent 72%),
		radial-gradient(ellipse 46% 60% at 78% 22%, rgba(74, 44, 132, 0.24), transparent 70%),
		linear-gradient(180deg, #140d24 0%, #241740 58%, #17102b 100%);
}

.sky__near,
.sky__far {
	position: absolute;
	top: -10%;
	bottom: -10%;
	left: -10%;
	right: auto;
	width: calc(120% + 1200px);
	background-image: var(--lot-starfield, url('images/starfield.svg'));
	background-repeat: repeat;
}

.sky__near {
	background-size: 600px 400px;
	opacity: 0.95;
	animation: lot-drift-near 180s linear infinite;
}

/* A second copy at a larger scale gives depth without a second request. */
.sky__far {
	background-size: 1100px 733px;
	opacity: 0.6;
	animation: lot-drift-far 320s linear infinite reverse;
}

@keyframes lot-drift-near {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-600px, 0, 0); }
}

@keyframes lot-drift-far {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-1100px, 0, 0); }
}

/* --- twinkle ---------------------------------------------------------------
   A handful of brighter stars that pulse. These are real elements, not part of
   the tile: an SVG used as a background-image is painted as a still, so CSS and
   SMIL inside it never run. Anything that moves has to be in the document.

   Position, size, duration and delay all arrive as custom properties from
   template-parts/sky.php. The staggered durations are deliberately not multiples
   of each other, so the field never falls into visible lockstep. */
.sky__star {
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: var(--s);
	height: var(--s);
	border-radius: 50%;
	background: #fff;
	box-shadow:
		0 0 4px 1px rgba(214, 196, 255, 0.9),
		0 0 10px 3px rgba(150, 108, 226, 0.45);
	opacity: 0.25;
	animation: lot-twinkle var(--t) ease-in-out var(--d) infinite;
	will-change: opacity, transform;
}

@keyframes lot-twinkle {
	0%, 100% { opacity: 0.18; transform: scale(0.65); }
	50%      { opacity: 1;    transform: scale(1); }
}

/* ========================================
   SITE HEADER — CENTERED LAYOUT
   ======================================== */
.site-header {
	background: var(--lot-dark);
	padding: 0;
	z-index: 999;
	position: relative;
	isolation: isolate;
}

/* Everything in the header sits above the sky. */
.site-header > *:not(.sky),
.site-footer > *:not(.sky) {
	position: relative;
	z-index: 1;
}

/* Nav + bottom line stick to top */
.site-nav-sticky {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--lot-dark);
}

/* When lightbox is open, hide everything behind it */
body.lightbox-open .site-header,
body.lightbox-open .site-nav-sticky,
body.lightbox-open .deco-bg-wrapper,
body.lightbox-open .site-footer {
	display: none;
}

/* Banner logo — collapsible on scroll */
.site-header-banner {
	display: grid;
	grid-template-rows: 1fr;
	justify-items: center;
	text-align: center;
	padding: 0 2rem;
	transition: grid-template-rows 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
	opacity: 1;
}

.site-header-banner > .site-banner-link {
	display: inline-block;
	overflow: hidden;
}

.site-header.is-collapsed .site-header-banner {
	grid-template-rows: 0fr;
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
}

.site-header.is-collapsed .site-header-line:first-of-type {
	height: 0;
	box-shadow: none;
}

/* ----------------------------------------------------------------- LOGO SHINE
   A specular sweep across the wordmark on hover, plus a warm bloom around it.

   The trick is the mask: the overlay uses the logo PNG as its own mask image, so
   the moving highlight only ever lands on the metal of the mark and never on the
   empty box around it. Without that it reads as a rectangle of light sliding
   over the header, which is the giveaway of a cheap shine.

   `--lot-logo` is set inline in header.php — CSS has no way to build a URL from
   the theme directory. */
.site-banner-link {
	display: inline-block;
	position: relative;
	transition: filter 0.45s ease;
}

.site-banner-logo {
	max-width: 500px;
	max-height: 175px;
	width: auto;
	height: auto;
	display: block;
	border: none !important;
	transition: filter 0.45s ease;
	object-fit: contain;
}

.site-banner-shine {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;

	/* A narrow band of light, angled, parked off the left edge. */
	background: linear-gradient(
		105deg,
		transparent 38%,
		rgba(255, 251, 235, 0.28) 47%,
		rgba(255, 253, 247, 0.75) 50%,
		rgba(255, 251, 235, 0.28) 53%,
		transparent 62%
	);
	background-size: 260% 100%;
	background-repeat: no-repeat;
	background-position: 130% 0;

	/* Clipped to the shape of the mark itself. */
	-webkit-mask-image: var(--lot-logo);
	mask-image: var(--lot-logo);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.site-banner-link:hover .site-banner-shine,
.site-banner-link:focus-visible .site-banner-shine {
	opacity: 1;
	animation: lot-logo-sweep 900ms ease-out;
}

@keyframes lot-logo-sweep {
	from { background-position: 130% 0; }
	to   { background-position: -60% 0; }
}

.site-banner-link:hover .site-banner-logo,
.site-banner-link:focus-visible .site-banner-logo {
	filter:
		brightness(1.08)
		drop-shadow(0 0 5px rgba(240, 216, 136, 0.4))
		drop-shadow(0 0 22px rgba(196, 163, 90, 0.22));
}

/* Metallic shine separator lines */
.site-header-line {
	height: 2px;
	background: linear-gradient(90deg, #8a6d2a, #dcc477 25%, #f0d888 50%, #dcc477 75%, #8a6d2a);
	box-shadow: 0 1px 4px rgba(196, 163, 90, 0.2);
	transition: height 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   NAVIGATION — MATCHES PROJECTS NAV PATTERN
   ======================================== */
/* flex-wrap is the safety net, not the plan.

   The four labels come to ~486px at the desktop size, so on any phone they
   overflowed a centred flex row — which clips symmetrically, taking a bite out
   of both "About" and "Discography". The type steps down at the breakpoints
   below so they fit on one line; wrapping is what catches the cases the metrics
   do not, and a wrapped row is at least legible where a clipped one is not. */
.main-navigation {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	padding: 0.4rem 1rem;
	max-width: 100%;
}

/* Vertical line separator with diamond */
.nav-sep {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 30px;
	flex-shrink: 0;
	margin: 0 0.15rem;
	pointer-events: none;
}

.nav-sep::before,
.nav-sep::after {
	content: "";
	width: 2px;
	flex: 1;
	background: linear-gradient(180deg, transparent, var(--lot-gold-dark) 30%, var(--lot-gold-light) 50%, var(--lot-gold-dark) 70%, transparent);
}

.nav-sep .diamond {
	width: 5px;
	height: 5px;
	background: var(--lot-gold);
	transform: rotate(45deg);
	flex-shrink: 0;
	margin: 2px 0;
}

.nav-item {
	background: transparent;
	border: none;
	padding: 0.5rem 1rem;
	font-family: var(--lot-font-body);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lot-text-muted);
	cursor: pointer;
	position: relative;
	transition: color 0.3s ease;
	white-space: nowrap;
	text-decoration: none;
}

/* Top + bottom expanding lines */
.nav-item::before,
.nav-item::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 1px;
	transition: width 0.35s ease;
	pointer-events: none;
	background: var(--lot-hover-line);
}

.nav-item::before { top: 0; }
.nav-item::after { bottom: 0; }

.nav-item:hover::before,
.nav-item:hover::after,
.nav-item.is-active::before,
.nav-item.is-active::after {
	width: 100%;
}

.nav-item:hover {
	color: var(--lot-gold);
}

.nav-item.is-active {
	color: var(--lot-gold);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.site-content {
	max-width: var(--lot-container);
	margin: 0 auto;
	padding: 1.25rem 2rem 3rem;
	animation: pageReveal 0.6s ease-out;
}

@keyframes pageReveal {
	from {
		opacity: 0;
		transform: translateY(15px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   WORDPRESS BLOCK OVERRIDES
   ======================================== */
.wp-block-group.alignfull {
	max-width: 100%;
	padding-left: 2rem;
	padding-right: 2rem;
}

.wp-block-heading {
	font-family: var(--lot-font-display);
	color: var(--lot-cream);
	margin-bottom: 1rem;
}

.has-xx-large-font-size {
	font-size: clamp(2rem, 5vw, 3.2rem);
}

.has-medium-font-size {
	font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.wp-block-group p,
.entry-content p {
	color: var(--lot-text);
	margin-bottom: 1.25rem;
	font-size: 1rem;
	line-height: 1.8;
}

.has-small-font-size {
	font-size: 0.9rem;
}

.wp-block-columns {
	gap: var(--lot-gap);
}

.wp-block-columns.alignwide {
	max-width: var(--lot-container);
	margin: 0 auto;
}

/* Buttons — art deco gold */
.wp-block-button__link,
.wp-element-button {
	font-family: var(--lot-font-body);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	padding: 0.9rem 2.5rem;
	background: transparent;
	color: var(--lot-gold) !important;
	border: 2px solid var(--lot-gold);
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	position: relative;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--lot-gold);
	color: var(--lot-black) !important;
	box-shadow: 0 0 20px rgba(196, 163, 90, 0.3);
}

/* Images */
.wp-block-image img {
	border: 1px solid var(--lot-gold-dark);
}

.wp-block-image figcaption {
	color: var(--lot-text-muted);
	font-size: 0.8rem;
	text-align: center;
	margin-top: 0.5rem;
	font-style: italic;
}

/* Galleries */
.wp-block-gallery {
	gap: 0.75rem !important;
}

.wp-block-gallery .wp-block-image {
	overflow: hidden;
	border: 1px solid var(--lot-gold-dark);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-gallery .wp-block-image:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(196, 163, 90, 0.15);
}

.wp-block-gallery .wp-block-image img {
	border: none;
	transition: transform 0.4s ease;
}

.wp-block-gallery .wp-block-image:hover img {
	transform: scale(1.03);
}

/* ========================================
   PAGE HERO SECTIONS
   ======================================== */
/* The nav bar above already separates the title from the masthead; 4rem on top
   of .site-content's 3rem left a dead band above every page title. */
.page-hero {
	text-align: center;
	padding: 0.75rem 2rem 1.25rem;
	position: relative;
}

/* The title is metal, so it catches the light like metal: a bright band sweeps
   across the letterforms on hover.

   The sweep must never leave the text uncovered. With `background-clip: text`,
   any letter the background does not reach is filled with nothing and vanishes.
   At `background-size: 260%` the background is 2.6x the element, and
   `background-position` percentages are resolved against the *difference* — so
   only 0%..100% keeps the whole word covered. 100% aligns the background's right
   edge with the element's; 0% aligns the left. Anything outside that range
   opens a gap and letters drop out.

   So the sweep runs 100% -> 0%, and the resting position is 0% — the animation
   ends exactly where the element already sits, with no snap-back.

   inline-block matters too: a block-level h1 spans the full column and the sweep
   would cross empty space either side of the word. */
.page-hero h1 {
	display: inline-block;
	font-size: clamp(2.2rem, 6vw, 3.5rem);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background-image: var(--lot-metallic);
	background-size: 260% 100%;
	background-position: 0% 0;
	background-repeat: no-repeat;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent;
	margin-bottom: 0.5rem;
	cursor: default;
}

.page-hero h1:hover {
	animation: lot-title-sweep 1.1s ease-out;
}

/* The rule directly under a title does not need a full 2.5rem of air above it. */
.page-hero + .deco-rule {
	margin-top: 0.5rem;
}

@keyframes lot-title-sweep {
	from { background-position: 100% 0; }
	to   { background-position: 0% 0; }
}

/* ========================================
   PROJECTS PAGE — SEPARATOR NAV STYLE
   ======================================== */
.projects-page {
	max-width: 800px;
	padding-bottom: 1rem;
}

.projects-subtitle {
	text-align: center;
	color: var(--lot-text-muted);
	max-width: 520px;
	margin: 0 auto 2rem;
	font-size: 1rem;
	line-height: 1.8;
}

/* Project nav — a fixed 3x2 grid rather than a wrapping row.

   Six titles of wildly different lengths ("LoT Hub" against "Explorers of
   Elysium") wrapped into a ragged two-and-a-half lines and read as a jumble. A
   grid gives every project the same slot, so the eye gets two clean rows and the
   separators are no longer load-bearing — the cells do that work now. */
.projects-nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.25rem 0.5rem;
	max-width: 660px;
	margin: 0 auto 2rem;
}

.project-nav-item {
	background: transparent;
	border: none;
	padding: 0.5rem 1rem;
	font-family: var(--lot-font-body);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lot-text-muted);
	cursor: pointer;
	position: relative;
	transition: color 0.3s ease;
}

/* Vertical line separator with diamond center */
/* Top + bottom expanding lines */
.project-nav-item::before,
.project-nav-item::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 1px;
	transition: width 0.35s ease;
	pointer-events: none;
	background: var(--lot-hover-line);
}

.project-nav-item::before { top: 0; }
.project-nav-item::after { bottom: 0; }

.project-nav-item:hover::before,
.project-nav-item:hover::after,
.project-nav-item.is-active::before,
.project-nav-item.is-active::after {
	width: 100%;
}

.project-nav-item:hover {
	color: var(--lot-gold);
}

.project-nav-item.is-active {
	color: var(--lot-gold);
}

/* Panels */
.projects-panels {
	margin-bottom: 0;
}

.project-panel {
	display: none;
	animation: projectPanelIn 0.3s ease;
}

.project-panel.is-visible {
	display: block;
}

@keyframes projectPanelIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.project-panel p {
	color: var(--lot-text);
	font-size: 0.95rem;
	line-height: 1.85;
	margin-bottom: 1rem;
	text-align: center;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.project-cta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	margin: 0 auto;
	font-family: var(--lot-font-body);
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--lot-gold);
	border: 1px solid var(--lot-gold-dark);
	padding: 0.5rem 1.25rem;
	transition: all 0.3s ease;
}

.project-cta:hover {
	background: var(--lot-gold);
	color: var(--lot-black);
	border-color: var(--lot-gold);
}

.projects-footer-cta {
	text-align: center;
	margin-top: 1rem;
}

@media (max-width: 768px) {
	/* Three columns of uppercase titles do not survive a phone; two do. */
	.projects-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.project-nav-item {
		font-size: 0.7rem;
		padding: 0.4rem 0.5rem;
	}
}

/* ========================================
   ARTWORK PAGE — PHP GALLERY
   ======================================== */
.artwork-intro {
	text-align: center;
	color: var(--lot-text-muted);
	max-width: 560px;
	margin: 0 auto;
	font-size: 1rem;
	line-height: 1.8;
}

.artwork-gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2rem;
}

.artwork-item {
	width: calc(33.333% - 0.5rem);
	min-width: 260px;
}

.artwork-item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 2px solid transparent;
	border-image: var(--lot-metallic) 1;
	background: var(--lot-panel);
	box-shadow: 0 0 4px rgba(220, 196, 119, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.artwork-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 0 8px rgba(220, 196, 119, 0.2), 0 8px 25px rgba(196, 163, 90, 0.15);
}

.artwork-item .artwork-img-wrap {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
}

.artwork-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: none !important;
	transition: filter 0.4s ease, transform 0.4s ease;
}

.artwork-item .artwork-img-wrap {
	position: relative;
}

.artwork-item .artwork-img-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 30px 15px rgba(16, 13, 15, 0.5);
	pointer-events: none;
	transition: box-shadow 0.4s ease;
}

.artwork-item:hover .artwork-img-wrap::after {
	box-shadow: inset 0 0 10px 5px rgba(16, 13, 15, 0.2);
}

.artwork-item:hover img {
	transform: scale(1.03);
}

/* Metallic line separator above caption */
.artwork-item figcaption {
	padding: 0.65rem 0.75rem;
	font-family: var(--lot-font-ui);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #d9cfb8;
	text-align: center;
	margin-top: auto;
	border-top: 1px solid;
	border-image: var(--lot-metallic-border) 1;
}

/* ========================================
   ARTWORK LIST VIEW
   ======================================== */
.artwork-list {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.artwork-list-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.6rem 1rem;
	background: var(--lot-panel);
	border: 2px solid transparent;
	border-image: var(--lot-metallic) 1;
	cursor: pointer;
	transition: background 0.3s ease;
}

.artwork-list-item:hover {
	background: var(--lot-panel-light);
}

.artwork-list-item img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border: 1px solid var(--lot-gold-dark);
	flex-shrink: 0;
}

.artwork-list-item span {
	font-family: var(--lot-font-body);
	font-size: 0.85rem;
	color: var(--lot-text);
	letter-spacing: 0.02em;
}

.artwork-list-item:hover span {
	color: var(--lot-gold);
}

/* ========================================
   DISCOGRAPHY LIST VIEW
   ======================================== */
.disco-list {
	display: flex;
	flex-direction: column;
	gap: 1px;
	max-width: 600px;
	margin: 0 auto;
}

.disco-list-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.6rem 1rem;
	background: var(--lot-panel);
	border: 2px solid transparent;
	border-image: var(--lot-metallic) 1;
	text-decoration: none;
	transition: background 0.3s ease;
}

.disco-list-item:hover {
	background: var(--lot-panel-light);
}

.disco-list-item img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border: 1px solid var(--lot-gold-dark);
	flex-shrink: 0;
}

.disco-list-info {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.disco-list-title {
	font-family: var(--lot-font-ui);
	font-size: 0.72rem;
	color: var(--lot-cream);
	transition: color 0.3s ease;
}

.disco-list-item:hover .disco-list-title {
	color: var(--lot-gold);
}

.disco-list-meta {
	font-family: var(--lot-font-body);
	font-size: 0.7rem;
	color: var(--lot-text-muted);
	letter-spacing: 0.05em;
}

/* ========================================
   ARTWORK LIGHTBOX
   ======================================== */
body.lightbox-open {
	overflow: hidden;
}

.lot-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(16, 13, 15, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.lot-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lot-lightbox-inner {
	position: relative;
	max-width: 85vw;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lot-lightbox-img {
	max-width: 85vw;
	max-height: 72vh;
	object-fit: contain;
	border: 2px solid transparent;
	border-image: var(--lot-metallic) 1;
	box-shadow: 0 0 30px rgba(196, 163, 90, 0.15);
	cursor: pointer;
	transition: transform 0.3s ease;
}

.lot-lightbox-img:hover {
	transform: scale(1.01);
}

.lot-lightbox-caption {
	margin-top: 1rem;
	font-family: var(--lot-font-display);
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	background: var(--lot-shine);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.lot-lightbox-counter {
	margin-top: 0.4rem;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	color: #a49b88;
}

/* Close, previous and next: the same chamfered plates as the gallery's controls,
   pinned to the edges of the screen so they never cover the picture. */
.lot-lightbox-btn,
.lot-lightbox-close {
	--cut: 9px;
	--rim: rgba(196, 163, 90, 0.55);
	position: fixed;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--rim);
	background:
		linear-gradient(135deg, var(--rim) calc(var(--cut) * 0.7071 + 0.8px), transparent 0) border-box,
		linear-gradient(315deg, var(--rim) calc(var(--cut) * 0.7071 + 0.8px), transparent 0) border-box,
		linear-gradient(180deg, rgba(27, 21, 25, 0.92), rgba(13, 10, 14, 0.94)) border-box;
	clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
	color: #d9cfb8;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.lot-lightbox-btn {
	top: 50%;
	transform: translateY(-50%);
}

.lot-lightbox-btn:hover,
.lot-lightbox-close:hover {
	--rim: var(--lot-gold-light);
	color: #fff0c2;
}

.lot-lightbox-btn:focus-visible,
.lot-lightbox-close:focus-visible {
	outline: 2px solid var(--lot-gold-light);
	outline-offset: -5px;
}

.lot-lightbox-prev {
	left: clamp(0.5rem, 2vw, 1.5rem);
}

.lot-lightbox-next {
	right: clamp(0.5rem, 2vw, 1.5rem);
}

.lot-lightbox-close {
	top: clamp(0.5rem, 2vw, 1.25rem);
	right: clamp(0.5rem, 2vw, 1.5rem);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
	background: var(--lot-dark);
	border-top: none;
	text-align: center;
	padding: 0;
	position: relative;
	z-index: 1;
	/* Keeps the sky's stacking contained to the footer. */
	isolation: isolate;
}

.footer-socials,
.footer-logo,
.site-footer > p {
	padding-left: 2rem;
	padding-right: 2rem;
}

.site-footer > p {
	padding-bottom: 1.5rem;
}

/* Metallic shine line at top of footer. Positioned so it stays above the sky —
   an unpositioned block would paint underneath it and disappear. */
.site-footer::before {
	content: "";
	display: block;
	height: 2px;
	margin-bottom: 0;
	position: relative;
	z-index: 1;
	background: linear-gradient(90deg, #8a6d2a, #dcc477 25%, #f0d888 50%, #dcc477 75%, #8a6d2a);
	box-shadow: 0 -1px 4px rgba(196, 163, 90, 0.2);
}

.site-footer p {
	color: var(--lot-text-muted);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
}

.footer-logo {
	text-align: center;
	margin: -0.1rem 0 0;
	padding-bottom: 1.5rem;
}

.footer-logo a {
	display: inline-block;
	transition: filter 0.3s ease;
}

.footer-logo img {
	max-width: 140px;
	height: auto;
	display: block;
	border: none !important;
	opacity: 0.7;
	transition: opacity 0.3s ease, filter 0.3s ease;
}

.footer-logo a:hover img {
	opacity: 1;
	filter: drop-shadow(0 0 8px rgba(212, 185, 106, 0.6)) drop-shadow(0 0 20px rgba(196, 163, 90, 0.3));
}

/* Social links with metallic separators */
.footer-socials {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
	padding: 1.25rem 0;
}

.footer-socials a {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.9rem;
	font-family: var(--lot-font-ui);
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lot-text-muted);
	background: transparent;
	border: none;
	transition: color 0.3s ease;
	position: relative;
}

/* Top + bottom expanding lines */
.footer-socials a::before,
.footer-socials a::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 1px;
	transition: width 0.35s ease;
	pointer-events: none;
	background: var(--lot-hover-line);
}

.footer-socials a::before { top: 0; }
.footer-socials a::after { bottom: 0; }

.footer-socials a:hover::before,
.footer-socials a:hover::after {
	width: 100%;
}

/* Diamond separator — standalone element between links */
/* Vertical line separator with diamond center */
.footer-sep {
	display: flex;
	flex-direction: column;
	align-items: center;
	align-self: center;
	height: 30px;
	flex-shrink: 0;
	margin: 0 0.4rem;
}

.footer-sep::before,
.footer-sep::after {
	content: "";
	width: 2px;
	flex: 1;
	background: linear-gradient(180deg, transparent, var(--lot-gold-dark) 30%, var(--lot-gold-light) 50%, var(--lot-gold-dark) 70%, transparent);
}

.footer-sep .diamond {
	width: 5px;
	height: 5px;
	background: var(--lot-gold);
	transform: rotate(45deg);
	flex-shrink: 0;
	margin: 2px 0;
}

.footer-socials a svg {
	flex-shrink: 0;
	transition: color 0.3s ease;
}

.footer-socials a:hover {
	color: var(--lot-gold);
}

.footer-socials a:hover svg {
	color: var(--lot-gold);
}

/* ========================================
   SCROLLBAR — METALLIC WITH DIAMONDS
   ======================================== */
::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: var(--lot-black);
	border-left: 1px solid rgba(196, 163, 90, 0.1);
}

::-webkit-scrollbar-thumb {
	background: linear-gradient(
		180deg,
		var(--lot-gold-dark) 0%,
		var(--lot-gold-light) 15%,
		var(--lot-gold) 50%,
		var(--lot-gold-light) 85%,
		var(--lot-gold-dark) 100%
	);
	border: 1px solid rgba(196, 163, 90, 0.3);
	border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(
		180deg,
		var(--lot-gold) 0%,
		var(--lot-gold-light) 20%,
		#f0d888 50%,
		var(--lot-gold-light) 80%,
		var(--lot-gold) 100%
	);
	box-shadow: -2px 0 6px rgba(196, 163, 90, 0.3);
}

::-webkit-scrollbar-button:vertical:start:decrement,
::-webkit-scrollbar-button:vertical:end:increment {
	display: block;
	height: 10px;
	background: var(--lot-black);
}

::-webkit-scrollbar-button:vertical:start:decrement {
	background:
		linear-gradient(135deg, transparent 40%, var(--lot-gold) 40%, var(--lot-gold) 60%, transparent 60%),
		linear-gradient(225deg, transparent 40%, var(--lot-gold) 40%, var(--lot-gold) 60%, transparent 60%);
	background-size: 100% 100%;
}

::-webkit-scrollbar-button:vertical:end:increment {
	background:
		linear-gradient(315deg, transparent 40%, var(--lot-gold) 40%, var(--lot-gold) 60%, transparent 60%),
		linear-gradient(45deg, transparent 40%, var(--lot-gold) 40%, var(--lot-gold) 60%, transparent 60%);
	background-size: 100% 100%;
}

/* Firefox scrollbar */
html {
	scrollbar-width: thin;
	scrollbar-color: var(--lot-gold-dark) var(--lot-black);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
	.footer-socials {
		flex-wrap: wrap;
		justify-content: center;
	}

	.wp-block-columns {
		flex-direction: column;
	}

	.deco-panel {
		padding: 1.5rem;
	}

	.footer-socials {
		gap: 0.4rem;
	}

	.footer-socials a {
		padding: 0.4rem 0.75rem;
		font-size: 0.65rem;
	}

}

/* ========================================
   BUTTON-AS-SURFACE RESETS

   The gallery tiles and list rows are <button> now rather than div-with-onclick,
   so they are reachable by keyboard and announce themselves. That means undoing
   the UA button styling they inherit.
   ======================================== */
.artwork-open {
	display: block;
	width: 100%;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: inherit;
}

.artwork-list-item {
	width: 100%;
	font: inherit;
	color: inherit;
	text-align: left;
}

/* ========================================
   HIDDEN STATE

   Several of these classes set `display`, which beats the user-agent's
   `[hidden]` rule on specificity — the element stays visible with the attribute
   set. Each one needs saying explicitly.
   ======================================== */
.artwork-gallery[hidden],
.artwork-list[hidden],
.disco-list[hidden],
.lot-lightbox[hidden],
.project-panel[hidden] {
	display: none;
}

/* ========================================
   FOCUS

   One visible ring everywhere, on keyboard focus only. `:focus-visible` rather
   than `:focus` so a mouse click on a gallery tile does not leave a ring behind.
   ======================================== */
:focus-visible {
	outline: 2px solid var(--lot-gold-light);
	outline-offset: 3px;
}

.artwork-open:focus-visible,
.artwork-list-item:focus-visible {
	outline-offset: -2px;
}

/* Skip link: off-screen until focused. */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--lot-panel);
	color: var(--lot-gold);
	font-family: var(--lot-font-body);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid var(--lot-gold-dark);
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* The anchor the skip link targets. It has no size of its own; it exists so
   focus can land at the top of the content. */
.site-content-anchor {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.site-content-anchor:focus {
	outline: none;
}



/* ========================================
   PROJECTS — THE HUB CARD

   Below the rule, always on screen, never hidden behind a tab. It is the index
   to everything above it, so it should not compete with the projects for the
   same slot.
   ======================================== */
/* The Hub is the map of the whole universe, so it gets the same night sky the
   masthead and footer wear rather than the flat panel colour every other surface
   uses. The starfield tile is a child pseudo-element, not a background on the
   card itself, so the violet ground can sit under it and the drift can be
   animated independently of the border and shadow. */
.project-hub {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	text-align: center;
	max-width: 620px;
	margin: 0 auto;
	padding: 1.75rem 1.5rem;
	background:
		radial-gradient(ellipse 80% 100% at 50% 40%, rgba(124, 76, 196, 0.32), transparent 72%),
		linear-gradient(180deg, #1a1230 0%, #241740 48%, #150e26 100%);
	border: 2px solid transparent;
	border-image: var(--lot-metallic) 1;
	box-shadow: 0 0 6px rgba(220, 196, 119, 0.12);
}

.project-hub::before {
	content: "";
	position: absolute;
	top: -10%;
	bottom: -10%;
	left: -10%;
	right: auto;
	width: calc(120% + 600px);
	z-index: -1;
	background-image: var(--lot-starfield, url('images/starfield.svg'));
	background-size: 600px 400px;
	background-repeat: repeat;
	opacity: 0.85;
	animation: lot-drift-near 180s linear infinite;
}

/* A little shadow at the edges so the metallic border reads against the sky. */
.project-hub::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(ellipse 90% 90% at 50% 50%, transparent 40%, rgba(10, 7, 18, 0.55) 100%);
}

.project-hub > * {
	position: relative;
	z-index: 1;
}

/* Same 0%..100% constraint as .page-hero h1 — see the note there. */
.project-hub-title {
	display: inline-block;
	font-size: 1.35rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	background-image: var(--lot-metallic);
	background-size: 260% 100%;
	background-position: 0% 0;
	background-repeat: no-repeat;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent;
	margin-bottom: 0.6rem;
}

.project-hub:hover .project-hub-title {
	animation: lot-title-sweep 1.1s ease-out;
}

/* Full-strength text, not the muted grey: that was tuned for the flat panel and
   loses too much contrast against the sky. */
.project-hub-desc {
	color: var(--lot-text);
	font-size: 0.92rem;
	line-height: 1.75;
	margin-bottom: 1.25rem;
	text-shadow: 0 1px 3px rgba(10, 7, 18, 0.8);
}

.project-hub-cta {
	margin: 0 auto;
}

@media (max-width: 768px) {
	.project-hub {
		padding: 1.35rem 1rem;
	}

	.project-hub-title {
		font-size: 1.1rem;
	}
}

/* ========================================
   NAVIGATION ON SMALL SCREENS

   Four labels at the desktop size come to roughly 486px. That is wider than any
   phone, and because the row is centred it overflowed on both sides at once —
   the first and last items each lost a few characters off the edge rather than
   the row simply running off to the right.

   Two steps down in size and padding bring it under 320px, so the strip stays a
   single centred line all the way down to the narrowest screens in use.
   ======================================== */
@media (max-width: 600px) {
	.main-navigation {
		padding: 0.35rem 0.5rem;
	}

	.nav-item {
		font-size: 0.68rem;
		letter-spacing: 0.08em;
		padding: 0.5rem 0.55rem;
	}
}

@media (max-width: 380px) {
	.main-navigation {
		padding: 0.3rem 0.25rem;
	}

	.nav-item {
		font-size: 0.6rem;
		letter-spacing: 0.05em;
		padding: 0.45rem 0.4rem;
	}
}

/* ========================================
   REDUCED MOTION

   Everything ambient stops; everything that communicates state keeps a short
   transition so changes still read as changes rather than as jump cuts.
   ======================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	/* Ambient decoration is removed rather than sped up — a starfield that
	   finishes its drift in a millisecond has simply teleported. */
	.sky__near,
	.sky__far {
		animation: none !important;
	}

	/* The stars stay, lit and still, rather than blinking. */
	.sky__star {
		animation: none !important;
		opacity: 0.85;
		transform: scale(1);
	}

	.project-hub::before {
		animation: none !important;
	}

	.artwork-item:hover {
		transform: none;
	}

	.artwork-item:hover img,
	.lot-lightbox-img:hover {
		transform: none;
	}

	.site-banner-link:hover .site-banner-shine,
	.site-banner-link:focus-visible .site-banner-shine {
		/* Keep the glow, drop the sweep: the hover still reads as a response. */
		animation: none !important;
		background-position: 35% 0;
		opacity: 0.85;
	}
}
