/*
Theme Name: Long Hound Gallery Studio
Author: Long Hound Co.
Description: The custom immersive portfolio theme for The Long Hound Co., based on the locked Gallery Studio design.
Version: 4.1.16
Text Domain: long-hound
Requires at least: 6.4
Requires PHP: 7.4
*/

/*
 * WordPress-authored rich text shares one readable studio hierarchy. Main
 * page titles remain centered in their templates; an optional opening
 * paragraph stays centered, while headings, body copy, lists, and links use
 * the left-aligned Fine Print treatment approved in v4.0.10.
 */
.studio-rich-text {
	width: min(100%, 740px);
	margin-top: 2.4rem;
	text-align: left;
}

.studio-rich-text > :first-child {
	margin-top: 0;
}

/* Standalone page and gallery introductions stay centered. */
.studio-rich-text:not(.studio-rich-text--section) > p:first-child {
	text-align: center;
}

.studio-rich-text h2,
.studio-rich-text h3 {
	color: var(--bright-gold);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-weight: 400;
	text-transform: uppercase;
}

.studio-rich-text h2 {
	margin: 3.1rem 0 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(198, 161, 91, 0.3);
	font-size: clamp(1.18rem, 2vw, 1.55rem);
	letter-spacing: 0.1em;
	line-height: 1.35;
}

.studio-rich-text h3 {
	margin: 2.15rem 0 0.65rem;
	font-size: clamp(0.9rem, 1.35vw, 1.08rem);
	letter-spacing: 0.075em;
	line-height: 1.45;
}

.studio-rich-text p,
.studio-rich-text li {
	color: var(--muted);
	font-family: Lora, Georgia, serif;
	font-size: clamp(0.94rem, 1.2vw, 1.04rem);
	line-height: 1.82;
}

.studio-rich-text p {
	margin: 0 0 1.15rem;
}

.studio-rich-text ul,
.studio-rich-text ol {
	margin: 0 0 1.35rem;
	padding-left: 1.45rem;
}

.studio-rich-text a {
	color: var(--bright-gold);
	text-underline-offset: 0.2em;
}

/* Entry bodies sit beneath their own titles, so their first paragraphs stay left. */
.studio-rich-text--section {
	width: 100%;
	margin-top: 0;
}

@media (max-width: 680px) {
	.studio-rich-text h2 {
		letter-spacing: 0.065em;
	}

	.studio-rich-text h3 {
		letter-spacing: 0.05em;
	}
}

/*
 * The Studio Floor already subtracts the fixed 118px footer from its viewport
 * height. WordPress renders the footer after <main>, so allowing the main
 * wrapper to impose another full viewport prevents an extra black band from
 * being inserted between the floor and footer.
 */
.home .studio-shell {
	min-height: 0;
}

/* Keep the header outside the Studio Floor fade in both transition directions. */
.phase-opening .scene-header,
.phase-closing .scene-header {
	opacity: 1 !important;
	filter: none !important;
	transform: none !important;
}

.studio-menu-list,
.footer-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.studio-menu-list a {
	display: block;
	padding: 0.7rem 0.35rem;
	border-bottom: 1px solid rgba(198, 161, 91, 0.13);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: 0.68rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.room-enter {
	position: absolute;
	inset: 0;
	z-index: 8;
	border-radius: inherit;
}

.room-enter:focus-visible {
	outline: 1px solid var(--bright-gold);
	outline-offset: -6px;
}

.focus-room-artworks {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: block;
	opacity: 1;
	visibility: visible;
	pointer-events: none;
}

/*
 * Desktop room previews use a 7:4 stage while the approved room paintings are
 * 3:2. The paintings are therefore centered with a 1/14-width side margin.
 * Measure editable artwork against the painting itself, not those letterbox
 * margins, so every slot remains clipped by its actual frame opening.
 */
@media (min-width: 981px) {
	.focus-room-artworks {
		left: 7.142857%;
		right: 7.142857%;
	}
}

.focused-room-link > .focused-room-image {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.focused-room-entry {
	z-index: 4;
}

@media (min-width: 981px) {
	.focused-room-entry {
		right: calc(7.142857% + 1.2rem);
	}
}

.preview-artwork {
	position: absolute;
	z-index: 1;
	display: block;
	overflow: hidden;
	opacity: 1;
	visibility: visible;
	background: transparent;
}

.focus-room-artworks .preview-artwork img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
	opacity: 1;
	visibility: visible;
}

.focus-room-artworks .preview-artwork-fit-contain img {
	object-fit: contain;
}

/* The KNR belongs only on the Studio Floor. Hide the entire interactive mark
 * while a room is opening, open, or closing so later cascade rules cannot let
 * it bleed through a gallery preview. */
.studio-viewport.is-room-focused .studio-medallion {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.preview-artwork-character-1 { left: 15.7%; top: 33.3%; width: 12.9%; height: 27.7%; transform: rotate(-2.6deg); clip-path: polygon(2% 5%, 91% 0, 100% 96%, 8% 100%); }
.preview-artwork-character-2 { left: 36.6%; top: 33.3%; width: 9.25%; height: 21.7%; }
.preview-artwork-character-3 { left: 52.85%; top: 33.3%; width: 9.65%; height: 21.7%; }
.preview-artwork-character-4 { left: 68.8%; top: 47.1%; width: 13.1%; height: 11.25%; }
.preview-artwork-story-1 { left: 38.48%; top: 32.9%; width: 23.18%; height: 24.9%; }
.preview-artwork-process-1 { left: 23.11%; top: 30.96%; width: 9.64%; height: 23.05%; }
.preview-artwork-process-2 { left: 37.57%; top: 30.96%; width: 10.29%; height: 23.05%; }
.preview-artwork-process-3 { left: 52.73%; top: 30.96%; width: 10.16%; height: 23.05%; }
/* The drafting table naturally sits in front of the far-right Process frame. */
.preview-artwork-process-4 { left: 68.16%; top: 30.96%; width: 10.22%; height: 20.02%; }
.preview-artwork-graphic-1 { left: 14.8%; top: 29.8%; width: 15.8%; height: 28.3%; transform: rotate(-1.3deg); clip-path: polygon(1% 3%, 96% 0, 100% 97%, 5% 100%); }
.preview-artwork-graphic-2 { left: 45.3%; top: 39.3%; width: 14.7%; height: 11.4%; }
.preview-artwork-graphic-3 { left: 75.5%; top: 29.9%; width: 9.5%; height: 19.6%; }
@media (min-width: 981px) {
	.preview-artwork-character-1 { clip-path: polygon(2% 5%, 88% 11%, 100% 96%, 8% 100%); }
	.preview-artwork-story-1 { top: 33%; height: 24.7%; }
	.preview-artwork-graphic-1 { clip-path: polygon(1.5% 2.5%, 89.3% 5.5%, 89.3% 94.9%, 3.5% 96.7%); }
	.preview-artwork-graphic-3 { height: 19.1%; }
}
.preview-artwork-shop-1 { left: 34.83%; top: 33.2%; width: 11%; height: 21.97%; }
.preview-artwork-shop-2 { left: 53.78%; top: 33.2%; width: 10.94%; height: 21.97%; }
.preview-artwork-shop-3 { left: 34.83%; top: 60.55%; width: 8.79%; height: 9.28%; }
.preview-artwork-shop-4 { left: 44.47%; top: 60.55%; width: 8.79%; height: 9.28%; }
.preview-artwork-shop-5 { left: 54.17%; top: 60.55%; width: 8.79%; height: 9.28%; }
.focus-room-artworks .preview-artwork-shop-3 img,
.focus-room-artworks .preview-artwork-shop-4 img,
.focus-room-artworks .preview-artwork-shop-5 img { object-fit: contain; }

.focused-room-entry[hidden] {
	display: none !important;
}

.homepage-artworks {
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
}

.homepage-artwork {
	position: absolute;
	display: block;
	overflow: hidden;
	background: #161310;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.55);
}

.homepage-artwork img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.artwork-character-1 {
	left: -1%;
	top: 32%;
	width: 25%;
	height: 31%;
	transform: rotate(-6deg);
}

.artwork-character-2 {
	left: 40%;
	top: 31.5%;
	width: 25%;
	height: 25%;
}

.artwork-character-3 {
	left: 75%;
	top: 31.5%;
	width: 25%;
	height: 25%;
}

.artwork-character-4 {
	left: 79%;
	top: 48%;
	width: 22%;
	height: 14%;
}

.artwork-story-1 {
	left: 48%;
	top: 29%;
	width: 63%;
	height: 31%;
}

.artwork-process-1 {
	left: -2%;
	top: 31%;
	width: 28%;
	height: 27%;
}

.artwork-process-2 {
	left: 25%;
	top: 31%;
	width: 29%;
	height: 27%;
}

.artwork-process-3 {
	left: 57%;
	top: 31%;
	width: 29%;
	height: 27%;
}

.artwork-process-4 {
	left: 90%;
	top: 31%;
	width: 28%;
	height: 27%;
}

.artwork-graphic-1 {
	left: -2%;
	top: 30%;
	width: 23%;
	height: 30%;
	transform: rotate(-4deg);
}

.artwork-graphic-2 {
	left: 45%;
	top: 39.5%;
	width: 34%;
	height: 15%;
}

.artwork-graphic-3 {
	left: 91%;
	top: 29%;
	width: 22%;
	height: 24%;
}

.gallery-introduction p {
	margin: 0;
}

.art-card-caption {
	margin: 0.8rem 0 0;
	color: rgba(244, 237, 220, 0.82);
	font-size: 0.88rem;
	line-height: 1.55;
	text-align: center;
}

.lightbox-blank {
	width: min(76vw, 920px);
	aspect-ratio: 4 / 3;
	border: 1px solid rgba(198, 161, 91, 0.58);
	background: #171614;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62), inset 0 0 70px rgba(0, 0, 0, 0.3);
}

.lightbox-blank[hidden] {
	display: none;
}

.art-placeholder[data-lightbox] {
	width: 100%;
	border: 1px solid rgba(184, 139, 70, 0.78);
	color: inherit;
	cursor: zoom-in;
}

.story-sections,
.mark-entries {
	max-width: 1120px;
	margin: 0 auto;
}

.story-section,
.mark-entry {
	margin: 0 0 clamp(52px, 7vw, 88px);
	padding-bottom: clamp(38px, 5vw, 64px);
	border-bottom: 1px solid rgba(198, 161, 91, 0.24);
}

.story-section h2,
.mark-entry h2 {
	margin: 0 0 1.2rem;
	color: var(--antique-gold);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: clamp(1.5rem, 3vw, 2.5rem);
	font-weight: 400;
	letter-spacing: 0.07em;
}

.story-section-content,
.mark-entry-copy {
	color: var(--ivory);
	font-size: clamp(0.96rem, 1.25vw, 1.12rem);
	line-height: 1.75;
}

.story-layout-image-text {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(28px, 5vw, 68px);
}

.story-layout-full-image .story-section-content:empty,
.story-layout-full-text .story-images {
	display: none;
}

.story-images,
.mark-entry-images {
	display: grid;
	grid-template-columns: repeat(var(--image-count, 1), minmax(0, 1fr));
	gap: clamp(16px, 2.5vw, 30px);
}

.story-images figure,
.mark-entry-images figure {
	margin: 0;
}

.story-images img,
.mark-entry-images img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid rgba(198, 161, 91, 0.54);
}

.story-images figcaption,
.mark-entry-images figcaption {
	margin-top: 0.65rem;
	color: rgba(244, 237, 220, 0.72);
	font-size: 0.82rem;
	line-height: 1.45;
	text-align: center;
}

.long-hound-contact-form {
	max-width: 760px;
	margin: 42px auto 0;
	padding-top: 34px;
	border-top: 1px solid rgba(198, 161, 91, 0.3);
}

.long-hound-contact-form h2 {
	margin: 0 0 1.5rem;
	color: var(--antique-gold);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: clamp(1.35rem, 2.4vw, 2rem);
	font-weight: 400;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
}

.long-hound-contact-form label {
	display: block;
	margin: 0 0 1rem;
	color: var(--ivory);
	font-size: 0.92rem;
}

.long-hound-contact-form input,
.long-hound-contact-form textarea {
	width: 100%;
	margin-top: 0.45rem;
	padding: 0.82rem 0.9rem;
	border: 1px solid rgba(198, 161, 91, 0.5);
	border-radius: 2px;
	color: var(--ivory);
	background: rgba(8, 7, 6, 0.58);
	font: inherit;
}

.long-hound-contact-form textarea {
	min-height: 170px;
	resize: vertical;
}

.long-hound-contact-form button {
	padding: 0.8rem 1.25rem;
	border: 1px solid rgba(214, 170, 100, 0.72);
	color: var(--antique-gold);
	background: rgba(67, 20, 27, 0.92);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
}

.long-hound-contact-status {
	margin: 0 0 1.5rem;
	padding: 0.8rem 1rem;
	border: 1px solid rgba(198, 161, 91, 0.42);
	color: var(--ivory);
	text-align: center;
}

.long-hound-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.gallery-interior .art-card > a {
	text-decoration: none;
	background: #ded7ca;
}

.gallery-interior .art-card > a > img {
	position: absolute !important;
	inset: 4% !important;
	width: 92% !important;
	height: 92% !important;
	max-width: none !important;
	max-height: none !important;
	display: block;
	box-sizing: border-box;
	padding: 0;
	background: transparent;
	object-fit: contain !important;
	object-position: center !important;
}

.navigation.pagination {
	margin-top: 50px;
	color: var(--antique-gold);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-align: center;
	text-transform: uppercase;
}

.navigation.pagination .page-numbers {
	display: inline-block;
	padding: 0.45rem 0.7rem;
}

.navigation.pagination .current {
	border: 1px solid var(--line);
}

.long-hound-leaving .gallery-interior,
.long-hound-leaving .behind-mark-page,
.long-hound-leaving .site-header,
.long-hound-leaving .site-footer {
	opacity: 0;
	filter: blur(1px);
	transform: perspective(1200px) translateZ(-150px) scale(0.94);
	transition:
		opacity 680ms var(--ease-cinematic),
		transform 680ms var(--ease-cinematic),
		filter 680ms var(--ease-cinematic);
}

.long-hound-leaving .interior-transition {
	opacity: 1;
}

.art-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: clamp(24px, 5vw, 72px);
	opacity: 0;
	visibility: hidden;
	background: rgba(5, 4, 4, 0.92);
	backdrop-filter: blur(8px);
	transition:
		opacity 420ms var(--ease-cinematic),
		visibility 420ms var(--ease-cinematic);
}

.art-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.art-lightbox figure {
	max-width: min(90vw, 1180px);
	max-height: 88vh;
	margin: 0;
	opacity: 0;
	transform: scale(0.97);
	transition:
		opacity 480ms var(--ease-cinematic) 80ms,
		transform 480ms var(--ease-cinematic) 80ms;
}

.art-lightbox.is-open figure {
	opacity: 1;
	transform: scale(1);
}

.art-lightbox img {
	max-width: 100%;
	max-height: 82vh;
	display: block;
	margin: 0 auto;
	box-sizing: border-box;
	padding: clamp(10px, 1.2vw, 20px);
	background: #ded7ca;
	border: 1px solid rgba(198, 161, 91, 0.58);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
}

.art-lightbox figcaption {
	margin-top: 12px;
	color: var(--ivory);
	font-family: Cinzel, "Trajan Pro", Georgia, serif;
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	text-align: center;
	text-transform: uppercase;
}

.lightbox-close {
	position: absolute;
	right: clamp(18px, 3vw, 46px);
	top: clamp(14px, 2vw, 34px);
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--antique-gold);
	cursor: pointer;
	background: rgba(12, 10, 9, 0.72);
	font-size: 1.55rem;
	font-weight: 300;
	line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
	border-color: var(--bright-gold);
	color: var(--bright-gold);
	outline: none;
}

.lightbox-open {
	overflow: hidden;
}

.footer-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(1.2rem, 4vw, 4rem);
}

.footer-menu li {
	display: flex;
	align-items: center;
}

.footer-menu li + li::before {
	content: "•";
	margin-right: clamp(1.2rem, 4vw, 4rem);
	color: var(--gold);
}

.admin-bar .studio-viewport {
	height: calc(100svh - 150px);
}

@media (max-width: 782px) {
	.admin-bar .studio-viewport {
		height: auto;
	}
}

@media (max-width: 680px) {
	.homepage-artwork {
		display: none;
	}

	.footer-menu,
	.site-footer .footer-menu {
		gap: 0.75rem;
	}

	.footer-menu li + li::before {
		margin-right: 0.75rem;
	}
}

@media (max-width: 760px) {
	.focus-room-artworks {
		display: none;
	}

	.story-layout-image-text {
		grid-template-columns: 1fr;
	}

	.story-images,
	.mark-entry-images {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.art-lightbox,
	.art-lightbox figure {
		transition: none;
	}
}

/* v4.1 WordPress mobile details: keep editable room artwork aligned, stack
 * authored sections, and make every form/lightbox control comfortable to tap. */
@media (max-width: 980px) {
	.mobile-room-artworks.focus-room-artworks {
		position: absolute;
		inset: 0;
		z-index: 3;
		display: block;
		pointer-events: none;
	}

	.story-layout-image-text {
		grid-template-columns: 1fr;
		align-items: start;
	}

	.story-images,
	.mark-entry-images {
		grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	}

	.story-section,
	.mark-entry {
		margin-bottom: clamp(42px, 7vw, 68px);
		padding-bottom: clamp(32px, 5vw, 52px);
	}

	.studio-rich-text {
		width: 100%;
	}

	.long-hound-contact-form {
		width: 100%;
		margin-top: 34px;
		padding-top: 30px;
	}

	.long-hound-contact-form input,
	.long-hound-contact-form textarea {
		min-height: 48px;
		font-size: 16px;
	}

	.long-hound-contact-form textarea {
		min-height: 170px;
	}

	.long-hound-contact-form button {
		min-width: 170px;
		min-height: 48px;
	}

	.art-lightbox figure {
		max-width: calc(100vw - 36px);
		max-height: calc(100dvh - 36px);
	}

	.art-lightbox img,
	.lightbox-blank {
		max-width: 100%;
		max-height: calc(100dvh - 110px);
	}
}

@media (max-width: 680px) {
	.mobile-room-artworks.focus-room-artworks {
		display: block;
	}

	.story-images,
	.mark-entry-images {
		grid-template-columns: 1fr;
	}

	.story-section h2,
	.mark-entry h2 {
		font-size: clamp(1.35rem, 7vw, 2rem);
		line-height: 1.25;
	}

	.studio-rich-text {
		margin-top: 1.8rem;
	}

	.studio-rich-text h2 {
		margin-top: 2.5rem;
		font-size: 1.08rem;
	}

	.studio-rich-text h3 {
		font-size: 0.9rem;
	}

	.studio-rich-text p,
	.studio-rich-text li,
	.story-section-content,
	.mark-entry-copy {
		font-size: 0.96rem;
		line-height: 1.75;
	}

	.long-hound-contact-form button {
		width: 100%;
	}

	.site-footer .footer-menu li + li::before {
		display: none;
	}

	.lightbox-close {
		right: 12px;
		top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.art-lightbox figure {
		max-width: calc(100vw - 24px);
		max-height: calc(100dvh - 28px);
	}

	.art-lightbox figcaption {
		padding-inline: 8px;
		font-size: 0.58rem;
		line-height: 1.5;
	}
}
