/*
 * Aelia — front-end styles.
 *
 * theme.json owns design tokens and element/block defaults. This file only adds
 * what theme.json can't express: block-style variations, the hero treatment,
 * hairline/meander textures, scroll-reveal, and accessibility primitives.
 *
 * All values reference the theme.json CSS custom properties so there is one
 * source of truth for the palette and scale.
 */

/* ---------------------------------------------------------------------------
 * 1. Accessibility primitives
 * ------------------------------------------------------------------------- */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--marble);
	border-radius: 0 0 4px;
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.skip-link:focus {
	left: 0;
}

/* A consistent, high-visibility focus ring everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--terracotta);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Honour the body line-measure for readable prose. */
.aelia-measure :where(p, li) {
	max-width: var(--wp--custom--measure);
}

/* ---------------------------------------------------------------------------
 * 2. Hairlines, meander texture, separators
 * ------------------------------------------------------------------------- */

.wp-block-separator.is-style-brass-hairline {
	border: none;
	border-top: var(--wp--custom--hairline--brass);
	opacity: 1;
	max-width: 100%;
	margin-block: var(--wp--preset--spacing--40);
}

/* Greek-key / meander motif — used as a quiet texture only, never as chrome. */
.wp-block-separator.is-style-meander {
	border: none;
	height: 16px;
	max-width: 220px;
	opacity: 0.5;
	background-image: url("../images/meander.svg");
	background-repeat: repeat-x;
	background-position: center;
	background-size: auto 16px;
}

.is-style-meander-texture {
	position: relative;
}

.is-style-meander-texture::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("../images/meander.svg");
	background-repeat: repeat;
	background-size: 48px 48px;
}

/* ---------------------------------------------------------------------------
 * 3. Cards & editorial image frame
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-card {
	background: var(--wp--preset--color--marble);
	border: var(--wp--custom--hairline--ink);
	border-radius: var(--wp--custom--radius--card);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
}

.wp-block-image.is-style-editorial-frame img {
	border-radius: var(--wp--custom--radius--card);
}

.wp-block-image.is-style-editorial-frame {
	position: relative;
}

.wp-block-image.is-style-editorial-frame::after {
	content: "";
	position: absolute;
	inset: 10px;
	border: var(--wp--custom--hairline--brass);
	border-radius: var(--wp--custom--radius--small);
	pointer-events: none;
}

/* Consistent media aspect ratios → zero CLS. */
.aelia-ratio-3-2 img,
figure.aelia-ratio-3-2 img {
	aspect-ratio: 3 / 2;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.aelia-ratio-4-5 img {
	aspect-ratio: 4 / 5;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.aelia-ratio-16-9 img {
	aspect-ratio: 16 / 9;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* ---------------------------------------------------------------------------
 * 4. Buttons — variations beyond theme.json
 * ------------------------------------------------------------------------- */

.wp-block-button.is-style-whatsapp .wp-block-button__link {
	background-color: #128c7e;
	color: #fff;
}

.wp-block-button.is-style-whatsapp .wp-block-button__link:hover,
.wp-block-button.is-style-whatsapp .wp-block-button__link:focus {
	background-color: #0c6b5f;
}

/* Checklist (inclusions). */
.wp-block-list.is-style-check {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-check li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.6rem;
}

.wp-block-list.is-style-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 0.7rem;
	height: 0.4rem;
	border-left: 2px solid var(--wp--preset--color--olive);
	border-bottom: 2px solid var(--wp--preset--color--olive);
	transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------------
 * 5. Header / navigation
 * ------------------------------------------------------------------------- */

.aelia-header {
	border-bottom: var(--wp--custom--hairline--brass);
	background: color-mix(
		in srgb,
		var(--wp--preset--color--limestone) 88%,
		transparent
	);
	backdrop-filter: saturate(120%) blur(6px);
	position: sticky;
	top: 0;
	z-index: 50;
}

@supports not (backdrop-filter: blur(6px)) {
	.aelia-header {
		background: var(--wp--preset--color--limestone);
	}
}

/* Language switcher. */
.aelia-language-switcher {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--small);
	list-style: none;
	margin: 0;
	padding: 0;
}

.aelia-language-switcher li {
	margin: 0;
}

.aelia-language-switcher a,
.aelia-language-switcher span {
	text-decoration: none;
	color: var(--wp--preset--color--ink-muted);
	padding: 0.25rem 0.4rem;
	border-radius: 3px;
	display: inline-block;
}

.aelia-language-switcher a:hover,
.aelia-language-switcher a:focus {
	color: var(--wp--preset--color--terracotta);
}

.aelia-language-switcher [aria-current="true"],
.aelia-language-switcher .is-current {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.aelia-language-switcher li + li {
	border-left: var(--wp--custom--hairline--ink);
	padding-left: 0.5rem;
}

/* ---------------------------------------------------------------------------
 * 6. Hero
 * ------------------------------------------------------------------------- */

.aelia-hero {
	position: relative;
	isolation: isolate;
}

.aelia-hero__media img {
	aspect-ratio: 16 / 9;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aelia-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		90deg,
		rgba(42, 39, 36, 0.55) 0%,
		rgba(42, 39, 36, 0.25) 45%,
		rgba(42, 39, 36, 0) 75%
	);
}

.aelia-eyebrow {
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass);
}

/* ---------------------------------------------------------------------------
 * 7. Scroll reveal (progressive, reduced-motion aware)
 * ------------------------------------------------------------------------- */

.aelia-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity var(--wp--custom--transition--slow),
		transform var(--wp--custom--transition--slow);
	will-change: opacity, transform;
}

.aelia-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* No-JS and reduced-motion users always see content. */
.no-js .aelia-reveal {
	opacity: 1;
	transform: none;
}

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

	.aelia-reveal {
		opacity: 1;
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * 8. Journey timeline & map slot blocks
 * ------------------------------------------------------------------------- */

.aelia-journey-day {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--40);
	border-top: var(--wp--custom--hairline--brass);
}

.aelia-journey-day__index {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--brass);
	line-height: 1;
}

.aelia-journey-day__index small {
	display: block;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-muted);
}

.aelia-journey-day__title {
	margin: 0 0 0.5rem;
}

.aelia-map-slot {
	border: var(--wp--custom--hairline--ink);
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
	background: var(--wp--preset--color--marble);
}

.aelia-map-slot__placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	color: var(--wp--preset--color--ink-muted);
	background-image: linear-gradient(
			var(--wp--preset--color--limestone) 1px,
			transparent 1px
		),
		linear-gradient(
			90deg,
			var(--wp--preset--color--limestone) 1px,
			transparent 1px
		);
	background-size: 32px 32px;
	text-align: center;
	padding: var(--wp--preset--spacing--40);
}

.aelia-map-slot iframe {
	display: block;
	width: 100%;
	border: 0;
	aspect-ratio: 16 / 9;
}

/* ---------------------------------------------------------------------------
 * 9. Forms (Fluent Forms styling hooks + native fallbacks)
 * ------------------------------------------------------------------------- */

.aelia-form :where(input, select, textarea) {
	border: var(--wp--custom--hairline--ink);
	border-radius: var(--wp--custom--radius--small);
	padding: 0.7rem 0.9rem;
	font: inherit;
	background: var(--wp--preset--color--marble);
	color: var(--wp--preset--color--ink);
	width: 100%;
}

.aelia-form :where(input, select, textarea):focus {
	border-color: var(--wp--preset--color--aegean);
	outline: 2px solid var(--wp--preset--color--terracotta);
	outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
 * 10. Footer
 * ------------------------------------------------------------------------- */

.aelia-footer {
	background: var(--wp--preset--color--ink);
	color: color-mix(
		in srgb,
		var(--wp--preset--color--marble) 85%,
		transparent
	);
}

.aelia-footer :where(h2, h3, h4) {
	color: var(--wp--preset--color--marble);
}

.aelia-footer a {
	color: color-mix(
		in srgb,
		var(--wp--preset--color--marble) 80%,
		transparent
	);
	text-decoration: none;
}

.aelia-footer a:hover,
.aelia-footer a:focus {
	color: var(--wp--preset--color--brass);
}

.aelia-footer .aelia-language-switcher a,
.aelia-footer .aelia-language-switcher span {
	color: color-mix(
		in srgb,
		var(--wp--preset--color--marble) 70%,
		transparent
	);
}

.aelia-footer .aelia-language-switcher [aria-current="true"] {
	color: var(--wp--preset--color--marble);
}

.aelia-footer .aelia-language-switcher li + li {
	border-left-color: color-mix(
		in srgb,
		var(--wp--preset--color--marble) 25%,
		transparent
	);
}
