/* =========================================================
   I. Ada Crapper — Shared Immersive Framework
   File: css/immersive-framework.css
   ========================================================= */

/*
 * PURPOSE
 *
 * This file controls the shared architecture for every completed
 * immersive room on iadacrapper.com.
 *
 * It provides:
 *
 * - removal of the conventional visible header and footer,
 * - full available viewport coverage,
 * - automatic WordPress administration-bar allowance,
 * - one shared full-screen room canvas,
 * - consistent image scaling,
 * - hotspot positioning,
 * - overflow control,
 * - keyboard accessibility.
 *
 * Room-specific stylesheets should contain only:
 *
 * - hotspot positions,
 * - hotspot shapes,
 * - room-specific interaction effects.
 */


/* =========================================================
   Shared framework variables
   ========================================================= */

:root {
	--iada-immersive-background: #1f1713;
	--iada-immersive-admin-bar-height: 0px;
	--iada-immersive-focus-color: rgba(243, 201, 111, 0.96);
}


/*
 * WordPress administration-bar height.
 */

body.admin-bar.iada-immersive-page {
	--iada-immersive-admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar.iada-immersive-page {
		--iada-immersive-admin-bar-height: 46px;
	}
}


/* =========================================================
   Immersive document foundation
   ========================================================= */

html:has(body.iada-immersive-page) {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--iada-immersive-background);
}

body.iada-immersive-page {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--iada-immersive-background);
}


/* =========================================================
   Remove ordinary website framing
   ========================================================= */

/*
 * header.php and footer.php still execute internally.
 *
 * WordPress metadata, wp_head(), wp_footer(), scripts, plugins,
 * and the administration bar continue working.
 *
 * Only the visible public site header and footer are removed.
 */

body.iada-immersive-page .site-header,
body.iada-immersive-page .site-footer {
	display: none !important;
}


/* =========================================================
   Remove inherited theme layout
   ========================================================= */

body.iada-immersive-page .site,
body.iada-immersive-page .site-content,
body.iada-immersive-page .site-main,
body.iada-immersive-page #page,
body.iada-immersive-page #content,
body.iada-immersive-page #primary {
	width: 100%;
	max-width: none;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: var(--iada-immersive-background);
	border: 0;
	box-shadow: none;
}


/* =========================================================
   Shared immersive stage
   ========================================================= */

/*
 * Every immersive room occupies the complete browser viewport
 * beneath the WordPress administration bar.
 */

.iada-immersive-stage,
.iada-lobby-home,
.iada-library-lobby__stage,
.iada-grand-library__stage,
.iada-childrens-library__stage,
.iada-children-library__stage,
.iada-book-room__stage,
.iada-reading-room__stage,
.iada-about-room__stage,
.iada-contact-room__stage,
.iada-store-room__stage {
	position: relative;
	display: block;
	width: 100vw;
	height: calc(100dvh - var(--iada-immersive-admin-bar-height));
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--iada-immersive-background);
}


/*
 * Fallback for browsers without dynamic viewport units.
 */

@supports not (height: 100dvh) {
	.iada-immersive-stage,
	.iada-lobby-home,
	.iada-library-lobby__stage,
	.iada-grand-library__stage,
	.iada-childrens-library__stage,
	.iada-children-library__stage,
	.iada-book-room__stage,
	.iada-reading-room__stage,
	.iada-about-room__stage,
	.iada-contact-room__stage,
	.iada-store-room__stage {
		height: calc(100vh - var(--iada-immersive-admin-bar-height));
	}
}


/* =========================================================
   Shared full-screen room canvas
   ========================================================= */

/*
 * The room canvas fills the complete available viewport.
 *
 * It no longer forces a 3:2 box. This removes the dark side
 * margins that appeared when 3:2 artwork was contained inside
 * a wider browser screen.
 */

.iada-immersive-canvas,
.iada-lobby-home__image-wrap,
.iada-library-lobby__image-wrap,
.iada-grand-library__image-wrap,
.iada-childrens-library__image-wrap,
.iada-children-library__image-wrap,
.iada-book-room__image-wrap,
.iada-reading-room__image-wrap,
.iada-about-room__image-wrap,
.iada-contact-room__image-wrap,
.iada-store-room__image-wrap {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--iada-immersive-background);
}


/* =========================================================
   Shared room image
   ========================================================= */

/*
 * Landscape displays:
 *
 * The artwork fills the viewport using object-fit: cover.
 * A controlled amount of artwork may be cropped at the top
 * and bottom when the browser is wider than the source image.
 *
 * The artwork is never stretched or distorted.
 */

.iada-immersive-image,
.iada-lobby-home__image,
.iada-library-lobby__image,
.iada-grand-library__image,
.iada-childrens-library__image,
.iada-children-library__image,
.iada-book-room__image,
.iada-reading-room__image,
.iada-about-room__image,
.iada-contact-room__image,
.iada-store-room__image {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	object-fit: cover;
	object-position: center center;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}


/* =========================================================
   Optional room image positioning
   ========================================================= */

/*
 * A future room may use one of these modifier classes when its
 * important artwork is concentrated toward one edge.
 */

.iada-immersive-image--top {
	object-position: center top;
}

.iada-immersive-image--bottom {
	object-position: center bottom;
}

.iada-immersive-image--left {
	object-position: left center;
}

.iada-immersive-image--right {
	object-position: right center;
}


/* =========================================================
   Portrait-screen behavior
   ========================================================= */

/*
 * On narrow portrait screens, showing the complete width of a
 * wide room is usually more useful than heavily cropping both
 * sides.
 *
 * The room remains full-screen, with the image centered inside
 * the dark immersive background.
 */

@media screen and (orientation: portrait) {
	.iada-immersive-image,
	.iada-lobby-home__image,
	.iada-library-lobby__image,
	.iada-grand-library__image,
	.iada-childrens-library__image,
	.iada-children-library__image,
	.iada-book-room__image,
	.iada-reading-room__image,
	.iada-about-room__image,
	.iada-contact-room__image,
	.iada-store-room__image {
		object-fit: contain;
		object-position: center center;
	}
}


/* =========================================================
   Shared hotspot foundation
   ========================================================= */

/*
 * Room-specific files determine each hotspot’s:
 *
 * - left position,
 * - top position,
 * - width,
 * - height,
 * - border radius,
 * - hover response.
 */

.iada-immersive-hotspot,
.iada-lobby-home__hotspot,
.iada-library-hotspot,
.iada-grand-library-hotspot,
.iada-childrens-library-hotspot,
.iada-children-library-hotspot,
.iada-book-room-hotspot,
.iada-reading-room-hotspot,
.iada-about-room-hotspot,
.iada-contact-room-hotspot,
.iada-store-room-hotspot {
	position: absolute;
	z-index: 20;
	display: block;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
	pointer-events: auto;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}


/* =========================================================
   Keyboard accessibility
   ========================================================= */

.iada-immersive-hotspot:focus-visible,
.iada-lobby-home__hotspot:focus-visible,
.iada-library-hotspot:focus-visible,
.iada-grand-library-hotspot:focus-visible,
.iada-childrens-library-hotspot:focus-visible,
.iada-children-library-hotspot:focus-visible,
.iada-book-room-hotspot:focus-visible,
.iada-reading-room-hotspot:focus-visible,
.iada-about-room-hotspot:focus-visible,
.iada-contact-room-hotspot:focus-visible,
.iada-store-room-hotspot:focus-visible {
	outline: 3px solid var(--iada-immersive-focus-color);
	outline-offset: -6px;
}

@media screen and (max-width: 760px) {
	.iada-immersive-hotspot:focus-visible,
	.iada-lobby-home__hotspot:focus-visible,
	.iada-library-hotspot:focus-visible,
	.iada-grand-library-hotspot:focus-visible,
	.iada-childrens-library-hotspot:focus-visible,
	.iada-children-library-hotspot:focus-visible,
	.iada-book-room-hotspot:focus-visible,
	.iada-reading-room-hotspot:focus-visible,
	.iada-about-room-hotspot:focus-visible,
	.iada-contact-room-hotspot:focus-visible,
	.iada-store-room-hotspot:focus-visible {
		outline-width: 2px;
		outline-offset: -3px;
	}
}


/* =========================================================
   Accessible navigation foundation
   ========================================================= */

/*
 * Each immersive room may include a hidden semantic navigation
 * list for screen-reader users while visual visitors navigate
 * through the artwork.
 */

.iada-immersive-accessible-navigation ul,
.iada-lobby-home__accessible-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}


/* =========================================================
   Screen-reader utility
   ========================================================= */

.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}


/* =========================================================
   Reduced-motion accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.iada-immersive-hotspot,
	.iada-lobby-home__hotspot,
	.iada-library-hotspot,
	.iada-grand-library-hotspot,
	.iada-childrens-library-hotspot,
	.iada-children-library-hotspot,
	.iada-book-room-hotspot,
	.iada-reading-room-hotspot,
	.iada-about-room-hotspot,
	.iada-contact-room-hotspot,
	.iada-store-room-hotspot,
	.iada-immersive-hotspot::before,
	.iada-immersive-hotspot::after,
	.iada-lobby-home__hotspot::before,
	.iada-lobby-home__hotspot::after,
	.iada-library-hotspot::before,
	.iada-library-hotspot::after,
	.iada-grand-library-hotspot::before,
	.iada-grand-library-hotspot::after,
	.iada-childrens-library-hotspot::before,
	.iada-childrens-library-hotspot::after,
	.iada-children-library-hotspot::before,
	.iada-children-library-hotspot::after,
	.iada-book-room-hotspot::before,
	.iada-book-room-hotspot::after,
	.iada-reading-room-hotspot::before,
	.iada-reading-room-hotspot::after,
	.iada-about-room-hotspot::before,
	.iada-about-room-hotspot::after,
	.iada-contact-room-hotspot::before,
	.iada-contact-room-hotspot::after,
	.iada-store-room-hotspot::before,
	.iada-store-room-hotspot::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}