/**
 * Site layout: header, title banner, footer, popups, listings, 404. Front end only, after site--base.css.
 */

:root {
	/* Height of the header bar that lies over the top of the page. */
	--qq-header-height: 61px;
}

/* Header */

.site-header {
	position: absolute;
	z-index: 50;
	top: 0;
	right: 0;
	left: 0;
	color: var(--wp--preset--color--base);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* No dark top to lie over (404): a solid night bar in the flow. */
.site-header--solid {
	position: relative;
	background-color: var(--wp--preset--color--night);
}

.admin-bar .site-header--solid {
	top: 0;
}

.site-header > .container,
.site-header .container {
	max-width: calc(1280px + 2 * var(--qq-gutter));
}

.site-header__bar {
	border-bottom: 1px solid rgb(255 255 255 / 0.09);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 61px;
}

.site-logo {
	display: inline-flex;
	flex: none;
	align-items: center;
	color: inherit;
	text-decoration: none;
}

.site-logo__image {
	width: auto;
	height: 40px;
}

.site-logo__text {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 22px;
	font-weight: 700;
}

/* On the dark desktop header and in the footer the logo is a white silhouette; the white mobile bar shows it as is. */
.site-header .site-logo__image,
.site-footer .site-logo__image {
	filter: brightness(0) invert(1);
}

.site-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-nav__menu,
.site-nav__menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__menu {
	display: flex;
	align-items: center;
}

.site-nav__menu > li {
	position: relative;
}

.site-nav__menu > li > a {
	display: block;
	padding: 18px 20px;
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

/* Current item and the hovered one: a soft pill behind the label. */
.site-nav__menu > li > a::before {
	position: absolute;
	z-index: -1;
	inset: 13px 8px;
	border-radius: 4px;
	background-color: rgb(255 255 255 / 0.1);
	content: "";
	opacity: 0;
	transition: opacity 0.3s;
}

.site-nav__menu > li > a {
	position: relative;
	isolation: isolate;
}

.site-nav__menu > :is(.current-menu-item, .current-menu-ancestor, :hover, :focus-within) > a::before {
	opacity: 1;
}

.site-nav__menu .sub-menu {
	position: absolute;
	z-index: 10;
	top: 100%;
	left: 0;
	min-width: 232px;
	padding: 16px 0;
	border-radius: 5px;
	background-color: var(--wp--preset--color--base);
	box-shadow: 0 20px 50px rgb(3 13 34 / 0.18);
	opacity: 0;
	transform: translateY(8px);
	visibility: hidden;
	transition: opacity 0.25s, transform 0.25s var(--qq-ease), visibility 0.25s;
}

.site-nav__menu > li:is(:hover, :focus-within) > .sub-menu {
	opacity: 1;
	transform: none;
	visibility: visible;
}

.site-nav__menu .sub-menu a {
	display: block;
	padding: 9px 23px;
	color: var(--wp--preset--color--text);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	transition: color 0.2s;
}

.site-nav__menu .sub-menu a:is(:hover, :focus-visible),
.site-nav__menu .sub-menu .current-menu-item > a {
	color: var(--wp--preset--color--violet);
}

.site-nav-toggle,
.site-nav__cta {
	display: none;
}

.site-header__cta {
	flex: none;
}

/* Tablets and phones: a white bar with the regular logo and a menu toggle; the menu is a panel under it. */
@media (max-width: 1200px) {
	:root {
		--qq-header-height: 85px;
	}

	.site-header__bar {
		border-bottom: 0;
		background-color: var(--wp--preset--color--base);
		color: var(--wp--preset--color--heading);
	}

	.site-header__inner {
		justify-content: space-between;
		min-height: 85px;
	}

	.site-header .site-logo__image {
		filter: none;
	}

	.site-nav {
		flex: none;
		order: 3;
	}

	.site-header__cta {
		margin-left: auto;
	}

	.site-nav-toggle {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--wp--preset--color--heading);
		cursor: pointer;
	}

	.site-nav-toggle__lines,
	.site-nav-toggle__lines::before,
	.site-nav-toggle__lines::after {
		display: block;
		width: 22px;
		height: 2px;
		border-radius: 2px;
		background-color: currentColor;
		transition: transform 0.3s var(--qq-ease), opacity 0.3s;
	}

	.site-nav-toggle__lines {
		position: relative;
	}

	.site-nav-toggle__lines::before,
	.site-nav-toggle__lines::after {
		position: absolute;
		left: 0;
		content: "";
	}

	.site-nav-toggle__lines::before {
		top: -7px;
	}

	.site-nav-toggle__lines::after {
		top: 7px;
	}

	.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__lines {
		background-color: transparent;
	}

	.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__lines::before {
		transform: translateY(7px) rotate(45deg);
	}

	.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__lines::after {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-nav__panel {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		max-height: calc(100dvh - var(--qq-header-height));
		padding: 8px var(--qq-gutter) 28px;
		overflow-y: auto;
		background-color: var(--wp--preset--color--base);
		box-shadow: 0 30px 40px rgb(3 13 34 / 0.12);
		opacity: 0;
		transform: translateY(-8px);
		visibility: hidden;
		transition: opacity 0.25s, transform 0.25s var(--qq-ease), visibility 0.25s;
	}

	.site-nav__panel.is-open {
		opacity: 1;
		transform: none;
		visibility: visible;
	}

	.site-nav__menu {
		display: block;
	}

	.site-nav__menu > li {
		border-bottom: 1px solid var(--qq-line);
	}

	.site-nav__menu > li > a {
		padding: 14px 0;
		color: var(--wp--preset--color--heading);
		font-size: var(--wp--preset--font-size--medium);
	}

	.site-nav__menu > li > a::before {
		display: none;
	}

	.site-nav__menu > :is(.current-menu-item, .current-menu-ancestor) > a {
		color: var(--wp--preset--color--violet);
	}

	.site-nav__menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 12px 16px;
		box-shadow: none;
		opacity: 1;
		transform: none;
		visibility: visible;
	}

	.site-nav__menu .sub-menu a {
		padding: 7px 0;
	}

	.site-nav__cta {
		display: block;
		margin-top: 20px;
	}

	.site-nav__cta .button {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.site-header__cta {
		display: none;
	}

	.site-logo__image {
		height: 36px;
	}
}

/* Title banner (template-parts/content--page-header.php): night with the perspective grid, rounded bottom corners */

.page-header {
	position: relative;
	overflow: hidden;
	padding-block: calc(var(--qq-header-height) + clamp(3rem, 6vw, 4.5rem)) clamp(4rem, 9vw, 8rem);
	border-radius: 0 0 var(--qq-radius-section) var(--qq-radius-section);
	background: var(--wp--preset--color--night) url("../images/site--hero-grid.avif") center bottom / cover no-repeat;
	color: var(--wp--preset--color--base);
}

.page-header__title {
	max-width: 1000px;
	color: var(--wp--preset--color--base);
	font-size: clamp(36px, 4.4vw, 64px);
	letter-spacing: -0.05em;
	line-height: 1.05;
}

.page-header__text {
	max-width: 640px;
	margin-top: 20px;
	font-size: var(--wp--preset--font-size--large);
}

.page-header__crumbs {
	margin-bottom: 16px;
}

/* Breadcrumbs (template-parts/content--breadcrumbs.php) */

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
	margin-inline: 6px;
	content: "-";
}

.page-header .breadcrumbs {
	color: var(--wp--preset--color--orange);
}

.breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.breadcrumbs a:hover {
	text-decoration: underline;
}

/* Footer */

.site-footer {
	margin-top: var(--qq-section-space);
	background: linear-gradient(170deg, var(--wp--preset--color--night) 0%, rgb(3 13 34 / 0.95) 100%);
	color: rgb(255 255 255 / 0.8);
}

.site-footer__crumbs {
	border-bottom: 1px solid rgb(255 255 255 / 0.08);
	color: #8745d5;
	font-size: 15px;
}

.site-footer__crumbs .breadcrumbs {
	min-height: 41px;
	align-items: center;
	font-size: 15px;
}

.site-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 20px;
	padding-block: clamp(3.5rem, 6vw, 5rem) clamp(3rem, 6vw, 4.5rem);
}

.site-footer__label {
	margin-bottom: 52px;
	color: rgb(255 255 255 / 0.47);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.site-footer__label--small {
	margin: 28px 0 12px;
}

.site-footer__contacts .site-footer__label:first-child {
	margin-bottom: 0;
}

.site-footer__menu {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__menu a {
	color: #cbcbcb;
	font-size: 15px;
	text-decoration: none;
	transition: color 0.2s;
}

.site-footer__menu a:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--base);
}

.site-footer__contact {
	display: block;
	color: var(--wp--preset--color--base);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

a.site-footer__contact + a.site-footer__contact {
	margin-top: 22px;
}

a.site-footer__contact:is(:hover, :focus-visible) {
	color: #c9a6ff;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
	padding-block: 36px 60px;
}

.site-footer__logo .site-logo__image {
	height: 38px;
}

.site-footer__copyright {
	color: rgb(255 255 255 / 0.85);
	font-size: 16px;
}

.site-footer__socials {
	display: flex;
	gap: 26px;
	margin: 0 clamp(0px, 10vw, 120px) 0 0;
	padding: 0;
	list-style: none;
}

.site-footer__socials a {
	display: block;
	color: rgb(255 255 255 / 0.8);
	transition: color 0.2s;
}

.site-footer__socials a:hover {
	color: var(--wp--preset--color--base);
}

.site-footer__socials .icon {
	width: 21px;
	height: 21px;
}

@media (max-width: 1024px) {
	.site-footer__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-footer__label {
		margin-bottom: 24px;
	}
}

@media (max-width: 600px) {
	.site-footer__columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__socials {
		margin: 0;
	}
}

/* Popups (template-parts/site--popups.php): white panel over a dimmed page */

html:has(.popup[open]) {
	overflow: hidden;
}

.popup {
	width: min(600px, calc(100% - 2 * var(--qq-gutter)));
	max-height: calc(100dvh - 2 * var(--qq-gutter));
	padding: 0;
	border: 0;
	border-radius: var(--qq-radius);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
}

.popup::backdrop {
	background-color: rgb(3 13 34 / 0.8);
}

.popup[open] {
	animation: popup-in 0.3s var(--qq-ease);
}

@keyframes popup-in {
	from {
		opacity: 0;
		translate: 0 16px;
	}
}

.popup__panel {
	position: relative;
	padding: clamp(28px, 5vw, 48px);
}

.popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--heading);
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s;
}

.popup__close:is(:hover, :focus-visible) {
	background-color: var(--wp--preset--color--violet);
	color: var(--wp--preset--color--base);
}

.popup__title {
	padding-right: 48px;
	font-size: clamp(26px, 2.6vw, 34px);
	letter-spacing: -0.04em;
}

.popup__text {
	margin: 12px 0 28px;
}

/* Thank you: centred, a round check mark above the title. */
.popup--thanks {
	width: min(480px, calc(100% - 2 * var(--qq-gutter)));
	text-align: center;
}

.popup--thanks .popup__title {
	padding-inline: 48px;
}

.popup__badge {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--qq-gradient);
	color: var(--wp--preset--color--base);
}

.popup__badge .icon {
	width: 34px;
	height: 34px;
}

/* Listings (index.php) and the empty state */

.listing__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-card__image {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--qq-radius-card);
}

.entry-card__title {
	margin-top: 16px;
	font-size: var(--wp--preset--font-size--x-large);
}

.entry-card__title a {
	color: inherit;
	text-decoration: none;
}

.entry-card__text {
	margin-top: 10px;
}

.listing__empty {
	display: grid;
	gap: 20px;
	justify-items: center;
	text-align: center;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 50px;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 12px;
	border: 1px solid var(--qq-line);
	border-radius: var(--qq-radius-pill);
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	border-color: transparent;
	background: var(--qq-gradient);
	color: var(--wp--preset--color--base);
}

/* 404 */

.not-found__inner {
	display: grid;
	justify-items: center;
	text-align: center;
}

.not-found__code {
	background: var(--qq-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(120px, 18vw, 220px);
	font-weight: 700;
	letter-spacing: -0.06em;
	line-height: 1;
}

.not-found__title {
	margin-top: 12px;
	font-size: var(--wp--preset--font-size--xx-large);
	letter-spacing: -0.05em;
}

.not-found__text {
	max-width: 520px;
	margin-top: 16px;
}

.not-found__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 32px;
}
