/*
 * Mosaic at The Riverfront — what core blocks and theme.json cannot set: the sticky header and its phone layout, the
 * wordmark, the photo mosaics, eyebrows, tile bullets, the hero price line, overlays on small screens and focus rings.
 */

/* Sections sit edge to edge; each one's own padding sets the rhythm. */
:where(.wp-site-blocks) > * + *,
.wp-site-blocks .wp-block-post-content > * {
	margin-block: 0;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* In-page links land right below the sticky header (77px; 104px once the section links wrap to a second row). */
:root {
	--mosaic-header-height: 77px;
}

html {
	scroll-padding-top: calc(var(--mosaic-header-height) + var(--wp-admin--admin-bar--height, 0px));
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Focus: a 3px ring in river teal, amber on the dark bands. */
:where(a, button, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--teal);
	outline-offset: 3px;
}

:where(.mosaic-hero, .mosaic-band, .mosaic-dark) :focus-visible {
	outline-color: var(--wp--preset--color--amber);
}

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

.mosaic-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--position-offset, 0px);
	z-index: 50;
}

.mosaic-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.mosaic-header .mosaic-header__bar {
	min-height: 76px;
}

.mosaic-header__bar > .mosaic-nav {
	margin-left: auto;
}

.mosaic-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 0.25rem;
	text-decoration: none;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.4em;
}

.mosaic-nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--coral);
}

.mosaic-header__cta .wp-block-button__link {
	font-size: 1rem;
	padding: 0.7em 1.3em;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	transition: background-color 0.15s ease;
}

.wp-block-button.is-style-sunset .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--amber-hover);
	color: var(--wp--preset--color--contrast);
}

/* Up to 959px the three section links move to a second row, centred and evenly spaced, under wordmark and button. */
@media (max-width: 959px) {
	:root {
		--mosaic-header-height: 104px;
	}

	.mosaic-header .mosaic-header__bar {
		flex-wrap: wrap;
		gap: 0.25rem 0.75rem;
		min-height: 0;
		padding-top: 0.625rem;
	}

	.mosaic-header__bar > .mosaic-nav {
		order: 3;
		flex-basis: 100%;
		margin-left: 0;
		border-top: 1px solid var(--wp--preset--color--line);
	}

	.mosaic-nav .wp-block-navigation__container {
		width: 100%;
		justify-content: space-around;
		gap: 0;
	}

	.mosaic-header__cta .wp-block-button__link {
		font-size: 0.9375rem;
		padding: 0.6em 1em;
	}
}

/* ---------- Wordmark ---------- */

.mosaic-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.mosaic-wordmark:hover {
	color: var(--wp--preset--color--contrast);
}

.mosaic-wordmark__mark {
	flex: none;
	width: 36px;
	height: 36px;
}

.mosaic-wordmark__text {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1;
}

.mosaic-wordmark__name {
	font-size: 1.625rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.mosaic-wordmark__dot {
	color: var(--wp--preset--color--coral);
	font-size: 1.5rem;
}

.mosaic-wordmark__place {
	color: var(--wp--preset--color--teal);
	font-size: 1.125rem;
	font-style: italic;
}

.mosaic-wordmark--footer .mosaic-wordmark__mark {
	width: 30px;
	height: 30px;
}

.mosaic-wordmark--footer .mosaic-wordmark__name {
	font-size: 1.375rem;
}

/* On phones the wordmark stacks: MOSAIC over "at The Riverfront". */
@media (max-width: 600px) {
	.mosaic-wordmark {
		gap: 0.625rem;
	}

	.mosaic-wordmark__mark {
		width: 32px;
		height: 32px;
	}

	.mosaic-wordmark__text {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.mosaic-wordmark__dot {
		display: none;
	}

	.mosaic-wordmark__name {
		font-size: 1.3125rem;
	}

	.mosaic-wordmark__place {
		font-size: 1rem;
	}
}

/* Small phones (360px): a slightly smaller wordmark keeps it and the button on one row. */
@media (max-width: 400px) {
	.mosaic-wordmark {
		gap: 0.5rem;
	}

	.mosaic-wordmark__mark {
		width: 28px;
		height: 28px;
	}

	.mosaic-wordmark__name {
		font-size: 1.1875rem;
		letter-spacing: 0.14em;
	}
}

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

/* Section eyebrow: small caps label led by a tiny tile mark. */
.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: var(--wp--preset--color--teal);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.3;
	text-transform: uppercase;
}

.is-style-eyebrow::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: url(../images/mosaic-mark.svg) center / contain no-repeat;
}

.is-style-eyebrow + .wp-block-heading {
	margin-block-start: 0.75rem;
}

:where(.mosaic-dark) .is-style-eyebrow {
	color: var(--wp--preset--color--teal-soft);
}

/* Over a photo the eyebrow is sand, for contrast wherever the band's gradient is lightest. */
:where(.mosaic-band) .is-style-eyebrow {
	color: var(--wp--preset--color--base);
}

:where(.mosaic-band, .mosaic-dark) .is-style-eyebrow::before {
	background-image: url(../images/mosaic-mark-light.svg);
}

/* Lists with tile bullets (a small quarter-disc, as in the mark), each item on a hairline, label on its own line. */
.is-style-tiles {
	margin: 0;
	padding: 0;
	list-style: none;
}

.is-style-tiles > li {
	position: relative;
	padding: 1rem 0 1rem 1.75rem;
	border-top: 1px solid var(--wp--preset--color--line);
}

.is-style-tiles > li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.is-style-tiles > li::before {
	content: "";
	position: absolute;
	top: calc(1rem + 0.5lh - 0.3125rem);
	left: 0;
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 0 0.625rem 0 0;
	background: var(--wp--preset--color--coral);
}

.is-style-tiles > li > strong:first-child {
	display: block;
	margin-bottom: 0.125rem;
	font-weight: 700;
}

/* ---------- Photo mosaics ---------- */

/* Rows share one height, so every mosaic on the page keeps the same rhythm; tiles fill their cells. */
.is-style-mosaic {
	grid-auto-rows: clamp(9rem, 4rem + 13vw, 16rem);
}

.is-style-mosaic > .wp-block-image {
	min-height: 0;
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
}

.is-style-mosaic > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The lead tile takes a quarter-circle corner, echoing the tile mark. */
.is-style-mosaic > .wp-block-image:first-child {
	border-top-left-radius: clamp(3rem, 1.5rem + 6vw, 7.5rem);
}

.mosaic-amenity__photo img,
.mosaic-photo img {
	border-radius: 6px;
}

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

.mosaic-split {
	align-items: center;
}

.mosaic-split__end {
	align-self: end;
}

/* Keep a readable measure (about 70 characters) where a split stacks or a card spans the full width. */
.mosaic-split > .wp-block-group,
.mosaic-card p {
	max-width: 42rem;
}

/* Hero: the price line, the lighter link colour and a readable overlay wherever the text spans the photo. */
.mosaic-hero h1 {
	max-width: 13em;
}

.mosaic-price {
	padding-left: 1rem;
	border-left: 3px solid var(--wp--preset--color--amber);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}

.mosaic-price strong {
	color: var(--wp--preset--color--amber);
	font-size: 1.45em;
	font-weight: 600;
	white-space: nowrap;
}

:where(.mosaic-hero, .mosaic-band) a:not(.wp-element-button) {
	color: var(--wp--preset--color--white);
	text-decoration-color: var(--wp--preset--color--amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

@media (max-width: 1024px) {
	.mosaic-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgba(11, 31, 44, 0.84) 0%, rgba(11, 31, 44, 0.74) 55%, rgba(11, 31, 44, 0.9) 100%) !important;
	}
}

/* Residence cards: descriptions in the muted ink under a navy title. */
.mosaic-card p {
	color: var(--wp--preset--color--muted);
}

/* Location columns start on a rule. */
.mosaic-place {
	padding-top: var(--wp--preset--spacing--40);
	border-top: 2px solid var(--wp--preset--color--line);
}

.mosaic-place p {
	color: var(--wp--preset--color--muted);
}

/* Closing band: sand text, amber links, the tile mark above the heading. */
.mosaic-dark a:not(.wp-element-button) {
	color: var(--wp--preset--color--amber);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.mosaic-dark a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--white);
}

.mosaic-closing::before {
	content: "";
	display: block;
	width: 56px;
	height: 56px;
	margin: 0 auto var(--wp--preset--spacing--40);
	background: url(../images/mosaic-mark-light.svg) center / contain no-repeat;
}

.mosaic-address p {
	text-wrap: balance;
}

.mosaic-address p:first-child {
	font-size: 1rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Footer */
.mosaic-footer a:not(.mosaic-wordmark) {
	color: var(--wp--preset--color--teal);
}

.mosaic-footer__legal .wp-block-image {
	flex: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	::before,
	::after {
		transition: none !important;
		animation: none !important;
	}
}
