/**
 * Marketing homepage (landing page) styles — v1.0.7.
 *
 * Everything is scoped under .wim-home so Divi and other theme styles
 * don't bleed in and we don't bleed out. Uses a warm neutral palette
 * with a gold accent that matches the plugin's default invitation
 * accent, so the landing page feels consistent with the product.
 *
 * Structure:
 *   - Design tokens (CSS custom properties on the root wrapper)
 *   - Section rhythm (padding, containers, section headers)
 *   - Hero
 *   - Showcase (template grid)
 *   - How it works (steps)
 *   - Features
 *   - FAQ (accordion)
 *   - Final CTA
 *   - Utilities (screen-reader text, skip link)
 *   - Responsive breakpoints
 */

/* =============================================================
 * Design tokens
 * ============================================================= */
.wim-home {
	/* Type + spacing scale */
	--wim-home-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wim-home-font-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
	--wim-home-line: 1.6;

	/* Palette */
	--wim-home-bg: #faf7f0;
	--wim-home-bg-alt: #ffffff;
	--wim-home-surface: #ffffff;
	--wim-home-border: #eae2cf;
	--wim-home-text: #2a241a;
	--wim-home-text-soft: #6a5f4c;
	--wim-home-text-faint: #8c8272;
	--wim-home-accent: #c9a96e;
	--wim-home-accent-strong: #a88c4f;

	/* Radius + shadow */
	--wim-home-radius: 8px;
	--wim-home-radius-lg: 14px;
	--wim-home-shadow: 0 1px 2px rgba(42, 36, 26, 0.04), 0 8px 24px rgba(42, 36, 26, 0.06);
	--wim-home-shadow-lg: 0 4px 8px rgba(42, 36, 26, 0.05), 0 20px 40px rgba(42, 36, 26, 0.1);

	/* Layout */
	--wim-home-container: 1180px;
	--wim-home-container-narrow: 760px;
	--wim-home-section-pad: clamp(3rem, 6vw, 5rem);

	box-sizing: border-box;
	font-family: var(--wim-home-font);
	color: var(--wim-home-text);
	line-height: var(--wim-home-line);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.wim-home *,
.wim-home *::before,
.wim-home *::after {
	box-sizing: border-box;
}

/* Normalise some Divi defaults that leak into content */
.wim-home p {
	margin: 0 0 1em;
	color: inherit;
}
.wim-home p:last-child {
	margin-bottom: 0;
}
.wim-home ul,
.wim-home ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wim-home h1,
.wim-home h2,
.wim-home h3 {
	font-family: var(--wim-home-font-serif);
	font-weight: 500;
	color: var(--wim-home-text);
	line-height: 1.15;
	margin: 0;
	letter-spacing: -0.01em;
}
.wim-home img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* =============================================================
 * Section rhythm
 * ============================================================= */
.wim-home__container {
	width: 100%;
	max-width: var(--wim-home-container);
	margin: 0 auto;
	padding-left: clamp(1rem, 4vw, 2rem);
	padding-right: clamp(1rem, 4vw, 2rem);
}
.wim-home__container--narrow {
	max-width: var(--wim-home-container-narrow);
}

.wim-home__section-header {
	text-align: center;
	max-width: 680px;
	margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.wim-home__section-heading {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-bottom: 0.5em;
}
.wim-home__section-lead {
	font-size: 1.05rem;
	color: var(--wim-home-text-soft);
	margin: 0;
}

/* =============================================================
 * Hero
 * ============================================================= */
.wim-home__hero {
	background:
		radial-gradient(ellipse at top left, rgba(201, 169, 110, 0.08), transparent 55%),
		radial-gradient(ellipse at bottom right, rgba(201, 169, 110, 0.06), transparent 55%),
		var(--wim-home-bg);
	padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
	border-bottom: 1px solid var(--wim-home-border);
}
.wim-home__hero-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: center;
}
.wim-home__hero-media {
	order: -1;
	border-radius: var(--wim-home-radius-lg);
	overflow: hidden;
	box-shadow: var(--wim-home-shadow-lg);
	/* The bundled hero image is wide letterbox (~2.3:1). On narrow
	   viewports where the image stacks above the copy, cap its
	   height so it doesn't push the headline below the fold. */
	max-height: min(40vh, 340px);
}
.wim-home__hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 55%;
}
.wim-home__hero-copy {
	text-align: left;
}
.wim-home__hero-copy.is-centered {
	text-align: center;
	max-width: 760px;
	margin: 0 auto;
}
.wim-home__eyebrow {
	font-family: var(--wim-home-font);
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wim-home-accent-strong);
	margin: 0 0 0.5rem;
}
.wim-home__headline {
	font-size: clamp(2rem, 5.5vw, 3.25rem);
	line-height: 1.1;
	margin-bottom: 1rem;
}
.wim-home__subheadline {
	font-size: clamp(1.05rem, 2vw, 1.2rem);
	color: var(--wim-home-text-soft);
	margin-bottom: 2rem;
	max-width: 580px;
}
.wim-home__hero-copy.is-centered .wim-home__subheadline {
	margin-left: auto;
	margin-right: auto;
}
.wim-home__hero-cta {
	margin: 0 0 1.5rem;
}
.wim-home__hero-copy.is-centered .wim-home__hero-cta,
.wim-home__hero-copy.is-centered .wim-home__trust-line {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.wim-home__trust-line {
	font-size: 0.92rem;
	color: var(--wim-home-text-faint);
	margin: 0;
	line-height: 1.55;
}

/* Restyle the embedded purchase button to match the homepage tone. */
.wim-home .wim-purchase {
	padding: 0;
	background: transparent;
	border: 0;
	max-width: none;
	display: inline-flex;
	flex-direction: column;
	gap: 0.5em;
	text-align: left;
}
.wim-home__hero-copy.is-centered .wim-purchase,
.wim-home__cta .wim-purchase {
	text-align: center;
	align-items: center;
}
.wim-home .wim-purchase__price {
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--wim-home-text-soft);
	margin-bottom: 0.35em;
}
.wim-home .wim-purchase__button {
	display: inline-block;
	padding: 1rem 2rem;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	background: var(--wim-home-accent-strong);
	color: #fff;
	border: 0;
	border-radius: var(--wim-home-radius);
	cursor: pointer;
	transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
	box-shadow: 0 4px 12px rgba(168, 140, 79, 0.25);
}
.wim-home .wim-purchase__button:hover,
.wim-home .wim-purchase__button:focus-visible {
	background: #927844;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(168, 140, 79, 0.3);
}
.wim-home .wim-purchase__button:focus-visible {
	outline: 2px solid var(--wim-home-accent);
	outline-offset: 3px;
}
.wim-home .wim-purchase__small {
	font-size: 0.85rem;
	color: var(--wim-home-text-faint);
	margin: 0.25rem 0 0;
}

/* =============================================================
 * Showcase (template grid)
 * ============================================================= */
.wim-home__showcase {
	background: var(--wim-home-bg-alt);
	padding: var(--wim-home-section-pad) 0;
}
.wim-home__template-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.25rem, 3vw, 2rem);
}
.wim-home__template {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--wim-home-surface);
	border: 1px solid var(--wim-home-border);
	border-radius: var(--wim-home-radius-lg);
	padding: 1.5rem 1rem 1.25rem;
	transition: transform 200ms ease, box-shadow 200ms ease;
	box-shadow: var(--wim-home-shadow);
}
.wim-home__template:hover {
	transform: translateY(-3px);
	box-shadow: var(--wim-home-shadow-lg);
}
.wim-home__template-preview {
	width: 100%;
	aspect-ratio: 3 / 4;
	max-width: 240px;
	margin-bottom: 1.1rem;
	overflow: hidden;
	border-radius: var(--wim-home-radius);
	background: #f4ede1;
}
.wim-home__template-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.wim-home__template-preview--empty {
	background: repeating-linear-gradient(45deg, #f4ede1, #f4ede1 6px, #ebe0cb 6px, #ebe0cb 12px);
}
.wim-home__template-name {
	font-size: 1.15rem;
	margin: 0 0 0.5rem;
	text-align: center;
	font-family: var(--wim-home-font-serif);
}
.wim-home__template-dots {
	display: flex;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 0.25rem;
}
.wim-home__template-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wim-dot, #ccc);
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* =============================================================
 * How it works (steps)
 * ============================================================= */
.wim-home__how {
	background: var(--wim-home-bg);
	padding: var(--wim-home-section-pad) 0;
}
.wim-home__steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.5rem, 3vw, 2.25rem);
	counter-reset: wim-steps;
}
.wim-home__step {
	background: var(--wim-home-surface);
	border: 1px solid var(--wim-home-border);
	border-radius: var(--wim-home-radius-lg);
	padding: 2rem 1.75rem 1.75rem;
	text-align: left;
	position: relative;
	box-shadow: var(--wim-home-shadow);
}
.wim-home__step-num {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--wim-home-accent-strong);
	color: #fff;
	font-family: var(--wim-home-font-serif);
	font-size: 1.25rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.25rem;
	box-shadow: 0 4px 10px rgba(168, 140, 79, 0.25);
}
.wim-home__step-title {
	font-size: 1.3rem;
	margin: 0 0 0.5em;
}
.wim-home__step-body {
	color: var(--wim-home-text-soft);
	font-size: 1rem;
	margin: 0;
}

/* =============================================================
 * Features
 * ============================================================= */
.wim-home__features {
	background: var(--wim-home-bg-alt);
	padding: var(--wim-home-section-pad) 0;
}
.wim-home__feature-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.wim-home__feature {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem 1.25rem 1.25rem;
	background: var(--wim-home-bg);
	border: 1px solid var(--wim-home-border);
	border-radius: var(--wim-home-radius);
}
.wim-home__feature-icon {
	width: 36px;
	height: 36px;
	color: var(--wim-home-accent-strong);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.wim-home__feature-icon svg {
	width: 100%;
	height: 100%;
}
.wim-home__feature-title {
	font-family: var(--wim-home-font);
	font-weight: 600;
	font-size: 1.05rem;
	margin: 0;
	color: var(--wim-home-text);
	letter-spacing: -0.005em;
}
.wim-home__feature-body {
	font-size: 0.95rem;
	color: var(--wim-home-text-soft);
	margin: 0;
	line-height: 1.5;
}

/* =============================================================
 * FAQ
 * ============================================================= */
.wim-home__faq {
	background: var(--wim-home-bg);
	padding: var(--wim-home-section-pad) 0;
}
.wim-home__faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.wim-home__faq-item {
	background: var(--wim-home-surface);
	border: 1px solid var(--wim-home-border);
	border-radius: var(--wim-home-radius);
	overflow: hidden;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}
.wim-home__faq-item[open] {
	border-color: var(--wim-home-accent);
	box-shadow: var(--wim-home-shadow);
}
.wim-home__faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.25rem;
	cursor: pointer;
	font-weight: 600;
	font-size: 1.02rem;
	color: var(--wim-home-text);
	list-style: none;
	user-select: none;
}
.wim-home__faq-question::-webkit-details-marker {
	display: none;
}
.wim-home__faq-question:hover {
	background: rgba(201, 169, 110, 0.05);
}
.wim-home__faq-question:focus-visible {
	outline: 2px solid var(--wim-home-accent);
	outline-offset: -2px;
}
.wim-home__faq-q-text {
	flex: 1 1 auto;
}
.wim-home__faq-chevron {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: var(--wim-home-accent-strong);
	transition: transform 200ms ease;
}
.wim-home__faq-chevron svg {
	width: 100%;
	height: 100%;
}
.wim-home__faq-item[open] .wim-home__faq-chevron {
	transform: rotate(180deg);
}
.wim-home__faq-answer {
	padding: 0 1.25rem 1.25rem;
	color: var(--wim-home-text-soft);
	font-size: 0.98rem;
	line-height: 1.6;
}
.wim-home__faq-answer p {
	margin: 0;
}

/* =============================================================
 * Final CTA
 * ============================================================= */
.wim-home__cta {
	background:
		linear-gradient(180deg, var(--wim-home-bg) 0%, #f2e9d3 100%);
	padding: clamp(3rem, 7vw, 5.5rem) 0;
	text-align: center;
	border-top: 1px solid var(--wim-home-border);
}
.wim-home__cta-heading {
	font-size: clamp(1.75rem, 4.5vw, 2.75rem);
	margin-bottom: 1rem;
}
.wim-home__cta-lead {
	font-size: 1.1rem;
	color: var(--wim-home-text-soft);
	margin-bottom: 2rem;
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}
.wim-home__cta-button {
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
}

/* Final-CTA specific trust-line centring. The .wim-home__trust-line
   base rule doesn't force alignment because the hero context handles
   it differently (via flex on is-centered). In the CTA we want the
   text itself centred, narrow enough to wrap onto two lines at
   desktop widths so it forms a tight centred block matching the
   button's visual width rather than escaping past it. */
.wim-home__cta .wim-home__trust-line {
	text-align: center;
	max-width: 340px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.7;
}

/* =============================================================
 * Utilities
 * ============================================================= */
.wim-home__skip {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.wim-home__skip:focus {
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.5rem 1rem;
	background: var(--wim-home-text);
	color: #fff;
	border-radius: var(--wim-home-radius);
	z-index: 1000;
	font-size: 0.9rem;
}
.wim-home .screen-reader-text {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* =============================================================
 * Responsive breakpoints
 *
 * Mobile first: default styles above target narrow screens. These
 * breakpoints progressively enhance for wider layouts.
 * ============================================================= */

/* Tablet-ish — 560px and up */
@media (min-width: 560px) {
	.wim-home__template-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.wim-home__feature-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Small desktop — 860px and up */
@media (min-width: 860px) {
	.wim-home__template-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.wim-home__steps {
		grid-template-columns: repeat(3, 1fr);
	}
	.wim-home__feature-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop — 1100px and up */
@media (min-width: 1100px) {
	.wim-home__template-grid {
		grid-template-columns: repeat(4, 1fr);
	}
	.wim-home__feature-grid {
		grid-template-columns: repeat(4, 1fr);
	}
	/* Hero: split layout when a hero image is present */
	.wim-home__hero-inner {
		grid-template-columns: 1.15fr 1fr;
	}
	.wim-home__hero-media {
		order: 0; /* image on the right at wide sizes */
		max-height: none; /* desktop: let image size to its column */
		aspect-ratio: 4 / 3; /* tighter crop than source for visual balance */
	}
	/* If there's no hero image, the copy block sits centred. */
	.wim-home__hero-inner:not(:has(.wim-home__hero-media)) {
		grid-template-columns: 1fr;
	}
}

/* Reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
	.wim-home__template,
	.wim-home__faq-chevron,
	.wim-home__faq-item,
	.wim-home .wim-purchase__button {
		transition: none;
	}
}
