/**
 * Maison Lune: tokens, type, layout and shared components.
 *
 * Breakpoints match Elementor's defaults: tablet <= 1024px, mobile <= 767px.
 * Figma frames: desktop 1440, tablet 834, mobile 390.
 * Section styles live in assets/css/parts/<widget>.css.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                             */
/* ------------------------------------------------------------------ */

:root {
	--ml-c-ink: #4c2732;
	--ml-c-wine: #5c2938;
	--ml-c-wine-dark: #45202b;
	--ml-c-dark: #2e2327;
	--ml-c-paper: #f2efe7;
	--ml-c-sand: #e6dfd4;
	--ml-c-muted: #695a5d;
	--ml-c-line: #695a5d;
	--ml-c-border: rgba(76, 39, 50, 0.25);
	--ml-c-white: #ffffff;
	--ml-c-error: #a33b2b;

	--ml-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--ml-sans: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--ml-max: 1200px;
	--ml-gutter: 120px;
	--ml-section-pad: 80px;
	--ml-radius: 12px;
	--ml-radius-panel: 16px;
	--ml-radius-control: 8px;

	/* Figma text styles: display (hero 64/110%), h1 (section 44/112%), h2 (40/112%), h3 (28/110%). */
	--ml-fs-display: 64px;
	--ml-lh-display: 70px;
	--ml-fs-h1: 44px;
	--ml-lh-h1: 49px;
	--ml-fs-h2: 40px;
	--ml-lh-h2: 45px;
	--ml-fs-h3: 28px;
	--ml-lh-h3: 31px;
	--ml-fs-lead: 18px;
	--ml-lh-lead: 27px;
	--ml-fs-body: 16px;
	--ml-lh-body: 24px;
	--ml-fs-small: 14px;
	--ml-lh-small: 21px;
	--ml-fs-caption: 13px;
	--ml-lh-caption: 20px;
	--ml-fs-label: 12px;
	--ml-lh-label: 18px;
	/* Big numbers (at a glance, Le Salon numbers, the day timeline). */
	--ml-fs-figure: 44px;
	--ml-lh-figure: 49px;
}

@media (max-width: 1279px) {
	:root {
		--ml-gutter: 32px;
	}
}

@media (max-width: 1024px) {
	:root {
		--ml-section-pad: 56px;
		--ml-fs-display: 56px;
		--ml-lh-display: 62px;
		--ml-fs-h1: 40px;
		--ml-lh-h1: 45px;
		--ml-fs-h2: 36px;
		--ml-lh-h2: 40px;
	}
}

@media (max-width: 767px) {
	:root {
		--ml-gutter: 20px;
		--ml-section-pad: 32px;
		--ml-fs-display: 42px;
		--ml-lh-display: 45px;
		--ml-fs-h1: 36px;
		--ml-lh-h1: 40px;
		--ml-fs-h2: 32px;
		--ml-lh-h2: 36px;
		--ml-fs-h3: 26px;
		--ml-lh-h3: 29px;
		--ml-fs-figure: 36px;
		--ml-lh-figure: 40px;
	}
}

/* Palettes: paper (#f2efe7), sand (#e6dfd4), dark (#2e2327). Elementor colour controls override them per widget. */
.ml--paper,
.ml--sand,
.ml--dark {
	--ml-heading: var(--ml-c-ink);
	--ml-text: var(--ml-c-ink);
	--ml-muted: var(--ml-c-muted);
	--ml-line: var(--ml-c-line);
	--ml-accent: var(--ml-c-wine);
	--ml-on-accent: var(--ml-c-paper);
	--ml-field: transparent;
}

.ml--paper {
	--ml-bg: var(--ml-c-paper);
}

.ml--sand {
	--ml-bg: var(--ml-c-sand);
}

.ml--dark {
	--ml-bg: var(--ml-c-dark);
	--ml-heading: var(--ml-c-paper);
	--ml-text: var(--ml-c-paper);
	--ml-muted: rgba(242, 239, 231, 0.72);
	--ml-line: var(--ml-c-paper);
	--ml-accent: var(--ml-c-wine);
	--ml-on-accent: var(--ml-c-paper);
}

/* ------------------------------------------------------------------ */
/* Base                                                               */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--ml-c-paper);
	color: var(--ml-c-ink);
	font-family: var(--ml-sans);
	font-size: var(--ml-fs-body);
	line-height: var(--ml-lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
	max-width: 100%;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--ml-c-wine);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ml-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 1000;
	padding: 12px 16px;
	border-radius: var(--ml-radius-control);
	background: var(--ml-c-wine);
	color: var(--ml-c-paper);
	font-weight: 500;
	text-decoration: none;
}

.ml-skip-link:focus {
	top: 16px;
}

/* A section rendered by a Maison Lune widget. */
.ml {
	/* Reset, so a section placed inside a narrow column (e.g. inside a post) keeps its 1200 container. */
	--ml-max: 1200px;
	position: relative;
	background: var(--ml-bg);
	color: var(--ml-text);
	font-family: var(--ml-sans);
	font-size: var(--ml-fs-body);
	line-height: var(--ml-lh-body);
}

/* Zero specificity, so a section's own margins (".ml-heading__text { margin-top }") always win. */
:where(.ml) :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd) {
	margin: 0;
}

:where(.ml) :where(ul, ol) {
	list-style: none;
	padding: 0;
}

/* Vertical rhythm: every section uses these, Elementor "Padding" controls override them. */
.ml-pad {
	padding-top: var(--ml-pad-t, var(--ml-section-pad));
	padding-bottom: var(--ml-pad-b, var(--ml-section-pad));
}

.ml-container {
	width: min(var(--ml-max), 100% - 2 * var(--ml-gutter));
	margin-inline: auto;
}

/* Wider container (64px gutters at 1440). */
.ml-container--wide {
	--ml-max: 1312px;
	width: min(var(--ml-max), 100% - 2 * min(var(--ml-gutter), 64px));
}

.ml-container--narrow {
	--ml-max: 760px;
}

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

.ml-display,
.ml-h1,
.ml-h2,
.ml-h3,
.ml-figure-value {
	font-family: var(--ml-serif);
	font-weight: 400;
	color: var(--ml-heading, var(--ml-c-ink));
	letter-spacing: 0;
}

.ml-display {
	font-size: var(--ml-fs-display);
	line-height: var(--ml-lh-display);
}

.ml-h1 {
	font-size: var(--ml-fs-h1);
	line-height: var(--ml-lh-h1);
}

.ml-h2 {
	font-size: var(--ml-fs-h2);
	line-height: var(--ml-lh-h2);
}

.ml-h3 {
	font-size: var(--ml-fs-h3);
	line-height: var(--ml-lh-h3);
}

.ml-figure-value {
	font-size: var(--ml-fs-figure);
	line-height: var(--ml-lh-figure);
}

.ml-lead {
	font-size: var(--ml-fs-lead);
	line-height: var(--ml-lh-lead);
}

.ml-small {
	font-size: var(--ml-fs-small);
	line-height: var(--ml-lh-small);
}

.ml-label {
	font-family: var(--ml-sans);
	font-size: var(--ml-fs-label);
	line-height: var(--ml-lh-label);
	font-weight: 500;
	text-transform: uppercase;
}

.ml-muted {
	color: var(--ml-muted, var(--ml-c-muted));
}

.ml-eyebrow {
	color: var(--ml-muted);
}

/* Section heading: title then one line of text 16px under it. */
.ml-heading {
	margin-bottom: 40px;
}

.ml-heading .ml-eyebrow {
	margin-bottom: 32px;
}

.ml-heading__text {
	margin-top: 16px;
	color: var(--ml-text);
}

@media (max-width: 767px) {
	.ml-heading {
		margin-bottom: 32px;
	}

	.ml-heading .ml-eyebrow {
		margin-bottom: 24px;
	}
}

/* ------------------------------------------------------------------ */
/* Buttons and links                                                  */
/* ------------------------------------------------------------------ */

.ml-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: var(--ml-radius-control);
	font-family: var(--ml-sans);
	font-size: 15px;
	line-height: 24px;
	font-weight: 400;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Primary: wine with paper text (Figma "Action / Book a table"). */
.ml .ml-btn--primary,
.ml-btn--primary {
	background: var(--ml-accent, var(--ml-c-wine));
	color: var(--ml-on-accent, var(--ml-c-paper));
}

.ml .ml-btn--primary:hover,
.ml-btn--primary:hover {
	background: var(--ml-c-wine-dark);
	color: var(--ml-c-paper);
}

/* Outline: transparent with a 1px rule in the text colour ("Use example details", time chips). */
.ml .ml-btn--outline,
.ml-btn--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--ml-heading, var(--ml-c-ink));
}

.ml .ml-btn--outline:hover,
.ml-btn--outline:hover {
	background: rgba(76, 39, 50, 0.06);
}

.ml--dark .ml-btn--outline:hover {
	background: rgba(242, 239, 231, 0.1);
}

/* Light: sand with a wine rule, on photos (Figma "Button / Book a table" in the hero). */
.ml .ml-btn--light,
.ml-btn--light {
	background: var(--ml-c-sand);
	border-color: var(--ml-c-ink);
	color: var(--ml-c-wine);
}

.ml .ml-btn--light:hover,
.ml-btn--light:hover {
	background: var(--ml-c-paper);
}

.ml-btn--block {
	width: 100%;
}

.ml .ml-link,
.ml-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--ml-heading, var(--ml-c-ink));
	font-size: 16px;
	line-height: 24px;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.ml .ml-link:hover,
.ml-link:hover {
	text-decoration-thickness: 2px;
}

.ml-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
}

/* ------------------------------------------------------------------ */
/* Form fields (booking bars, enquiry form, newsletter)               */
/* ------------------------------------------------------------------ */

.ml-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.ml-field__label {
	color: var(--ml-text, var(--ml-c-ink));
}

/* Boxed control: 48px, 1px rule, white. Selects and the date field share it. */
.ml-control {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--ml-c-line);
	border-radius: var(--ml-radius-control);
	background: var(--ml-field, var(--ml-c-white));
	color: var(--ml-c-ink);
}

.ml-control:focus-within {
	border-color: var(--ml-c-ink);
}

.ml-control select,
.ml-control input {
	flex: 1;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font-family: var(--ml-sans);
	font-size: 16px;
	line-height: 24px;
	appearance: none;
	-webkit-appearance: none;
}

.ml-control select {
	padding-right: 28px;
	cursor: pointer;
}

.ml-control__icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.ml-control__lead {
	flex: none;
}

/* Date: native input under the formatted text; theme.js opens the picker. */
.ml-control--date {
	cursor: pointer;
}

.ml-control__value {
	display: none;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ml-js .ml-control--date .ml-control__value {
	display: block;
}

.ml-js .ml-control--date input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.ml-js .ml-control--date input::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* Plain text input (enquiry form, newsletter). */
.ml-input {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	border: 1px solid var(--ml-c-line);
	border-radius: var(--ml-radius-control);
	background: var(--ml-c-paper);
	color: var(--ml-c-ink);
	font-family: var(--ml-sans);
	font-size: 16px;
	line-height: 24px;
}

.ml-input::placeholder {
	color: var(--ml-c-muted);
	opacity: 1;
}

.ml-input:focus {
	outline: 0;
	border-color: var(--ml-c-ink);
}

.ml-form-note {
	color: var(--ml-muted);
	font-size: var(--ml-fs-small);
	line-height: var(--ml-lh-small);
}

.ml-form-note:empty {
	display: none;
}

/* ------------------------------------------------------------------ */
/* FAQ accordion                                                      */
/* ------------------------------------------------------------------ */

.ml-faq__item {
	border-bottom: 1px solid var(--ml-line);
}

.ml-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 48px;
	padding: 12px 0;
	list-style: none;
	cursor: pointer;
}

.ml-faq__q::-webkit-details-marker {
	display: none;
}

.ml-faq__question {
	color: var(--ml-heading);
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
}

.ml-faq__icon {
	flex: none;
	width: 24px;
	height: 24px;
	color: var(--ml-heading);
	transition: transform 0.2s ease;
}

.ml-faq__item[open] .ml-faq__icon {
	transform: rotate(45deg);
}

.ml-faq__a {
	padding: 0 64px 20px 0;
	color: var(--ml-text);
	font-size: var(--ml-fs-body);
	line-height: var(--ml-lh-body);
}

@media (max-width: 767px) {
	.ml-faq__a {
		padding-right: 0;
	}
}

.ml-faq__a p + p {
	margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Photos with captions                                               */
/* ------------------------------------------------------------------ */

.ml-figure {
	margin: 0;
	min-width: 0;
}

.ml-figure__media {
	overflow: hidden;
	border-radius: var(--ml-radius);
	background: var(--ml-c-line);
}

.ml .ml-figure__media img,
.ml-figure__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ml-figure__caption {
	margin-top: 12px;
	color: var(--ml-muted);
	font-size: var(--ml-fs-caption);
	line-height: var(--ml-lh-caption);
}

/* Photo credit on a full-bleed photo. */
.ml-credit {
	color: rgba(255, 255, 255, 0.9);
	font-size: var(--ml-fs-small);
	line-height: var(--ml-lh-small);
}

/* Horizontal scroll rows (tablet and phone card rows, photo strips). */
.ml-scroll {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--ml-gutter);
	scrollbar-width: none;
}

.ml-scroll::-webkit-scrollbar {
	display: none;
}

.ml-scroll > * {
	flex: none;
	scroll-snap-align: start;
}

/* Bleeds a scroll row to the viewport edge while its first item lines up with the container. */
.ml-bleed {
	margin-inline: calc(-1 * var(--ml-gutter));
	padding-inline: var(--ml-gutter);
}

/* ------------------------------------------------------------------ */
/* Elementor integration                                              */
/* ------------------------------------------------------------------ */

/* Maison Lune widgets bring their own spacing; remove wrapper gaps around them. */
.elementor-widget[class*="elementor-widget-ml-"],
.elementor-widget[class*="elementor-widget-ml-"] > .elementor-widget-container {
	margin: 0;
	padding: 0;
}
