/* =========================================================
   Card shell, shared by all 5 designs: frame, a11y menu, forms,
   reviews, legal sheet, toast, reveal. Each design file sets --ff,
   its tokens and its own blocks under .d1-.d5.
   ========================================================= */

:root {
	--bar: 0px;
	--ease: cubic-bezier(.16, 1, .3, 1);
	--ease-out: cubic-bezier(.23, 1, .32, 1);
	--ease-io: cubic-bezier(.77, 0, .175, 1);
	/* Floating buttons pinned to the left edge of the 430px frame */
	--edge: max(14px, calc(50% - 215px + 14px));
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background: #0e0f12;
	min-height: 100dvh;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}

/* height: auto – WordPress adds width/height attributes, which would otherwise beat aspect-ratio */
img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

input,
textarea {
	font: inherit;
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
	border: 0;
	background: none;
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid #ffd23f;
	outline-offset: 2px;
}

.app {
	max-width: 430px;
	margin: 0 auto;
	position: relative;
	min-height: 100dvh;
	overflow-x: clip;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
}

.d {
	min-height: calc(100dvh - var(--bar));
}

.ltr {
	direction: ltr;
	unicode-bidi: isolate;
}

/* Icons: Phosphor SVG sprite, sized by font-size like the icon font */
.icon {
	display: inline-grid;
	place-items: center;
	font-style: normal;
	line-height: 1;
	flex: none;
}

.icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Waze glyph (Simple Icons, CC0): masks currentColor, sized like an icon */
.ic-waze {
	display: inline-block;
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.218 0C9.915 0 6.835 1.49 4.723 4.148c-1.515 1.913-2.31 4.272-2.31 6.706v1.739c0 .894-.62 1.738-1.862 1.813-.298.025-.547.224-.547.522-.05.82.82 2.31 2.012 3.502.82.844 1.788 1.515 2.832 2.036a3 3 0 0 0 2.955 3.528 2.966 2.966 0 0 0 2.931-2.385h2.509c.323 1.689 2.086 2.856 3.974 2.21 1.64-.546 2.36-2.409 1.763-3.924a12.84 12.84 0 0 0 1.838-1.465 10.73 10.73 0 0 0 3.18-7.65c0-2.882-1.118-5.589-3.155-7.625A10.899 10.899 0 0 0 13.218 0zm0 1.217c2.558 0 4.967.994 6.78 2.807a9.525 9.525 0 0 1 2.807 6.78A9.526 9.526 0 0 1 20 17.585a9.647 9.647 0 0 1-6.78 2.807h-2.46a3.008 3.008 0 0 0-2.93-2.41 3.030 3.030 0 0 0-2.534 1.367v.024a8.945 8.945 0 0 1-2.41-1.788c-.844-.844-1.316-1.614-1.515-2.110a2.858 2.858 0 0 0 1.441-.846 2.959 2.959 0 0 0 .795-2.036v-1.789c0-2.11.696-4.197 2.012-5.861 1.863-2.385 4.620-3.726 7.600-3.726zm-2.410 5.986a1.192 1.192 0 1 0 0 2.385 1.192 1.192 0 0 0 0-2.385zm7.204 0a1.192 1.192 0 1 0 0 2.385 1.192 1.192 0 0 0 0-2.385zm-7.377 4.769a.596.596 0 0 0-.546.845 4.813 4.813 0 0 0 4.346 2.757 4.770 4.770 0 0 0 4.347-2.757.596.596 0 0 0-.547-.845h-.025a.561.561 0 0 0-.521.348 3.590 3.590 0 0 1-3.254 2.061 3.591 3.591 0 0 1-3.254-2.061.640.640 0 0 0-.546-.348z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.218 0C9.915 0 6.835 1.49 4.723 4.148c-1.515 1.913-2.31 4.272-2.31 6.706v1.739c0 .894-.62 1.738-1.862 1.813-.298.025-.547.224-.547.522-.05.82.82 2.31 2.012 3.502.82.844 1.788 1.515 2.832 2.036a3 3 0 0 0 2.955 3.528 2.966 2.966 0 0 0 2.931-2.385h2.509c.323 1.689 2.086 2.856 3.974 2.21 1.64-.546 2.36-2.409 1.763-3.924a12.84 12.84 0 0 0 1.838-1.465 10.73 10.73 0 0 0 3.18-7.65c0-2.882-1.118-5.589-3.155-7.625A10.899 10.899 0 0 0 13.218 0zm0 1.217c2.558 0 4.967.994 6.78 2.807a9.525 9.525 0 0 1 2.807 6.78A9.526 9.526 0 0 1 20 17.585a9.647 9.647 0 0 1-6.78 2.807h-2.46a3.008 3.008 0 0 0-2.93-2.41 3.030 3.030 0 0 0-2.534 1.367v.024a8.945 8.945 0 0 1-2.41-1.788c-.844-.844-1.316-1.614-1.515-2.110a2.858 2.858 0 0 0 1.441-.846 2.959 2.959 0 0 0 .795-2.036v-1.789c0-2.11.696-4.197 2.012-5.861 1.863-2.385 4.620-3.726 7.600-3.726zm-2.410 5.986a1.192 1.192 0 1 0 0 2.385 1.192 1.192 0 0 0 0-2.385zm7.204 0a1.192 1.192 0 1 0 0 2.385 1.192 1.192 0 0 0 0-2.385zm-7.377 4.769a.596.596 0 0 0-.546.845 4.813 4.813 0 0 0 4.346 2.757 4.770 4.770 0 0 0 4.347-2.757.596.596 0 0 0-.547-.845h-.025a.561.561 0 0 0-.521.348 3.590 3.590 0 0 1-3.254 2.061 3.591 3.591 0 0 1-3.254-2.061.640.640 0 0 0-.546-.348z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Floating a11y button. z-index: sticky bars 40, FAB 105, a11y panel 110, sheet 120, toast 130 */
.fab {
	position: fixed;
	left: var(--edge);
	z-index: 105;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 23px;
	color: #fff;
	box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
	transition: transform .16s var(--ease-out), bottom .45s var(--ease-out), background .2s ease;
}

.fab:active {
	transform: scale(.94);
}

.fab-a11y {
	bottom: max(16px, env(safe-area-inset-bottom));
	background: #2450d8;
}

/* Lift the a11y button above a sticky save bar while it is showing */
html.sticky-on .fab-a11y {
	bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px);
}

/* Accessibility menu */
.a11y-panel {
	position: fixed;
	left: var(--edge);
	bottom: calc(max(16px, env(safe-area-inset-bottom)) + 62px);
	width: min(calc(100vw - 28px), 360px);
	z-index: 110;
	background: #fff;
	color: #111;
	border-radius: 18px;
	padding: 16px;
	font-family: var(--ff);
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
	display: none;
	transform-origin: bottom left;
}

html.sticky-on .a11y-panel {
	bottom: calc(max(16px, env(safe-area-inset-bottom)) + 138px);
}

.a11y-panel.open {
	display: block;
}

.a11y-panel h2 {
	font-size: 17px;
	margin-bottom: 12px;
}

.a11y-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.a11y-grid button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border-radius: 12px;
	background: #f0f1f4;
	font-size: 14px;
	text-align: start;
}

.a11y-grid button i {
	font-size: 20px;
}

.a11y-grid button[aria-pressed="true"] {
	background: #2450d8;
	color: #fff;
}

.a11y-foot {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	font-size: 14px;
}

.a11y-foot button {
	text-decoration: underline;
	text-underline-offset: 3px;
}

html.a11y-zoom .d.on {
	zoom: 1.12;
}

html.a11y-contrast {
	filter: contrast(1.25) saturate(1.1);
}

/* !important: the user's a11y choice must beat every design rule */
html.a11y-links .d a {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

html.a11y-still *,
html.a11y-still *::before,
html.a11y-still *::after {
	animation: none !important;
	transition: none !important;
}

/* Forms (shared behaviour, each design styles its own inputs) */
.lead-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.fld {
	display: grid;
	gap: 6px;
	margin-bottom: 14px;
}

.fld .err {
	font-size: 13.5px;
	font-weight: 500;
}

.fld .err:empty,
.form-error:empty {
	display: none;
}

.js-form [type="tel"],
.js-form [type="email"] {
	text-align: right;
}

.chk label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.chk input {
	width: 20px;
	height: 20px;
	flex: none;
	margin-top: 1px;
}

.chk a,
.chk button {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.form-error {
	font-size: 14px;
	margin-bottom: 10px;
}

.form-done {
	display: none;
	text-align: center;
	padding: 12px 0;
}

.form-done i {
	font-size: 44px;
}

.form-done strong {
	display: block;
	font-size: 20px;
	margin-top: 6px;
}

.form-done p {
	margin-top: 4px;
	opacity: .8;
}

.js-form.sent .form-body {
	display: none;
}

.js-form.sent .form-done {
	display: block;
}

[type="submit"]:disabled {
	opacity: .7;
	cursor: progress;
}

.qr-box svg {
	display: block;
	width: 100%;
	height: auto;
}

/* Reviews carousel (each design only sets the --gr-* tokens) */
.gr-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
}

.gr-sum {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	color: var(--gr-text);
}

.gr-logo {
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 50%;
	background: #fff;
	display: grid;
	place-items: center;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.gr-logo svg {
	width: 24px;
	height: 24px;
}

.gr-score {
	display: flex;
	align-items: center;
	gap: 8px;
}

.gr-score b {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
}

.gr-stars {
	display: flex;
	gap: 1px;
	direction: ltr;
	color: #fbbc04;
	font-size: 15px;
}

.gr-stars .off {
	color: #dadce0;
}

.gr-count {
	display: block;
	font-size: 13.5px;
	color: var(--gr-sub);
	margin-top: 3px;
}

.gr-nav {
	display: flex;
	gap: 8px;
	flex: none;
}

.gr-nav button {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 17px;
	background: var(--gr-btn);
	color: var(--gr-text);
	border: 1px solid var(--gr-btn-line, transparent);
	transition: transform .16s var(--ease-out), opacity .2s ease;
}

.gr-nav button:active {
	transform: scale(.94);
}

.gr-nav button:disabled {
	opacity: .35;
	pointer-events: none;
}

.gr-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 84%;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	margin: 16px calc(var(--gr-pad) * -1) 0;
	padding: 2px var(--gr-pad) 6px;
	scroll-padding-inline: var(--gr-pad);
	overscroll-behavior-x: contain;
}

.gr-track::-webkit-scrollbar {
	display: none;
}

.gr-card {
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 16px;
	border-radius: var(--gr-r);
	background: var(--gr-card);
	color: var(--gr-ink);
	border: 1px solid var(--gr-line);
}

.gr-who {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}

.gr-av {
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 50%;
	background: var(--c);
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 17px;
}

.gr-who strong {
	display: block;
	font-size: 15.5px;
	font-weight: 600;
}

.gr-who small {
	display: block;
	font-size: 13px;
	color: var(--gr-muted);
}

.gr-who .gr-g {
	width: 20px;
	height: 20px;
	flex: none;
	margin-inline-start: auto;
}

.gr-txt {
	font-size: 15.5px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gr-card.open .gr-txt {
	display: block;
}

.gr-more {
	font-size: 14px;
	font-weight: 600;
	color: var(--gr-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gr-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}

.gr-dots {
	display: flex;
	gap: 6px;
}

.gr-dots span {
	width: 7px;
	height: 7px;
	border-radius: 99px;
	background: var(--gr-dot);
	transition: width .35s var(--ease-out), background .3s ease;
}

.gr-dots span.on {
	width: 22px;
	background: var(--gr-accent);
}

.gr-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--gr-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Legal sheet */
.sheet {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(8, 9, 12, .55);
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s;
}

.sheet.open {
	opacity: 1;
	pointer-events: auto;
}

.sheet-card {
	width: 100%;
	max-width: 430px;
	background: #fff;
	color: #16181c;
	border-radius: 24px 24px 0 0;
	padding: 24px 20px max(24px, env(safe-area-inset-bottom));
	font-family: var(--ff);
	transform: translateY(100%);
	transition: transform .45s var(--ease);
}

.sheet.open .sheet-card {
	transform: none;
}

.sheet-card h2 {
	font-size: 20px;
	margin-bottom: 10px;
}

.sheet-card p {
	font-size: 15.5px;
	line-height: 1.7;
	color: #454850;
	white-space: pre-line;
}

.sheet-link {
	display: inline-block;
	margin-top: 10px;
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sheet-link[hidden] {
	display: none;
}

.sheet-card button {
	display: block;
	margin-top: 18px;
	height: 48px;
	padding: 0 26px;
	border-radius: 999px;
	background: #16181c;
	color: #fff;
	font-weight: 500;
}

/* Toast */
.toast {
	position: fixed;
	left: 50%;
	bottom: 110px;
	z-index: 130;
	transform: translate(-50%, 16px);
	opacity: 0;
	pointer-events: none;
	background: #16181c;
	color: #fff;
	padding: 12px 18px;
	border-radius: 999px;
	font: 500 15px var(--ff);
	display: flex;
	gap: 8px;
	align-items: center;
	white-space: nowrap;
	transition: opacity .3s, transform .4s var(--ease);
	box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5);
}

.toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.toast i {
	color: #5ee08f;
	font-size: 18px;
}

/* Scroll reveal: card.js tags the children of every .rv block as .r-item with a stagger
   index (--i). Each design sets its entrance through --r-from / --r-blur / --r-ease. */
.r-item {
	opacity: 0;
	transform: var(--r-from, translateY(18px));
	filter: blur(var(--r-blur, 0px));
	transition: opacity .6s var(--ease-out), transform .9s var(--r-ease, var(--ease-out)), filter .6s var(--ease-out);
	transition-delay: calc(var(--i, 0) * 60ms);
}

.rv.in .r-item,
.rv.in.r-item {
	opacity: 1;
	transform: none;
	filter: none;
}

/* Gallery images wipe up from the bottom */
.r-img {
	clip-path: inset(0 0 100% 0);
	transition: clip-path 1s var(--ease-io);
	transition-delay: calc(120ms + var(--k, 0) * 90ms);
}

.rv.in .r-img {
	clip-path: inset(0 0 0 0);
}

/* !important: arming must cancel the transitions above for one frame */
.r-arming .r-item,
.r-arming .r-img {
	transition: none !important;
}

/* Hero entrance: children of [data-hero-stg] pop in one after another.
   fill-mode backwards so :active press transforms still work afterwards */
.d.on [data-hero-stg] > * {
	animation: heroPop .55s var(--ease-out) backwards;
	animation-delay: calc(var(--hero-base, .45s) + var(--j, 0) * 45ms);
}

@keyframes heroPop {
	from {
		opacity: 0;
		transform: translateY(10px) scale(.92);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes heroUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes heroZoom {
	from {
		transform: scale(1.12);
	}

	to {
		transform: none;
	}
}

/* Sticky save bar (d1, d3) */
.sticky {
	position: fixed;
	bottom: 0;
	left: 50%;
	width: min(100%, 430px);
	z-index: 40;
	transform: translate(-50%, 130%);
	transition: transform .5s var(--ease);
}

.sticky.show {
	transform: translate(-50%, 0);
}

/* 404 */
.not-found {
	min-height: 100dvh;
	display: grid;
	place-content: center;
	gap: 12px;
	padding: 24px;
	color: #f2f2f4;
	font-family: system-ui, sans-serif;
	text-align: center;
}

.not-found__title {
	font-size: 28px;
}

.not-found__text {
	color: #a3a5ae;
}

.not-found__link {
	justify-self: center;
	margin-top: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	background: #f2f2f4;
	color: #0e0f12;
	font-weight: 600;
}

/* !important: reduced motion must beat every animation and transition in the designs */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}

	/* Keeps a gentle fade, drops all movement */
	.r-item {
		transform: none !important;
		filter: none !important;
		transition: opacity .4s ease !important;
	}

	.r-img {
		clip-path: none !important;
	}
}
