/*
 * Villa Beaulieu — supplemental front-end CSS.
 * Design tokens live in theme.json; this file only carries what theme.json can't yet express:
 * accessibility helpers, the skip link, focus-visible polish and a few structural niceties.
 */

/* --- Accessibility: skip link --------------------------------------------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 9999;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* --- Accessibility: always-visible keyboard focus ------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
	border-radius: 1px;
}

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

/* --- Editorial niceties --------------------------------------------------- */
.villa-eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	/* Darker gold: passes WCAG AA (~4.8:1) on the cream background, still on-brand. */
	color: #7a6234;
}

/* On dark sections the eyebrow keeps the bright brand gold (high contrast on forest/ink). */
.wp-block-cover .villa-eyebrow,
.has-cream-color .villa-eyebrow,
[class*="has-forest"] .villa-eyebrow,
.has-ink-background-color .villa-eyebrow {
	color: var(--wp--preset--color--gold);
}

/* Body links: forest on light (set in theme.json) → but bright gold on dark sections,
   so a forest-coloured link never disappears on a forest/ink background. */
.wp-block-cover a:where(:not(.wp-element-button)),
.has-cream-color a:where(:not(.wp-element-button)),
[class*="has-forest"] a:where(:not(.wp-element-button)),
.has-ink-background-color a:where(:not(.wp-element-button)) {
	/* Soft gold: brand gold #a68b5b only reaches ~3.9:1 on forest — this passes AA. */
	color: #c9ac7e;
}
.wp-block-cover a:where(:not(.wp-element-button)):hover,
.has-cream-color a:where(:not(.wp-element-button)):hover,
[class*="has-forest"] a:where(:not(.wp-element-button)):hover,
.has-ink-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--white);
}

/* Gold hairline used under eyebrows / above sections */
.villa-hairline {
	display: block;
	width: 3rem;
	height: 1px;
	background: var(--wp--preset--color--gold);
	border: 0;
}

/* Images should never overflow their container (responsive safety net) */
img {
	max-width: 100%;
	height: auto;
}

/* --- Outline buttons adapt to the current text colour ---------------------
   Works on both cream and dark (forest) sections without per-section overrides. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1px solid currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
	background: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
}

/* --- Header navigation: quiet ink links, gold on hover -------------------- */
.site-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.site-header .wp-block-navigation a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--gold);
}
.site-header .wp-block-site-title a {
	color: var(--wp--preset--color--forest);
	text-decoration: none;
}

/* --- Footer link treatment ------------------------------------------------ */
.site-footer a {
	color: var(--wp--preset--color--cream);
	text-decoration: none;
}
.site-footer a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Plain (bullet-less) lists, used in the footer ------------------------ */
.is-style-villa-plain {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}
.is-style-villa-plain li {
	margin: 0.4rem 0;
}

/* --- Team cards: illustration by default, real photo on hover/focus ------- */
.villa-team-card {
	text-align: center;
}
.villa-team-card .team-figure {
	position: relative;
	margin: 0;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 2px;
	background: var(--wp--preset--color--stone);
}
.villa-team-card .team-figure img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.5s ease;
}
.villa-team-card .team-photo {
	opacity: 0;
}
.villa-team-card:hover .team-photo,
.villa-team-card:focus-within .team-photo {
	opacity: 1;
}

/* ============================================================
   Lovable signature design system — ported 1:1 from the
   original site's styles.css (film-grain, hairline links,
   reveal-on-scroll, ken burns, marquee, typography).
   ============================================================ */

html { scroll-behavior: smooth; }

/* Serif headings: subtle negative tracking + balanced wrapping */
h1, h2, h3, h4,
.wp-block-heading {
	letter-spacing: -0.01em;
	text-wrap: balance;
}
::selection {
	background-color: color-mix(in oklab, var(--wp--preset--color--gold) 30%, transparent);
	color: var(--wp--preset--color--forest);
}

/* --- Film-grain texture overlay (dark brand-splash sections) -------------- */
.film-grain { position: relative; }
.film-grain::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.06;
	mix-blend-mode: overlay;
	z-index: 1;
	background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}
/* Brand-splash hero: solid forest + grain, content vertically centred */
.villa-hero-splash {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 92svh;
	text-align: center;
}
.villa-hero-splash .villa-hero-drawing {
	width: 100%;
	max-width: 760px;
	margin-inline: auto;
}

/* --- Hairline link — the signature CTA ------------------------------------ */
a.hairline-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-weight: 600;
	text-decoration: none;
}
a.hairline-link::after {
	content: "";
	width: 2rem;
	height: 1px;
	background-color: currentColor;
	transition: width 400ms ease;
}
a.hairline-link:hover::after { width: 3rem; }
a.hairline-link:hover { text-decoration: none; }

/* --- Reveal on scroll ----------------------------------------------------- */
@keyframes villaRevealUp {
	from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(6px); }
	to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
html.js .reveal { opacity: 0; }
.reveal.is-visible { animation: villaRevealUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.reveal.delay-1 { animation-delay: 0.1s; }
.reveal.delay-2 { animation-delay: 0.2s; }
.reveal.delay-3 { animation-delay: 0.3s; }

/* --- Ken Burns slow zoom on hero imagery ---------------------------------- */
@keyframes villaKenBurns { from { transform: scale(1); } to { transform: scale(1.05); } }
.ken-burns { animation: villaKenBurns 14s ease-in-out infinite alternate; will-change: transform; }

/* --- Marquee ticker ------------------------------------------------------- */
.villa-marquee { overflow: hidden; width: 100%; }
.villa-marquee__track {
	display: inline-flex;
	white-space: nowrap;
	animation: villaMarquee 30s linear infinite;
	will-change: transform;
}
.villa-marquee__track > span {
	padding: 0 1.4rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.72rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}
@keyframes villaMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	html.js .reveal { opacity: 1; }
	.reveal.is-visible { animation: none; }
	.ken-burns, .villa-marquee__track { animation: none; }
}
