/* ==========================================================================
   Lychee Theme: site.css
   --------------------------------------------------------------------------
   The one hand-written stylesheet. Rule: no colour, font or size values here,
   only theme.json tokens (--wp--preset--*, --wp--custom--*). Rebranding a client
   copy changes theme.json, not this file. Layout numbers (breakpoints, ratios,
   1px lines) are structure, not brand, and may stay.

   1  Scroll-craft engine themed with our tokens
   2  Base: focus, selection, media
   3  Header and footer
   4  Block style variations (inc/block-styles.php)
   5  Pattern structure (patterns/)
   6  Phones
   ========================================================================== */

/* 1  Scroll-craft engine themed with our tokens ---------------------------- */
:root {
	--sc-canvas: var(--wp--preset--color--base);
	--sc-surface: var(--wp--preset--color--surface);
	--sc-ink: var(--wp--preset--color--contrast);
	--sc-ink-soft: var(--wp--preset--color--muted);
	--sc-accent: var(--wp--preset--color--primary);
	--sc-accent-ink: var(--wp--preset--color--base);
	--sc-font-display: var(--wp--preset--font-family--heading);
	--sc-font-text: var(--wp--preset--font-family--body);
	--sc-t-base: var(--wp--preset--font-size--medium);
	--sc-leading-body: var(--wp--custom--line-height--body);
	--sc-r-sm: var(--wp--custom--radius--small);
	--sc-r-md: var(--wp--custom--radius--medium);
	--sc-r-lg: var(--wp--custom--radius--large);
}

/* The engine sets body letter-spacing and font smoothing; keep WordPress's text settings. */
body {
	letter-spacing: normal;
}

/* 2  Base ----------------------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* The engine makes images block-level; captions and inline icons still behave. */
.wp-block-image img,
.wp-block-post-featured-image img {
	height: auto;
}

.wp-block-image[class*="aspect"] img,
.wp-block-image img[style*="aspect-ratio"] {
	height: auto;
	width: 100%;
}

/* Long text never runs wider than a comfortable line. */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol {
	max-width: var(--wp--custom--measure);
}

.wp-block-quote:not([class*="is-style-"]) {
	border-left: 2px solid var(--wp--preset--color--primary);
	padding-left: var(--wp--preset--spacing--40);
	margin-left: 0;
}

.wp-block-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
}

/* Outline buttons: a line in the text colour, filled on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* Full-width sections carry their own padding, so they sit flush against each other and
   against the header and footer (no block gap strips between coloured bands). */
.wp-site-blocks > main,
.wp-site-blocks > .site-footer,
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * {
	margin-block-start: 0;
}

/* 3  Header and footer ---------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--border);
	transition: box-shadow 200ms ease;
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header.is-scrolled {
	box-shadow: var(--wp--custom--shadow--small);
}

.site-header .wp-block-site-title a {
	text-decoration: none;
}

/* The logo is an Image block (class site-logo) so Editors can replace it; size set here. */
.site-logo {
	margin: 0;
}

.site-logo img {
	display: block;
	height: 40px;
	width: auto;
}

.site-header .wp-block-navigation a:hover,
.site-footer .wp-block-navigation a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.site-footer a {
	color: inherit;
}

/* 4  Block style variations ------------------------------------------------ */
.is-style-eyebrow {
	color: var(--wp--preset--color--secondary);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: var(--wp--custom--line-height--snug);
	text-transform: uppercase;
}

/* Eyebrows on a coloured ground take the ground's text colour. */
.has-text-color .is-style-eyebrow,
.is-style-eyebrow.has-text-color {
	color: inherit;
}

.is-style-lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--snug);
	max-width: var(--wp--custom--measure);
}

.has-text-align-center.is-style-lede {
	margin-left: auto;
	margin-right: auto;
}

.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--custom--shadow--small);
	padding: var(--wp--preset--spacing--50);
}

.is-style-panel {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--large);
	padding: var(--wp--preset--spacing--60);
}

.is-style-inset {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	padding: var(--wp--preset--spacing--50);
}

.wp-block-image.is-style-soft img,
.wp-block-post-featured-image.is-style-soft img,
.wp-block-post-featured-image.is-style-soft {
	border-radius: var(--wp--custom--radius--medium);
	overflow: hidden;
}

.wp-block-image.is-style-frame {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--medium);
	padding: var(--wp--preset--spacing--30);
}

.wp-block-list.is-style-checks,
.wp-block-list.is-style-plain {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-checks li,
.wp-block-list.is-style-plain li {
	margin-bottom: var(--wp--preset--spacing--20);
}

.wp-block-list.is-style-checks li {
	padding-left: 1.6em;
	position: relative;
}

.wp-block-list.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0.15em;
	top: 0.45em;
	width: 0.9em;
	height: 0.5em;
	border-left: 2px solid var(--wp--preset--color--primary);
	border-bottom: 2px solid var(--wp--preset--color--primary);
	transform: rotate(-45deg);
}

.wp-block-details.is-style-faq {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-details.is-style-faq:first-child {
	border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-details.is-style-faq summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--snug);
	list-style: none;
	padding-right: 2em;
	position: relative;
}

.wp-block-details.is-style-faq summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 0;
	color: var(--wp--preset--color--primary);
	transition: transform 200ms ease;
}

.wp-block-details.is-style-faq[open] summary::after {
	transform: rotate(45deg);
}

.wp-block-details.is-style-faq > :not(summary) {
	margin-top: var(--wp--preset--spacing--30);
	max-width: var(--wp--custom--measure);
}

.wp-block-quote.is-style-testimonial {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	margin: 0;
	padding: var(--wp--preset--spacing--50);
}

.wp-block-quote.is-style-testimonial p {
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--body);
}

.wp-block-button.is-style-text-link > .wp-block-button__link {
	background: transparent;
	border-radius: 0;
	color: var(--wp--preset--color--primary);
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.wp-block-button.is-style-text-link > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--contrast);
}

.wp-block-table.is-style-lined td,
.wp-block-table.is-style-lined th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
}

/* 5  Pattern structure ------------------------------------------------------ */

/* Alternating rows: the second row mirrors on wide screens. */
@media (min-width: 782px) {
	.wp-block-columns.is-reversed {
		flex-direction: row-reverse;
	}
}

/* Hero split: picture first on phones. */
@media (max-width: 781px) {
	.wp-block-columns > .lychee-media-first {
		order: -1;
	}
}

/* Process steps */
.lychee-step {
	border-top: 2px solid var(--wp--preset--color--primary);
	padding-top: var(--wp--preset--spacing--40);
}

.lychee-step__number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	line-height: 1;
}

/* Stats */
.lychee-stat__number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* Timeline: a line on the left, a dot per milestone. */
.lychee-timeline {
	border-left: 2px solid var(--wp--preset--color--border);
	padding-left: var(--wp--preset--spacing--50);
}

.lychee-timeline__item {
	position: relative;
}

.lychee-timeline__item::before {
	content: "";
	position: absolute;
	left: calc(-1 * var(--wp--preset--spacing--50) - 7px);
	top: 0.35em;
	width: 12px;
	height: 12px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 4px var(--wp--preset--color--base);
}

/* Logos: quiet until hovered. */
.lychee-logos {
	align-items: center;
}

.lychee-logo img {
	filter: grayscale(1);
	margin-inline: auto;
	max-height: 4rem;
	opacity: 0.75;
	transition: filter 200ms ease, opacity 200ms ease;
	width: auto;
}

.lychee-logo img:hover {
	filter: none;
	opacity: 1;
}

/* Pricing: the featured plan stands forward. */
.lychee-plan.is-featured {
	border: 2px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--medium);
}

.lychee-plan .wp-block-buttons {
	margin-top: auto;
}

.lychee-price {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	line-height: 1;
}

/* Contact: the form slot */
.lychee-form-slot {
	min-height: 18rem;
}

/* FAQ: details sit flush. */
.lychee-faq > .wp-block-details {
	margin-block: 0;
}

/* Scroll-craft hero (Level 4): one pinned stage, the picture settles as the act runs.
   --sc-p (0 to 1) is published by the engine on the act. Without JavaScript the
   section is a normal full-height hero. */
.lychee-scroll-hero {
	position: relative;
}

/* No `position` on the stage: the engine makes .sc-stage sticky, and a plain position
   here would override it and stop the pin (the engine's own warning in scrollcraft.css). */
.lychee-scroll-hero__stage {
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--70);
}

.lychee-scroll-hero__media {
	position: absolute;
	inset: 0;
	margin: 0 !important;
	max-width: none !important;
	z-index: 0;
}

.lychee-scroll-hero__media img {
	height: 100%;
	object-fit: cover;
	opacity: 0.45;
	transform: scale(calc(1.12 - 0.12 * var(--sc-p, 0)));
	transform-origin: center;
	width: 100%;
}

.lychee-scroll-hero__copy {
	position: relative;
	z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
	.lychee-scroll-hero__media img {
		transform: none;
	}
}

/* 6  Tablets and phones ------------------------------------------------------ */
.site-header .wp-block-site-title {
	white-space: nowrap;
}

/* Below desktop the header keeps the logo and menu; the call to action lives in the page. */
@media (max-width: 1023px) {
	.site-header .wp-block-buttons.site-header__cta {
		display: none;
	}
}
