/*
Theme Name: El Duende
Template: twentytwentyfive
Description: Shared block theme for elduendetemacho.com (bar, lodge, art). Dark, brass and serif. Each site sets the option "elduende_site" to bar, lodge or art to get its own patterns.
Version: 2.8.2
Requires at least: 6.7
Text Domain: elduende
*/

:root {
	--ed-header-h: 96px; --ed-ease: cubic-bezier(.2, .7, .1, 1);
	/* Metallic gold, matched to the Te Macho badge and the San Blas sign. */
	--ed-gold: linear-gradient(105deg, #9C7424 0%, #E9C46A 28%, #FBE7A6 46%, #D4A63C 62%, #F2D58C 80%, #A87F2A 100%);
}

body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); }

/* Film grain over the whole page. */
body::after {
	content: ""; position: fixed; inset: -50%; z-index: 9999; pointer-events: none; opacity: .055;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: ed-grain 1.2s steps(6) infinite;
}
@keyframes ed-grain { 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }

/* Header: fixed over the hero, solid after the first 120px of scroll. */
.ed-header {
	position: fixed; inset: 0 0 auto; z-index: 100;
	border-bottom: 1px solid transparent;
	animation: ed-solid linear both; animation-timeline: scroll(root); animation-range: 0 120px;
}
@keyframes ed-solid {
	to { background: rgba(11, 9, 8, .9); border-color: rgba(212, 166, 60, .18); backdrop-filter: blur(14px); padding-block: 12px; }
}
/* A backdrop-filter on the header traps the fixed mobile menu inside the header box: drop it while the menu is open. */
.ed-header:has(.wp-block-navigation__responsive-container.is-menu-open) { animation: none; background: none; backdrop-filter: none; }
body:has(.wp-block-post-content > .wp-block-cover:first-child, .wp-block-post-content > .ed-hero:first-child, .ed-page-hero) { --ed-top: 0px; }
.wp-site-blocks { padding-top: var(--ed-top, var(--ed-header-h)); }
.admin-bar .ed-header { top: 32px; }
.ed-header .ed-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.ed-header .ed-header__brand { text-align: center; gap: 8px; }
.ed-header .ed-header__brand .wp-block-site-title { text-indent: .32em; }
.ed-header .ed-header__end { justify-content: flex-end; }
/* ES · EN switch (the plugin adds it when the site has two languages). */
.ed-lang { display: flex; align-items: center; gap: 10px; margin-right: 22px; font: 500 11px/1 var(--wp--preset--font-family--body, sans-serif); letter-spacing: .24em; text-transform: uppercase; }
.ed-lang > * + *::before { content: "·"; margin-right: 10px; opacity: .5; color: var(--wp--preset--color--contrast); }
.ed-lang__on { color: var(--wp--preset--color--accent-1); }
.ed-lang__to { color: var(--wp--preset--color--contrast); text-decoration: none; opacity: .7; transition: opacity .3s; }
.ed-lang__to:hover, .ed-lang__to:focus-visible { opacity: 1; }

/* Frequent questions (home pages) */
.ed-faq { padding: var(--wp--preset--spacing--60) clamp(20px, 5vw, 72px); }
.ed-faq__in { max-width: 780px; margin: 0 auto; }
.ed-faq h2 { margin: .3em 0 1.1em; }
.ed-faq__q { border-top: 1px solid rgba(201, 162, 75, .28); }
.ed-faq__q:last-child { border-bottom: 1px solid rgba(201, 162, 75, .28); }
.ed-faq__q summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font-family: var(--wp--preset--font-family--display, serif); font-size: clamp(18px, 2vw, 23px); line-height: 1.25; }
.ed-faq__q summary::-webkit-details-marker { display: none; }
.ed-faq__q summary::after { content: "+"; flex: none; color: var(--wp--preset--color--accent-1); font-family: var(--wp--preset--font-family--body, sans-serif); }
.ed-faq__q[open] summary::after { content: "\2013"; }
.ed-faq__q p { margin: 0 0 22px; max-width: 62ch; color: rgba(237, 230, 218, .75); }
@media (max-width: 781px) { .ed-lang { margin: 0 0 0 16px; } }
.ed-header .wp-block-button__link { padding: 13px 22px; }
.ed-header .wp-block-site-tagline { white-space: nowrap; }
.ed-header .wp-block-navigation-item { white-space: nowrap; }
/* Six menu items do not fit beside the centred brand below 1200px: use the menu button. */
@media (max-width: 1280px) {
	.ed-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ed-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (max-width: 900px) {
	.ed-header .ed-header__bar { grid-template-columns: auto 1fr auto; }
	.ed-header .ed-header__brand { text-align: left; order: -1; }
	.ed-header .ed-header__brand .wp-block-site-title { font-size: 19px !important; letter-spacing: .22em; text-indent: 0; }
	.ed-header .ed-header__brand .wp-block-site-tagline { display: none; }
	.ed-header .ed-header__end .wp-block-buttons { display: none; }
	.ed-header .ed-header__bar > .wp-block-navigation { justify-self: end; }
}
.wp-block-navigation__responsive-container.is-menu-open { padding-top: 90px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--display); font-size: 32px; letter-spacing: 0; text-transform: none; }

/* Small wide-spaced label above a heading. */
.is-style-eyebrow {
	font-size: 12px !important; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; line-height: 1;
	color: var(--wp--preset--color--accent-1);
}
.is-style-eyebrow.has-text-align-center::before,
.is-style-eyebrow.has-text-align-center::after { content: ""; display: inline-block; width: 56px; height: 1px; background: currentColor; vertical-align: middle; margin: 0 16px; }

/* Italic brass words inside headings: select the words and set them in italics. */
h1 em, h2 em, h3 em, .wp-block-heading em,
.ed-header .wp-block-site-title a, .wp-block-site-title.is-style-gold a {
	color: var(--wp--preset--color--accent-2);
	background: var(--ed-gold); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	padding-inline-end: .06em;
}

/* Primary button: solid gold with dark text. Ghost and text-link styles stay as outlines. */
.wp-block-button:not(.is-style-ghost):not(.is-style-text-link) .wp-block-button__link {
	background: var(--ed-gold); background-size: 200% 100%; background-position: 0 0;
	color: var(--wp--preset--color--base); border-color: transparent; font-weight: 600;
	transition: background-position .8s var(--ed-ease), box-shadow .5s;
}
.wp-block-button:not(.is-style-ghost):not(.is-style-text-link) .wp-block-button__link:hover,
.wp-block-button:not(.is-style-ghost):not(.is-style-text-link) .wp-block-button__link:focus {
	background: var(--ed-gold); background-size: 200% 100%; background-position: 100% 0; color: var(--wp--preset--color--base);
	box-shadow: 0 10px 34px -12px rgba(212, 166, 60, .6);
}

/* Text link with a thin underline. */
.is-style-text-link .wp-block-button__link { border: 0; border-bottom: 1px solid var(--wp--preset--color--accent-6); padding: 16px 0 8px; color: var(--wp--preset--color--accent-1); background: none !important; }
.is-style-text-link .wp-block-button__link:hover { border-color: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--accent-1); }
.is-style-ghost .wp-block-button__link { border-color: rgba(237, 230, 218, .35); }
.is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.wp-element-button, .wp-block-button__link { transition: background .5s, color .5s, border-color .5s; }

/* Image with an offset brass frame. */
.is-style-framed { position: relative; isolation: isolate; }
.is-style-framed img { width: 100%; }
.is-style-framed::after { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1px solid var(--wp--preset--color--accent-6); z-index: -1; }
@media (max-width: 781px) { .is-style-framed::after { inset: 12px -12px -12px 12px; } }

/* Covers: slow zoom on the image, thin frame inside the hero. */
.wp-block-cover.is-style-hero .wp-block-cover__image-background,
.ed-triptych img { animation: ed-drift 16s ease-in-out infinite alternate; transform: scale(1.12); }
@keyframes ed-drift { to { transform: scale(1.02) translate(-2.5%, -3%); } }
.wp-block-cover.is-style-hero { padding-top: calc(var(--ed-header-h) + 24px) !important; }
.wp-block-cover.is-style-hero::after {
	content: ""; position: absolute; inset: calc(var(--ed-header-h) + 12px) clamp(18px, 4.5vw, 64px) clamp(18px, 4.5vw, 64px); border: 1px solid var(--wp--preset--color--accent-6); pointer-events: none; z-index: 1;
}
.wp-block-cover.is-style-hero .wp-block-cover__inner-container { z-index: 2; }
.wp-block-cover.is-style-hero h1 { margin-block: 28px 24px; }

/* Bar hero: three photos side by side behind the text (group .ed-hero with a group .ed-triptych of three images). */
.ed-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding-top: var(--ed-header-h) !important; }
.ed-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(11, 9, 8, .82), rgba(11, 9, 8, .35) 70%), linear-gradient(180deg, rgba(11, 9, 8, .7), transparent 22%, transparent 70%, #0B0908); }
.ed-hero::after { content: ""; position: absolute; inset: calc(var(--ed-header-h) + 12px) clamp(18px, 4.5vw, 64px) clamp(18px, 4.5vw, 64px); border: 1px solid var(--wp--preset--color--accent-6); pointer-events: none; z-index: 1; }
.ed-hero > .ed-triptych { position: absolute; inset: 0; z-index: 0; display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 !important; max-width: none !important; }
.ed-hero > *:not(.ed-triptych) { position: relative; z-index: 2; }
.ed-triptych figure { position: relative; overflow: hidden; margin: 0 !important; height: 100%; }
.ed-triptych figure + figure { border-left: 1px solid var(--wp--preset--color--accent-6); }
.ed-triptych img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; }
.ed-triptych figure:nth-child(2) img { animation-delay: -7s; }
.ed-triptych figure:nth-child(3) img { animation-delay: -14s; }
.ed-hero h1 { margin-block: 28px 24px; }
@media (max-width: 781px) { .ed-hero > .ed-triptych { grid-template-columns: 1fr; } .ed-triptych figure:not(:nth-child(2)) { display: none; } }

/* Photo focus for cropped images (class on the image block). */
.ed-focus-18 img { object-position: 18% 50%; }
.ed-focus-48 img { object-position: 48% 50%; }
.ed-focus-62 img { object-position: 62% 50%; }

/* Big outlined number behind a heading. */
.ed-num { position: relative; isolation: isolate; }
.ed-num::before {
	content: "N°1"; position: absolute; top: -.42em; right: -.05em; z-index: -1;
	font: italic 400 clamp(90px, 12vw, 190px)/.8 var(--wp--preset--font-family--display); color: transparent; -webkit-text-stroke: 1px var(--wp--preset--color--accent-6);
}

/* Three facts in a row between two thin lines. */
.is-style-notes { border-block: 1px solid rgba(212, 166, 60, .2); padding-block: 28px; }
.is-style-notes p { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--wp--preset--color--accent-4); line-height: 1.6; }
.is-style-notes p strong { display: block; font: 400 22px/1.2 var(--wp--preset--font-family--display); letter-spacing: 0; text-transform: none; color: var(--wp--preset--color--contrast); margin-bottom: 6px; }

/* Cards: the middle card sits lower on wide screens. */
@media (min-width: 782px) { .is-style-staggered > .wp-block-column:nth-child(2) { margin-top: 90px; } }
.is-style-staggered .wp-block-image { overflow: hidden; }
.is-style-staggered .wp-block-image img { transition: transform 1.6s var(--ed-ease), filter 1s; filter: saturate(.9); }
.is-style-staggered .wp-block-column:hover .wp-block-image img { transform: scale(1.06); filter: saturate(1.05); }

/* Panel with a thin border, used for the visit block. */
.is-style-panel { border: 1px solid rgba(212, 166, 60, .2); }

/* Dark maps. */
.ed-map iframe { display: block; width: 100%; min-height: 460px; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.85) sepia(.25); }

/* Fade in as each block enters the screen (browsers without support show it at once). */
@supports (animation-timeline: view()) {
	.wp-block-post-content > *:not(:first-child) > *,
	.ed-reveal {
		animation: ed-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%;
	}
}
@keyframes ed-rise { from { opacity: 0; transform: translateY(60px); } }
.wp-block-post-content { overflow-x: clip; } /* Columns slide in from the sides without a sideways scroll. */

/* Motion as the page scrolls (Chrome, Edge, Safari 26; other browsers show the page still).
   Scroll-driven, transform and opacity only, no script. "backwards" fill: after its range an element
   has no animation left, so the browser drops its extra layer. */
@supports (animation-timeline: view()) {
	/* Photos settle into their frame. */
	.wp-block-post-content .wp-block-image:not(.ed-triptych *):not(.is-style-framed):not(.ed-vip__badge) { overflow: hidden; }
	.wp-block-post-content .wp-block-image:not(.ed-triptych *):not(.is-style-framed):not(.ed-vip__badge) img {
		animation: ed-settle linear backwards; animation-timeline: view(); animation-range: entry 0% cover 45%;
	}
	/* Framed photo: the gold frame slides out from behind the photo. */
	.is-style-framed::after { animation: ed-frame linear backwards; animation-timeline: view(); animation-range: entry 20% cover 50%; }
	/* Cards and the three facts arrive one after another. */
	.is-style-staggered > .wp-block-column, .is-style-notes > .wp-block-column {
		animation: ed-rise linear backwards; animation-timeline: view(); animation-range: entry 0% entry 60%;
	}
	.is-style-staggered > .wp-block-column:nth-child(2), .is-style-notes > .wp-block-column:nth-child(2) { animation-range: entry 15% entry 75%; }
	.is-style-staggered > .wp-block-column:nth-child(3), .is-style-notes > .wp-block-column:nth-child(3) { animation-range: entry 30% entry 90%; }
	/* The small gold lines beside a centred eyebrow draw outwards. */
	.is-style-eyebrow.has-text-align-center::before { transform-origin: right; }
	.is-style-eyebrow.has-text-align-center::after { transform-origin: left; }
	.is-style-eyebrow.has-text-align-center::before, .is-style-eyebrow.has-text-align-center::after {
		animation: ed-line linear backwards; animation-timeline: view(); animation-range: entry 30% cover 40%;
	}
	/* Wide photo bands move a little slower than the page. */
	.wp-block-post-content .wp-block-cover:not(.is-style-hero) .wp-block-cover__image-background {
		animation: ed-depth linear both; animation-timeline: view(); animation-range: cover;
	}
	/* Side-by-side columns (photo + text) come in from their own side. */
	.wp-block-post-content .wp-block-columns:not(.is-style-staggered):not(.is-style-notes):not(.is-style-panel) > .wp-block-column:first-child {
		animation: ed-from-left linear backwards; animation-timeline: view(); animation-range: entry 0% cover 35%;
	}
	.wp-block-post-content .wp-block-columns:not(.is-style-staggered):not(.is-style-notes):not(.is-style-panel) > .wp-block-column:nth-child(2) {
		animation: ed-from-right linear backwards; animation-timeline: view(); animation-range: entry 10% cover 40%;
	}
	/* Section headings rise a beat after their section. */
	.wp-block-post-content h2 { animation: ed-rise linear backwards; animation-timeline: view(); animation-range: entry 20% cover 30%; }
	/* The VIP badge turns into place. */
	.ed-vip__badge img { animation: ed-turn linear backwards; animation-timeline: view(); animation-range: entry 10% cover 45%; }
}
@keyframes ed-settle { from { transform: scale(1.3); opacity: 0; } }
@keyframes ed-frame { from { transform: translate(-40px, -40px); opacity: 0; } }
@keyframes ed-line { from { transform: scaleX(0); } }
@keyframes ed-from-left { from { transform: translateX(-90px); opacity: 0; } }
@keyframes ed-from-right { from { transform: translateX(90px); opacity: 0; } }
@keyframes ed-depth { from { transform: translateY(-12%) scale(1.28); } to { transform: translateY(12%) scale(1.28); } }
@keyframes ed-turn { from { transform: rotate(-35deg) scale(.6); opacity: 0; } }

/* Hero: on load the photos open one after another, the frame draws in, then the text rises line by line.
   One-shot animations (they end after about 2 s). */
.ed-triptych figure { animation: ed-open 1.5s var(--ed-ease) backwards; }
.ed-triptych figure:nth-child(2) { animation-delay: .18s; }
.ed-triptych figure:nth-child(3) { animation-delay: .36s; }
.ed-hero::after, .wp-block-cover.is-style-hero::after { animation: ed-frame-in 1.6s .5s var(--ed-ease) backwards; }
.ed-hero > :not(.ed-triptych) > *, .wp-block-cover.is-style-hero .wp-block-cover__inner-container > * { animation: ed-hero-in 1.1s var(--ed-ease) backwards; }
.ed-hero > :not(.ed-triptych) > :nth-child(1), .wp-block-cover.is-style-hero .wp-block-cover__inner-container > :nth-child(1) { animation-delay: .6s; }
.ed-hero > :not(.ed-triptych) > :nth-child(2), .wp-block-cover.is-style-hero .wp-block-cover__inner-container > :nth-child(2) { animation-delay: .78s; }
.ed-hero > :not(.ed-triptych) > :nth-child(3), .wp-block-cover.is-style-hero .wp-block-cover__inner-container > :nth-child(3) { animation-delay: .96s; }
.ed-hero > :not(.ed-triptych) > :nth-child(n+4), .wp-block-cover.is-style-hero .wp-block-cover__inner-container > :nth-child(n+4) { animation-delay: 1.14s; }
/* A light passes once over the gold word of the hero title. */
.ed-hero h1 em, .wp-block-cover.is-style-hero h1 em { animation: ed-sheen 2.4s 1.3s var(--ed-ease) backwards; }
@keyframes ed-open { from { clip-path: inset(100% 0 0 0); } }
@keyframes ed-frame-in { from { opacity: 0; transform: scale(.96); } }
@keyframes ed-hero-in { from { opacity: 0; transform: translateY(34px); } }
@keyframes ed-sheen { from { background-position: 100% 0; } }

@supports (animation-timeline: view()) {
	/* Hero scrolls away: the text lifts and fades, the photos sink slower than the page. */
	.ed-hero > :not(.ed-triptych), .wp-block-cover.is-style-hero .wp-block-cover__inner-container {
		animation: ed-hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 90%;
	}
	.ed-hero > .ed-triptych { animation: ed-sink linear both; animation-timeline: view(); animation-range: exit; }
	/* Big outlined "N°1" glides against the scroll. */
	.ed-num::before { animation: ed-glide linear both; animation-timeline: view(); animation-range: cover; }
	/* Gold words in section titles catch the light as they pass. */
	.wp-block-post-content h2 em { animation: ed-sheen linear both; animation-timeline: view(); animation-range: entry 20% exit 20%; }
	/* Left-aligned eyebrows slide in. */
	.wp-block-post-content .is-style-eyebrow:not(.has-text-align-center) { animation: ed-from-left linear backwards; animation-timeline: view(); animation-range: entry 10% cover 30%; }
}
@keyframes ed-hero-out { to { opacity: 0; transform: translateY(-90px); } }
@keyframes ed-sink { to { transform: translateY(30%); } }
@keyframes ed-glide { from { transform: translateX(70px); } to { transform: translateX(-40px); } }

/* Lightbox for page photos (assets/lightbox.js), same look as the event flyer. */
.ed-zoom { cursor: zoom-in; }
.ed-zoom:focus-visible { outline: 1px solid var(--wp--preset--color--accent-1); outline-offset: 4px; }
.ed-lightbox { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px 18px 24px; border: 1px solid rgba(232, 174, 44, .45); background: #0b0908; color: var(--wp--preset--color--contrast); text-align: center; overflow: auto; }
.ed-lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.ed-lightbox[open] { animation: ed-lightbox-in .45s var(--ed-ease); }
@keyframes ed-lightbox-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.ed-lightbox__img { display: block; width: 100%; height: auto; max-height: 72dvh; object-fit: contain; }
.ed-lightbox__close { position: absolute; top: 6px; right: 8px; z-index: 1; width: 40px; height: 40px; border: 0; background: rgba(11, 9, 8, .7); color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.ed-lightbox__title { margin: 18px 0 0; font: 400 26px/1.15 var(--wp--preset--font-family--display); }
.ed-lightbox__text { margin: 8px 0 0; font-size: 14px; color: var(--wp--preset--color--accent-4); }

/* Cards lift a little under the pointer. */
@media (hover: hover) {
	.is-style-staggered > .wp-block-column { transition: translate .6s var(--ed-ease); }
	.is-style-staggered > .wp-block-column:hover { translate: 0 -10px; }
	/* Photos that open in the lightbox grow a little and brighten under the pointer (the figure clips them). */
	.ed-zoom { transition: scale .9s var(--ed-ease), filter .6s; }
	.wp-block-post-content .wp-block-image:not(.is-style-framed) img.ed-zoom:hover { scale: 1.07; filter: brightness(1.12) saturate(1.05); }
	.is-style-framed .ed-zoom:hover { filter: brightness(1.12); }
}

/* Forms (Fluent Forms) on the dark background. */
.fluentform .ff-el-form-control {
	background: transparent !important; border: 0 !important; border-bottom: 1px solid rgba(237, 230, 218, .25) !important; border-radius: 0 !important;
	color: var(--wp--preset--color--contrast) !important; font-family: inherit; padding-inline: 0 !important;
}
.fluentform .ff-el-form-control:focus { border-color: var(--wp--preset--color--accent-1) !important; box-shadow: none !important; }
.fluentform .ff-el-input--label label { font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--wp--preset--color--accent-4); }
.fluentform .ff-btn-submit {
	background: transparent !important; border: 1px solid var(--wp--preset--color--accent-1) !important; border-radius: 0 !important; color: var(--wp--preset--color--contrast) !important;
	font: 500 11px/1 var(--wp--preset--font-family--body) !important; letter-spacing: .32em !important; text-transform: uppercase; padding: 17px 30px !important;
}
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--accent-1) !important; color: var(--wp--preset--color--base) !important; }

/* Floating WhatsApp button. */
.ed-wa {
	position: fixed; right: 26px; bottom: 26px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
	border: 1px solid var(--wp--preset--color--accent-1); display: grid; place-items: center; background: rgba(11, 9, 8, .7); backdrop-filter: blur(8px); transition: background .4s;
}
.ed-wa svg { width: 22px; height: 22px; fill: var(--wp--preset--color--accent-1); transition: fill .4s; }
.ed-wa:hover { background: var(--wp--preset--color--accent-1); }
@media (max-width: 600px) { .ed-wa { right: max(12px, env(safe-area-inset-right, 0px)); } }
.ed-wa:hover svg { fill: var(--wp--preset--color--base); }

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

/* Bar: the Te Macho brand. Pure black and the bright gold of the badge. */
body.ed-site-bar {
	--wp--preset--color--base: #000;
	--wp--preset--color--accent-1: #E8AE2C;
	--wp--preset--color--accent-2: #FFD970;
	--wp--preset--color--accent-3: #0A0A0A;
	--wp--preset--color--accent-5: #141414;
	--wp--preset--color--accent-6: rgba(232, 174, 44, .42);
	--ed-gold: linear-gradient(105deg, #B8860B 0%, #F0B92E 30%, #FFE08A 48%, #E8AE2C 64%, #FFD25C 82%, #C08A16 100%);
	background: #000;
}
body.ed-site-bar h2 em, body.ed-site-bar h1 em { font-weight: 500; }

/* Logo in the header (set per site in the Site Editor or Customizer). */
.ed-header .wp-block-site-logo { margin: 0 auto 4px; line-height: 0; }
.ed-header .wp-block-site-logo img { width: 64px; height: auto; border-radius: 50%; }
@media (max-width: 900px) {
	.ed-header .ed-header__brand:has(.wp-block-site-logo) { flex-direction: row; align-items: center; gap: 12px; }
	.ed-header .wp-block-site-logo { margin: 0; }
	.ed-header .wp-block-site-logo img { width: 42px; }
}

/* Te Macho Vip section */
.ed-vip__badge img { width: min(320px, 70vw); height: auto; border-radius: 50%; box-shadow: 0 0 80px rgba(232, 174, 44, .18); }
.ed-footer-logo { margin-bottom: 14px; line-height: 0; }
.ed-footer-logo img { width: 110px; height: auto; }

/* Badge beside the name, not above it, so the header keeps its height. */
.ed-header .ed-header__brand:has(.wp-block-site-logo) { display: grid; grid-template-columns: auto auto; column-gap: 16px; row-gap: 8px; align-items: center; text-align: left; }
.ed-header .ed-header__brand .wp-block-site-logo { grid-row: 1 / 3; margin: 0; }
.ed-header .ed-header__brand .wp-block-site-logo img { width: 56px; }
.ed-header .ed-header__brand:has(.wp-block-site-logo) .wp-block-site-title { align-self: end; text-align: left; text-indent: 0; }
.ed-header .ed-header__brand:has(.wp-block-site-logo) .wp-block-site-tagline { align-self: start; text-align: left; }
@media (max-width: 900px) {
	.ed-header .ed-header__brand .wp-block-site-logo img { width: 42px; }
	/* The tagline is hidden here: one row, title centred on the badge. */
	.ed-header .ed-header__brand .wp-block-site-logo { grid-row: auto; }
	.ed-header .ed-header__brand:has(.wp-block-site-logo) .wp-block-site-title { align-self: center; }
}
/* WordPress gives every block after the first a top margin; in the header grid it pushes the brand down. */
.ed-header .ed-header__bar > * { margin-block: 0; }

/* Desktop: name on the left, menu in the centre, button on the right. */
@media (min-width: 1281px) {
	.ed-header .ed-header__bar { grid-template-columns: auto 1fr auto; column-gap: 40px; }
	.ed-header .ed-header__brand { order: -1; }
	.ed-header .ed-header__bar > .wp-block-navigation { justify-self: center; }
}
@media (max-width: 600px) { .is-style-eyebrow.has-text-align-center::before, .is-style-eyebrow.has-text-align-center::after { width: 22px; margin: 0 10px; } .is-style-eyebrow { letter-spacing: .3em; } }

/* Group badge beside the copyright line. */
.ed-group-badge { width: 30px; height: 30px; vertical-align: middle; margin-right: 10px; }

/* San Blas (lodge site): the deep green and gold of the El Duende San Blas brand. */
body.ed-site-lodge {
	--wp--preset--color--base: #08130D;
	--wp--preset--color--accent-1: #C9A04A;
	--wp--preset--color--accent-2: #EAD397;
	--wp--preset--color--accent-3: #0D1E14;
	--wp--preset--color--accent-5: #13291B;
	--wp--preset--color--accent-6: rgba(201, 160, 74, .36);
	--ed-gold: linear-gradient(105deg, #8E6A22 0%, #C9A04A 30%, #F3E1A6 48%, #C9A04A 64%, #E6CB82 82%, #94702A 100%);
}
body.ed-site-lodge .ed-header .wp-block-site-logo img { border-radius: 50%; }

/* ---------- 2.5.0: readability, access and modern details ---------- */

/* Native page-to-page fade between pages of the same site (browsers without support load as before). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

html {
	color-scheme: dark;
	accent-color: var(--wp--preset--color--accent-1);
	scrollbar-color: var(--wp--preset--color--accent-6) transparent;
	/* Anchor links (#te-macho, #contacto) stop below the fixed header, not under it. */
	scroll-padding-top: calc(var(--ed-header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Even line lengths: no single word alone on the last line of a heading or paragraph. */
h1, h2, h3, h4, .wp-block-heading, .wp-block-post-title, blockquote p { text-wrap: balance; }
p, li, figcaption, .ed-carta__desc { text-wrap: pretty; }

/* Keyboard focus: a gold ring on every link, button and field (the parent theme draws it near-black). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1) !important; outline-offset: 3px; border-radius: 2px;
}
.skip-link:focus { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); padding: 12px 18px; z-index: 1000; }

/* Touch: the grain stays, but still (saves battery on phones). */
@media (pointer: coarse) { body::after { animation: none; } }

/* Larger hit area for nav links (44 px rule) without a visual change. */
.ed-header .wp-block-navigation-item__content { padding-block: 12px; }

/* Mobile menu: items rise in one after another; a thin gold line under the open menu header. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { animation: ed-menu-in .7s var(--ed-ease) both; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: .06s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: .12s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: .18s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: .24s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(n+6) { animation-delay: .3s; }
@keyframes ed-menu-in { from { opacity: 0; transform: translateY(22px); } }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-1); }

/* Images: a soft gold sheen passes over the framed photo on hover (pointer devices only). */
@media (hover: hover) {
	.is-style-framed img { transition: filter .8s var(--ed-ease); }
	.is-style-framed:hover img { filter: brightness(1.06) saturate(1.06); }
}

/* Phones held sideways: the hero must not hide the buttons, the mascot steps aside. */
@media (max-height: 480px) and (orientation: landscape) {
	.ed-hero, .wp-block-cover.is-style-hero { min-height: auto !important; padding-bottom: 48px !important; }
	.ed-hero h1, .wp-block-cover.is-style-hero h1 { font-size: clamp(34px, 9vh, 56px) !important; margin-block: 12px !important; }
	.ed-mascot { display: none; }
}

/* Footer: the legal link (Libro de Reclamaciones). */
.ed-legal a { display: inline-flex; align-items: center; gap: 8px; }
.ed-legal svg { width: 16px; height: 16px; fill: currentColor; }

/* 404 page. */
.ed-404 { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.ed-404__num { font: italic 400 clamp(120px, 28vw, 340px)/.8 var(--wp--preset--font-family--display); color: transparent; -webkit-text-stroke: 1px var(--wp--preset--color--accent-6); margin: 0; }
.ed-404 .wp-block-search__input { background: transparent; color: var(--wp--preset--color--contrast); border: 0; border-bottom: 1px solid rgba(237, 230, 218, .3); border-radius: 0; padding: 12px 0; }
.ed-404 .wp-block-search__inside-wrapper { border: 0; gap: 12px; }
.ed-404 > * { min-width: 0; width: 100%; }
.ed-404 .wp-block-search { width: min(440px, 100%); margin-inline: auto; }
.ed-404 .wp-block-search__inside-wrapper { width: 100% !important; }
.ed-404 .wp-block-search__input { min-width: 0; flex: 1; }

/* Print: a clean carta and contact page on paper. */
@media print {
	body::after, .ed-header, .ed-wa, .ed-mascot, footer { display: none !important; }
	body, .wp-site-blocks { background: #fff !important; color: #000 !important; padding: 0 !important; }
	h1, h2, h3, .ed-carta__name, .ed-carta__price { color: #000 !important; -webkit-text-fill-color: #000 !important; }
	.wp-block-post-content > * > * { animation: none !important; }
}

/* Footer: compact, left-aligned editorial grid. On wide screens the right gutter stays open for the mascot and the WhatsApp button. */
.ed-foot { --gut: clamp(20px, 5vw, 72px); margin-top: 0 !important; border-top: 1px solid rgba(194, 160, 106, .15); padding: clamp(48px, 6vw, 72px) var(--gut) 24px; }
.ed-foot > * + * { margin-block-start: 0; }
.ed-foot__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(40px, 6vw, 96px); align-items: start; }
.ed-foot__brand { display: flex; align-items: center; gap: 18px; }
.ed-foot__brand .ed-footer-logo { margin: 0; }
.ed-foot__brand .ed-footer-logo img { width: 64px; }
.ed-foot__name > * { margin: 0; text-align: left; }
.ed-foot__name .wp-block-site-title { font-size: 30px; line-height: 1.1; }
@media (max-width: 600px) { .ed-foot__name .wp-block-site-title { font-size: clamp(17px, 5.6vw, 24px); text-wrap: balance; } }
.ed-foot__name .wp-block-site-tagline { margin-top: 6px; }
.ed-foot__col > * { margin: 0; }
.ed-foot__label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); margin-bottom: 14px !important; }
.ed-foot__site a { display: flex; align-items: baseline; gap: 12px; padding-block: 5px; text-decoration: none; font-family: var(--wp--preset--font-family--display); font-size: 22px; line-height: 1.2; color: var(--wp--preset--color--contrast); transition: color .3s; }
.ed-foot__site small { font-family: var(--wp--preset--font-family--body); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--wp--preset--color--accent-4); }
.ed-foot__site a:hover { color: var(--wp--preset--color--accent-1); }
@media (min-width: 1361px) { .ed-foot__grid:has(.ed-foot__col--nav) { grid-template-columns: minmax(0, 1fr) auto auto auto; } }
@media (min-width: 901px) and (max-width: 1360px) { .ed-foot__grid:has(.ed-foot__col--nav) { grid-template-columns: repeat(3, auto); justify-content: space-between; } .ed-foot__grid:has(.ed-foot__col--nav) .ed-foot__brand { grid-column: 1 / -1; } }
.ed-foot__links a, .ed-foot__nav a { display: block; padding-block: 6px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; }
.ed-foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 28px; margin-top: clamp(36px, 4vw, 52px) !important; padding-top: 20px; border-top: 1px solid rgba(194, 160, 106, .12); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--wp--preset--color--accent-4); }
.ed-foot__bar p { margin: 0; display: flex; align-items: center; gap: 10px; }
.ed-foot__bar .ed-legal { gap: 24px; }
.ed-foot__bar a { text-decoration: none; }
@media (min-width: 901px) { .ed-foot { padding-right: max(var(--gut), 220px); } }
@media (max-width: 900px) {
	.ed-foot__grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
	.ed-foot__brand { grid-column: 1 / -1; }
	.ed-foot__bar { flex-direction: column; align-items: flex-start; }
	.ed-foot__site a { flex-direction: column; gap: 4px; }
	.ed-foot__bar .ed-legal { flex-direction: column; align-items: flex-start; gap: 6px; }
}
.ed-foot__bar .ed-group-badge { width: 24px; height: 24px; margin: 0; }

/* ---------- Vivo palette (preview): warmer colours from the "Misión iniciada" ad ----------
   Active only on a page that holds an element with the class ed-vivo, so the other pages keep the gold-on-black look. */
body.ed-site-bar:has(.ed-vivo) {
	--wp--preset--color--base: #1A0C14;
	--wp--preset--color--contrast: #FFF1DE;
	--wp--preset--color--accent-1: #FF7A4D;
	--wp--preset--color--accent-2: #FFC98A;
	--wp--preset--color--accent-3: #24101B;
	--wp--preset--color--accent-4: #D9B9A6;
	--wp--preset--color--accent-5: #301624;
	--wp--preset--color--accent-6: rgba(255, 92, 92, .5);
	--ed-teal: #46D9C2;
	--ed-gold: linear-gradient(105deg, #D9304F 0%, #FF5A4E 26%, #FF9A52 46%, #FFD27A 58%, #FF7A4D 76%, #E2364F 100%);
	background:
		radial-gradient(ellipse 50% 40% at 8% 18%, rgba(255, 150, 60, .16), transparent 70%),
		radial-gradient(ellipse 55% 45% at 92% 55%, rgba(170, 50, 110, .2), transparent 70%),
		#1A0C14 fixed;
}
body:has(.ed-vivo) .is-style-eyebrow { color: var(--ed-teal); }
body:has(.ed-vivo) h1, body:has(.ed-vivo) h2 { text-shadow: 0 0 34px rgba(255, 90, 70, .35); }
body:has(.ed-vivo) h1 em, body:has(.ed-vivo) h2 em { text-shadow: none; filter: drop-shadow(0 0 18px rgba(255, 110, 70, .45)); }
body:has(.ed-vivo) .wp-block-post-content img:not(.ed-vip__badge img) { filter: saturate(1.18) brightness(1.06); }
body:has(.ed-vivo) .ed-hero::before {
	background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(40, 12, 28, .72), rgba(40, 12, 28, .18) 70%), linear-gradient(180deg, rgba(26, 12, 20, .6), transparent 22%, transparent 70%, #1A0C14); }
body:has(.ed-vivo) .ed-hero::after { border-color: rgba(255, 80, 90, .7); box-shadow: 0 0 22px rgba(255, 70, 80, .35), inset 0 0 22px rgba(255, 70, 80, .2); }
body:has(.ed-vivo) .wp-block-button:not(.is-style-ghost):not(.is-style-text-link) .wp-block-button__link { color: #fff; box-shadow: 0 8px 30px -10px rgba(255, 80, 70, .7); }
body:has(.ed-vivo) .is-style-ghost .wp-block-button__link { border-color: rgba(70, 217, 194, .6); color: var(--ed-teal); }
body:has(.ed-vivo) .wp-block-cover .wp-block-cover__background { background-color: #2A0F22 !important; opacity: .55 !important; }
body:has(.ed-vivo) .ed-wa { background: rgba(26, 12, 20, .7); }
