/*
Theme Name: Clickfade
Description: Block theme for the marketing website. Tokens live in theme.json; this file holds the rules theme.json cannot express (layout polish, motion, the product mockups). No JavaScript.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: clickfade-theme
*/

/* ==========================================================================
   Base
   ========================================================================== */
html {
	scroll-behavior: smooth;
	interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
:where(a, button, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 4px;
}
a {
	transition: color 0.2s ease;
}
h1,
h2,
h3 {
	text-wrap: balance;
}

/* ==========================================================================
   Header: sticky, frosted
   ========================================================================== */
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: color-mix(in srgb, var(--wp--preset--color--background) 80%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(14px);
	backdrop-filter: saturate(1.6) blur(14px);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent);
}
.cf-header .wp-block-site-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.cf-header .wp-block-navigation-item a,
.cf-header .cf-login a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.cf-header .wp-block-navigation-item a:hover,
.cf-header .cf-login a:hover {
	color: var(--wp--preset--color--accent);
}
@media (max-width: 599px) {
	.cf-login {
		display: none;
	}
}

/* ==========================================================================
   Buttons: arrow that slides, lift on hover
   ========================================================================== */
.wp-block-button__link {
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:active {
	transform: translateY(0);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--background);
}
main .wp-block-button:not(.is-style-outline) .wp-block-button__link::after {
	content: "\2192";
	margin-inline-start: 0.5em;
	transition: transform 0.2s ease;
}
main .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.cf-section {
	padding-block: var(--wp--preset--spacing--50);
}
@media (min-width: 960px) {
	.cf-section {
		padding-block: var(--wp--preset--spacing--60);
	}
}
.cf-section > h2 {
	margin-bottom: var(--wp--preset--spacing--10);
}
.cf-lead {
	max-width: 36rem;
	margin-inline: auto;
}
.cf-section > .cf-lead {
	margin-bottom: var(--wp--preset--spacing--40);
}
.cf-eyebrow {
	margin-bottom: 0;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--wp--preset--color--accent);
}
.has-night-background-color .cf-eyebrow {
	color: color-mix(in srgb, var(--wp--preset--color--accent) 55%, white);
}

.cf-grad {
	background: var(--wp--preset--gradient--accent-text);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Hero: radar sweep, rings, product mockup
   ========================================================================== */
.cf-hero {
	position: relative;
	overflow: hidden;
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: 0;
	background: var(--wp--preset--gradient--hero-glow);
	text-align: center;
}
@media (min-width: 960px) {
	.cf-hero {
		padding-top: var(--wp--preset--spacing--60);
	}
}
.cf-hero > * {
	position: relative;
	z-index: 1;
}
.cf-hero h1 {
	letter-spacing: -0.03em;
	max-width: 18em;
	text-wrap: balance;
	margin-inline: auto;
}
.cf-hero .cf-sub {
	max-width: 38rem;
	margin-inline: auto;
}
.cf-hero::before,
.cf-hero::after {
	content: "";
	position: absolute;
	z-index: 0;
	left: 50%;
	top: 30%;
	width: min(1500px, 220vw);
	aspect-ratio: 1;
	translate: -50% -50%;
	border-radius: 50%;
	pointer-events: none;
}
.cf-hero::before {
	background: repeating-radial-gradient(circle, transparent 0 7.5%, color-mix(in srgb, var(--wp--preset--color--accent) 16%, transparent) 7.5% calc(7.5% + 1px));
	-webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
	mask-image: radial-gradient(circle, #000 0%, transparent 62%);
}
.cf-hero::after {
	background: conic-gradient(from 0deg, transparent 0deg 290deg, color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent) 360deg);
	-webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
	mask-image: radial-gradient(circle, #000 0%, transparent 62%);
	animation: cf-sweep 9s linear infinite;
}
@keyframes cf-sweep {
	to {
		rotate: 360deg;
	}
}

.cf-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0;
	padding: 0.375rem 0.875rem;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius-pill);
	box-shadow: var(--wp--preset--shadow--soft);
	color: var(--wp--preset--color--muted);
}
.cf-pill::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--loss);
	animation: cf-pulse 2s ease-out infinite;
}
@keyframes cf-pulse {
	0% {
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--wp--preset--color--loss) 55%, transparent);
	}
	100% {
		box-shadow: 0 0 0 8px transparent;
	}
}

.cf-checks {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem var(--wp--preset--spacing--30);
	list-style: none;
	padding: 0;
	margin-block: 0;
	color: var(--wp--preset--color--muted);
}
.cf-checks li::before {
	content: "\2713";
	margin-inline-end: 0.4em;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* Load-in sequence (translate/opacity only, so hover transforms still work) */
.cf-hero .cf-pill,
.cf-hero .cf-sub,
.cf-hero .wp-block-buttons,
.cf-hero .cf-checks {
	animation: cf-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-hero .cf-sub {
	animation-delay: 0.08s;
}
.cf-hero .wp-block-buttons {
	animation-delay: 0.16s;
}
.cf-hero .cf-checks {
	animation-delay: 0.24s;
}
@keyframes cf-rise {
	from {
		opacity: 0;
		translate: 0 24px;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}

/* ==========================================================================
   Product mockups (decorative, built from CSS; sample data)
   ========================================================================== */
.cf-mock-wrap {
	position: relative;
	max-width: 1040px;
	margin: var(--wp--preset--spacing--50) auto 0;
	animation: cf-float 8s ease-in-out infinite;
	-webkit-mask-image: linear-gradient(#000 70%, transparent);
	mask-image: linear-gradient(#000 70%, transparent);
	text-align: left;
}
@keyframes cf-float {
	50% {
		translate: 0 -8px;
	}
}
.cf-mock {
	overflow: hidden;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius-lg) var(--wp--custom--radius-lg) 0 0;
	box-shadow: var(--wp--preset--shadow--lift);
	transform: perspective(1600px) rotateX(5deg);
	transform-origin: 50% 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	animation: cf-rise 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-mock__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 12px 16px;
	background: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.cf-mock__bar i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--line);
}
.cf-mock__url {
	margin-inline: auto;
	padding: 2px 14px;
	border-radius: var(--wp--custom--radius-pill);
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
}
.cf-mock__body {
	padding: var(--wp--preset--spacing--30);
}
.cf-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--20);
}
.cf-stats > div {
	padding: 12px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
}
.cf-stats small {
	display: block;
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
}
.cf-stats strong {
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}
.cf-loss {
	color: var(--wp--preset--color--loss);
}
.cf-chart {
	display: block;
	width: 100%;
	height: 120px;
	margin-block: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--accent);
}
.cf-chart .cf-draw {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: cf-draw 1.8s 0.6s ease-out forwards;
}
.cf-chart .cf-area {
	opacity: 0;
	animation: cf-fade 1s 1.6s ease-out forwards;
}
@keyframes cf-draw {
	to {
		stroke-dashoffset: 0;
	}
}
@keyframes cf-fade {
	to {
		opacity: 1;
	}
}
.cf-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 7.5rem 4rem 6.5rem;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: 10px 4px;
	border-top: 1px solid var(--wp--preset--color--line);
	animation: cf-rise 0.6s calc(0.7s + var(--i, 0) * 0.1s) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-row--head {
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	animation: none;
	border-top: 0;
}
.cf-row b {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cf-chip {
	justify-self: start;
	padding: 2px 10px;
	border-radius: var(--wp--custom--radius-pill);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-dark);
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}
.cf-float {
	position: absolute;
	z-index: 2;
	right: 3%;
	top: 36%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius-lg);
	box-shadow: var(--wp--preset--shadow--lift);
	font-size: 0.8125rem;
	animation: cf-rise 0.8s 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-float strong {
	display: block;
}
.cf-float .cf-ico {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--wp--preset--color--loss) 12%, white);
	color: var(--wp--preset--color--loss);
	font-weight: 600;
}
@media (max-width: 782px) {
	.cf-float {
		display: none;
	}
	.cf-row {
		grid-template-columns: minmax(0, 1fr) 4rem;
	}
	.cf-row > :nth-child(2),
	.cf-row > :nth-child(4) {
		display: none;
	}
	.cf-stats > div:nth-child(3) {
		display: none;
	}
	.cf-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}
.cf-mock-note {
	text-align: center;
	color: var(--wp--preset--color--muted);
}

/* Smaller mockups in the showcase */
.cf-mock--static {
	transform: none;
	animation: none;
	border-radius: var(--wp--custom--radius-lg);
	height: 100%;
}
.cf-showcase .cf-mock__body {
	min-height: 14rem;
}
.cf-bars {
	display: flex;
	align-items: flex-end;
	gap: var(--wp--preset--spacing--20);
	height: 10rem;
	margin-top: var(--wp--preset--spacing--20);
}
.cf-bars > div {
	flex: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
}
.cf-bars span {
	display: block;
	height: var(--h);
	border-radius: 6px 6px 0 0;
	background: var(--wp--preset--color--line);
	transform-origin: bottom;
}
.cf-bars > div:not(:first-child) span {
	background: var(--wp--preset--gradient--accent-text);
}
.cf-bars b {
	color: var(--wp--preset--color--ink);
}
.cf-big {
	font-size: 2.5rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
	margin: 12px 0 4px;
}
.cf-fakebtn {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
	font-weight: 600;
}
.cf-showcase .cf-fig {
	margin: 0;
}

/* ==========================================================================
   Cards, steps, icons
   ========================================================================== */
.cf-card {
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius-lg);
	padding: var(--wp--preset--spacing--30);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.has-surface-background-color .cf-card {
	background: var(--wp--preset--color--background);
}
.cf-card > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}
.cf-card h3 {
	margin-block-end: 0;
}
.cf-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lift);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 40%, var(--wp--preset--color--line));
}
.cf-card--featured,
.has-surface-background-color .cf-card--featured {
	border-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--preset--shadow--soft);
	background: linear-gradient(180deg, var(--wp--preset--color--accent-soft), var(--wp--preset--color--background) 40%);
}
.cf-card--featured::before {
	content: "Most popular";
	position: absolute;
	top: -12px;
	left: var(--wp--preset--spacing--30);
	padding: 2px 12px;
	border-radius: var(--wp--custom--radius-pill);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
	font-size: 0.75rem;
	font-weight: 600;
}
.cf-card.cf-card--dark {
	background: color-mix(in srgb, var(--wp--preset--color--background) 5%, transparent);
	border-color: color-mix(in srgb, var(--wp--preset--color--background) 14%, transparent);
	color: var(--wp--preset--color--mist);
}
.cf-card--dark h3 {
	color: var(--wp--preset--color--background);
}
.cf-card.cf-card--dark:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 70%, white);
	box-shadow: none;
}
.cf-rule {
	padding-top: var(--wp--preset--spacing--20);
	border-top: 1px dashed color-mix(in srgb, var(--wp--preset--color--background) 18%, transparent);
	font-size: 0.875rem;
	color: var(--wp--preset--color--background);
}
.cf-card--dark .cf-chip {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
	color: var(--wp--preset--color--background);
}

.cf-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	line-height: 0;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.cf-card:hover .cf-icon {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
	transform: rotate(-6deg) scale(1.05);
}
.cf-icon svg {
	width: 24px;
	height: 24px;
}
.cf-step-num {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 0;
	border-radius: 50%;
	background: var(--wp--preset--gradient--accent-text);
	color: var(--wp--preset--color--background);
	font-weight: 600;
	box-shadow: var(--wp--preset--shadow--glow);
}

.cf-price {
	margin-block-end: 0;
}
.cf-sites {
	display: block;
	width: fit-content;
	margin: 0 0 var(--wp--preset--spacing--20);
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-dark);
	font-weight: 600;
}
.cf-price span {
	font-size: 1rem;
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}
.cf-card ul {
	list-style: none;
	padding: 0;
	margin-block: 0;
}
.cf-card li {
	position: relative;
	padding-inline-start: 1.5rem;
}
.cf-card li + li {
	margin-block-start: var(--wp--preset--spacing--10);
}
.cf-card li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* ==========================================================================
   Final call to action
   ========================================================================== */
.cf-final {
	position: relative;
	overflow: hidden;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
	border-radius: calc(var(--wp--custom--radius-lg) * 1.5);
	background: var(--wp--preset--gradient--night-glow);
	text-align: center;
}
.cf-final::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 900px;
	max-width: 160vw;
	aspect-ratio: 1;
	translate: -50% -50%;
	border-radius: 50%;
	background: repeating-radial-gradient(circle, transparent 0 9%, color-mix(in srgb, var(--wp--preset--color--background) 9%, transparent) 9% calc(9% + 1px));
	-webkit-mask-image: radial-gradient(circle, #000, transparent 65%);
	mask-image: radial-gradient(circle, #000, transparent 65%);
	pointer-events: none;
}
.cf-final > * {
	position: relative;
}
.cf-final h2 {
	color: var(--wp--preset--color--background);
}
.cf-final .wp-block-button__link {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--ink);
	box-shadow: none;
}
.cf-final .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--ink);
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.wp-block-details {
	padding-block: 0;
}
.wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	min-height: 56px;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	transition: color 0.2s ease;
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary:hover {
	color: var(--wp--preset--color--accent);
}
.wp-block-details summary::after {
	content: "+";
	display: grid;
	place-items: center;
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	font-size: 1.25rem;
	line-height: 1;
	transition: rotate 0.3s ease;
}
.wp-block-details[open] summary::after {
	rotate: 45deg;
}
.wp-block-details::details-content {
	block-size: 0;
	overflow: clip;
	transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
}
.wp-block-details[open]::details-content {
	block-size: auto;
}
.wp-block-details p {
	color: var(--wp--preset--color--muted);
	padding-bottom: var(--wp--preset--spacing--20);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.cf-footer-list {
	padding-inline-start: 0;
}
footer a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}
footer a:hover {
	color: var(--wp--preset--color--accent);
}

/* ==========================================================================
   Grids that fill the row (empty tracks collapse so cards use the full width)
   ========================================================================== */
.wp-block-group.cf-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(var(--cf-grid-min, 16rem), 100%), 1fr));
	align-items: stretch;
}
.cf-grid--features {
	--cf-grid-min: 18rem;
}
.cf-grid--causes {
	--cf-grid-min: 15rem;
}
.cf-grid--plans {
	--cf-grid-min: 14rem;
}

/* ==========================================================================
   Scroll reveals: pure CSS scroll-driven animation (Chromium); elsewhere content just shows.
   ========================================================================== */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.cf-section > :is(h2, .cf-lead, .cf-eyebrow),
		.cf-grid > *,
		.cf-showcase .cf-fig,
		.cf-final,
		.wp-block-details {
			animation: cf-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 80%;
		}
		.cf-grid > :nth-child(3n + 2) {
			animation-range: entry 6% entry 90%;
		}
		.cf-grid > :nth-child(3n + 3) {
			animation-range: entry 12% entry 100%;
		}
		.cf-bars span {
			animation: cf-grow linear both;
			animation-timeline: view();
			animation-range: entry 30% entry 100%;
		}
	}
}
@keyframes cf-grow {
	from {
		transform: scaleY(0);
	}
	to {
		transform: scaleY(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
	.cf-chart .cf-draw {
		stroke-dashoffset: 0;
	}
	.cf-chart .cf-area {
		opacity: 1;
	}
}

/* Steps: number and title on one line */
.cf-step-head {
	gap: var(--wp--preset--spacing--20);
}
.cf-step-head .cf-step-num {
	flex: none;
}

/* Feature cards: centered icon, title and text */
.cf-grid--features .cf-card {
	text-align: center;
}
.cf-grid--features .cf-icon {
	margin-inline: auto;
}

/* ==========================================================================
   Customer portal (central site)
   ========================================================================== */
/* The whole page is the background: gradient and rings run from the very top to the very bottom. */
.wp-site-blocks:has(.cf-portal-page) {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	overflow: clip;
	background:
		radial-gradient(90% 60% at 50% 0%, var(--wp--preset--color--accent-soft), transparent),
		linear-gradient(180deg, var(--wp--preset--color--background), var(--wp--preset--color--accent-soft));
}
html:has(.cf-portal-page) {
	background: var(--wp--preset--color--accent-soft);
}
.wp-site-blocks:has(.cf-portal-page)::before,
.wp-site-blocks:has(.cf-portal-page)::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(1400px, 220vw);
	aspect-ratio: 1;
	translate: -50% -50%;
	border-radius: 50%;
	pointer-events: none;
	-webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
	mask-image: radial-gradient(circle, #000 0%, transparent 62%);
}
.wp-site-blocks:has(.cf-portal-page)::before {
	background: repeating-radial-gradient(circle, transparent 0 7.5%, color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent) 7.5% calc(7.5% + 1px));
}
.wp-site-blocks:has(.cf-portal-page)::after {
	background: conic-gradient(from 0deg, transparent 0deg 290deg, color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent) 360deg);
	animation: cf-sweep 9s linear infinite;
}
.wp-site-blocks:has(.cf-portal-page) > * {
	margin-block: 0;
}
.cf-portal-page {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-block: var(--wp--preset--spacing--50);
}
.cf-portal-page:has(.cf-auth) {
	align-items: center;
}
.cf-portal-page > .wp-block-post-content {
	width: 100%;
}

/* Transparent header over the background; it turns frosted once the page scrolls. */
.wp-site-blocks:has(.cf-portal-page) > .wp-block-template-part:first-child {
	background: transparent;
	border-bottom-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.wp-site-blocks:has(.cf-portal-page) > .wp-block-template-part:first-child {
			animation: cf-header-solid linear both;
			animation-timeline: scroll(root);
			animation-range: 0 80px;
		}
	}
}
@keyframes cf-header-solid {
	to {
		background-color: color-mix(in srgb, var(--wp--preset--color--background) 80%, transparent);
		border-bottom-color: color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent);
		-webkit-backdrop-filter: saturate(1.6) blur(14px);
		backdrop-filter: saturate(1.6) blur(14px);
	}
}
.cf-footer-slim {
	position: relative;
	z-index: 1;
}

.cf-portal {
	margin-inline: auto !important;
	animation: cf-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Buttons */
.cf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	min-height: 44px;
	padding: 0 1.25rem;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	box-shadow: var(--wp--preset--shadow--glow);
	transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cf-btn:hover {
	background: var(--wp--preset--color--accent-dark);
	color: var(--wp--preset--color--background);
	transform: translateY(-2px);
}
.cf-btn--block {
	display: flex;
	width: 100%;
}
.cf-btn--google,
.cf-btn--ghost {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--line);
	box-shadow: var(--wp--preset--shadow--soft);
}
.cf-btn--google:hover,
.cf-btn--ghost:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--muted);
}

/* Sign-in card */
.cf-auth {
	max-width: 26rem;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: calc(var(--wp--custom--radius-lg) * 1.25);
	box-shadow: var(--wp--preset--shadow--lift);
}
.cf-auth > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}
.cf-auth__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	text-align: center;
}
.cf-auth__sub {
	margin-block-start: var(--wp--preset--spacing--10);
	text-align: center;
	color: var(--wp--preset--color--muted);
}
.cf-auth label {
	display: block;
	font-weight: 600;
}
.cf-auth input[type="email"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: var(--wp--preset--spacing--10) 0 var(--wp--preset--spacing--20);
	padding: 0 var(--wp--preset--spacing--20);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	background: var(--wp--preset--color--background);
	font: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cf-auth input[type="email"]:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent);
}
.cf-auth__or {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-block: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
}
.cf-auth__or::before,
.cf-auth__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--line);
}
.cf-auth__small {
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.cf-portal__note {
	padding: var(--wp--preset--spacing--20);
	border-radius: 10px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-dark);
}

/* Account and download */
.cf-account {
	max-width: 44rem;
}
.cf-account > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}
.cf-account__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
}
.cf-account__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
}
.cf-account__email {
	margin: var(--wp--preset--spacing--10) 0 0;
	color: var(--wp--preset--color--muted);
}
.cf-account__h2 {
	margin-block-end: 0;
	font-size: var(--wp--preset--font-size--large);
}
.cf-sites {
	display: grid;
	gap: var(--wp--preset--spacing--20);
}
.cf-site,
.cf-empty,
.cf-steps li {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius-lg);
	box-shadow: var(--wp--preset--shadow--soft);
}
.cf-site {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}
.cf-site__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}
.cf-site small {
	color: var(--wp--preset--color--muted);
}
.cf-empty {
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	border-style: dashed;
	text-align: center;
}
.cf-empty > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}
.cf-empty h3 {
	margin: 0;
}
.cf-empty p {
	color: var(--wp--preset--color--muted);
}
.cf-steps {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0;
	list-style: none;
	counter-reset: cf-step;
}
.cf-steps li {
	position: relative;
	display: grid;
	gap: 2px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) var(--wp--preset--spacing--20) 4.25rem;
	counter-increment: cf-step;
}
.cf-steps li::before {
	content: counter(cf-step);
	position: absolute;
	left: var(--wp--preset--spacing--30);
	top: 50%;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	translate: 0 -50%;
	border-radius: 50%;
	background: var(--wp--preset--gradient--accent-text);
	color: var(--wp--preset--color--background);
	font-weight: 600;
}
.cf-steps span {
	color: var(--wp--preset--color--muted);
}
.cf-account > .cf-account__h2 {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* Brand: the site logo when one is set (the title stays for screen readers), else the site title */
.cf-brand {
	align-items: center;
}
.cf-brand .wp-block-site-logo {
	line-height: 0;
}
.cf-brand .wp-block-site-logo img {
	width: auto !important;
	height: 40px;
	max-width: none;
	object-fit: contain;
}
.cf-brand:has(.wp-block-site-logo img) .wp-block-site-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
@media (max-width: 599px) {
	.cf-brand .wp-block-site-logo img {
		height: 26px;
	}
	.cf-header .wp-block-button__link {
		padding: 0.5rem 0.75rem;
		font-size: var(--wp--preset--font-size--small);
	}
}

/* Pricing: monthly / annual switch (CSS only: two radio buttons decide which prices show) */
.cf-billing {
	display: flex;
	width: fit-content;
	margin: 0 auto var(--wp--preset--spacing--40);
	padding: 4px;
	gap: 4px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
}
.cf-billing input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.cf-billing label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0 1.25rem;
	border-radius: 999px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.cf-billing input:checked + label {
	background: var(--wp--preset--color--accent);
	color: #fff;
}
.cf-billing input:focus-visible + label {
	outline: 2px solid var(--wp--preset--color--accent-dark);
	outline-offset: 2px;
}
.cf-billing__save {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-dark);
}
.cf-billing input:checked + label .cf-billing__save {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}
.cf-plans:not(:has(#cf-bill-year:checked)) .cf-bill-y,
.cf-plans:has(#cf-bill-year:checked) .cf-bill-m {
	display: none;
}

/* Plan cards switch content when the billing period changes: no scroll reveal on them, because a card caught
   mid-animation (partly transparent and shifted by a fraction of a pixel) renders its text blurry. */
.cf-grid--plans > * {
	animation: none;
	translate: none;
}

/* Consent banner (only printed when an ads tag is configured) */
.cf-consent {
	position: fixed;
	inset: auto var(--wp--preset--spacing--20) var(--wp--preset--spacing--20) var(--wp--preset--spacing--20);
	z-index: 100;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	max-width: 44rem;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	background: var(--wp--preset--color--background);
	box-shadow: var(--wp--preset--shadow--lift);
}
.cf-consent[hidden] {
	display: none;
}
.cf-consent p {
	margin: 0;
	flex: 1 1 18rem;
}
.cf-consent__buttons {
	display: flex;
	gap: var(--wp--preset--spacing--10);
}
.cf-consent #cf-consent-no {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--ink);
}
