/**
 * Still Water: tokens, type, layout and shared components.
 *
 * Breakpoints match Elementor's defaults: tablet <= 1024px, mobile <= 767px.
 * Figma frames: desktop 1440, tablet 834, mobile 390.
 * The Figma file has no styles or variables; every token below was read from the frames
 * (PLAN.md B3.1f). Section styles live in assets/css/parts/<widget>.css and use only these
 * tokens. Hover and motion are not in the frames: the resting state here is the Figma one, and
 * Step 4 (mgk-motion) adds the movement.
 */

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

/*
 * Colours and fonts follow Elementor's global colours and fonts (Site Settings), so changing
 * them in Elementor restyles every section. Elementor prints those variables on the kit class
 * of <body>, so these tokens are declared on body; the hex values are the Figma colours, used
 * when Elementor is off or a global is missing. The demo importer writes the same values into
 * the kit: system colours primary/secondary/text/accent and the custom colours below.
 */
body {
	--sw-c-ink: var(--e-global-color-primary, #18332f);     /* text, primary button, hero / band / footer, night */
	--sw-c-muted: var(--e-global-color-secondary, #536a62); /* secondary text, labels, captions, twilight */
	--sw-c-text: var(--e-global-color-text, #18332f);       /* body text */
	--sw-c-mist: var(--e-global-color-accent, #f3f6f3);     /* page background, nav, secondary button */
	--sw-c-white: var(--e-global-color-swwhite, #ffffff);   /* white sections, fields, panels; text on dark */
	--sw-c-pale: var(--e-global-color-swpale, #dce7df);     /* daylight, lake, stay summary, form alert; muted text on dark */
	--sw-c-sun: var(--e-global-color-swsun, #d8b46a);       /* golden hour, month bars, sun rays */
	--sw-c-line: var(--e-global-color-swline, #c8d5cd);     /* every 1px border and rule */
	--sw-c-error: var(--e-global-color-swerror, #aa382e);   /* error text */

	/* Headings and figures: Elementor "Primary" font; text: Elementor "Text" font. */
	--sw-serif: var(--e-global-typography-primary-font-family, "Instrument Serif"), Georgia, "Times New Roman", serif;
	--sw-sans: var(--e-global-typography-text-font-family, "Geist"), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root {
	/* "Flat dark layer 35%" on hero photos, 30% on the feature band. */
	--sw-overlay: rgb(24 51 47 / 0.35);
	--sw-overlay-band: rgb(24 51 47 / 0.3);

	--sw-max: 1200px;
	--sw-gutter: 120px;
	--sw-section-pad: 80px;
	--sw-heading-gap: 48px;
	--sw-radius: 12px;
	--sw-radius-panel: 16px;
	--sw-radius-control: 8px;

	/* Figma text styles (desktop). */
	--sw-fs-display: 104px;
	--sw-lh-display: 124px;
	--sw-fs-display-sm: 56px;
	--sw-lh-display-sm: 60px;
	--sw-fs-h1: 56px;
	--sw-lh-h1: 64px;
	--sw-fs-h2: 36px;
	--sw-lh-h2: 44px;
	--sw-fs-h3: 28px;
	--sw-lh-h3: 36px;
	--sw-fs-numeral: 44px;
	--sw-lh-numeral: 48px;
	--sw-fs-question: 24px;
	--sw-lh-question: 32px;
	--sw-fs-lead: 20px;
	--sw-lh-lead: 30px;
	/* Article lead on tablet and phone: body-lg size, which stays 18/28 there (Figma 834 / 390). */
	--sw-fs-lead-sm: 18px;
	--sw-lh-lead-sm: 28px;
	--sw-fs-body-lg: 18px;
	--sw-lh-body-lg: 28px;
	--sw-fs-body: 16px;
	--sw-lh-body: 24px;
	--sw-fs-small: 14px;
	--sw-lh-small: 20px;
	--sw-fs-label: 12px;
	--sw-lh-label: 16px;
}

/* Between the frames: keep the 1200 container while it fits, with tablet gutters. */
@media (max-width: 1439px) {
	:root {
		--sw-gutter: 32px;
	}
}

/* Tablet: the 834 frames (titles stay 56/64, as drawn). */
@media (max-width: 1024px) {
	:root {
		--sw-section-pad: 56px;
		--sw-heading-gap: 40px;
	}
}

/* Phone: the 390 frames. */
@media (max-width: 767px) {
	:root {
		--sw-gutter: 20px;
		--sw-section-pad: 32px;
		--sw-heading-gap: 24px;
		--sw-fs-display: 56px;
		--sw-lh-display: 60px;
		--sw-fs-h1: 36px;
		--sw-lh-h1: 44px;
		--sw-fs-question: 20px;
		--sw-lh-question: 28px;
		--sw-fs-body-lg: 16px;
		--sw-lh-body-lg: 24px;
	}
}

/* Palettes: mist (#f3f6f3), white, ink (dark). Elementor colour controls override them per widget. */
.sw--mist,
.sw--white,
.sw--ink {
	--sw-heading: var(--sw-c-ink);
	--sw-text: var(--sw-c-text);
	--sw-muted: var(--sw-c-muted);
	--sw-line: var(--sw-c-line);
	--sw-accent: var(--sw-c-ink);
	--sw-on-accent: var(--sw-c-white);
	--sw-field: var(--sw-c-white);
}

.sw--mist {
	--sw-bg: var(--sw-c-mist);
}

.sw--white {
	--sw-bg: var(--sw-c-white);
}

.sw--ink {
	--sw-bg: var(--sw-c-ink);
	--sw-heading: var(--sw-c-white);
	--sw-text: var(--sw-c-white);
	--sw-muted: var(--sw-c-pale);
	--sw-accent: var(--sw-c-white);
	--sw-on-accent: var(--sw-c-ink);
}

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

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

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

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

body {
	margin: 0;
	background: var(--sw-c-mist);
	color: var(--sw-c-text);
	font-family: var(--sw-sans);
	font-size: var(--sw-fs-body);
	line-height: var(--sw-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(--sw-c-ink);
	outline-offset: 2px;
}

.sw--ink :focus-visible {
	outline-color: var(--sw-c-white);
}

.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;
}

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

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

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

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

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

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

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

/* Article measure (Article header and body, 792 at 1440). */
.sw-container--narrow {
	--sw-max: 792px;
}

/* Dark photo layer (hero, hero band, feature band): put it inside the photo's positioned wrapper. */
.sw-overlay {
	position: absolute;
	inset: 0;
	background: var(--sw-overlay);
	pointer-events: none;
}

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

.sw-display,
.sw-display-sm,
.sw-h1,
.sw-h2,
.sw-h3,
.sw-numeral,
.sw-question {
	font-family: var(--sw-serif);
	font-weight: 400;
	color: var(--sw-heading, var(--sw-c-ink));
	letter-spacing: 0;
}

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

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

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

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

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

.sw-numeral {
	font-size: var(--sw-fs-numeral);
	line-height: var(--sw-lh-numeral);
}

.sw-question {
	font-size: var(--sw-fs-question);
	line-height: var(--sw-lh-question);
}

.sw-lead {
	color: var(--sw-muted, var(--sw-c-muted));
	font-size: var(--sw-fs-lead);
	line-height: var(--sw-lh-lead);
}

@media (max-width: 1024px) {
	.sw-lead {
		font-size: var(--sw-fs-lead-sm);
		line-height: var(--sw-lh-lead-sm);
	}
}

.sw-body-lg {
	font-size: var(--sw-fs-body-lg);
	line-height: var(--sw-lh-body-lg);
}

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

/* Figma "label": 12/16 semibold; the copy is written in capitals. */
.sw-label {
	font-family: var(--sw-sans);
	font-size: var(--sw-fs-label);
	line-height: var(--sw-lh-label);
	font-weight: 600;
	text-transform: uppercase;
}

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

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

/* Section heading: optional label, title, then one line of text 4px under it. */
.sw-heading {
	margin-bottom: var(--sw-heading-gap);
}

.sw-heading .sw-eyebrow {
	margin-bottom: 16px;
}

.sw-heading__text {
	margin-top: 4px;
	color: var(--sw-muted);
	font-size: var(--sw-fs-body-lg);
	line-height: var(--sw-lh-body-lg);
}

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

.sw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: var(--sw-radius-control);
	font-family: var(--sw-sans);
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

/* Figma "Button/Primary": ink, white text (white with ink text on dark sections). */
.sw .sw-btn--primary,
.sw-btn--primary {
	background: var(--sw-accent, var(--sw-c-ink));
	color: var(--sw-on-accent, var(--sw-c-white));
}

/* Figma "Button/Secondary": mist with a line border, ink text. */
.sw .sw-btn--secondary,
.sw-btn--secondary {
	background: var(--sw-c-mist);
	border-color: var(--sw-c-line);
	color: var(--sw-c-ink);
}

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

/* Figma "Link": button text 16/24 semibold, underlined, 44px tap target. */
.sw .sw-link,
.sw-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--sw-heading, var(--sw-c-ink));
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

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

/* ------------------------------------------------------------------ */
/* Form fields (closing form, stay request, newsletter)               */
/* ------------------------------------------------------------------ */

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

.sw-field__label {
	color: var(--sw-text, var(--sw-c-ink));
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
}

/* Figma "Control": 48px, white, 1px line border, radius 8, padding 12. Placeholders are muted,
   entered values ink (PLAN.md B3 Q8e). */
.sw-input {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	border: 1px solid var(--sw-c-line);
	border-radius: var(--sw-radius-control);
	background: var(--sw-field, var(--sw-c-white));
	color: var(--sw-c-ink);
	font-family: var(--sw-sans);
	font-size: 16px;
	line-height: 24px;
}

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

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

/* Error state (Figma "<cabin> / error", Q8b): the text of the fields turns red, the border
   keeps its colour; the summary sits on pale above the fields. */
.sw-input--error,
.sw-input--error::placeholder {
	color: var(--sw-c-error);
}

.sw-alert {
	padding: 16px;
	background: var(--sw-c-pale);
	color: var(--sw-c-error);
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
}

.sw-alert__title {
	font-size: var(--sw-fs-body);
	line-height: var(--sw-lh-body);
	font-weight: 600;
}

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

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

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

/* Figma "FAQ": rows divided by a line, question serif 24/32 (20/28 on phones), plus / minus 24. */
.sw-faq__item {
	border-top: 1px solid var(--sw-line);
}

.sw-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 0;
	list-style: none;
	cursor: pointer;
}

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

.sw-faq__question {
	color: var(--sw-heading);
	font-family: var(--sw-serif);
	font-size: var(--sw-fs-question);
	line-height: var(--sw-lh-question);
}

.sw-faq__icon {
	flex: none;
	width: 24px;
	height: 24px;
	color: var(--sw-heading);
}

/* Plus when closed, minus when open. */
.sw-faq__icon--close,
.sw-faq__item[open] .sw-faq__icon--open {
	display: none;
}

.sw-faq__item[open] .sw-faq__icon--close {
	display: block;
}

/* Open ("State=Open"): the answer under the question, 28px above the next row. */
.sw-faq__a {
	padding: 0 0 28px;
	color: var(--sw-muted);
	font-size: var(--sw-fs-body-lg);
	line-height: var(--sw-lh-body-lg);
}

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

/* ------------------------------------------------------------------ */
/* Photos, figures and rules                                          */
/* ------------------------------------------------------------------ */

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

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

/* Photos fill their frame; the focal point (sw_media_image(), Media Library) picks the crop. */
.sw img[style*="--sw-focus"],
.sw-figure__media img,
.sw .sw-figure__media img {
	object-position: var(--sw-focus, 50% 50%);
}

@media (max-width: 767px) {
	.sw img[style*="--sw-focus"],
	.sw-figure__media img,
	.sw .sw-figure__media img {
		object-position: var(--sw-focus-phone, var(--sw-focus, 50% 50%));
	}
}

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

.sw-figure__caption {
	margin-top: 8px;
	color: var(--sw-muted);
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
}

/* Photo caption on a full-bleed photo (white 14/20). */
.sw-credit {
	color: var(--sw-c-white);
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
}

/* Figures with a line above them (V2 Glance, Moments, Arrival, At a glance): 1px rule, 16px
   above the value (PLAN.md B3 Q15: top edge only). */
.sw-stat {
	padding-top: 16px;
	border-top: 1px solid var(--sw-line);
}

.sw-stat__label {
	color: var(--sw-muted);
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
}

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

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

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

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

/* Inline SVG drawings (assets/svg/maps; the day-of-light drawings) recolour through these, so
   they follow the Elementor global colours like the rest of the page. */
.sw-drawing {
	--sw-map-land: var(--sw-c-white);
	--sw-map-water: var(--sw-c-pale);
	--sw-map-rail: var(--sw-c-ink);
	--sw-map-road: var(--sw-c-muted);
	--sw-map-ink: var(--sw-c-ink);
	--sw-map-muted: var(--sw-c-muted);
	position: relative;
}

.sw-drawing svg {
	display: block;
	width: 100%;
	height: auto;
}

/* HTML labels laid over a drawing, positioned in % of its viewBox. */
.sw-drawing__label {
	position: absolute;
	color: var(--sw-c-ink);
	font-family: var(--sw-sans);
	font-size: var(--sw-fs-small);
	line-height: var(--sw-lh-small);
	white-space: nowrap;
	pointer-events: none;
}

.sw-drawing__label--center {
	transform: translate(-50%, -50%);
}

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

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