/* ==========================================================================
   Sunset Ammoudi – final-round design changes (Nov 2026)
   1. Logo-only intro screen (front page)
   2. Square corners everywhere (images, buttons, form fields, boxes)
   3. No decorative outer frames
   4. Mobile: edge-to-edge photos
   ========================================================================== */

:root {
	--amm-navy: #001e4f;
}

/* ---------- 1. Intro screen ---------- */
/* A full-screen navy panel that is simply the first screen of the page: scrolling pushes it
   up and off like a drawer and the rest of the site follows in the same motion. */
#amm-intro {
	display: none;
}

html.amm-intro #amm-intro {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	height: 100svh; /* stays put while the mobile address bar collapses */
	background: var(--amm-navy);
	overflow: hidden;
	cursor: pointer;
}

.amm-intro__logo {
	display: block;
	width: min(420px, 62vw);
	height: auto;
	opacity: 0;
	animation: amm-logo-in 1.4s ease .15s forwards;
	will-change: transform;
}

@keyframes amm-logo-in {
	from { opacity: 0; translate: 0 12px; }
	to   { opacity: 1; translate: 0 0; }
}

/* scroll cue: label + thin line with a dot travelling down */
.amm-intro__cue {
	position: absolute;
	left: 50%;
	bottom: calc(6vh + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	color: #fff;
	opacity: 0;
	animation: amm-cue-in 1s ease 1.6s forwards;
}

.amm-intro__cue-text {
	font-size: 12px;
	letter-spacing: .3em;
	text-transform: uppercase;
	padding-left: .3em; /* optically centre the tracked text */
}

.amm-intro__cue-line {
	position: relative;
	width: 1px;
	height: 64px;
	background: rgba(255, 255, 255, .35);
	overflow: hidden;
}

.amm-intro__cue-line::after {
	content: "";
	position: absolute;
	left: 0;
	top: -20px;
	width: 1px;
	height: 20px;
	background: #fff;
	animation: amm-cue-drop 1.8s cubic-bezier(.6, 0, .4, 1) 2.2s infinite;
}

@keyframes amm-cue-in {
	to { opacity: 1; }
}

@keyframes amm-cue-drop {
	0%   { top: -20px; }
	70%  { top: 64px; }
	100% { top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.amm-intro__logo { animation: none; opacity: 1; }
	.amm-intro__cue { animation: none; opacity: .85; }
	.amm-intro__cue-line::after { animation: none; top: 18px; }
}

/* ---------- 2. Square corners ---------- */
body img:not(#wpadminbar img),
body video,
body iframe,
.elementor-widget-image .elementor-widget-container,
.elementor-widget-image a,
.elementor-element.e-con,
.elementor-background-overlay,
.qodef-button,
.qodef-button .qodef-m-text,
.qodef-button::before,
.qodef-button::after,
.elementor-button,
button:not(#wpadminbar button),
input,
select,
textarea,
.wpcf7 input,
.wpcf7 textarea,
.wpcf7 select {
	border-radius: 0 !important;
}

/* Square buttons get their size from padding, not the old fixed oval width/height */
.qodef-button.qodef-layout--filled,
.qodef-button.qodef-layout--outlined {
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	padding: 15px 34px !important;
	line-height: 1.2 !important;
	white-space: nowrap;
}

.qodef-button.qodef-layout--filled.qodef-size--large,
.qodef-button.qodef-layout--outlined.qodef-size--large {
	padding: 18px 44px !important;
}

/* ---------- 3. No decorative outer frames ---------- */
/* (the frame inside "the Legacy" box is also removed in Elementor itself) */
.elementor-17 .elementor-element-cd51231 {
	border: 0 !important;
}

/* ---------- 4. Mobile: edge-to-edge photos ---------- */
@media (max-width: 767px) {
	html,
	body {
		overflow-x: hidden;
	}

	body.home .elementor-widget-image:not(.amm-keyvisual),
	body.home .elementor-widget-image:not(.amm-keyvisual) .elementor-widget-container,
	body.home [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] {
		width: 100vw !important;
		max-width: 100vw !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: 0 !important;
		/* centred flex / grid parents would shift it again */
		align-self: flex-start !important;
		justify-self: start !important;
	}

	body.home .elementor-widget-image .elementor-widget-container {
		margin-left: 0 !important;
	}

	/* gallery: no side gutters, one full-width photo per row */
	body.home [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] > .elementor-widget-container {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	body.home [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] .qodef-grid-inner {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.home [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] .qodef-grid-item {
		padding-left: 0 !important;
		padding-right: 0 !important;
		width: 100% !important;
	}

	body.home [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] img,
	body.home .elementor-widget-image:not(.amm-keyvisual) img {
		width: 100% !important;
		max-width: 100% !important;
		height: auto;
	}
}

/* ---------- 6. Sticky header ---------- */
/* Theme gave it a white background while logo + menu are white → invisible.
   Use the brand colour so it matches the white-on-photo main header. */
.qodef-header-sticky {
	background-color: var(--e-global-color-primary, #001e4f) !important;
	box-shadow: none !important;
}

.qodef-header-sticky .qodef-header-navigation > ul > li > a {
	color: #fff;
}

.qodef-header-sticky .qodef-header-navigation > ul > li.current-menu-item > a,
.qodef-header-sticky .qodef-header-navigation > ul > li > a:hover {
	color: var(--e-global-color-21c7cd1, #ccc0ae);
}

/* ---------- 7. Lenis smooth scroll ---------- */
/* Elementor sets scroll-behavior:smooth, which double-smooths with Lenis */
html.lenis,
html.lenis body {
	scroll-behavior: auto !important;
}

/* lenis.css disables iframes whenever smoothing is on; only do it mid-scroll */
.lenis.lenis-smooth iframe {
	pointer-events: auto;
}

.lenis.lenis-smooth.lenis-scrolling iframe {
	pointer-events: none;
}

/* ---------- 8. Mobile: "sea level Gastronomy" label sat flush against the photo ---------- */
@media (max-width: 767px) {
	.elementor-17 .elementor-element-2677686 {
		margin-top: 24px !important;
	}
}

/* ---------- 9. Key visual: mosaic assembly + crawl (see ammoudi-lobster.js) ---------- */
.elementor-17 .elementor-element-2d575e4 {
	overflow: hidden; /* the crawl must never cause sideways scroll */
}

/* the lobster crawls behind the photo row */
.amm-kv-band .amm-keyvisual {
	position: relative;
	z-index: 1;
}

.amm-kv-band [class*="elementor-widget-qi_addons_for_elementor_image_gallery"] {
	position: relative;
	z-index: 2;
}

/* The stage carries the lobster's width; image and layers fill it exactly, so the
   aspect ratio is always the image's. */
.amm-kv-stage {
	position: relative;
	display: block;
	width: 34%;
	margin: 0 auto;
	will-change: transform;
}

@media (max-width: 1024px) {
	.amm-kv-stage { width: 50%; }
}

@media (max-width: 767px) {
	.amm-kv-stage { width: 72%; }

	/* equal beige space above and below the lobster (band padding 15.6 + 28 ≈ 44 above;
	   10 + 20 flex gap + 14 gallery inset = 44 below) */
	.elementor-17 .amm-keyvisual {
		margin-top: 28px !important;
		margin-bottom: 10px !important;
	}
}

/* desktop/tablet: the lobster lives in the photo row (JS moves it there), so its own
   slot takes no space – only once the script is running */
@media (min-width: 768px) {
	.amm-kv-band .amm-keyvisual {
		height: 0;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		overflow: visible;
	}
}

.amm-keyvisual .amm-kv-stage img {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
}

.amm-kv-tiles {
	position: absolute;
	inset: -2px; /* cover anti-aliased edges */
	display: grid;
	pointer-events: none;
}

.amm-kv-tiles span {
	display: block;
	margin: -0.5px; /* no hairline seams between tiles */
	will-change: opacity, transform;
}

/* layered lobster: body + two claws, each with a masked water-light shimmer */
.amm-kv-layer {
	position: absolute;
	inset: 0;
	background: center / 100% 100% no-repeat;
	opacity: 0;
	will-change: transform;
}

.amm-kv-stage.is-layered > img {
	opacity: 0;
}

.amm-kv-stage.is-layered .amm-kv-layer {
	opacity: 1;
}

.amm-kv-sheen {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: .5; /* plain alpha – no blend modes or CSS masks (those killed the frame rate) */
	pointer-events: none;
}



/* ---------- 10. Button hover fill: square, not an oval ---------- */
/* The theme fills buttons on hover with a growing clip-path ellipse, which shows as an oval
   inside the now-square frame. Same motion (rises from the bottom), square shape. */
.qodef-predefined-hover::after {
	clip-path: inset(100% 0 0 0) !important;
}

.qodef-predefined-hover:hover::after,
.qodef-predefined-hover:focus-visible::after {
	clip-path: inset(0 0 0 0) !important;
}

/* Safari: the theme slides the fill with a transform instead; keep that path */
.qodef-browser--safari .qodef-predefined-hover::after,
.qodef-browser--safari .qodef-predefined-hover:hover::after {
	clip-path: none !important;
}
