/* Reset & base */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

[id] {
	scroll-margin-top: 90px; /* clears the sticky nav bar */
}

/* Lenis smooth scrolling (smooth-scroll.js) takes over from CSS smoothing. */
html.lenis,
html.lenis body {
	height: auto;
	scroll-behavior: auto;
}

.lenis.lenis-stopped {
	overflow: clip;
}

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	color: var(--color-ink);
	background: var(--color-white);
	-webkit-font-smoothing: antialiased;
	/* Garamond's old-style figures dip below the line; keep phone numbers and dates level. */
	font-variant-numeric: lining-nums;
}

/* Interface text is Montserrat; reading text stays Garamond. */
button,
input,
select,
textarea,
label,
legend,
.nav-menu,
.topbar {
	font-family: var(--font-ui);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	text-wrap: balance;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

h1, h2, h3, h4, h5, h6, p {
	margin: 0;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

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

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: var(--color-white);
	color: var(--color-burgundy-600);
	border-radius: var(--radius-button);
}

/* Layout */
.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 26px; /* one size site-wide (~50px tall); variants only change colour */
	border: 1.5px solid transparent; /* outline and filled buttons line up exactly */
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 15px;
	line-height: normal;
	white-space: nowrap;
	border-radius: var(--radius-button);
	transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn__arrow {
	display: inline-block;
	transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover .btn__arrow {
	transform: translateX(4px);
}

/* Primary CTA sits on dark surfaces (hero, footer): solid white, burgundy text. */
.btn--primary {
	background: var(--color-white);
	color: var(--color-burgundy-600);
}

.btn--primary:hover {
	background: var(--color-blush-100);
	box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn--light {
	background: var(--color-white);
	color: var(--color-burgundy-600);
}

.btn--light:hover {
	background: var(--color-blush-100);
	box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn--brand {
	background: var(--color-burgundy-600);
	color: var(--color-white);
}

.btn--brand:hover {
	background: var(--color-burgundy-800);
	box-shadow: 0 10px 30px rgba(140, 16, 27, 0.3);
}

.btn--outline-light {
	border-color: rgba(255, 255, 255, 0.4);
	color: var(--color-white);
}

.btn--outline-light:hover {
	border-color: var(--color-white);
	background: var(--color-white);
	color: var(--color-burgundy-600);
}

.btn--outline-brand {
	border-color: var(--color-burgundy-600);
	color: var(--color-burgundy-600);
}

.btn--outline-brand:hover {
	background: var(--color-burgundy-600);
	color: var(--color-white);
}

/* Whole-card links: the card's main link stretches over the card; any other
   link inside it sits above (z-index 2) and stays clickable. */
.card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.card-link:focus-visible {
	outline: none;
}

.card-link:focus-visible::after {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-ui);
	font-size: 15px;
	font-weight: 600;
	line-height: normal;
	white-space: nowrap;
	color: var(--color-burgundy-600);
	transition: color var(--dur-fast);
}

.text-link--sm {
	font-size: 14px;
}

.text-link:hover {
	color: var(--color-burgundy-800);
}

.text-link:hover .btn__arrow {
	transform: translateX(4px);
}

/* Section headings ------------------------------------------------------------ */
.section-label {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	font-family: var(--font-ui);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: normal;
	text-transform: uppercase;
	color: var(--label-color, var(--color-burgundy-600));
	white-space: nowrap;
}

.section-label--bar::after {
	content: "";
	width: 40px;
	height: 3px;
	background: var(--accent);
}

/* --title-size is the Figma px size at 1440, rendered at 80% (Montserrat runs wide);
   it scales down with the viewport to a 26px floor. */
.section-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(26px, calc(var(--title-size, 48) * 0.8 * 100vw / 1440), calc(var(--title-size, 48) * 0.8px));
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--title-color, var(--color-ink));
}

/* The accent words in a heading: Garamond italic, a touch larger to match Montserrat. */
.section-title em,
.landing-title em,
.hero__word.is-accent {
	font-family: var(--font-body);
	font-size: 1.1em;
	font-style: italic;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--title-accent, var(--color-burgundy-600));
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-ui);
	font-size: 13px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.eyebrow::before,
.eyebrow--center::after {
	content: "";
	width: 40px;
	height: 2px;
	background: currentColor;
}

/* Scroll reveals: hidden only when the `anim` class is present (set in <head>
   when motion is allowed, and removed again if GSAP fails to load). */
.anim [data-reveal],
.anim [data-reveal-stagger] > *,
.anim [data-split] {
	opacity: 0;
}

/* data-split: one mask per word; padding keeps italic descenders/overhang visible. */
.split-word {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding: 0 0.06em 0.1em 0;
	margin: 0 -0.06em -0.1em 0;
}

.split-word > span {
	display: inline-block;
	transform-origin: 0 100%;
}

/* Set by JS while GSAP intro animations run. */
.is-intro .btn,
.is-intro .hero__tab {
	transition: none !important;
}

@media (max-width: 600px) {
	.btn {
		padding: 13px 22px;
		font-size: 14px;
	}

	.eyebrow {
		gap: 10px;
		font-size: 12px;
	}

	.eyebrow::before,
	.eyebrow--center::after {
		width: 24px;
	}
}

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

/* Form fields (appointment and contact forms) ------------------------------------ */
.field {
	position: relative;
}

.field__control {
	display: block;
	width: 100%;
	height: 53px;
	padding: 0 20px;
	border: 1px solid rgba(140, 16, 27, 0.12);
	border-radius: 14px;
	background: var(--color-cream);
	font-family: var(--font-ui);
	font-size: 15px;
	font-weight: 500;
	line-height: normal;
	color: var(--color-ink);
	transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
	-webkit-appearance: none;
	appearance: none;
}

.field__control::placeholder {
	color: var(--color-slate);
	font-weight: 400;
	opacity: 1;
}

.field__label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-ui);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-ink);
}

.field__label span {
	font-weight: 500;
	color: var(--color-slate);
}

.field__control:hover {
	border-color: rgba(140, 16, 27, 0.3);
}

.field__control:focus {
	outline: none;
	border-color: var(--color-burgundy-600);
	background: var(--color-white);
	box-shadow: 0 0 0 4px rgba(140, 16, 27, 0.1);
}

.field.is-invalid .field__control {
	border-color: #c0392b;
	box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

/* Select & date: ▾ indicator from the design */
.field--select::after {
	content: "▾";
	position: absolute;
	bottom: 26.5px; /* centred on the 53px control, below any label */
	right: 20px;
	font-family: system-ui, sans-serif;
	font-size: 14px;
	color: var(--color-slate);
	transform: translateY(50%);
	pointer-events: none;
}

.field--select select {
	padding-right: 44px;
	cursor: pointer;
}

.field--select select:invalid {
	color: var(--color-slate);
}

/* Styled dropdown (assets/js/select.js): a button and a listbox over the real
   <select>, which stays in the form, hidden. */
.select__native {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.select__button {
	overflow: hidden;
	padding-right: 48px;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
}

.select__button.is-placeholder {
	font-weight: 400;
	color: var(--color-slate);
}

.field--select.is-open .select__button {
	border-color: var(--color-burgundy-600);
	background: var(--color-white);
	box-shadow: var(--ring-field, 0 0 0 4px rgba(140, 16, 27, 0.1));
}

.field--select.is-enhanced::after {
	content: "";
	width: 8px;
	height: 8px;
	border: solid var(--color-burgundy-600);
	border-width: 0 2px 2px 0;
	transform: translateY(calc(50% - 3px)) rotate(45deg);
	transition: transform var(--dur-base) var(--ease-out);
}

.field--select.is-open::after {
	transform: translateY(calc(50% + 1px)) rotate(-135deg);
}

.select__list {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 320px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 16px;
	background: var(--color-white);
	box-shadow: 0 24px 50px -16px rgba(58, 26, 32, 0.35), inset 0 0 0 1px var(--line-on-light);
	list-style: none;
	animation: select-in 0.22s var(--ease-out);
}

.select__list:focus {
	outline: none;
}

.opens-up .select__list {
	top: auto;
	bottom: calc(100% + 8px);
	transform-origin: 50% 100%;
}

@keyframes select-in {
	from { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

.select__group {
	padding: 12px 12px 4px;
	font-family: var(--font-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-slate);
}

.select__option {
	position: relative;
	padding: 10px 36px 10px 12px;
	border-radius: 10px;
	font-family: var(--font-ui);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--color-ink);
	cursor: pointer;
}

.select__option.is-active {
	background: var(--color-cream);
	color: var(--color-burgundy-600);
}

.select__option[aria-selected="true"] {
	font-weight: 700;
	color: var(--color-burgundy-600);
}

.select__option[aria-selected="true"]::after { /* tick */
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 5px;
	height: 10px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: translateY(-65%) rotate(45deg);
}

/* Date: show "Preferred date" until a value is picked; whole field opens the picker. */
.field--date input {
	padding-right: 44px;
	cursor: pointer;
}

.field--date::before {
	content: attr(data-placeholder);
	position: absolute;
	top: 50%;
	left: 21px;
	font-family: var(--font-ui);
	font-size: 15px;
	line-height: normal;
	color: var(--color-slate);
	transform: translateY(-50%);
	pointer-events: none;
}

.field--date.has-value::before {
	content: none;
}

.field--date:not(.has-value) input::-webkit-datetime-edit {
	color: transparent;
}

.field--date input::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	opacity: 0;
	cursor: pointer;
}
