/* ==========================================================================
   Bespoke — WordPress glue
   The original build's style.css, pages.css and homes.css do the design work.
   This file only adds what WordPress needs on top: block alignments, editor
   output, pagination, the skip link, and a few bridges where a template has to
   render something the static site never had.
   Load order: fonts → style → pages → homes → theme.
   ========================================================================== */

/* ------------------------------------------------------------- skip link */

.bsp-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--background);
	color: var(--foreground);
	border-radius: 0 0 12px 0;
	font-weight: 600;
}
.bsp-skip:focus { left: 0; outline: 2px solid var(--ring, var(--primary)); outline-offset: 2px; }

.screen-reader-text,
.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

/* --------------------------------------------------- admin bar allowance */

body.admin-bar [data-header] { top: 32px; }

@media (max-width: 782px) {
	body.admin-bar [data-header] { top: 46px; }
}

/* ----------------------------------------------------- section rhythm */

/* The project baseline, applied to any section the original CSS does not
   already size. Sections that manage their own spacing opt out with
   .bsp-flush, and the original pg-/hd- sections keep their own padding. */
section.bsp-section {
	padding: var(--section-padding, 60px);
}

@media (max-width: 1024px) {
	section.bsp-section { padding: var(--section-padding-tablet, 60px) 20px; }
}

@media (max-width: 767px) {
	section.bsp-section { padding: var(--section-padding-mobile, 40px) 20px; }
}

.bsp-flush { padding: 0; }

/* Utilities the WP templates use that the compiled static CSS never needed. */
.sticky { position: sticky; }

/* ------------------------------------------------------------- header */

/* The static header was always transparent over a hero. Pages without one
   get a solid header instead, and the transparent header solidifies on
   scroll. */
[data-header].is-solid {
	background: var(--background);
	color: var(--foreground);
	border-bottom-color: var(--border);
	background-image: none;
}

[data-header].is-solid .text-ink-foreground,
[data-header].is-solid a,
[data-header].is-solid button { color: var(--foreground); }

[data-header].is-solid a.bg-primary,
[data-header].is-solid a.bg-primary:hover { color: var(--primary-foreground); }

.bsp-no-hero [data-header] { position: sticky; }

/* --------------------------------------------------------- floating UI */

.bsp-floats {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 40;
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
}

.bsp-float {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 10px 28px -10px rgb(0 0 0 / .55);
	transition: transform .2s ease;
}
.bsp-float:hover { transform: translateY(-2px); }
.bsp-float:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.bsp-float[hidden] { display: none; }
.bsp-float--wa { background: #25d366; color: #fff; }
.bsp-float--top { background: var(--ink); color: var(--ink-foreground); }

@media (max-width: 480px) {
	.bsp-floats { right: 14px; bottom: 14px; }
	.bsp-float { width: 48px; height: 48px; }
}

/* ---------------------------------------------------------- lightbox */

.bsp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	padding: 24px;
	background: color-mix(in srgb, var(--ink) 92%, transparent);
}
.bsp-lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; }
.bsp-lightbox__close {
	position: absolute;
	top: 18px;
	right: 18px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ink-foreground) 15%, transparent);
	color: var(--ink-foreground);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

/* ------------------------------------------------------ editor content */

/* Anything an editor writes in a WYSIWYG field or the block editor. */
.bsp-prose { font-size: 1rem; line-height: 1.75; color: var(--foreground); }
.bsp-prose > * + * { margin-top: 1.1em; }
.bsp-prose h2 { font-family: var(--font-display); font-size: 1.625rem; line-height: 1.25; margin-top: 1.8em; }
.bsp-prose h3 { font-family: var(--font-display); font-size: 1.3125rem; line-height: 1.3; margin-top: 1.6em; }
.bsp-prose a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--primary); }
.bsp-prose a:hover { color: var(--primary); }
.bsp-prose ul, .bsp-prose ol { padding-left: 1.3em; }
.bsp-prose li + li { margin-top: .4em; }
.bsp-prose img { border-radius: var(--radius, 1rem); height: auto; max-width: 100%; }
.bsp-prose blockquote {
	margin-inline: 0;
	padding-left: 20px;
	border-left: 3px solid var(--primary);
	font-family: var(--font-display);
	font-size: 1.25rem;
	line-height: 1.5;
}
.bsp-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.bsp-prose th, .bsp-prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }

/* --------------------------------------------------------- blog + 404 */

.bsp-posts {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}

.bsp-post-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--radius, 1rem);
	overflow: hidden;
	background: var(--cream);
}
.bsp-post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.bsp-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.bsp-post-card__body { padding: 1.375rem; display: grid; gap: .5rem; }
.bsp-post-card__date {
	margin: 0;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}
.bsp-post-card__title { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; }
.bsp-post-card__title a { color: inherit; text-decoration: none; }
.bsp-post-card__title a:hover { color: var(--primary); }
.bsp-post-card__text { margin: 0; font-size: .9375rem; line-height: 1.65; color: var(--muted-foreground); }

.bsp-pagination { margin-top: 2.5rem; }
.bsp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.bsp-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: .875rem;
	font-weight: 600;
}
.bsp-pagination .page-numbers.current { background: var(--ink); color: var(--ink-foreground); border-color: var(--ink); }

/* -------------------------------------------------------- search form */

.bsp-searchform { display: flex; gap: 8px; }
.bsp-searchform__input {
	flex: 1;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--background);
	font: inherit;
}
.bsp-searchform__submit {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: var(--ink);
	color: var(--ink-foreground);
	cursor: pointer;
}

/* -------------------------------------------------------- empty state */

.bsp-empty-state {
	padding: 3.5rem 1.25rem;
	text-align: center;
	border: 1px dashed var(--border);
	border-radius: var(--radius, 1rem);
}
.bsp-empty-state p { margin: .625rem auto 0; max-width: 48ch; color: var(--muted-foreground); }

/* -------------------------------------------------------- WP blocks */

.alignwide { max-width: 1080px; margin-inline: auto; }
.alignfull { width: 100%; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8125rem; color: var(--muted-foreground); margin-top: 8px; }

/* ------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------- app shell */

/* Find Your Home fills the viewport: the page does not scroll, the results
   column and the map do. */
html:has(body.bsp-appshell),
body.bsp-appshell { height: 100%; }

body.bsp-appshell { overflow: hidden; }
body.bsp-appshell #find-main { display: grid; } /* guard against `.pg-page main { display: block }` */

body.bsp-appshell.admin-bar { height: calc(100% - 32px); }

@media (max-width: 782px) {
	body.bsp-appshell.admin-bar { height: calc(100% - 46px); }
}

/* ------------------------------------------------- footer menus (WP menus)
   WordPress prints bare <a> inside the menu list, so the link styling the
   original build put on each anchor lives here instead. */

.bsp-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	font-size: .875rem;
	line-height: 1.4;
	color: color-mix(in oklch, var(--ink-foreground) 80%, transparent);
	transition: color .2s;
}

.bsp-footer-links a:hover,
.bsp-footer-links a:focus-visible {
	color: var(--primary);
}

.bsp-footer-links .current-menu-item > a {
	color: var(--ink-foreground);
}

/* ---------------------------------------------------- native selects
   Search panel + room filters use utility classes, so the browser's default
   select chrome leaked through. Match the .pg-input select from pages.css. */
#main select:not(.pg-input) {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.5rem;
	background-color: var(--background);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23857f75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .9rem center;
	cursor: pointer;
	line-height: 1.4;
}
#main select:not(.pg-input):focus,
#main input[type="date"]:not(.pg-input):focus {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 30%, transparent);
}
#main select:not(.pg-input) option { color: var(--foreground); background: var(--background); }
#main input[type="date"]:not(.pg-input) { appearance: none; -webkit-appearance: none; cursor: pointer; }
#main input[type="date"]:not(.pg-input)::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* --------------------------------------------------- search panel band
   The card overlaps the hero; the strip under it takes the colour of the
   section that follows, so there is no white gap between hero and content. */
.bl-search { display: flow-root; background: var(--cream); } /* flow-root: the card's negative margin must not collapse through the section */
@media (min-width: 48rem) {
	/* a touch taller hero, and the card sits half over it, half over the next section */
	section[aria-roledescription="carousel"],
	section[aria-roledescription="carousel"] > .container-bl.relative { min-height: 860px; }
	section[aria-roledescription="carousel"] > .container-bl.relative { padding-bottom: 12rem; }
	section[aria-roledescription="carousel"] > .container-bl.absolute { bottom: 11.5rem; }
	.bl-search > .container-bl { margin-top: -8.5rem; }
}
.bl-search:has(+ .pg-section--sand) { background: var(--sand); }
.bl-search:has(+ .pg-section--ink) { background: var(--ink); }
.bl-search:has(+ .pg-section:not(.pg-section--cream):not(.pg-section--sand):not(.pg-section--ink)) { background: var(--background); }

/* -------------------------------------------- featured room card (home)
   Utilities the precompiled Tailwind build did not include. */
.bl-featured-card ul.grid { column-gap: 1rem; row-gap: .5rem; padding-bottom: 1.5rem; }
.bl-featured-card .backdrop-blur { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bl-featured-card .bl-slides-nav { opacity: 0; transition: opacity .2s; }
.bl-featured-card:hover .bl-slides-nav, .bl-featured-card:focus-within .bl-slides-nav { opacity: 1; }
.bl-featured-head .pg-lead { max-width: 48rem; }

/* ------------------------------------------------------- home page (hd-*) */
.hd-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; margin: 0; padding: 0; list-style: none; }
.hd-features li { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; }
.hd-features svg { flex-shrink: 0; color: var(--primary); }
@media (max-width: 40rem) { .hd-features { grid-template-columns: minmax(0, 1fr); } }
.hd-prose { margin-top: 1rem; font-size: .9375rem; line-height: 1.7; color: var(--foreground); }
.hd-prose p { margin: 0 0 .9rem; }
.hd-prose ul, .hd-prose ol { margin: 0 0 .9rem 1.25rem; padding: 0; }
.hd-prose li + li { margin-top: .3rem; }
.hd-small a { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
