/* =====================================================================
   COTTAGE GARDEN DESIGNS — main stylesheet
   Includes:
     1. Design tokens (color palette from the original climbing vine)
     2. Base typography
     3. The scroll-driven vine (ported from climbing-vine-bloom-v7.html)
     4. Header, monogram, primary nav, hamburger
     5. Page layout, hero, intro, services, contact, form
     6. Footer
     7. Responsive breakpoints
     8. Accessibility / reduced-motion fallbacks
   ===================================================================== */

/* ---------- 1. Tokens ------------------------------------------------ */
:root {
	--vine-dark:  #2f5d22;
	--vine:       #4a7c2f;
	--vine-light: #6BA84F;

	--leaf-1: #4f8a2e;
	--leaf-2: #6BA84F;
	--leaf-3: #3f7029;
	--leaf-4: #82bb52;

	--bloom-violet: #8E5BC8;
	--bloom-lilac:  #B07BDD;
	--bloom-pink:   #FF7BA0;
	--bloom-coral:  #FF6B5B;
	--bloom-core:   #FFD24A;

	--bud: #5e9a3a;

	--ink:    #36412c;
	--ink-mid:#4a553c;
	--moss:   #335220;
	--accent: #8E5BC8;

	--paper:    #f7f3e7;
	--paper-2:  #efe6d0;
	--paper-3:  #eef4e8;

	--rule:    rgba(63, 112, 41, 0.18);

	--header-h: 78px;
	--vine-w:  clamp(70px, 11vw, 130px);
}

/* ---------- 2. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	/* Cream backstop matches the bottom of the body gradient. Prevents the
	   default white flash during mobile address-bar show/hide transitions,
	   when the visible viewport briefly grows past the body's rendered box. */
	background-color: var(--paper-2);
}

body {
	margin: 0;
	min-height: 100%;
	font-family: "Spectral", Georgia, serif;
	color: var(--ink);
	line-height: 1.78;
	background:
		radial-gradient(130% 70% at 10% -5%, var(--paper-3) 0%, transparent 55%),
		linear-gradient(180deg, var(--paper-3) 0%, var(--paper) 50%, var(--paper-2) 100%);
	background-attachment: fixed;
}

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

a {
	color: var(--vine-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .2s ease;
}
a:hover, a:focus { color: var(--accent); }

.cgd-skip-link {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.cgd-skip-link:focus {
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: .5rem .9rem;
	background: var(--vine-dark);
	color: #fff;
	border-radius: 6px;
	z-index: 200;
}

.eyebrow {
	font-family: "Spectral", serif;
	font-style: italic;
	letter-spacing: .05em;
	color: var(--vine);
	margin: 0 0 .4rem;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; }

h1 {
	font-weight: 600;
	font-size: clamp(2.6rem, 5.4vw, 5.2rem);
	line-height: 1.02;
	letter-spacing: -.018em;
	color: var(--moss);
	margin: 0 0 1.3rem;
}

h2 {
	font-weight: 600;
	font-size: clamp(1.9rem, 3.3vw, 2.9rem);
	color: var(--vine-dark);
	margin: 3.5rem 0 1rem;
	letter-spacing: -.012em;
	line-height: 1.12;
}

h3 {
	font-weight: 600;
	font-size: clamp(1.25rem, 1.7vw, 1.55rem);
	color: var(--moss);
	margin: 0 0 .4rem;
	letter-spacing: -.005em;
	line-height: 1.2;
}

.lede {
	font-size: clamp(1.18rem, 1.45vw, 1.45rem);
	color: var(--ink-mid);
	line-height: 1.55;
}

.scroll-cue {
	display: inline-block;
	margin-top: 1.4rem;
	font-family: "Fraunces", serif;
	font-style: italic;
	color: var(--accent);
	text-decoration: none;
	animation: cgd-cue-bob 2.4s ease-in-out infinite;
}
@keyframes cgd-cue-bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ---------- 3. The vine --------------------------------------------- */
/* Ported from climbing-vine-bloom-v7.html. The vine lives in a fixed strip
   on the right edge and animates with scroll-driven CSS where supported. */

.vine {
	position: fixed;
	top: 0;
	right: 0;
	bottom: auto;
	height: 100vh;       /* fallback for older browsers */
	height: 100lvh;      /* size to the *large* viewport — when the mobile
	                        nav bar is showing, the bottom of the vine is
	                        simply hidden behind the bar; when the bar hides,
	                        the rest of the vine is revealed without the
	                        strip moving or growing. */
	width: var(--vine-w);
	pointer-events: none;
	z-index: 5;
	transform-origin: bottom right;
}

.vine-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.vine-stem {
	fill: none;
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.anchor {
	position: absolute;
	transform: translate(-50%, -100%) rotate(var(--rot, 0deg));
	transform-origin: 50% 100%;
}
.anchor.center {
	transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
	transform-origin: 50% 50%;
}
.grower {
	width: var(--w, 46px);
	transform-origin: 50% 100%;
	scale: 1;
	will-change: scale;
}
.center .grower { transform-origin: 50% 50%; }
.grower svg { display: block; width: 100%; height: auto; }
.grower svg :is(path, ellipse, circle) { stroke: none; }

.leaf { --w: clamp(34px, 9vw, 58px); }

.flower-anchor {
	position: absolute;
	width: var(--w, 70px);
	height: var(--w, 70px);
	translate: -50% -50%;
}
.flower {
	position: absolute;
	inset: 0;
	perspective: 460px;
	transform-style: preserve-3d;
}

.sepal {
	position: absolute;
	left: 50%;
	bottom: 50%;
	width: calc(var(--w) * 0.16);
	height: calc(var(--w) * 0.28);
	/* -16 keeps the sepals behind the bloom face so the open flower
	   covers them as they shrink away. */
	translate: -50% 0 -16px;
	transform-origin: 50% 100%;
	background: linear-gradient(to top, #3f7029, #6BA84F);
	border-radius: 50% 50% 48% 48% / 78% 78% 22% 22%;
	transform: rotateZ(0deg) rotateX(0deg);
	scale: 0;
	backface-visibility: hidden;
}

.bloom-3d {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 100%;
	height: 100%;
	translate: -50% -50%;
	transform-style: preserve-3d;
	scale: 1;
}
.petal-spoke {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	transform-style: preserve-3d;
	rotate: var(--a, 0deg);
}
.petal {
	position: absolute;
	left: 0;
	bottom: 0;
	width: calc(var(--w) * 0.30);
	height: calc(var(--w) * 0.50);
	translate: -50% 0;
	transform-origin: 50% 100%;
	background: linear-gradient(to top, color-mix(in srgb, var(--pet) 80%, #3a1d4a 12%), var(--pet));
	border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%;
	transform: rotateX(0deg);
	backface-visibility: hidden;
}
.center {
	position: absolute;
	left: 50%;
	top: 50%;
	width: calc(var(--w) * 0.30);
	height: calc(var(--w) * 0.30);
	translate: -50% -50%;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 50%, #6B4226 0 22%, transparent 23%),
		radial-gradient(circle at 38% 40%, #C9920B 0 14%, transparent 15%),
		radial-gradient(circle at 64% 44%, #C9920B 0 13%, transparent 14%),
		radial-gradient(circle at 50% 66%, #C9920B 0 13%, transparent 14%),
		radial-gradient(circle, #FFC93C, #F0A92B);
	box-shadow: inset 0 0 0 2px rgba(107,66,38,.35);
	scale: 1;
}

@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes unfurl { 0%{ scale: 0; } 72%{ scale: 1.12; } 100%{ scale: 1; } }
/* Sepals form a tight upright bud behind the bloom, then tip backward
   in the same direction the bottom petals fold (rotateX going positive)
   in step with the petal fold, while shrinking fast — invisible well
   before the petals reach flat. */
@keyframes sepal-left {
	0%   { transform: rotateZ(-12deg) rotateX(0deg);  scale: 0;    }  /* hidden */
	14%  { transform: rotateZ(-12deg) rotateX(0deg);  scale: 1;    }  /* bud formed */
	55%  { transform: rotateZ(-12deg) rotateX(0deg);  scale: 1;    }  /* still closed */
	62%  { transform: rotateZ(-12deg) rotateX(30deg); scale: 0.5;  }  /* pivoting back, shrinking */
	70%  { transform: rotateZ(-12deg) rotateX(60deg); scale: 0;    }  /* gone before petals reach flat */
	100% { transform: rotateZ(-12deg) rotateX(60deg); scale: 0;    }
}
@keyframes sepal-right {
	0%   { transform: rotateZ(12deg)  rotateX(0deg);  scale: 0;    }
	14%  { transform: rotateZ(12deg)  rotateX(0deg);  scale: 1;    }
	55%  { transform: rotateZ(12deg)  rotateX(0deg);  scale: 1;    }
	62%  { transform: rotateZ(12deg)  rotateX(30deg); scale: 0.5;  }
	70%  { transform: rotateZ(12deg)  rotateX(60deg); scale: 0;    }
	100% { transform: rotateZ(12deg)  rotateX(60deg); scale: 0;    }
}
@keyframes bloom-grow { from { scale: 0; } to { scale: 1; } }
@keyframes fan        { from { rotate: 0deg; } to { rotate: var(--a); } }
@keyframes fold       { from { transform: rotateX(-82deg); } to { transform: rotateX(0deg); } }
@keyframes pop        { from { scale: 0; } to { scale: 1; } }
@keyframes breeze     { from { rotate: -.2deg; } to { rotate: .25deg; } }

@supports (animation-timeline: scroll()) {
	/* dasharray + dashoffset have to match the path's actual rendered length,
	   not the SVG `pathLength` attribute — browsers don't reliably honour
	   pathLength against CSS values when preserveAspectRatio="none" stretches
	   the path. vine.js sets --cgd-stem-len to getTotalLength() on load and
	   on resize; the 1500 fallback is large enough to keep the stem fully
	   hidden during the brief window before JS runs.

	   animation-range: 0 70% compresses the whole vine into the first 70%
	   of scroll, so by the time the contact heading reaches the viewport
	   (it sits at scroll 73%) the vine is fully bloomed. The JS sync
	   scales each leaf/flower's --rs/--re to match. */
	.vine-stem {
		stroke-dasharray: var(--cgd-stem-len, 1500);
		stroke-dashoffset: var(--cgd-stem-len, 1500);
		animation: draw linear both;
		animation-timeline: scroll(root block);
		animation-range: 0% 70%;
	}
	.grower {
		scale: 0;
		animation: unfurl linear both;
		animation-timeline: scroll(root block);
		animation-range: var(--rs) var(--re);
	}
	.sepal, .petal-spoke, .petal, .bloom-3d, .center {
		animation-timing-function: linear;
		animation-fill-mode: both;
		animation-timeline: scroll(root block);
	}
	.sepal-left  { animation-name: sepal-left;  animation-range: var(--sepal-rs) var(--sepal-re); }
	.sepal-right { animation-name: sepal-right; animation-range: var(--sepal-rs) var(--sepal-re); }
	.bloom-3d    { animation-name: bloom-grow;  animation-range: var(--grow-rs)  var(--grow-re); }
	.petal-spoke { animation-name: fan;         animation-range: var(--fan-rs)   var(--fan-re); }
	.petal.fold  { animation-name: fold;        animation-range: var(--fold-rs)  var(--fold-re); }
	.center      { animation-name: pop;         animation-range: var(--core-rs)  var(--core-re); }

	.vine { animation: breeze 8s ease-in-out infinite alternate; }
}

/* ---------- 4. Header, monogram, primary nav ----------------------- */
.cgd-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(247, 243, 231, 0.88);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--rule);
}

.cgd-header-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0.6rem clamp(1rem, 3vw, 2rem) 0.6rem clamp(1rem, 4vw, 2.5rem);
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: var(--header-h);
	padding-right: calc(var(--vine-w) + 1rem);
}

.cgd-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--moss);
	margin-right: auto;
}

.cgd-monogram {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	flex: 0 0 56px;
}
.cgd-monogram svg { width: 100%; height: 100%; display: block; }
.cgd-monogram img { width: 100%; height: auto; }

.cgd-brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.cgd-brand-name {
	font-family: "Fraunces", serif;
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--moss);
	letter-spacing: -.01em;
}
.cgd-brand-tagline {
	font-family: "Spectral", serif;
	font-style: italic;
	font-size: 0.82rem;
	color: var(--vine);
	margin-top: 2px;
}

/* Primary nav */
.cgd-nav { display: flex; align-items: center; }
.cgd-nav-list {
	display: flex;
	gap: 1.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cgd-nav-list a {
	font-family: "Fraunces", serif;
	font-size: 1rem;
	font-weight: 500;
	color: var(--moss);
	text-decoration: none;
	padding: 0.5rem 0;
	position: relative;
}
.cgd-nav-list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .25s ease;
}
/* Underline only on hover / focus. The `.current-menu-item` selector was
   here originally so the active page kept a permanent underline, but on a
   single-page anchor menu WordPress matches every item ("/#welcome",
   "/#about", …) as the current page, so all four items lit up at once. */
.cgd-nav-list a:hover::after,
.cgd-nav-list a:focus::after { transform: scaleX(1); }

/* Sub-menus (desktop) */
.cgd-nav-list .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 200px;
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 8px;
	padding: 0.4rem;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .18s, transform .18s, visibility .18s;
	box-shadow: 0 12px 28px rgba(47, 93, 34, 0.12);
	z-index: 70;
}
.cgd-nav-list .menu-item-has-children {
	position: relative;
}
.cgd-nav-list .menu-item-has-children:hover > .sub-menu,
.cgd-nav-list .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.cgd-nav-list .sub-menu a {
	display: block;
	padding: 0.45rem 0.65rem;
	border-radius: 5px;
}
.cgd-nav-list .sub-menu a:hover { background: rgba(107, 168, 79, 0.12); }
.cgd-nav-list .sub-menu a::after { display: none; }

/* Hamburger toggle */
.cgd-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 8px;
	padding: 0.5rem 0.7rem;
	font-family: "Fraunces", serif;
	font-size: 0.95rem;
	color: var(--moss);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.cgd-nav-toggle:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.cgd-nav-toggle-bars {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	width: 22px;
}
.cgd-nav-toggle-bars span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--vine-dark);
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
.cgd-nav-toggle[aria-expanded="true"] .cgd-nav-toggle-bars span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
.cgd-nav-toggle[aria-expanded="true"] .cgd-nav-toggle-bars span:nth-child(2) {
	opacity: 0;
}
.cgd-nav-toggle[aria-expanded="true"] .cgd-nav-toggle-bars span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 5. Page layout & sections ------------------------------- */
.page-content {
	position: relative;
	z-index: 2;
	max-width: 1180px;
	margin: 6vh 0 16vh;
	margin-left: clamp(1.25rem, 5vw, 4.5rem);
	/* Just enough right gutter to clear the (now narrower) vine strip. */
	padding-right: clamp(100px, 13vw, 180px);
	text-align: left;
}

/* Inside the wide column, body text and prose still want a sensible measure.
   These wrap any paragraph that lives directly in a section so lines don't
   stretch past comfortable reading length. The services grid is a separate
   case (handled below) where short columns are the design intent. */
.cgd-section > p,
.cgd-intro p,
.cgd-services-intro,
.cgd-contact-body { max-width: 64ch; }

.cgd-section { margin-bottom: 5rem; }
.cgd-section > p { margin: 0 0 1.2rem; }

/* Drop cap on the opening paragraph of each section */
.cgd-intro p:first-of-type::first-letter,
.cgd-services-intro::first-letter {
	font-family: "Fraunces", serif;
	font-size: 3.2em;
	float: left;
	line-height: .72;
	padding: .08em .12em 0 0;
	color: var(--accent);
}

/* Hero */
.cgd-hero { margin-top: 0; }
.cgd-hero h1 { margin-top: 0; }

/* Services list */
.cgd-services-list {
	list-style: none;
	margin: 2.4rem 0 0;
	padding: 0;
	counter-reset: cgd-service;
}
.cgd-service {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 1rem 1.25rem;
	padding: 1.6rem 0 1.7rem;
	border-top: 1px solid var(--rule);
}
.cgd-service:last-child { border-bottom: 1px solid var(--rule); }
.cgd-service-body p { max-width: 52ch; }

.cgd-service-num {
	font-family: "Fraunces", serif;
	font-style: italic;
	font-weight: 500;
	font-size: 1.05rem;
	color: var(--vine);
	letter-spacing: .04em;
	padding-top: 0.4rem;
}
.cgd-service-title { color: var(--moss); }
.cgd-service-body p { margin: 0 0 0.7rem; }
.cgd-service-body p:last-child { margin-bottom: 0; }

/* Contact + form */
.cgd-contact { padding-top: 1rem; }
.cgd-contact-body { font-size: 1.08rem; color: var(--ink-mid); }

.cgd-form {
	margin-top: 1.6rem;
	max-width: 720px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid var(--rule);
	border-radius: 14px;
	padding: clamp(1.1rem, 2.5vw, 1.9rem);
	box-shadow: 0 8px 24px rgba(47, 93, 34, 0.06);
}

.cgd-form-fallback p { margin: 0 0 0.7rem; color: var(--ink-mid); }
.cgd-form-fallback code {
	background: var(--paper-2);
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	font-size: 0.92em;
}

/* ----- Forminator overrides --------------------------------------------
   The plugin ships a stylesheet that loads after the theme's, so on tied
   specificity its defaults win. The chained `.forminator-ui.forminator-custom-form`
   ancestor bumps us above its base rules; `!important` on the visual
   properties is the bulletproof seal because the plugin author leans on
   specificity-bumping selectors for individual field types. */
.cgd-form .forminator-ui.forminator-custom-form input[type="text"],
.cgd-form .forminator-ui.forminator-custom-form input[type="email"],
.cgd-form .forminator-ui.forminator-custom-form input[type="tel"],
.cgd-form .forminator-ui.forminator-custom-form input[type="url"],
.cgd-form .forminator-ui.forminator-custom-form input[type="number"],
.cgd-form .forminator-ui.forminator-custom-form select,
.cgd-form .forminator-ui.forminator-custom-form textarea,
.cgd-form .forminator-ui.forminator-custom-form .forminator-input,
.cgd-form .forminator-ui.forminator-custom-form .forminator-textarea {
	font-family: "Spectral", Georgia, serif !important;
	font-size: 1rem !important;
	background: #fff !important;
	border: 1px solid var(--rule) !important;
	border-radius: 8px !important;
	padding: 0.7rem 0.9rem !important;
	color: var(--ink) !important;
	box-shadow: none !important;
	line-height: 1.4 !important;
	height: auto !important;
}
.cgd-form .forminator-ui.forminator-custom-form textarea,
.cgd-form .forminator-ui.forminator-custom-form .forminator-textarea {
	min-height: 7.5rem !important;
}
.cgd-form .forminator-ui.forminator-custom-form input:focus,
.cgd-form .forminator-ui.forminator-custom-form select:focus,
.cgd-form .forminator-ui.forminator-custom-form textarea:focus,
.cgd-form .forminator-ui.forminator-custom-form .forminator-input:focus,
.cgd-form .forminator-ui.forminator-custom-form .forminator-textarea:focus {
	outline: 2px solid var(--accent) !important;
	outline-offset: 1px !important;
	border-color: var(--accent) !important;
}
.cgd-form .forminator-ui.forminator-custom-form .forminator-label,
.cgd-form .forminator-ui.forminator-custom-form label {
	font-family: "Fraunces", Georgia, serif !important;
	font-size: 0.95rem !important;
	font-weight: 500 !important;
	color: var(--moss) !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin-bottom: 0.4rem !important;
}
.cgd-form .forminator-ui.forminator-custom-form .forminator-description {
	font-family: "Spectral", Georgia, serif !important;
	font-size: 0.85rem !important;
	color: var(--ink-mid) !important;
	font-style: italic !important;
}
.cgd-form .forminator-ui.forminator-custom-form .forminator-button,
.cgd-form .forminator-ui.forminator-custom-form .forminator-button-submit,
.cgd-form .forminator-ui.forminator-custom-form button[type="submit"] {
	font-family: "Fraunces", Georgia, serif !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
	background: var(--vine-dark) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 0.75rem 1.7rem !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transition: background .2s ease, transform .12s ease !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	min-width: 0 !important;
	height: auto !important;
}
.cgd-form .forminator-ui.forminator-custom-form .forminator-button:hover,
.cgd-form .forminator-ui.forminator-custom-form .forminator-button-submit:hover,
.cgd-form .forminator-ui.forminator-custom-form button[type="submit"]:hover {
	background: var(--accent) !important;
}
.cgd-form .forminator-ui.forminator-custom-form .forminator-button:active,
.cgd-form .forminator-ui.forminator-custom-form .forminator-button-submit:active,
.cgd-form .forminator-ui.forminator-custom-form button[type="submit"]:active {
	transform: translateY(1px);
}
/* Forminator's upload field has its own button styling for "Choose file" */
.cgd-form .forminator-ui.forminator-custom-form .forminator-upload-file-text,
.cgd-form .forminator-ui.forminator-custom-form .forminator-button-upload {
	font-family: "Fraunces", Georgia, serif !important;
	color: var(--vine-dark) !important;
	background: transparent !important;
	border: 1px dashed var(--rule) !important;
	border-radius: 8px !important;
}

/* Ghost-pill "see more" CTA at the bottom of a section, pointing to
   another page (typically /gallery/). Secondary in hierarchy to the
   filled form Send button — outlined here, filled on hover. The
   chained selector outranks the generic `.cgd-section > p` margin reset. */
.cgd-section p.cgd-section-cta {
	margin: 2.5rem 0 0;
}
.cgd-section-cta a {
	display: inline-block;
	font-family: "Fraunces", serif;
	font-weight: 600;
	font-size: clamp(1.05rem, 1.1vw, 1.2rem);
	letter-spacing: 0;
	color: var(--vine-dark);
	background: transparent;
	border: 1.5px solid var(--vine-dark);
	border-radius: 999px;
	padding: 0.8rem 1.7rem;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, transform .12s ease;
}
.cgd-section-cta a:hover,
.cgd-section-cta a:focus {
	background: var(--vine-dark);
	color: #fff;
	outline: none;
}
.cgd-section-cta a:active {
	transform: translateY(1px);
}

/* Homepage section photos. Each one sits as a visual rest between two
   text sections. 4:3 with object-fit cover accommodates both portrait
   and landscape source photos without distortion. */
.cgd-section-image {
	margin: 2.6rem 0 0;
	padding: 0;
}
.cgd-section-image a {
	display: block;
	cursor: zoom-in;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
}
.cgd-section-image a::after { display: none; } /* suppress nav underline rule */
.cgd-section-image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 14px 38px rgba(47, 93, 34, 0.10);
	transition: transform .35s ease;
}
.cgd-section-image a:hover img {
	transform: scale(1.015);
}
@media (min-width: 1024px) {
	.cgd-section-image {
		margin-top: 3rem;
	}
	.cgd-section-image img {
		aspect-ratio: 16 / 10;
	}
}
@media (max-width: 540px) {
	.cgd-section-image img {
		border-radius: 10px;
	}
}

/* ---------- 5b. Gallery & Blog templates ---------------------------- */

/* Gallery page — wider canvas for image grids, slim vine gutter. */
.cgd-gallery-page {
	max-width: 1320px;
}
.cgd-gallery-head {
	margin-bottom: 2.5rem;
}
.cgd-gallery-head h1 { margin-bottom: 0.8rem; }
.cgd-gallery-head .lede { max-width: 60ch; }

/* WordPress core gallery block — masonry-ish grid that looks decent
   without any extra plugin. */
.cgd-gallery-content .wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
	gap: 1.4rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}
.cgd-gallery-content .wp-block-gallery .wp-block-image,
.cgd-gallery-content .wp-block-gallery > figure,
.cgd-gallery-content .wp-block-gallery > li {
	margin: 0;
	overflow: hidden;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.5);
	/* WP Gallery block applies its own flex layout to children with a
	   stylesheet that loads after the theme's; !important is the only
	   reliable way to force the figure to fill the grid cell. */
	width: 100% !important;
	max-width: none !important;
	flex: 0 0 100% !important;
}
.cgd-gallery-content .wp-block-gallery img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 1 / 1;
	transition: transform .35s ease;
}
@media (max-width: 720px) {
	.cgd-gallery-content .wp-block-gallery {
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem;
	}
}
.cgd-gallery-content .wp-block-gallery figure:hover img {
	transform: scale(1.03);
}
.cgd-gallery-content .wp-block-gallery figcaption {
	font-family: "Spectral", serif;
	font-style: italic;
	font-size: 0.85rem;
	color: var(--ink-mid);
	padding: 0.4rem 0.6rem 0.6rem;
}

/* If the user just dumps individual image blocks, give those some breathing room too. */
.cgd-gallery-content > .wp-block-image,
.cgd-page-content > .wp-block-image {
	margin: 1.4rem 0;
	border-radius: 8px;
	overflow: hidden;
}
.cgd-gallery-content > .wp-block-image img,
.cgd-page-content > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Blog / posts archive --------------------------------------------- */
.cgd-post-summary {
	margin-bottom: 3rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid var(--rule);
}
.cgd-post-summary:last-of-type {
	border-bottom: 0;
}
.cgd-post-title {
	font-family: "Fraunces", serif;
	font-weight: 600;
	font-size: clamp(1.6rem, 2.6vw, 2.2rem);
	color: var(--moss);
	letter-spacing: -.012em;
	line-height: 1.15;
	margin: 0 0 0.4rem;
}
.cgd-post-title a {
	color: inherit;
	text-decoration: none;
}
.cgd-post-title a:hover { color: var(--accent); }
.cgd-post-meta {
	font-family: "Spectral", serif;
	font-style: italic;
	color: var(--vine);
	font-size: 0.95rem;
	margin: 0 0 1rem;
	letter-spacing: .03em;
}
.cgd-post-excerpt p {
	max-width: 64ch;
	margin: 0 0 1rem;
}
.cgd-pagination {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
}
.cgd-pagination .page-numbers {
	font-family: "Fraunces", serif;
	color: var(--moss);
	text-decoration: none;
	padding: 0.4rem 0.8rem;
	border-radius: 6px;
}
.cgd-pagination .page-numbers.current {
	background: var(--vine-dark);
	color: #fff;
}
.cgd-pagination .page-numbers:hover { color: var(--accent); }

/* Single post — featured image and the body */
.cgd-post-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
}
.cgd-tags {
	font-family: "Spectral", serif;
	font-style: italic;
	color: var(--ink-mid);
}

/* ---------- 6. Footer ----------------------------------------------- */
.cgd-footer {
	position: relative;
	z-index: 3;
	margin-top: 6rem;
	background: rgba(247, 243, 231, 0.7);
	border-top: 1px solid var(--rule);
}
.cgd-footer-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
	padding-right: calc(var(--vine-w) + 1rem);
	display: grid;
	gap: 1.5rem 2rem;
	grid-template-columns: minmax(180px, 1fr) 2fr;
	align-items: start;
}
.cgd-footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.cgd-footer-brand .cgd-monogram { width: 48px; height: 48px; flex: 0 0 48px; }
.cgd-footer-tagline {
	margin: 0;
	font-family: "Fraunces", serif;
	color: var(--moss);
	font-weight: 500;
}
.cgd-footer-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.cgd-footer-line { margin: 0; color: var(--ink-mid); font-size: 0.95rem; }
.cgd-footer-nav { margin-top: 0.5rem; }
.cgd-footer-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cgd-footer-list a {
	font-family: "Fraunces", serif;
	color: var(--moss);
	text-decoration: none;
	font-size: 0.95rem;
}
.cgd-footer-list a:hover { color: var(--accent); }
.cgd-footer-credit {
	grid-column: 1 / -1;
	margin: 1rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-size: 0.85rem;
	color: var(--ink-mid);
}

/* ---------- 7. Responsive breakpoints ------------------------------- */

/* Desktop: use the room. Hero gets a 2-column composition that keeps the
   headline dominant on the left and lifts the lede beside it. Services
   become a 2-up grid. */
@media (min-width: 1024px) {
	.page-content {
		margin-top: 8vh;
	}

	/* Hero stacks on all sizes — the lede is short enough now that a side
	   column would just leave it orphaned, and stacking lets the hero photo
	   sit at the full content width below it. */
	.cgd-hero .lede {
		margin-top: 0;
		font-size: clamp(1.2rem, 1.4vw, 1.55rem);
	}

	.cgd-intro h2 { margin-top: 0; }

	/* Services lay out as steps across the page on wide screens.
	   Each step stacks its number on top of the title + body. The horizontal
	   rules that frame the section move from per-step (which would only
	   span one column at a time, broken by the column gaps) to the list
	   container itself, so they read as a single divider above the first
	   step and a single divider below all three. */
	.cgd-services-list {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 2.5rem;
		row-gap: 0;
		border-top: 1px solid var(--rule);
		border-bottom: 1px solid var(--rule);
		padding: 1.6rem 0 1.8rem;
	}
	.cgd-service {
		grid-template-columns: 1fr;
		gap: 0.5rem;
		padding: 0;
		border-top: 0;
		/* Outer 3-col grid stretches each step to match the tallest one
		   (Step 1 has the longest body). Without this, the inner grid
		   distributes the extra height across both rows and the number
		   cell grows. Pack rows to the top instead. */
		align-content: start;
	}
	.cgd-service:last-child { border-bottom: 0; }
	.cgd-service-num { padding-top: 0; }
}

/* Very wide monitors: vine stays slim so it reads as an accent, not a panel.
   Content centres a bit more. */
@media (min-width: 1500px) {
	:root { --vine-w: clamp(120px, 9vw, 160px); }
	.page-content {
		margin-left: clamp(2.5rem, 7vw, 7.5rem);
	}
}

@media (max-width: 880px) {
	:root {
		--vine-w: clamp(56px, 12vw, 100px);
		--header-h: 64px;
	}

	.cgd-header-inner {
		/* Keep the toggle clear of the vine strip on the right */
		padding-right: calc(var(--vine-w) + 0.6rem);
	}

	.cgd-nav-toggle { display: inline-flex; }

	.cgd-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--rule);
		box-shadow: 0 18px 32px rgba(47, 93, 34, 0.08);
		max-height: 0;
		overflow: hidden;
		transition: max-height .3s ease;
	}
	.cgd-nav[data-open="true"] { max-height: 80vh; overflow: auto; }

	.cgd-nav-list {
		flex-direction: column;
		gap: 0;
		padding: 0.5rem clamp(1rem, 4vw, 2rem) 1rem;
	}
	.cgd-nav-list > .menu-item {
		border-bottom: 1px solid var(--rule);
	}
	.cgd-nav-list > .menu-item:last-child { border-bottom: 0; }
	.cgd-nav-list a {
		display: block;
		padding: 0.85rem 0;
		font-size: 1.1rem;
	}
	.cgd-nav-list a::after { display: none; }

	.cgd-nav-list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: transparent;
		border: 0;
		box-shadow: none;
		padding: 0 0 0.6rem 1rem;
	}
	.cgd-nav-list .sub-menu a {
		padding: 0.45rem 0;
		font-size: 1rem;
		color: var(--ink-mid);
	}

	.page-content {
		margin-top: 4vh;
		padding-right: clamp(70px, 14vw, 120px);
	}

	.cgd-footer-inner {
		grid-template-columns: 1fr;
		padding-right: clamp(1rem, 4vw, 2rem);
	}
}

@media (max-width: 540px) {
	:root { --vine-w: 48px; }

	body { line-height: 1.7; }

	.cgd-brand-tagline { display: none; }
	.cgd-brand-name { font-size: 1.1rem; }
	.cgd-monogram { width: 44px; height: 44px; flex: 0 0 44px; }

	.page-content {
		margin: 3vh 0 12vh;
		margin-left: 1.25rem;
		padding-right: 60px;
	}

	.cgd-service {
		grid-template-columns: 1fr;
		gap: 0.3rem;
	}
	.cgd-service-num { padding-top: 0; }

	.cgd-form { padding: 1rem; }
}

/* ---------- 8. Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	.vine-stem { stroke-dashoffset: 0 !important; animation: none !important; }
	.grower { scale: 1 !important; animation: none !important; }
	.sepal  { scale: 0 !important; }
	.bloom-3d { scale: 1 !important; }
	.petal-spoke { rotate: var(--a) !important; }
	.petal  { transform: rotateX(0deg) !important; }
	.center { scale: 1 !important; }
	.sepal, .petal-spoke, .petal, .bloom-3d, .center { animation: none !important; }
	.vine { animation: none !important; rotate: 0deg !important; }
	.scroll-cue { animation: none; }

	.cgd-nav { transition: none; }
	.cgd-nav-list a::after { transition: none; }
}
