/* Residence header + overlay menu (replaces Hoteller's top menu). */
:root {
	--ra-ivory: #F7F3EC;
	--ra-linen: #EDE6DA;
	--ra-gold: #AD9B77;
	--ra-graphite: #2A2926;
	--ra-header-top: 0px; /* extra room above the bar (phones: notch / status bar) */
	--ra-header-h: 96px;
	--ra-gutter: clamp(16px, 4vw, 60px);
}

.ra-header, .ra-header *, .ra-overlay, .ra-overlay * { box-sizing: border-box; }
.ra-header {
	position: fixed; inset: 0 0 auto; z-index: 100;
	color: var(--ra-graphite);
	background: rgba(247, 243, 236, 0);
	transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.admin-bar .ra-header { top: 32px; }
.ra-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	height: var(--ra-header-h); padding: var(--ra-header-top) var(--ra-gutter) 0;
}

/* Solid state: inner pages, after scrolling, menu open is handled below */
.ra-header-solid .ra-header,
.ra-header.is-scrolled { background: var(--ra-ivory); color: var(--ra-graphite); box-shadow: 0 1px 0 var(--ra-linen); }
/* Transparent over the hero */
.ra-header-overlay .ra-header:not(.is-scrolled) { color: #fff; }
/* …and stays transparent while the Residence Hero is pinned (html.ra-hero-pinned, set by the widget) */
.ra-hero-pinned .ra-header.is-scrolled { background: transparent; box-shadow: none; color: #fff; }

/* Page scrolling: Hoteller's #perspective is a second scroll area (overflow:auto)
   that fights the window scroll (stuck wheel, extra scroll past the footer).
   We don't use Hoteller's side menu, so make it a normal box; clip sideways
   overflow without creating a scroll container; no bounce past the ends. */
#perspective { overflow: visible !important; }
html, body { overflow-x: clip; }
html { overscroll-behavior-y: none; }

/* Content starts below the fixed header on pages without a hero; the hero
   page starts at the very top (replaces Hoteller's own header spacing). */
body.ra-header-solid #wrapper { padding-top: var(--ra-header-h) !important; }
body.ra-header-overlay #wrapper { padding-top: 0 !important; }

/* Logo */
.ra-header .ra-header__logo { display: flex; align-items: center; color: inherit; text-decoration: none; }
/* Beats Elementor's global link hover (.elementor-kit-N a:hover) */
.ra-header .ra-header__logo:hover,
.ra-header .ra-header__logo:focus { color: inherit; }
.ra-logo { display: block; height: 40px; width: auto; }
.ra-logo-svg { display: block; width: auto; height: 38px; }
.ra-logo--light { display: none; }
.ra-header-overlay .ra-header:not(.is-scrolled) .has-light-logo .ra-logo--dark,
.ra-menu-open .has-light-logo .ra-logo--dark { display: none; }
.ra-header-overlay .ra-header:not(.is-scrolled) .has-light-logo .ra-logo--light,
.ra-menu-open .has-light-logo .ra-logo--light { display: block; }
.ra-logo-text { font: 300 26px/1 'Saldo', Georgia, serif; letter-spacing: .04em; text-transform: uppercase; }
.ra-logo-text small { display: block; margin-top: 4px; font: 500 10px/1 'Jost', Arial, sans-serif; letter-spacing: .35em; }

/* Main menu */
.ra-header__menu { display: flex; gap: clamp(24px, 3vw, 44px); margin: 0; padding: 0; list-style: none; }
.ra-header .ra-header__menu a {
	position: relative; color: inherit; text-decoration: none;
	font: 500 12px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
}
.ra-header .ra-header__menu a::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s ease;
}
.ra-header .ra-header__menu a:hover,
.ra-header .ra-header__menu a:focus { color: inherit; }
.ra-header .ra-header__menu a:hover::after,
.ra-header .ra-header__menu .current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }

/* Actions */
.ra-header__actions { display: flex; align-items: center; gap: 16px; }
.ra-header .ra-header__cta {
	display: inline-flex; align-items: center; padding: 15px 24px; border-radius: 999px;
	background: var(--ra-gold); color: #fff; text-decoration: none;
	font: 500 11px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
	transition: background-color .3s ease;
}
.ra-header .ra-header__cta:hover { background: var(--ra-graphite); color: #fff; }

/* Doubled class: beats Elementor's global button style (.elementor-kit-N button) */
.ra-header .ra-header__burger.ra-header__burger {
	position: relative; width: 46px; height: 46px; min-width: 0; padding: 0; margin: 0; border-radius: 50%;
	border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer;
	font-size: 0; line-height: 0; box-shadow: none;
	opacity: .9; transition: opacity .3s ease;
}
.ra-header .ra-header__burger.ra-header__burger:hover,
.ra-header .ra-header__burger.ra-header__burger:focus { background: transparent; color: inherit; opacity: 1; }
.ra-header__burger-lines,
.ra-header__burger-lines::before { position: absolute; left: 50%; width: 16px; height: 1px; background: currentColor; transition: transform .4s ease, top .4s ease; }
.ra-header__burger-lines { top: 20px; transform: translateX(-50%); }
.ra-header__burger-lines::before { content: ''; top: 5px; left: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Language switcher: pill like the burger (header colour), list as an ivory card.
   Doubled class: beats Elementor's global button style. */
.ra-lang { position: relative; }
.ra-header .ra-lang__btn.ra-lang__btn {
	display: inline-flex; align-items: center; gap: 8px; height: 46px; min-width: 0; margin: 0; padding: 0 16px 0 18px;
	border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; box-shadow: none; cursor: pointer;
	font: 500 11px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
	opacity: .9; transition: opacity .3s ease;
}
.ra-header .ra-lang__btn.ra-lang__btn:hover,
.ra-header .ra-lang__btn.ra-lang__btn:focus { background: transparent; color: inherit; opacity: 1; }
.ra-lang__chev { width: 6px; height: 6px; margin-top: -3px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform .3s ease, margin .3s ease; }
.ra-lang.is-open .ra-lang__chev { margin-top: 3px; transform: rotate(-135deg); }

.ra-lang__list {
	position: absolute; top: calc(100% + 10px); right: 0; z-index: 2; min-width: 190px; margin: 0; padding: 8px; list-style: none;
	border-radius: 18px; background: var(--ra-ivory); color: var(--ra-graphite);
	box-shadow: 0 18px 40px rgba(42, 41, 38, .16), 0 0 0 1px rgba(42, 41, 38, .06);
	opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease;
}
.ra-lang__list[hidden] { display: block; visibility: hidden; pointer-events: none; }
.ra-lang.is-open .ra-lang__list { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.ra-lang__list li { margin: 0; padding: 0; }
.ra-lang__list li::before { display: none; }
.ra-header .ra-lang__list a {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 11px 14px; border-radius: 12px;
	color: var(--ra-graphite); text-decoration: none; font: 300 15px/1.2 'Jost', Arial, sans-serif;
	transition: background-color .2s ease, color .2s ease;
}
.ra-lang__list small { font: 500 10px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; color: var(--ra-stone-text, #6B675F); }
.ra-header .ra-lang__list a:hover,
.ra-header .ra-lang__list a:focus-visible { background: var(--ra-linen); color: var(--ra-graphite); outline: none; }
.ra-header .ra-lang__list a[aria-current] { color: var(--ra-gold-text, #72664E); font-weight: 400; }
.ra-header .ra-lang__list a[aria-current] small { color: var(--ra-gold-text, #72664E); }

/* Menu open: header sits on top of the overlay in light colours, burger → X */
.ra-menu-open { overflow: hidden; }
.ra-menu-open .ra-header { background: transparent !important; box-shadow: none !important; color: var(--ra-ivory) !important; }
.ra-header__nav { transition: opacity .3s ease, visibility 0s; }
.ra-menu-open .ra-header__nav { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.ra-menu-open .ra-header__burger-lines { top: 22px; transform: translateX(-50%) rotate(45deg); }
.ra-menu-open .ra-header__burger-lines::before { top: 0; transform: rotate(-90deg); }

/* Overlay menu */
.ra-overlay {
	position: fixed; inset: 0; z-index: 99;
	background: var(--ra-graphite); color: var(--ra-ivory);
	clip-path: inset(0 0 100% 0); visibility: hidden;
	transition: clip-path .7s cubic-bezier(.76, 0, .24, 1), visibility 0s linear .7s;
}
.ra-menu-open .ra-overlay { clip-path: inset(0); visibility: visible; transition: clip-path .7s cubic-bezier(.76, 0, .24, 1), visibility 0s; }
.ra-overlay__inner {
	display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: end; gap: 60px;
	height: 100%; padding: calc(var(--ra-header-h) + 40px) var(--ra-gutter) clamp(40px, 6vh, 80px);
	overflow-y: auto;
}
.ra-overlay__menu { margin: 0; padding: 0; list-style: none; counter-reset: ra-menu; }
.ra-overlay__menu li { counter-increment: ra-menu; overflow: hidden; }
.ra-overlay .ra-overlay__menu a {
	display: flex; align-items: baseline; gap: 24px; padding: 6px 0;
	color: var(--ra-ivory); text-decoration: none;
	font: 300 clamp(36px, min(6.4vw, 9vh), 96px)/1.08 'Saldo', Georgia, serif;
	transform: translateY(105%); transition: transform .8s cubic-bezier(.2, .7, .2, 1), color .3s ease;
}
.ra-overlay .ra-overlay__menu a::before {
	content: counter(ra-menu, decimal-leading-zero); font: 500 11px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; color: var(--ra-gold);
}
.ra-overlay .ra-overlay__menu a:hover { color: var(--ra-gold); }
/* Keyboard focus: gold text instead of the browser ring (the line mask would clip it). */
.ra-overlay .ra-overlay__menu a:focus { outline: none; }
.ra-overlay .ra-overlay__menu a:focus-visible { color: var(--ra-gold); }
.ra-menu-open .ra-overlay__menu a { transform: translateY(0); }
.ra-menu-open .ra-overlay__menu li:nth-child(1) a { transition-delay: .25s; }
.ra-menu-open .ra-overlay__menu li:nth-child(2) a { transition-delay: .3s; }
.ra-menu-open .ra-overlay__menu li:nth-child(3) a { transition-delay: .35s; }
.ra-menu-open .ra-overlay__menu li:nth-child(4) a { transition-delay: .4s; }
.ra-menu-open .ra-overlay__menu li:nth-child(5) a { transition-delay: .45s; }
.ra-menu-open .ra-overlay__menu li:nth-child(n+6) a { transition-delay: .5s; }

.ra-overlay__aside { display: grid; gap: 10px; justify-items: start; opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.ra-menu-open .ra-overlay__aside { opacity: 1; transform: none; transition-delay: .45s; }
.ra-overlay__label { margin: 0 0 6px; font: 500 11px/1 'Jost', Arial, sans-serif; letter-spacing: .25em; text-transform: uppercase; color: var(--ra-gold); }
.ra-overlay .ra-overlay__contact { color: var(--ra-ivory); text-decoration: none; font: 300 clamp(20px, 1.8vw, 26px)/1.4 'Saldo', Georgia, serif; }
.ra-overlay .ra-overlay__contact:hover { color: var(--ra-gold); }
.ra-overlay__place { margin: 4px 0 24px; font: 300 14px/1.6 'Jost', Arial, sans-serif; color: rgba(247, 243, 236, .6); }
.ra-overlay .ra-overlay__cta {
	display: inline-flex; gap: 10px; padding: 16px 26px; border-radius: 999px; background: var(--ra-gold); color: #fff; text-decoration: none;
	font: 500 11px/1 'Jost', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
	transition: background-color .3s ease, color .3s ease;
}
.ra-overlay .ra-overlay__cta:hover { background: var(--ra-ivory); color: var(--ra-graphite); }

/* Tablet / mobile */
@media (max-width: 1100px) {
	.ra-header__nav { display: none; }
}
@media (max-width: 782px) {
	.admin-bar .ra-header { top: 46px; }
}
@media (max-width: 767px) {
	/* Bar of 68px plus breathing room on top (more on phones with a notch). */
	:root { --ra-header-top: max(12px, env(safe-area-inset-top)); --ra-header-h: calc(68px + var(--ra-header-top)); }
	.ra-header__cta { display: none !important; }
	.ra-header__actions { gap: 10px; }
	.ra-header .ra-lang__btn.ra-lang__btn { padding: 0 14px 0 16px; }
	.ra-logo-text { font-size: 22px; }
	.ra-logo-svg { height: 32px; }
	.ra-overlay__inner { grid-template-columns: 1fr; align-items: start; gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.ra-header, .ra-overlay, .ra-overlay__menu a, .ra-overlay__aside, .ra-lang__list, .ra-lang__chev { transition: none !important; }
}
