/* ============ Design tokens ============ */
:root {
	--plaster: #f6f1e6;
	--plaster-2: #efe7d6;
	--green: #2f4034;
	--green-2: #253328;
	--brass: #b9905a;
	--brass-light: #d9b884;
	--brass-ink: #855f3d;
	--ink: #2a2620;
	--ink-soft: #6b6154;
	--line: #ddd2ba;
	--radius: 4px;
	--container: 1320px;

	--step-0: 1.05rem;
	--step-1: 1.3rem;
	--step-2: 1.7rem;
	--step-3: 2.3rem;
	--step-4: 3.4rem;
	--step-5: 4.8rem;
	--step-6: 6.4rem;

	--space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
	--space-5: 40px; --space-6: 64px; --space-7: 100px; --space-8: 150px;

	--ease: cubic-bezier(.19,1,.22,1);
	--display: 'Cormorant Garamond', ui-serif, Georgia, serif;
	--body: 'Karla', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
	margin: 0; background: var(--plaster); color: var(--ink);
	font-family: var(--body); font-size: var(--step-0); line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	position: relative;
}
/* Warm paper-grain texture, site-wide — a blend-mode overlay works over any
   section background colour beneath it, so one texture covers cream and green
   sections alike without a per-section asset. */
body::after {
	content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none;
	background-image: url('../img/grain.png'); background-repeat: repeat; background-size: 180px 180px;
	mix-blend-mode: overlay; opacity: .5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
	margin: 0 0 .4em; font-family: var(--display); font-weight: 500;
	line-height: 1.05; letter-spacing: -.01em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-4); }
.eyebrow { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--brass-ink); font-weight: 600; }
em, .italic { font-style: italic; }

.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 28px; border-radius: 999px;
	border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
	font: inherit; font-weight: 600; font-size: .92rem; letter-spacing: .02em;
	cursor: pointer; text-decoration: none; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn.primary { background: var(--green); color: var(--plaster); border-color: var(--green); }
.btn.primary:hover { background: var(--brass); border-color: var(--brass); color: var(--green-2); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.on-dark { border-color: var(--brass-light); color: var(--plaster); }
.btn.on-dark:hover { background: var(--brass); border-color: var(--brass); color: var(--green-2); }

/* ============ Header ============ */
.site-head { position: sticky; top: 0; z-index: 200; background: color-mix(in srgb, var(--plaster) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; padding: 20px var(--space-4); gap: var(--space-4); max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 1.5rem; text-decoration: none; color: var(--ink); letter-spacing: .01em; }
.brand .mark { width: 34px; height: 34px; border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--brass); }
.main-nav { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-size: .92rem; letter-spacing: .03em; color: var(--ink-soft); transition: color .2s; }
.main-nav a:hover { color: var(--brass-ink); }

/* ============ Botanical flourish — the one recurring decorative motif ============ */
.ldn-botanical { display: block; height: 46px; width: auto; color: var(--brass); opacity: .55; }
.ldn-botanical.on-dark { color: var(--brass-light); opacity: .5; }
.hero .botanical-wrap { display: flex; justify-content: center; margin-bottom: var(--space-3); }
.hero .botanical-wrap .ldn-botanical { height: 34px; transform: scaleX(-1); }
.section-head .botanical-wrap { display: flex; justify-content: center; margin-bottom: var(--space-3); }

/* ============ Hero ============ */
.hero { padding: var(--space-7) 0 var(--space-6); text-align: center; position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }
/* Signature: real-time WebGL dappled-garden-light behind the hero. Pure
   background layer — the heading is server-rendered and stays the LCP
   regardless of whether this ever mounts (gated on WebGL2 + first
   interaction; see garden-light.js). */
.hero-webgl { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.4s var(--ease); pointer-events: none; }
.hero-webgl.is-live { opacity: 1; }
.hero-webgl canvas { display: block; width: 100%; height: 100%; }
.hero .kicker { color: var(--brass-ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: var(--space-3); font-family: var(--body); font-weight: 600; }
.hero h1 { font-size: clamp(2.8rem, 7vw, var(--step-6)); max-width: 18ch; margin: 0 auto .3em; font-style: italic; font-weight: 400; }
.hero .sub { color: var(--ink-soft); max-width: 52ch; margin: 0 auto var(--space-5); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-photo { margin-top: var(--space-6); aspect-ratio: 21/9; border-radius: var(--radius); overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ============ Organic clip-path reveal (replaces the usual fade+rise) ============ */
.reveal-clip {
	clip-path: ellipse(0% 0% at 50% 50%);
	opacity: 0;
	transition: clip-path 1.1s var(--ease), opacity .5s ease-out;
}
.reveal-clip.is-visible {
	clip-path: ellipse(100% 100% at 50% 50%);
	opacity: 1;
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
	.reveal, .reveal-clip { opacity: 1; transform: none; transition: none; clip-path: none; }
}

/* ============ Sections ============ */
.section { padding: var(--space-7) 0; }
.section.on-dark { background: var(--green); color: var(--plaster); position: relative; z-index: 0; }
.section.on-dark p { color: color-mix(in srgb, var(--plaster) 75%, transparent); }
.section.on-dark > .container { position: relative; z-index: 1; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-6); }
.section-head h2 { font-size: var(--step-4); font-style: italic; font-weight: 400; }

/* Photo-backed dark sections — the walled garden itself standing in for a flat
   colour fill, dimmed just enough to keep type readable. */
.section.on-dark[data-bg]::before {
	content: ''; position: absolute; inset: 0; z-index: 0;
	background-position: center; background-repeat: no-repeat;
	background-image:
		linear-gradient(160deg, color-mix(in srgb, var(--green) 92%, black) 0%, color-mix(in srgb, var(--green) 82%, transparent) 55%, color-mix(in srgb, var(--green) 90%, black) 100%),
		var(--section-photo);
	background-size: cover, cover;
}
.section.on-dark[data-bg="garden"] { --section-photo: url('../img/demo/gallery3.jpg'); }
.section.on-dark[data-bg="guestbook"] { --section-photo: url('../img/demo/gallery2.jpg'); }

/* ============ Signature layout: sticky scroll-linked room rail ============ */
.room-showcase { display: grid; grid-template-columns: 320px 1fr; gap: var(--space-6); align-items: start; }
.room-rail { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; }
.room-rail button {
	all: unset; cursor: pointer; padding: 16px 20px; border-radius: var(--radius);
	display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
	color: var(--ink-soft); transition: background .25s var(--ease), color .25s var(--ease), padding-left .25s var(--ease);
}
.room-rail button .rn { font-family: var(--display); font-size: 1.15rem; }
.room-rail button .rr { font-size: .8rem; opacity: .7; }
.room-rail button:hover { background: var(--plaster-2); }
.room-rail button.is-active { background: var(--green); color: var(--plaster); padding-left: 26px; }
.room-rail button.is-active .rr { opacity: .85; }

.room-stack { display: flex; flex-direction: column; gap: var(--space-8); }
.room-entry { scroll-margin-top: 110px; }
.room-entry .rphoto { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-4); }
.room-entry .rphoto img { width: 100%; height: 100%; object-fit: cover; }
/* Native CSS scroll-driven animation — a subtle image-scale settle as each
   room photo crosses the viewport, driven by the scroll position itself
   (no JS, no scroll listener). Progressive enhancement: browsers without
   support simply keep the JS reveal-clip transition and nothing else. */
@supports ( animation-timeline: view() ) {
	@keyframes ldn-photo-settle {
		from { scale: 1.06; }
		to { scale: 1; }
	}
	.room-entry .rphoto img {
		animation: ldn-photo-settle linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 40%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.room-entry .rphoto img { animation: none; }
}
.room-entry h3 { font-size: var(--step-3); font-style: italic; font-weight: 400; margin-bottom: 6px; }
.room-entry .rmeta { display: flex; gap: var(--space-4); font-size: .85rem; color: var(--brass-ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-3); }
.room-entry .ramenities { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-3) 0; }
.room-entry .ramenities span { font-size: .8rem; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }
.room-entry .rfoot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.room-entry .rrate { font-family: var(--display); font-size: var(--step-2); font-style: italic; }
.room-entry .rrate span { font-family: var(--body); font-size: .78rem; font-style: normal; color: var(--ink-soft); text-transform: uppercase; }

/* amenities row */
.amen-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.amen-item { text-align: center; }
.amen-item .ai-mark { width: 54px; height: 54px; margin: 0 auto var(--space-3); border: 1px solid var(--brass-light); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--brass-light); }
.amen-item h4 { font-family: var(--body); font-size: .95rem; font-weight: 700; margin-bottom: 4px; color: var(--plaster); }
.amen-item p { font-size: .85rem; margin: 0; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.gallery-grid .g-item { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-grid .g-item:hover img { transform: scale(1.06); }
.gallery-grid .g-item.tall { grid-row: span 2; }
/* WebGL hover-ripple canvas — sits over the <img>, only visible once its
   Three.js scene has actually mounted and the pointer is inside the item. */
.gallery-grid .g-item .ripple-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.gallery-grid .g-item .ripple-canvas.is-active { opacity: 1; }

/* testimonials */
.testi-strip { display: flex; gap: var(--space-5); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x proximity; }
.testi-card { flex: 0 0 min(420px, 85vw); scroll-snap-align: start; }
.testi-card blockquote { font-family: var(--display); font-style: italic; font-size: var(--step-2); margin: 0 0 var(--space-3); line-height: 1.35; }
.testi-card cite { font-style: normal; font-size: .85rem; color: var(--ink-soft); }

/* inquiry form */
.inquiry-box {
	background: linear-gradient(165deg, var(--plaster-2) 0%, color-mix(in srgb, var(--brass-light) 18%, var(--plaster-2)) 100%);
	border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); max-width: 620px; margin: 0 auto;
	position: relative;
}
.inquiry-box .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.inquiry-box label { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin: var(--space-3) 0 6px; color: var(--ink-soft); }
.inquiry-box input, .inquiry-box select {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--plaster);
}
.inquiry-box .btn { width: 100%; justify-content: center; margin-top: var(--space-4); }
.inquiry-status { margin-top: var(--space-3); font-size: .9rem; text-align: center; }
.inquiry-status.is-error { color: #a33d2e; }
.inquiry-status.is-ok { color: var(--green); }

/* footer */
.site-foot { padding: var(--space-6) 0 var(--space-4); background: var(--green); color: color-mix(in srgb, var(--plaster) 80%, transparent); }
.site-foot p { color: color-mix(in srgb, var(--plaster) 80%, transparent); }
.site-foot .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-6); }
.site-foot h4 { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brass-light); margin-bottom: var(--space-3); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-foot a { text-decoration: none; font-size: .92rem; }
.site-foot a:hover { color: var(--brass-light); }
.foot-bottom { display: flex; justify-content: space-between; padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; gap: var(--space-2); font-size: .8rem; }

.page-hero { padding: var(--space-6) 0 var(--space-4); text-align: center; }
.entry-content { max-width: 700px; margin: 0 auto; }
.entry-content h2 { font-size: var(--step-3); margin-top: var(--space-5); font-style: italic; font-weight: 400; }
.entry-content img { border-radius: var(--radius); }

@media (max-width: 980px) {
	.main-nav { display: none; }
	.room-showcase { grid-template-columns: 1fr; }
	.room-rail { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
	.room-rail button { flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; padding: 12px 16px; }
	.room-rail button.is-active { padding-left: 16px; }
	.amen-row, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.site-foot .cols { grid-template-columns: 1fr 1fr; }
	.inquiry-box .field-row { grid-template-columns: 1fr; }
}
