/* ==========================================================================
   The Moon Homestay - layout
   Header, navigation, hero, availability bar, highlights, sections, page
   headers, booking steps, footer and the mobile booking bar.
   ========================================================================== */

:root {
	--header-h: 78px;
	--avail-overlap: 3.5rem;
}

@media (max-width: 860px) {
	:root {
		--header-h: 66px;
		--avail-overlap: 2rem;
	}
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(246, 243, 238, .9);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--line);
	transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.is-scrolled {
	box-shadow: 0 10px 30px -24px rgba(27, 32, 30, .45);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

/* A backdrop-filter makes the header the containing block for fixed
   children, which would trap the full-screen mobile menu inside the header
   bar. Drop it while the menu is open. */
.site-header.nav-is-open {
	background: var(--ground);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.site-header__in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: var(--header-h);
}

/* Over the homepage photo the header starts transparent, then turns solid
   once the page scrolls. Only applied when JavaScript is running, so a
   visitor without it always gets a readable header. */
.js .site-header--overlay:not(.is-scrolled):not(.nav-is-open) {
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	border-bottom-color: transparent;
	color: #fff;
}

.js .site-header--overlay:not(.is-scrolled):not(.nav-is-open) .site-nav__list a {
	color: rgba(255, 255, 255, .92);
}

.js .site-header--overlay:not(.is-scrolled):not(.nav-is-open) .brand__sub {
	color: rgba(255, 255, 255, .75);
}

.js .site-header--overlay:not(.is-scrolled):not(.nav-is-open) .site-header__cta {
	background: #fff;
	color: var(--ink);
	box-shadow: none;
}

.js .site-header--overlay:not(.is-scrolled):not(.nav-is-open) .nav-toggle {
	color: #fff;
	border-color: rgba(255, 255, 255, .5);
}

/* ---------- Brand ---------- */

.brand {
	display: inline-flex;
	flex-direction: column;
	flex: none;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.brand__name {
	font-family: var(--f-display);
	font-size: 1.6rem;
	letter-spacing: -.02em;
}

.brand__sub {
	margin-top: .38rem;
	font-size: .6rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--muted);
	transition: color .35s var(--ease);
}

.brand .custom-logo {
	width: auto;
	max-height: calc(var(--header-h) - 22px);
}

/* The logo badge hangs a little below the bar, like a tag, and tucks into
   it once the page scrolls or the menu opens. The negative margin keeps the
   bar itself at --header-h. */
.brand--logo {
	align-self: flex-start;
	position: relative;
	z-index: 2;
	padding-top: 10px;
}

.brand__logo {
	display: block;
	width: auto;
	max-width: none;
	height: 96px;
	margin-bottom: -28px;
	filter: drop-shadow(0 8px 16px rgba(12, 16, 15, .28));
	transition: height .35s var(--ease), margin .35s var(--ease);
}

.site-header.is-scrolled .brand__logo,
.site-header.nav-is-open .brand__logo {
	height: 58px;
	margin-bottom: 0;
}

@media (max-width: 860px) {
	.brand--logo {
		padding-top: 7px;
	}

	.brand__logo {
		height: 70px;
		margin-bottom: -11px;
	}

	.site-header.is-scrolled .brand__logo,
	.site-header.nav-is-open .brand__logo {
		height: 52px;
		margin-bottom: 0;
	}
}

/* ---------- Navigation ---------- */

.site-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1.2rem, .4rem + 1.6vw, 2.3rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	position: relative;
	display: inline-block;
	padding-block: .4rem;
	font-size: .95rem;
	color: var(--ink-2);
	text-decoration: none;
	transition: color .2s var(--ease);
}

.site-nav__list a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 1.5px;
	border-radius: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--ease);
}

.site-nav__list a:hover::after,
.site-nav__list .current-menu-item > a::after,
.site-nav__list .current_page_item > a::after {
	transform: scaleX(1);
}

.site-nav__list a:hover {
	color: var(--ink);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.site-header__cta {
	padding: .72rem 1.3rem;
	font-size: .88rem;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	color: var(--ink);
	cursor: pointer;
	transition: color .35s var(--ease), border-color .35s var(--ease);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 18px;
	height: 1.5px;
	background: currentColor;
	transition: transform .3s var(--ease), opacity .2s;
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
	.nav-toggle {
		display: inline-flex;
	}

	.site-header__cta {
		display: none;
	}

	/* Full-screen menu panel on small screens. */
	.site-nav {
		position: fixed;
		inset: 0;
		z-index: -1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
		background: var(--ground);
		opacity: 0;
		visibility: hidden;
		transition: opacity .35s var(--ease), visibility .35s;
	}

	.site-header.nav-is-open .site-nav {
		opacity: 1;
		visibility: visible;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: .2rem;
	}

	.site-nav__list a {
		font-family: var(--f-display);
		font-size: clamp(2rem, 1.5rem + 3vw, 2.8rem);
		line-height: 1.25;
		color: var(--ink);
	}

	.site-nav__list a::after {
		display: none;
	}

	.site-nav__extra {
		display: grid;
		gap: .8rem;
		margin-top: 2.5rem;
		padding-top: 2rem;
		border-top: 1px solid var(--line);
	}
}

@media (min-width: 961px) {
	.site-nav__extra {
		display: none;
	}
}

html.nav-open {
	overflow: hidden;
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(600px, 94svh, 980px);
	margin-top: calc(-1 * var(--header-h) - 1px);
	overflow: hidden;
	background: var(--basalt);
	color: #fff;
	isolation: isolate;
}

.hero__media,
.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: moon-settle 2.4s var(--ease) both;
}

/* Three layers: a top band for the header, a left band behind the headline,
   and a bottom band behind the availability bar. The right of the photo stays
   untouched so the view itself keeps its colour. */
.hero__scrim {
	background:
		linear-gradient(180deg, rgba(12, 16, 15, .55) 0%, rgba(12, 16, 15, 0) 26%),
		linear-gradient(90deg, rgba(12, 16, 15, .62) 0%, rgba(12, 16, 15, .32) 42%, rgba(12, 16, 15, 0) 68%),
		linear-gradient(0deg, rgba(12, 16, 15, .85) 0%, rgba(12, 16, 15, .35) 38%, rgba(12, 16, 15, 0) 70%);
}

/* On phones the text spans the full width, so darken from the bottom up. */
@media (max-width: 720px) {
	.hero__scrim {
		background: linear-gradient(180deg, rgba(12, 16, 15, .5) 0%, rgba(12, 16, 15, .12) 28%, rgba(12, 16, 15, .55) 55%, rgba(12, 16, 15, .9) 100%);
	}
}

.hero__title,
.hero__lede,
.hero__content .eyebrow {
	text-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 2px 28px rgba(0, 0, 0, .34);
}

.hero__content {
	display: grid;
	gap: 1.15rem;
	padding-block: calc(var(--header-h) + 3rem) calc(var(--avail-overlap) + clamp(2.5rem, 1.5rem + 4vw, 5rem));
}

.hero__content > * {
	animation: moon-rise .9s var(--ease) both;
}

.hero__content > :nth-child(2) { animation-delay: .1s; }
.hero__content > :nth-child(3) { animation-delay: .2s; }
.hero__content > :nth-child(4) { animation-delay: .3s; }

.hero__title {
	max-width: 14ch;
	font-size: var(--t-2xl);
	line-height: 1.02;
	letter-spacing: -.025em;
	color: #fff;
}

.hero__title em {
	font-style: italic;
	color: var(--gold);
}

.hero__lede {
	max-width: 44ch;
	font-size: var(--t-md);
	line-height: 1.5;
	color: rgba(255, 255, 255, .88);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .8rem;
	margin-top: .6rem;
}

@keyframes moon-settle {
	from { transform: scale(1.07); }
	to   { transform: scale(1); }
}

@keyframes moon-rise {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Availability bar ---------- */

.avail-wrap {
	position: relative;
	z-index: 5;
	margin-top: calc(-1 * var(--avail-overlap));
}

.avail {
	padding: clamp(1.2rem, .9rem + 1vw, 1.7rem) clamp(1.2rem, .8rem + 1.4vw, 2.1rem) clamp(1.3rem, 1rem + 1vw, 1.8rem);
	background: var(--surface);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-lg);
	animation: moon-rise .9s .35s var(--ease) both;
}

.avail__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .3rem 1.5rem;
	margin-bottom: 1rem;
}

.avail__title {
	font-family: var(--f-display);
	font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem);
	line-height: 1.15;
}

.avail__note {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-size: .88rem;
	color: var(--muted);
}

.avail__note .icon {
	color: var(--sea);
}

/* Generic grid so any search form placed here - the booking plugin's or the
   theme's fallback - lays out as one row on wide screens. */
.avail form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem 1.1rem;
	align-items: end;
	margin: 0;
}

.avail form > p,
.avail form > div {
	margin: 0;
}

.avail form br {
	display: none;
}

.avail button,
.avail input[type="submit"] {
	width: 100%;
	min-height: 3.25rem;
}

/* Phones: dates side by side, guests side by side, then the button.
   booking.css repeats this for the same form on other pages. */
@media (max-width: 600px) {
	.avail form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: .8rem .6rem;
	}

	.avail form > :last-child,
	.avail .mphb_sc_search-submit-button-wrapper {
		grid-column: 1 / -1;
	}

	.avail input.mphb-datepick {
		padding-right: .5rem;
		padding-left: 2.2rem;
		background-position: left .7rem center;
		background-size: 1rem;
		font-size: .9rem;
	}
}

.avail input[type="text"],
.avail input[type="date"],
.avail select {
	min-height: 3.25rem;
	background-color: var(--ground);
	border-color: transparent;
}

.avail input[type="text"]:hover,
.avail select:hover {
	border-color: var(--line-strong);
}

.avail input:focus,
.avail select:focus {
	background-color: var(--surface);
	border-color: var(--sea);
}

/* ---------- Highlights under the availability bar ---------- */

.highlights {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.4rem 2rem;
	margin: clamp(2rem, 1.5rem + 1.5vw, 3rem) 0 0;
	padding: 0 clamp(.2rem, 1vw, 1rem);
	list-style: none;
}

@media (max-width: 960px) {
	.highlights {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 460px) {
	.highlights {
		grid-template-columns: 1fr;
	}
}

.highlight {
	display: flex;
	align-items: flex-start;
	gap: .95rem;
}

.highlight__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	background: var(--sea-soft);
	border-radius: 50%;
	color: var(--sea);
}

.highlight__icon .icon {
	width: 1.35rem;
	height: 1.35rem;
}

.highlight__title {
	display: block;
	font-family: var(--f-display);
	font-size: 1.14rem;
	font-weight: 400;
	line-height: 1.25;
}

.highlight__text {
	display: block;
	margin-top: .15rem;
	font-size: .88rem;
	line-height: 1.5;
	color: var(--muted);
}

/* The first section after the hero sits closer to it. */
.avail-wrap + .section {
	padding-top: calc(var(--section) * .75);
}

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

.section {
	padding-block: var(--section);
}

.section--white { background: var(--surface); }
.section--sand  { background: var(--sand-soft); }

.section--tight {
	padding-block: calc(var(--section) * .6);
}

.section-head {
	display: grid;
	gap: 1rem;
	max-width: 64ch;
	margin-bottom: clamp(2.5rem, 1.8rem + 2.4vw, 4.25rem);
}

.section-head h2 {
	font-size: var(--t-xl);
}

.section-head p:not(.eyebrow) {
	font-size: var(--t-md);
	line-height: 1.5;
	color: var(--ink-2);
}

/* Title on the left, "see all" link on the right. */
.section-head--split {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 1rem 3rem;
	max-width: none;
}

.section-head--split > div {
	display: grid;
	gap: 1rem;
	max-width: 64ch;
}

@media (max-width: 700px) {
	.section-head--split {
		grid-template-columns: 1fr;
	}
}

.section-foot {
	margin-top: clamp(2.2rem, 1.6rem + 2vw, 3.4rem);
}

/* ---------- Inner page header ---------- */

.page-hero {
	padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
}

/* The header shares the page's left edge (it is also a .wrap), and only its
   text is kept to a readable measure. Capping the .wrap itself would centre
   it and pull it out of line with the content below. */
.page-hero__in {
	display: grid;
	gap: 1.1rem;
}

.page-hero__in > * {
	max-width: 70ch;
}

.page-hero h1 {
	font-size: var(--t-xl);
}

.page-hero__lede {
	font-size: var(--t-md);
	line-height: 1.5;
	color: var(--ink-2);
}

.breadcrumb {
	font-size: var(--t-xs);
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}

.breadcrumb a {
	color: var(--sea);
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
	margin-inline: .5rem;
	opacity: .5;
}

.page-hero__image {
	margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
	overflow: hidden;
	border-radius: var(--r-lg);
	aspect-ratio: 21 / 9;
	background: var(--surface-2);
}

.page-hero__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 700px) {
	.page-hero__image {
		aspect-ratio: 4 / 3;
	}
}

/* ---------- Booking steps ----------
   Shown at the top of the search results, checkout and "reservation
   received" pages, so a guest always knows how far along they are. */

.booking-steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem .9rem;
	margin: 0 0 .4rem;
	padding: 0;
	list-style: none;
	counter-reset: moon-step;
}

.booking-steps li {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-size: .86rem;
	font-weight: 700;
	color: var(--muted);
	counter-increment: moon-step;
}

.booking-steps li::before {
	content: counter(moon-step);
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	border: 1.5px solid var(--line-strong);
	border-radius: 50%;
	font-size: .78rem;
	line-height: 1;
}

.booking-steps li:not(:last-child)::after {
	content: "";
	width: clamp(1.2rem, 3vw, 2.6rem);
	height: 1.5px;
	margin-left: .35rem;
	background: var(--line-strong);
}

.booking-steps .is-done {
	color: var(--sea);
}

.booking-steps .is-done::before {
	content: "\2713";
	background: var(--sea);
	border-color: var(--sea);
	color: #fff;
}

.booking-steps .is-done:not(:last-child)::after {
	background: var(--sea);
}

.booking-steps .is-current {
	color: var(--ink);
}

.booking-steps .is-current::before {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

@media (max-width: 520px) {
	.booking-steps li:not(.is-current) {
		font-size: 0;
		gap: 0;
	}

	.booking-steps li:not(.is-current)::after {
		margin-left: .6rem;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	position: relative;
	background: var(--basalt);
	color: var(--on-dark);
}

/* A soft wave where the page meets the dark footer. */
.site-footer__wave {
	position: absolute;
	bottom: calc(100% - 1px);
	left: 0;
	width: 100%;
	height: clamp(22px, 3.2vw, 52px);
	color: var(--basalt);
	pointer-events: none;
}

.site-footer a:not(.btn) {
	color: inherit;
	text-decoration: none;
	transition: color .2s var(--ease);
}

.site-footer a:not(.btn):hover {
	color: #fff;
}

.site-footer__invite {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 2rem 3rem;
	padding-block: clamp(3.5rem, 2.6rem + 4vw, 6rem) clamp(3rem, 2.4rem + 2.4vw, 4.5rem);
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.site-footer__invite h2 {
	max-width: 16ch;
	font-size: var(--t-xl);
	color: #fff;
}

.site-footer__invite h2 em {
	font-style: italic;
	color: var(--gold);
}

.site-footer__invite-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .8rem;
}

@media (max-width: 760px) {
	.site-footer__invite {
		grid-template-columns: 1fr;
		align-items: start;
	}
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 2.5rem 3rem;
	padding-block: clamp(3rem, 2.4rem + 2vw, 4.5rem);
}

@media (max-width: 900px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 520px) {
	.site-footer__grid {
		grid-template-columns: 1fr;
	}
}

.site-footer .brand__sub {
	color: var(--on-dark-muted);
}

/* On the dark footer a faint light edge keeps the badge's dark silhouette
   from melting into the background. */
.site-footer__logo {
	justify-self: start;
	margin-bottom: .5rem;
}

.site-footer__logo img {
	display: block;
	width: auto;
	height: 112px;
	filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)) drop-shadow(0 14px 28px rgba(0, 0, 0, .45));
}

.site-footer__heading {
	margin-bottom: 1rem;
	font-family: var(--f-body);
	font-size: var(--t-xs);
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--on-dark-muted);
}

.site-footer__col {
	display: grid;
	align-content: start;
	gap: .55rem;
	font-size: .95rem;
	color: var(--on-dark);
}

.site-footer__col p {
	color: var(--on-dark-muted);
	line-height: 1.6;
}

.site-footer__col .link-arrow {
	color: var(--gold);
}

.site-footer__menu {
	display: grid;
	gap: .55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__phone {
	font-family: var(--f-display);
	font-size: 1.25rem;
}

.site-footer__base {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .6rem 2rem;
	padding-block: 1.6rem 2rem;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: .84rem;
	color: var(--on-dark-muted);
}

/* ---------- Mobile booking bar ---------- */

.book-bar {
	display: none;
}

@media (max-width: 860px) {
	.book-bar {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: .6rem;
		padding: .7rem var(--gutter);
		padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px));
		background: rgba(255, 255, 255, .96);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--line);
		box-shadow: 0 -10px 30px -20px rgba(27, 32, 30, .35);
		transform: translateY(110%);
		transition: transform .4s var(--ease);
	}

	/* Slides in once the visitor has scrolled past the hero. */
	.book-bar.is-visible,
	html:not(.js) .book-bar {
		transform: none;
	}

	.book-bar .btn--primary {
		flex: 1;
	}

	.book-bar .btn--whatsapp {
		padding-inline: 1.1rem;
	}

	body.has-book-bar {
		padding-bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
	}

	/* On a room page the bar shows the price and jumps to the booking card. */
	.book-bar--room .btn--primary {
		flex: none;
	}

	.book-bar__price {
		flex: 1;
		font-family: var(--f-display);
		font-size: 1.35rem;
		line-height: 1.1;
		font-variant-numeric: tabular-nums;
	}

	.book-bar__price small {
		font-family: var(--f-body);
		font-size: .8rem;
		color: var(--muted);
	}
}
