/**
 * Villesaint.
 *
 * Palette drawn from the place: river slate, moss, weathered stone, and the
 * ochre of Limousin granite in evening light. Deliberately low-saturation so
 * photography carries the colour — an interface competing with the pictures is
 * the usual failure mode for accommodation sites.
 *
 * Hand-written CSS rather than a framework: a theme deployed by copying a
 * folder onto shared hosting should not need a build step to change a colour.
 */

:root {
	--stone-page: #faf8f4;
	--stone-card: #ffffff;
	--stone-line: #e4ded3;
	--stone-muted: #f2eee6;

	--ink: #23211d;
	--ink-soft: #57534a;
	--ink-faint: #8b857a;

	--moss-50: #f2f5ef;
	--moss-100: #e0e8da;
	--moss-600: #55684a;
	--moss-700: #3f4f37;

	--ochre-600: #9a7c42;
	--danger: #b32d2e;

	--font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 0.5rem;
	--gutter: 1.25rem;

	color-scheme: light;
}

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

body {
	margin: 0;
	background: var(--stone-page);
	color: var(--ink);
	font-family: var(--font-sans);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 1.15;
	margin: 0;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.vs-container {
	width: 100%;
	max-width: 72rem;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

@media (min-width: 40em) {
	:root { --gutter: 2rem; }
}

.vs-display { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.vs-heading { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.vs-lead { font-size: 1.125rem; color: var(--ink-soft); max-width: 42rem; }
.vs-muted { color: var(--ink-faint); }
.vs-prose p { color: var(--ink-soft); max-width: 42rem; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap;
}
.vs-skip:focus {
	position: fixed; top: 1rem; left: 1rem; z-index: 100;
	background: var(--ink); color: var(--stone-page);
	padding: 0.6rem 1rem; border-radius: 4px; clip-path: none;
	width: auto; height: auto;
}

/* ---------- Header ---------- */

.vs-header {
	position: sticky; top: 0; z-index: 40;
	background: color-mix(in srgb, var(--stone-page) 92%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--stone-line);
}
.vs-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem; padding-block: 0.85rem;
}
.vs-brand { font-family: var(--font-display); font-size: 1.15rem; text-decoration: none; }
.vs-nav { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.vs-nav a { text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; }
.vs-nav a:hover { color: var(--ink); }

/* Small screens get the nav on a second row rather than behind a menu button:
   a handful of links fit, and a tap saved is a tap saved. */
.vs-nav--mobile {
	display: flex; gap: 1.25rem; overflow-x: auto;
	border-top: 1px solid var(--stone-line);
	padding-block: 0.5rem; list-style: none; margin: 0;
}
.vs-nav--mobile a { white-space: nowrap; }
@media (min-width: 48em) {
	.vs-nav--mobile { display: none; }
}
@media (max-width: 47.99em) {
	.vs-nav--desktop { display: none; }
}

/* ---------- Buttons ---------- */

.vs-button {
	display: inline-block;
	background: var(--moss-600); color: #fff;
	padding: 0.7rem 1.3rem; border: 0; border-radius: 4px;
	font: inherit; font-size: 0.95rem; text-decoration: none;
	cursor: pointer; transition: background-color 150ms ease;
}
.vs-button:hover { background: var(--moss-700); }
.vs-button[disabled] { opacity: 0.6; cursor: default; }
.vs-button--ghost {
	background: transparent; color: var(--ink);
	border: 1px solid var(--stone-line);
}
.vs-button--ghost:hover { background: var(--stone-muted); }

/* ---------- Hero ---------- */

.vs-hero {
	position: relative; isolation: isolate;
	display: flex; align-items: flex-end;
	min-height: 68vh; overflow: hidden; background: var(--ink);
}
@media (min-width: 40em) { .vs-hero { min-height: 78vh; } }

.vs-hero__media {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%; object-fit: cover;
}
.vs-hero__scrim {
	position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, rgb(35 33 29 / 0.85), rgb(35 33 29 / 0.35) 45%, rgb(35 33 29 / 0.2));
}
.vs-hero__body { padding-block: 7rem 3.5rem; color: #fff; }
.vs-hero__body h1 { color: #fff; max-width: 46rem; text-wrap: balance; }
.vs-hero__body p { color: rgb(255 255 255 / 0.85); max-width: 34rem; font-size: 1.1rem; }

/* Decorative drift for the poster fallback when no video is set. */
@keyframes vs-drift {
	from { transform: scale(1.06); }
	to { transform: scale(1.16) translate3d(-1.5%, -1.5%, 0); }
}
.vs-hero__media--still { animation: vs-drift 28s ease-in-out infinite alternate; }

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

/* ---------- Sections & grids ---------- */

.vs-section { padding-block: 4.5rem; }
.vs-section--muted { background: var(--stone-muted); border-block: 1px solid var(--stone-line); }
.vs-section--moss { background: var(--moss-50); border-top: 1px solid var(--stone-line); }

.vs-grid { display: grid; gap: 1.5rem; }
@media (min-width: 34em) { .vs-grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .vs-grid--cards { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Cottage card ---------- */

.vs-card {
	background: var(--stone-card);
	border: 1px solid var(--stone-line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex; flex-direction: column;
}
.vs-card a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.vs-card__media { aspect-ratio: 4 / 3; background: var(--stone-muted); overflow: hidden; }
.vs-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms ease; }
.vs-card:hover .vs-card__media img { transform: scale(1.04); }
.vs-card__body { padding: 1.25rem; }
.vs-card__body h3 { font-size: 1.3rem; }
.vs-card__tagline { color: var(--ink-soft); font-size: 0.95rem; margin: 0.4rem 0 0; }
.vs-card__specs {
	display: flex; flex-wrap: wrap; gap: 0.25rem 1rem;
	margin: 1rem 0 0; font-size: 0.8rem; color: var(--ink-faint);
}
.vs-card__price { margin: 1rem 0 0; font-size: 0.95rem; }

/* ---------- Search form ---------- */

.vs-search {
	display: grid; gap: 1rem;
	background: var(--stone-card);
	border: 1px solid var(--stone-line);
	border-radius: var(--radius);
	padding: 1.25rem;
}
@media (min-width: 34em) { .vs-search { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .vs-search { grid-template-columns: repeat(5, 1fr); align-items: start; } }

.vs-field label {
	display: block; font-size: 0.72rem; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--ink-faint);
}
.vs-field input, .vs-field select, .vs-field textarea {
	width: 100%; margin-top: 0.35rem;
	padding: 0.5rem 0.7rem;
	border: 1px solid var(--stone-line); border-radius: 4px;
	background: var(--stone-page); color: var(--ink);
	font: inherit; font-size: 0.95rem;
}
.vs-field__hint { margin: 0.3rem 0 0; font-size: 0.75rem; color: var(--ink-faint); }
/* Level with the inputs, which carry a label above them. */
.vs-search .vs-button { align-self: start; margin-top: 1.35rem; }

/* ---------- Results ---------- */

.vs-result {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 1rem; padding: 1rem 1.25rem;
	background: var(--stone-card);
	border: 1px solid var(--stone-line); border-radius: var(--radius);
}
.vs-result__name { font-family: var(--font-display); font-size: 1.2rem; }
.vs-result--unavailable {
	background: transparent; color: var(--ink-faint); font-size: 0.9rem;
	border-color: color-mix(in srgb, var(--stone-line) 70%, transparent);
}

/* ---------- Quote summary ---------- */

.vs-quote {
	background: var(--stone-card);
	border: 1px solid var(--stone-line);
	border-radius: var(--radius); padding: 1.5rem;
}
.vs-quote__row { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.vs-quote__detail { display: block; font-size: 0.78rem; color: var(--ink-faint); }
.vs-quote__total {
	display: flex; justify-content: space-between; gap: 1rem;
	border-top: 1px solid var(--stone-line); margin-top: 1.25rem; padding-top: 1rem;
	font-family: var(--font-display); font-size: 1.2rem;
}
.vs-quote__deposit {
	border-top: 1px solid var(--stone-line); margin-top: 1.25rem; padding-top: 1rem;
	font-size: 0.95rem;
}

/* ---------- Tables ---------- */

.vs-table-scroll { overflow-x: auto; border: 1px solid var(--stone-line); border-radius: var(--radius); background: var(--stone-card); }
.vs-table { width: 100%; min-width: 42rem; border-collapse: collapse; font-size: 0.95rem; }
.vs-table th, .vs-table td { text-align: left; padding: 0.85rem 1.25rem; }
.vs-table thead tr {
	border-bottom: 1px solid var(--stone-line);
	font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint);
}
.vs-table thead th { font-weight: 400; }
.vs-table tbody tr + tr { border-top: 1px solid color-mix(in srgb, var(--stone-line) 60%, transparent); }
.vs-table td { color: var(--ink-soft); }

/* ---------- Notices ---------- */

.vs-notice {
	border: 1px solid var(--stone-line); border-radius: var(--radius);
	padding: 1rem 1.25rem; background: var(--stone-muted); color: var(--ink-soft);
}
.vs-notice--error { border-color: var(--danger); color: var(--danger); background: #fdf3f3; }
.vs-notice--success { border-color: var(--moss-100); background: var(--moss-50); }

/* ---------- Detail layout ---------- */

.vs-detail { display: grid; gap: 3rem; }
@media (min-width: 64em) {
	.vs-detail { grid-template-columns: 1fr 20rem; align-items: start; }
	.vs-detail__aside { position: sticky; top: 6rem; }
}
.vs-gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.vs-gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); width: 100%; }

.vs-amenities {
	list-style: none; padding: 0; margin: 1.25rem 0 0;
	display: grid; gap: 0.6rem 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	color: var(--ink-soft); font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.vs-footer { margin-top: 6rem; background: var(--stone-muted); border-top: 1px solid var(--stone-line); }
.vs-footer__inner { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 48em) { .vs-footer__inner { grid-template-columns: repeat(3, 1fr); } }
.vs-footer h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-family: var(--font-sans); }
.vs-footer ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.vs-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.vs-footer a:hover { color: var(--ink); }
.vs-footer__legal { border-top: 1px solid var(--stone-line); font-size: 0.78rem; color: var(--ink-faint); padding-block: 1.25rem; }

.vs-lang {
	border: 1px solid var(--stone-line);
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	color: var(--ink-soft);
	text-decoration: none;
}
.vs-lang:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ---------- Gallery ---------- */

.vs-gallery { margin-top: 3rem; }
.vs-gallery__grid {
	list-style: none; margin: 1.5rem 0 0; padding: 0;
	display: grid; gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.vs-gallery__item { margin: 0; }
.vs-gallery__item a {
	display: block; border-radius: var(--radius); overflow: hidden;
	background: var(--stone-muted);
}
.vs-gallery__item img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	transition: transform 500ms ease;
}
.vs-gallery__item a:hover img { transform: scale(1.03); }
.vs-gallery__item a:focus-visible { outline: 2px solid var(--moss-600); outline-offset: 3px; }

/* ---------- Lightbox ---------- */

.vs-lightbox {
	border: 0; padding: 0; max-width: 100vw; max-height: 100vh;
	width: 100%; height: 100%; background: transparent;
	overflow: hidden;
}
.vs-lightbox::backdrop { background: rgb(35 33 29 / 0.92); }
.vs-lightbox img {
	position: absolute; inset: 0; margin: auto;
	max-width: min(92vw, 80rem); max-height: 88vh;
	width: auto; height: auto; object-fit: contain;
	border-radius: 2px;
}
.vs-lightbox button {
	position: absolute; z-index: 1;
	background: rgb(255 255 255 / 0.12); color: #fff;
	border: 1px solid rgb(255 255 255 / 0.25); border-radius: 999px;
	width: 2.75rem; height: 2.75rem;
	font-size: 1.1rem; line-height: 1; cursor: pointer;
	backdrop-filter: blur(4px);
}
.vs-lightbox button:hover { background: rgb(255 255 255 / 0.22); }
.vs-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vs-lightbox__close { top: 1rem; right: 1rem; }
.vs-lightbox__nav { top: 50%; transform: translateY(-50%); }
.vs-lightbox__nav--prev { left: 1rem; }
.vs-lightbox__nav--next { right: 1rem; }

@media (max-width: 34em) {
	.vs-lightbox__nav { top: auto; bottom: 1rem; transform: none; }
}
