/*
 * Ashley Studios styles.
 *
 * Colors map onto Kadence's global palette, so Kadence's own header, buttons,
 * and links pick them up too:
 *   palette1/2 accents, palette3 to 6 text (strongest to subtle),
 *   palette7 borders, palette8 site background, palette9 content background.
 */

/* ---------- Tokens ---------- */

body.studio-style-classic {
	--global-palette1: #c9a35a;
	--global-palette2: #e2c07d;
	--global-palette3: #f4ecdc;
	--global-palette4: #e6d9c0;
	--global-palette5: #c8b897;
	--global-palette6: #8f7f63;
	--global-palette7: #3a3127;
	--global-palette8: #110e0b;
	--global-palette9: #18140f;
	--an-overlay: rgba(10, 8, 6, 0.62);
	--an-hero-bg: #1a140e;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 6c5 8 5 14 0 22-5-8-5-14 0-22zm0 22c5 8 5 14 0 22-5-8-5-14 0-22zM6 28c8-5 14-5 22 0-8 5-14 5-22 0zm22 0c8-5 14-5 22 0-8 5-14 5-22 0z' fill='%23c9a35a' fill-opacity='0.05'/%3E%3C/svg%3E");
}

body.studio-style-festive {
	--global-palette1: #b3262d;
	--global-palette2: #8e1b22;
	--global-palette3: #2b1b17;
	--global-palette4: #3d2a24;
	--global-palette5: #5c4a42;
	--global-palette6: #8a776c;
	--global-palette7: #e7d8bf;
	--global-palette8: #f7efe0;
	--global-palette9: #fdf8ef;
	--an-overlay: rgba(43, 14, 12, 0.55);
	--an-hero-bg: #7d161c;
	--an-fade: 90, 20, 24;
	--an-font-display: "Mountains of Christmas", Georgia, serif;
	/* Two faces only: the holiday script for titles, Lora for everything else. */
	--an-font-body: "Lora", Georgia, serif;
	--an-font-accent: "Lora", Georgia, serif;
	--an-font-label: "Lora", Georgia, serif;
	--an-band: repeating-linear-gradient(135deg, #b3262d 0 12px, #fdf8ef 12px 24px);
	--an-band-height: 14px;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M24 14v20M14 24h20M17 17l14 14M31 17L17 31' stroke='%23b3262d' stroke-opacity='0.06' stroke-width='1.5'/%3E%3C/svg%3E");
}

body.studio-style-jester {
	--global-palette1: #f5b82e;
	--global-palette2: #ff8a2a;
	--global-palette3: #fff6de;
	--global-palette4: #f6e7c4;
	--global-palette5: #dcc9f0;
	--global-palette6: #b49fd3;
	--global-palette7: #5f3fa3;
	--global-palette8: #24114a;
	--global-palette9: #2e1860;
	--an-overlay: transparent;
	--an-hero-bg: #24114a;
	--an-fade: 36, 17, 74;
	--an-font-display: "Metamorphous", Georgia, serif;
	--an-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='20' viewBox='0 0 96 20'%3E%3Cpath d='M12 0l12 10-12 10L0 10z' fill='%23d7263d'/%3E%3Cpath d='M36 0l12 10-12 10-12-10z' fill='%23f5b82e'/%3E%3Cpath d='M60 0l12 10-12 10-12-10z' fill='%2315935a'/%3E%3Cpath d='M84 0l12 10-12 10-12-10z' fill='%232f6fe0'/%3E%3C/svg%3E") repeat-x;
	--an-band-height: 20px;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M16 0l16 32-16 32L0 32z' fill='%23f5b82e' fill-opacity='0.05'/%3E%3Cpath d='M48 0l16 32-16 32-16-32z' fill='%23d7263d' fill-opacity='0.05'/%3E%3C/svg%3E");
}

body.studio-style-spyglass {
	--global-palette1: #dcae57;
	--global-palette2: #d0703f;
	--global-palette3: #f6ecd8;
	--global-palette4: #e9dcc2;
	--global-palette5: #b9c4d0;
	--global-palette6: #8fa0b3;
	--global-palette7: #35506f;
	--global-palette8: #0d1a2c;
	--global-palette9: #14263d;
	--an-overlay: transparent;
	--an-hero-bg: #0d1a2c;
	--an-fade: 13, 26, 44;
	--an-font-display: "Pirata One", Georgia, serif;
	--an-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16'%3E%3Crect width='20' height='16' fill='%239c7338'/%3E%3Cpath d='M-4 16L8 0h8L4 16zM16 16L28 0h8L24 16z' fill='%23dcae57'/%3E%3C/svg%3E") repeat-x;
	--an-band-height: 16px;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 42l4 14 14 4-14 4-4 14-4-14-14-4 14-4z' fill='%23dcae57' fill-opacity='0.05'/%3E%3C/svg%3E");
}

body.studio-style-dragon {
	--global-palette1: #e6b843;
	--global-palette2: #d42a3d;
	--global-palette3: #f8ecd9;
	--global-palette4: #eddcc4;
	--global-palette5: #cdb6a4;
	--global-palette6: #9d7f72;
	--global-palette7: #6a1f2b;
	--global-palette8: #120508;
	--global-palette9: #220a10;
	--an-overlay: transparent;
	--an-hero-bg: #120508;
	--an-fade: 18, 5, 8;
	--an-font-display: "Cinzel Decorative", Georgia, serif;
	--an-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cpath d='M0 22V10h11V2h11v8h22v12z' fill='%23a3131f'/%3E%3C/svg%3E") repeat-x;
	--an-band-height: 22px;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewBox='0 0 96 48'%3E%3Cpath d='M0 24h96M0 48h96M48 0v24M0 24v24M96 24v24' stroke='%23e6b843' stroke-opacity='0.04' fill='none'/%3E%3C/svg%3E");
}

body.studio-style-tintype {
	--global-palette1: #dcbb86;
	--global-palette2: #c8c6bd;
	--global-palette3: #f3e8d5;
	--global-palette4: #e6d8c1;
	--global-palette5: #c6b49b;
	--global-palette6: #97836b;
	--global-palette7: #5c4733;
	--global-palette8: #1e150e;
	--global-palette9: #2a1e14;
	--an-overlay: transparent;
	--an-hero-bg: #1e150e;
	--an-fade: 30, 21, 14;
	--an-font-display: "Rye", Georgia, serif;
	--an-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='16' viewBox='0 0 36 16'%3E%3Crect width='36' height='16' fill='%235c4733'/%3E%3Ccircle cx='18' cy='8' r='3' fill='%23c8c6bd'/%3E%3C/svg%3E") repeat-x;
	--an-band-height: 16px;
	--an-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='64' viewBox='0 0 160 64'%3E%3Cpath d='M0 0h160M0 32h160M40 0c8 10-8 22 0 32M120 32c-8 10 8 22 0 32' stroke='%23dcbb86' stroke-opacity='0.06' fill='none'/%3E%3C/svg%3E");
}

/* Two fonts per studio, no italics: the studio's display font for titles, Lora for everything else. */
body {
	--an-font-display: Georgia, serif;
	--an-font-accent: "Lora", Georgia, serif;
	--an-font-label: "Lora", Georgia, serif;
	--an-font-body: "Lora", Georgia, serif;
	font-family: var(--an-font-body);
	/* 18px: plenty of visitors are reading without their glasses. */
	font-size: 1.125rem;
}

/* ---------- Type ---------- */

body h1,
body h2,
.an-display {
	font-family: var(--an-font-display);
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1.05;
}

body h3,
body h4 {
	font-family: var(--an-font-accent);
	font-weight: 700;
	color: var(--global-palette1);
}

.an-kicker {
	font-family: var(--an-font-accent);
	font-weight: 600;
	font-size: 1.35rem;
	color: var(--global-palette1);
	margin-bottom: 0.25em;
}

.main-navigation .primary-menu-container > ul > li.menu-item > a,
.wp-element-button,
.wp-block-button__link {
	font-family: var(--an-font-label);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------- Header ---------- */

/* Kadence prints a white header by default; match it to the palette. */
body .site-header-row-container-inner,
body .site-header-wrap,
body #mobile-header .site-header-row-container-inner {
	background-color: var(--global-palette9);
}

/* Kadence hides the site title on tablet widths (with !important), which leaves the header empty. */
body #mobile-header .site-branding .site-title.vs-md-false {
	display: block !important;
}

body .site-branding .site-title {
	font-family: var(--an-font-label);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--global-palette3);
}

/* ---------- Sections ---------- */

/* body prefix outranks Kadence's .entry-content .alignfull, which zeroes the side padding. */
body .wp-block-group.an-section {
	padding-block: clamp(2.25rem, 5vw, 3.5rem);
	padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Sections sit flush against each other; their own padding is the spacing. */
body .entry-content > .wp-block-group.an-section,
body .entry-content > .an-hero.wp-block-cover {
	margin-block: 0;
}

/*
 * The page is already full width, so full-width sections need no negative side margins.
 * WordPress's 50vw math counts the desktop scrollbar and pushed them about 4px past each edge.
 */
body .entry-content > .alignfull {
	margin-inline: 0;
}

.an-section--texture {
	background-color: var(--global-palette9);
	background-image: var(--an-texture);
}

.an-hero.wp-block-cover {
	min-height: min(85vh, 760px) !important;
	/* Room for the band along the bottom, so the text stays centered in what's visible. */
	padding-bottom: calc(1em + var(--an-band-height, 0px));
	text-align: center;
	background-color: var(--an-hero-bg);
}

/*
 * Heroes with a photo never put text over it, and never crop it: the whole photo
 * shows as a framed inset in its own shape (hero.js sets the ratio), sized to the
 * screen but never wider than 1100px, so it stays sharp. It's short enough to keep
 * the title and button on the first screen, with those below it.
 */
.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) {
	--an-hero-pad: clamp(1rem, 3vw, 2.5rem);
	min-height: 0 !important;
	flex-direction: column;
	align-items: center;
	/* The band along the bottom sits over the padding, so it's added back to keep the spacing even. */
	padding: var(--an-hero-pad) 0 calc(var(--an-hero-pad) + var(--an-band-height, 0px));
}

.an-hero.wp-block-cover > .wp-block-cover__image-background {
	position: static;
	/* The smallest of: the screen minus a gutter, 1100px, or what fits above the title. */
	width: min(calc(100% - 2rem), 1100px, max(calc((100svh - 27rem) * var(--an-hero-ratio, 1.5)), 26rem));
	height: auto;
	aspect-ratio: var(--an-hero-ratio, 1.5);
	object-fit: contain;
	/* Centered here, since the studio themes align hero contents to the end. */
	align-self: center;
	border: 3px solid var(--global-palette1);
	border-radius: 6px;
}

.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) > .wp-block-cover__background {
	display: none;
}

.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) > .wp-block-cover__inner-container {
	width: 100%;
	margin-top: 1.25rem;
	padding-inline: 1rem;
}

/* Wide screens have room beside the photo, so the text moves there and the photo can be taller. */
@media (min-width: 960px) {
	.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) {
		flex-direction: row;
		justify-content: center;
		gap: clamp(2rem, 4vw, 4rem);
		--an-hero-pad: clamp(1.5rem, 3vw, 3rem);
		padding-inline: clamp(1.5rem, 4vw, 4rem);
	}

	.an-hero.wp-block-cover > .wp-block-cover__image-background {
		width: min(58%, 1000px, calc((100svh - 12rem) * var(--an-hero-ratio, 1.5)));
		flex: none;
	}

	.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) > .wp-block-cover__inner-container {
		align-self: center;
		width: auto;
		flex: 0 1 30rem;
		margin: 0;
		padding-inline: 0;
	}

	/*
	 * A hero with two buttons: the photo gives up a little width and the button text is
	 * a touch smaller (still 16px), so both buttons fit side by side next to the photo.
	 */
	.an-hero.wp-block-cover:has(.wp-block-button + .wp-block-button) > .wp-block-cover__image-background {
		width: min(50%, 1000px, calc((100svh - 12rem) * var(--an-hero-ratio, 1.5)));
	}

	.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) > .wp-block-cover__inner-container:has(.wp-block-button + .wp-block-button) {
		flex-basis: 36rem;
	}

	.an-hero .wp-block-buttons:has(.wp-block-button + .wp-block-button) .wp-block-button__link {
		font-size: 1rem;
		padding-inline: 1.1rem;
		letter-spacing: 0.04em;
	}

	.an-hero .wp-block-buttons:has(.wp-block-button + .wp-block-button) > .wp-block-button {
		min-width: 12.5rem;
	}

	.an-hero.wp-block-cover:has(> .wp-block-cover__image-background) h1 {
		font-size: clamp(2.4rem, 3.6vw, 3.75rem);
	}
}

/* Used when a photo has no focal point set: faces are usually in the upper third. */
.an-hero .wp-block-cover__image-background {
	object-position: 50% 35%;
}

.an-hero .wp-block-cover__background {
	background-color: var(--an-overlay) !important;
	opacity: 1 !important;
}

.an-hero h1 {
	font-size: clamp(2.6rem, 7vw, 5.5rem);
	color: #fff;
	margin-block: 0.15em;
}

.an-hero .an-kicker {
	color: #f4ecdc;
}

.an-hero .wp-block-image img {
	max-width: 220px;
	height: auto;
}

.an-logo img {
	width: clamp(200px, 28vw, 340px);
	max-width: 80vw;
	height: auto;
}


/* Outline buttons in the accent color, like the reference site. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--global-palette3);
	padding: 0.7em 1.8em;
	border-radius: 0;
}

.an-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: #fff;
}

/* body prefix outranks Kadence's :not(.has-text-color):hover rule, which turns it blue. */
body .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
body .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
	color: var(--global-palette1);
	border-color: currentColor;
	background: transparent;
}

/* Choose Your Style cards */
.an-styles .wp-block-column {
	border: 1px solid var(--global-palette7);
	padding: 1.5rem;
	background: var(--global-palette8);
}

.an-styles h3 {
	margin-top: 0;
}

/*
 * Gallery: columns that show each photo whole. The gallery block's own layout
 * crops photos to fill even rows, which cuts tall photos down to strips when
 * they sit next to wide ones.
 */
.an-gallery.wp-block-gallery.has-nested-images {
	display: block;
	columns: 3;
	column-gap: 0.75rem;
}

.an-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
	display: block;
	width: 100% !important;
	margin: 0 0 0.75rem;
	break-inside: avoid;
}

.an-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: auto;
	object-fit: initial;
}

@media (max-width: 600px) {
	.an-gallery.wp-block-gallery.has-nested-images {
		columns: 2;
		column-gap: 0.5rem;
	}

	.an-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
		margin-bottom: 0.5rem;
	}
}

/* Gallery: sepia until hovered, so mixed photos still feel like one set. */
.an-gallery.wp-block-gallery img {
	filter: sepia(0.35) contrast(1.05);
	transition: filter 0.3s ease;
}

.an-gallery.wp-block-gallery img:hover {
	filter: none;
}

.studio-style-festive .an-gallery.wp-block-gallery img {
	filter: none;
}

/* Full-screen photo view (the image block's Expand on click) in each studio's colors. */
body .wp-lightbox-overlay .scrim {
	background-color: var(--global-palette8) !important;
	opacity: 0.96 !important;
}

body .wp-lightbox-overlay button,
body .wp-lightbox-overlay button svg {
	color: var(--global-palette3) !important;
	fill: currentColor !important;
}

/* Visit info */
.an-visit dt {
	font-family: var(--an-font-label);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--global-palette1);
}

.an-promo {
	border: 1px solid var(--global-palette1);
	padding: 1rem 1.5rem;
	text-align: center;
	font-family: var(--an-font-accent);
	font-size: 1.25rem;
}

.an-promo:empty,
.an-promo p:empty {
	display: none;
}

/* Google maps, side by side when a studio has two. */
.an-maps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.an-map {
	width: 100%;
	height: 360px;
	border: 1px solid var(--global-palette7);
	filter: sepia(0.25) saturate(0.85);
}

/* Preview index on the main network site */
.an-index-card {
	position: relative;
	border: 1px solid var(--global-palette7);
	background: var(--global-palette8);
	padding: 1.25rem 1.5rem;
	margin-block: 1rem;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.an-index-card:hover,
.an-index-card:focus-within {
	border-color: var(--global-palette1);
	transform: translateY(-2px);
}

/* Stretches the title link over the whole card. */
.an-index-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.an-index-card__cta {
	font-family: var(--an-font-label);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--global-palette1);
}

.an-index-card > * {
	margin-block: 0.25rem;
}

.an-index-card h3 a {
	color: var(--global-palette1);
}

/* A block per location, for a studio at more than one faire. */
.an-location {
	height: 100%;
	padding: 1.5rem;
	border: 1px solid var(--global-palette7);
	border-top: 4px solid var(--global-palette1);
	background: var(--global-palette8);
	/* Clears the header when a hero button jumps here. */
	scroll-margin-top: 1.5rem;
}

.an-location h3 {
	margin-top: 0;
}

.an-location .an-maps {
	margin-top: 1rem;
	grid-template-columns: 1fr;
}

.an-location .an-map {
	height: 280px;
}

/* Choose Your Style tabs: a row of tab buttons over a strip of photos (tabs.js). */
.an-tablist {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 1.5rem 0 1.25rem;
}

.an-tab {
	font-family: var(--an-font-label);
	font-size: 1rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.6em 1.2em;
	min-height: 44px;
	border: 2px solid var(--global-palette7);
	border-radius: 0;
	background: var(--global-palette8);
	color: var(--global-palette4);
	cursor: pointer;
}

.an-tab:hover {
	border-color: var(--global-palette1);
	color: var(--global-palette3);
	background: var(--global-palette8);
}

.an-tab[aria-selected="true"] {
	border-color: var(--global-palette1);
	background: var(--global-palette1);
	color: var(--global-palette9);
}

.an-tab:focus-visible,
.an-tab-panel:focus-visible,
.an-carousel-nav button:focus-visible {
	outline: 3px solid var(--global-palette2);
	outline-offset: 3px;
}

/* The tab button shows the panel's name, so its own heading is kept for screen readers only. */
.an-tabs--ready .an-tab-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.an-tab-panel {
	margin-block: 0 2rem;
}

.an-tab-panel p {
	text-align: center;
	font-family: var(--an-font-accent);
	font-size: 1.2rem;
}

/* The photos in a panel sit in one row that swipes sideways, each photo uncropped. */
body .an-carousel.wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: nowrap;
	gap: 1rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--global-palette7) transparent;
	padding-bottom: 0.75rem;
}

body .an-carousel.wp-block-gallery.has-nested-images figure.wp-block-image {
	flex: 0 0 auto;
	width: auto !important;
	max-width: 85%;
	margin: 0;
	scroll-snap-align: start;
}

body .an-carousel.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: clamp(260px, 45vw, 440px);
	width: auto;
	max-width: 100%;
	object-fit: contain;
	border: 1px solid var(--global-palette7);
}

/* Phones: one photo at a time, full width, with the next one peeking in. */
@media (max-width: 599px) {
	body .an-carousel.wp-block-gallery.has-nested-images {
		align-items: center;
	}

	body .an-carousel.wp-block-gallery.has-nested-images figure.wp-block-image {
		width: 85% !important;
	}

	body .an-carousel.wp-block-gallery.has-nested-images figure.wp-block-image img {
		width: 100%;
		height: auto;
		max-height: 70svh;
	}
}

.an-carousel-nav {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

/* No arrows when every photo already fits (tabs.js sets hidden). */
.an-carousel-nav[hidden] {
	display: none;
}

/* Photos center when they all fit, and still scroll from the first one when they don't. */
body .an-carousel.wp-block-gallery.has-nested-images > figure.wp-block-image:first-child {
	margin-left: auto !important;
}

body .an-carousel.wp-block-gallery.has-nested-images > figure.wp-block-image:last-child {
	margin-right: auto !important;
}

.an-carousel-nav button {
	width: 48px;
	height: 48px;
	padding: 0;
	font-size: 1.8rem;
	line-height: 1;
	border: 2px solid var(--global-palette1);
	border-radius: 50%;
	background: transparent;
	color: var(--global-palette1);
	cursor: pointer;
}

.an-carousel-nav button:hover:not(:disabled) {
	background: var(--global-palette1);
	color: var(--global-palette9);
}

.an-carousel-nav button:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Choose Your Set: the set names as a row of labels. */
.an-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	padding: 0;
	margin: 1.5rem auto 0;
	list-style: none;
}

.an-chips li {
	padding: 0.5em 1.1em;
	border: 1px solid var(--global-palette1);
	background: var(--global-palette8);
	font-family: var(--an-font-label);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--global-palette3);
}

/* Choose Thy Realm: a card per set, each photo in the same 3:2 shape with its name under it.
   One per row on phones, two on tablets, three on desktops, with a short last row centered.
   The flex goes on the group's inner wrapper when the theme adds one. */
.an-sets:not(:has(> .wp-block-group__inner-container)),
.an-sets > .wp-block-group__inner-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	margin-top: 2rem;
}

.an-sets .wp-block-image {
	flex: 0 0 100%;
	/* The flex gap spaces the cards; WordPress's own block margins would make them uneven. */
	margin: 0 !important;
	padding: 0.75rem;
	border: 1px solid var(--global-palette7);
	border-top: 4px solid var(--global-palette1);
	background: var(--global-palette8);
}

@media (min-width: 600px) {
	.an-sets .wp-block-image {
		flex-basis: calc((100% - 1.5rem) / 2);
	}
}

@media (min-width: 960px) {
	.an-sets .wp-block-image {
		flex-basis: calc((100% - 3rem) / 3);
	}
}

/* Every realm photo in the same shape, so the cards and their names line up. */
.an-sets .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.an-sets .wp-block-image figcaption {
	margin: 0.75rem 0 0.25rem;
	text-align: center;
	font-family: var(--an-font-accent);
	font-size: 1.35rem;
	color: var(--global-palette1);
}

/* The festival's own map, under Visit Us. */
body .wp-block-group.an-section.an-festival-map {
	padding-top: 0;
}

.an-festival-map .wp-block-image img,
.an-timelapse video {
	width: 100%;
	height: auto;
	border: 1px solid var(--global-palette7);
}

/* The storefront timelapse in the welcome section: a framed, looping photo with no player controls. */
.wp-block-video.an-timelapse {
	margin-block: 1.75rem;
}

.an-timelapse video {
	display: block;
	pointer-events: none;
}

/* iPhones in Low Power Mode show a play button over autoplay videos; this one is decoration. */
.an-timelapse video::-webkit-media-controls-start-playback-button,
.an-timelapse video::-webkit-media-controls {
	display: none !important;
}

.an-festival-map figcaption {
	text-align: center;
	font-size: 1rem;
}

/* A location's own photo, such as the booth, right under its title. */
.an-location .wp-block-image {
	margin: 0 0 1.25rem;
}

.an-location .wp-block-image img {
	width: 100%;
	height: auto;
}

/* "View My Photos" in the hero (functions.php) uses each studio's own hero button style. */

/*
 * Under View My Photos: which location to choose on the photo site. The
 * button and its note stack in one column, and the row lines up at the top
 * so the other button keeps its own height.
 */
.an-hero .wp-block-buttons:has(.an-photos-button) {
	align-items: flex-start;
}

/* Hero buttons sit centered under the title, and match widths when they stack. */
.an-hero .wp-block-buttons {
	justify-content: center;
}

/*
 * Two buttons share a row at equal widths, and stack (still equal) only when
 * the row is too narrow for both, which is phones.
 */
.an-hero .wp-block-buttons > .wp-block-button {
	flex: 1 1 0;
	min-width: min(15rem, 100%);
	max-width: 18rem;
}

.an-hero .wp-block-buttons > .wp-block-button > .wp-block-button__link {
	width: 100%;
}

.an-hero .an-photos-button {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* As wide as the button above it (width 0 with min-width 100%), so the note never widens the button. */
.an-hero .an-photos-hint {
	width: 0;
	min-width: 100%;
	margin: 0.6rem 0 0;
	font-size: 1rem;
	line-height: 1.35;
	text-align: center;
	color: inherit;
	opacity: 0.95;
}

/*
 * Santa's hours: a calendar, one cell per day, Sunday first. On phones it
 * turns into a list of just the days with hours.
 */
.an-calendar {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin: 1.5rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.an-cal-head {
	padding: 0.4rem;
	background: var(--global-palette1);
	color: #fff;
	font-weight: 700;
	text-align: center;
}

.an-cal-day {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-height: 6.5rem;
	padding: 0.5rem;
	border: 1px solid var(--global-palette7);
	background: var(--global-palette9);
	font-size: 1rem;
	line-height: 1.3;
}

.an-cal-off {
	background: transparent;
	opacity: 0.65;
}

.an-cal-closed {
	background: var(--global-palette8);
}

.an-cal-date {
	font-weight: 700;
}

.an-cal-full {
	display: none;
}

.an-cal-hours {
	font-weight: 700;
	color: var(--global-palette1);
}

.an-cal-note,
.an-cal-break {
	font-size: 1rem;
}

.an-cal-note {
}

/* Below this width the grid's cells get too narrow for the times, so it becomes a list. */
@media (max-width: 900px) {
	.an-calendar {
		display: block;
	}

	.an-cal-head,
	.an-cal-day.an-cal-off {
		display: none;
	}

	.an-cal-day {
		display: grid;
		grid-template-columns: 7.5rem 1fr;
		gap: 0 0.75rem;
		min-height: 0;
		margin-bottom: 4px;
		font-size: 1rem;
	}

	.an-cal-day > :not(.an-cal-date) {
		grid-column: 2;
	}

	.an-cal-date {
		grid-row: span 3;
	}

	.an-cal-full {
		display: inline;
	}

	.an-cal-num {
		display: none;
	}
}

/* ---------- Contact form ---------- */

.an-form {
	max-width: 36rem;
}

.an-form input[type="text"],
.an-form input[type="email"],
.an-form input[type="tel"],
.an-form textarea {
	width: 100%;
	background: var(--global-palette8);
	color: var(--global-palette3);
	border: 1px solid var(--global-palette7);
	padding: 0.7em 0.8em;
	font: inherit;
}

.an-form label {
	font-family: var(--an-font-label);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 1rem;
}

.an-form button[type="submit"] {
	background: var(--global-palette1);
	color: var(--global-palette9);
	border: 0;
	border-radius: 0;
	padding: 0.8em 2em;
	cursor: pointer;
}

.an-form button[type="submit"]:hover {
	background: var(--global-palette2);
}

/* Honeypot: hidden from people, visible to bots. */
.an-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.an-form__notice {
	padding: 0.8rem 1rem;
	border-left: 4px solid var(--global-palette1);
	background: var(--global-palette8);
}

.an-form__notice--error {
	border-left-color: #c0392b;
}

/* ---------- Studio themes ---------- */

/* Everything but Classic: same layout, with each studio's font, band, and accents. */
:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) :is(h1, h2) {
	text-transform: none;
}

:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) h2 {
	color: var(--global-palette1);
}


:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .an-hero .wp-block-cover__background {
	background-color: transparent !important;
	background-image: linear-gradient(to bottom, rgba(var(--an-fade), 0) 50%, rgba(var(--an-fade), 0.94) 88%);
}

:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .an-hero h1 {
	font-size: clamp(2.5rem, 5.5vw, 4.5rem);
}

/* The band along the bottom of the hero: rope, battlements, rivets, motley, or candy cane. */
:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .an-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: var(--an-band-height);
	background: var(--an-band);
}

:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .wp-block-button.is-style-outline > .wp-block-button__link,
:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .an-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--global-palette1);
	border-color: var(--global-palette1);
	color: var(--global-palette8);
}

body:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
body:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
	background: var(--global-palette2);
	border-color: var(--global-palette2);
	color: var(--global-palette9);
}

:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-festive) .an-styles .wp-block-column {
	border-top: 4px solid var(--global-palette1);
}

:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-jester, .studio-style-festive) .an-gallery.wp-block-gallery img,
:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-jester, .studio-style-festive) .an-map {
	filter: none;
}

/* Festive is light, so its button text and fade work the other way round. */
.studio-style-festive .wp-block-button.is-style-outline > .wp-block-button__link,
.studio-style-festive .an-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: #fff;
}

body.studio-style-festive .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
body.studio-style-festive .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
	color: #fff;
}

/* A little personality per studio. */
/* Santa's hero glows warm red with faint snowflakes. */
.studio-style-festive .an-hero.wp-block-cover {
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg stroke='%23fff' stroke-opacity='0.16' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M22 12v16M14 20h16M16 14l12 12M28 14L16 26'/%3E%3Cpath d='M67 55v12M61 61h12M63 57l8 8M71 57l-8 8'/%3E%3C/g%3E%3C/svg%3E"),
		radial-gradient(circle at 50% 42%, #c8303a 0%, #8e1b22 45%, #5a1418 100%);
}

.studio-style-festive .an-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	background: #fdf8ef;
	border-color: #fdf8ef;
	color: #b3262d;
}

body.studio-style-festive .an-hero .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
body.studio-style-festive .an-hero .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
	background: #f1e4cc;
	border-color: #f1e4cc;
	color: #8e1b22;
}

/* Santa's logo is made for a dark background, so on the cream page it sits on a red ornament. */
/* Santa's Village: a small ornament where one section meets the next, so the page reads as separate parts. */
.studio-style-festive .entry-content > .an-section + .an-section {
	position: relative;
}

.studio-style-festive .entry-content > .an-section + .an-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: min(300px, 70%);
	height: 30px;
	transform: translate(-50%, -50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='30' viewBox='0 0 300 30'%3E%3Cpath d='M10 15H118M182 15H290' stroke='%23b3262d' stroke-opacity='0.45' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='15' r='2' fill='%23b3262d' fill-opacity='0.45'/%3E%3Ccircle cx='290' cy='15' r='2' fill='%23b3262d' fill-opacity='0.45'/%3E%3Cpath d='M128 15l6-5 6 5-6 5z M160 15l6-5 6 5-6 5z' fill='%23b3262d' fill-opacity='0.55'/%3E%3Cpath d='M150 3l2.6 7.4L160 8l-4.6 6L160 21l-7.4-1.4L150 27l-2.6-7.4L140 21l4.6-7-4.6-6 7.4 2.4z' fill='%23b3262d'/%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
}

/* No shadows anywhere, including Kadence's hover and focus shadows on buttons and form fields. */
body .wp-element-button,
body .wp-block-button__link,
body button,
body input,
body textarea,
body select {
	box-shadow: none !important;
}

/* With those gone, a clear outline shows where keyboard focus is. */
body :is(a, button, input, textarea, select, .wp-element-button):focus-visible {
	outline: 3px solid var(--global-palette1);
	outline-offset: 2px;
}

/* The site name in the header links to the top; pad it so it's an easy tap target. */
body .site-branding a.brand {
	display: inline-block;
	padding-block: 0.5rem;
}

/* Phone menu links: the same size as body text, so they're easy to read and tap. */
body .mobile-navigation ul li > a,
body .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap {
	font-size: 1.125rem;
}

/* The image block's "enlarge" button: big enough to tap easily. */
.wp-lightbox-container button.lightbox-trigger {
	width: 40px;
	height: 40px;
	padding: 10px;
}

/* A closing byline under a section's text: softer, with the studio's name in bold. */
.an-byline {
	margin-top: 1.75rem;
	font-family: var(--an-font-accent);
	font-size: 1.15rem;
	color: var(--global-palette4);
}

.an-byline strong {
	font-style: normal;
	color: var(--global-palette3);
}

/*
 * Santa's headings: big red display h2s, and h3s in the dark neutral, upright,
 * and bold, so the two levels don't read as the same thing.
 */
.studio-style-festive .entry-content h2 {
	font-size: clamp(2.1rem, 4vw, 2.75rem);
	line-height: 1.15;
}

.studio-style-festive .entry-content h3 {
	font-family: var(--an-font-accent);
	font-style: normal;
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--global-palette3);
}

/*
 * Santa sticks to red and one neutral, two fonts, and no italics: buttons,
 * links, and labels in Lora bold (normal case), the site name in the script.
 */
body.studio-style-festive :is(.an-kicker, .an-photos-hint, .an-byline, .an-cal-note, h3, h4) {
	font-style: normal;
}

body.studio-style-festive .an-kicker {
	font-weight: 600;
}

body.studio-style-festive :is(.wp-block-button__link, .wp-element-button, .header-navigation a, .mobile-navigation a, .an-form label, .an-form button) {
	font-family: var(--an-font-body);
	text-transform: none;
	letter-spacing: 0.01em;
	font-weight: 700;
}

body.studio-style-festive .site-branding .site-title {
	font-family: var(--an-font-display);
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.9rem;
	font-weight: 700;
	color: var(--global-palette1);
}

body.studio-style-festive .header-navigation a,
body.studio-style-festive .main-navigation .primary-menu-container > ul > li.menu-item > a {
	color: var(--global-palette3);
	text-transform: none;
	letter-spacing: 0.01em;
}

body.studio-style-festive :is(.an-byline, .an-cal-note) {
	color: var(--global-palette5);
}

body.studio-style-festive .an-byline strong {
	color: var(--global-palette3);
}

/* Santa's logo is a full badge of its own, so it shows a little bigger. */
.studio-style-festive .an-logo img {
	width: clamp(240px, 34vw, 420px);
}


.studio-style-jester .wp-block-button.is-style-outline > .wp-block-button__link,
.studio-style-jester .an-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	border-radius: 999px;
}

/* Each Jester How It Works step gets its own motley color. */
.studio-style-jester .an-styles .wp-block-column {
	border: 0;
	border-radius: 14px;
	color: #fff;
}

.studio-style-jester .an-styles .wp-block-column:nth-child(1) { background: #d7263d; }
.studio-style-jester .an-styles .wp-block-column:nth-child(2) { background: #15804f; }
.studio-style-jester .an-styles .wp-block-column:nth-child(3) { background: #2563d4; }
.studio-style-jester .an-styles .wp-block-column:nth-child(4) { background: #7a2fc4; }

.studio-style-jester .an-styles h3 {
	color: #fff;
}

@media (max-width: 781px) {

	:is(.studio-style-spyglass, .studio-style-dragon, .studio-style-tintype, .studio-style-jester, .studio-style-festive) .an-hero .wp-block-cover__background {
		background-image: linear-gradient(to bottom, rgba(var(--an-fade), 0) 58%, rgba(var(--an-fade), 0.95) 80%);
	}
}

/* Jester border samples under How It Works: uncropped, three across (two on phones), last row centered. */
.studio-style-jester .an-borders.wp-block-gallery.has-nested-images {
	justify-content: center;
	gap: 1rem;
	margin-top: 1.5rem;
}

.studio-style-jester .an-borders.wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0;
	width: calc((100% - 2rem) / 3) !important;
}

.studio-style-jester .an-borders.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}

@media (max-width: 600px) {
	.studio-style-jester .an-borders.wp-block-gallery.has-nested-images figure.wp-block-image {
		width: calc((100% - 1rem) / 2) !important;
	}
}
