/**
 * TruVive — supplemental front-end & editor styles.
 * Handles interactions and refinements not expressible in theme.json.
 */

:root {
	--tv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
	scroll-behavior: smooth;
}

/* Prevent decorative glows / off-canvas elements from creating a horizontal
   scrollbar. `clip` (not `hidden`) avoids establishing a scroll container,
   so the sticky header keeps working. */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Tighten serif headings a touch and balance line wrapping */
h1, h2, h3,
.wp-block-heading {
	text-wrap: balance;
}

/* ---------------------------------------------------------------------------
   Eyebrow / kicker (h6 styled label) as a pill chip
--------------------------------------------------------------------------- */
.tv-eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.78rem !important;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-strong);
	padding: 0.5rem 0.95rem;
	border-radius: 100px;
	background: var(--wp--preset--color--surface-cyan);
	line-height: 1;
}

.tv-eyebrow.is-on-dark {
	background: rgba(31, 192, 238, 0.14);
	color: var(--wp--preset--color--brand);
}

/* Gradient cyan text accent */
.tv-gradient-text {
	background: var(--wp--preset--gradient--cyan-glow);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* Serif italic accent heading style */
.is-style-serif-italic {
	font-style: italic;
	font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Buttons — block styles & micro-interactions
--------------------------------------------------------------------------- */
.wp-block-button__link {
	transition: transform 0.25s var(--tv-ease), background-color 0.25s var(--tv-ease), box-shadow 0.25s var(--tv-ease), color 0.25s var(--tv-ease);
	will-change: transform;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px -16px rgba(10, 147, 196, 0.55);
}

/* Cyan filled button */
.wp-block-button.is-style-cyan .wp-block-button__link {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-cyan .wp-block-button__link:hover {
	background: var(--wp--preset--color--brand-strong);
	color: #fff;
}

/* Outline button */
.wp-block-button.is-style-outline-ink .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--border);
}
.wp-block-button.is-style-outline-ink .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: #fff;
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--contrast);
}
/* Outline on dark backgrounds */
.has-contrast-background-color .wp-block-button.is-style-outline-ink .wp-block-button__link,
.has-ink-depth-gradient-background .wp-block-button.is-style-outline-ink .wp-block-button__link {
	color: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.32);
}
.has-contrast-background-color .wp-block-button.is-style-outline-ink .wp-block-button__link:hover,
.has-ink-depth-gradient-background .wp-block-button.is-style-outline-ink .wp-block-button__link:hover {
	background: #fff;
	color: var(--wp--preset--color--contrast);
}

/* ---------------------------------------------------------------------------
   Card group styles
--------------------------------------------------------------------------- */
.wp-block-group.is-style-card,
.wp-block-group.is-style-card-hover {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 22px;
}
.wp-block-group.is-style-card-hover {
	transition: transform 0.35s var(--tv-ease), box-shadow 0.35s var(--tv-ease), border-color 0.35s var(--tv-ease);
}
.wp-block-group.is-style-card-hover:hover {
	transform: translateY(-6px);
	box-shadow: 0 30px 60px -34px rgba(14, 17, 22, 0.32);
	border-color: var(--wp--preset--color--brand);
}

.wp-block-group.is-style-glass {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 22px;
	backdrop-filter: blur(6px);
}

/* Rounded image */
.wp-block-image.is-style-rounded-xl img {
	border-radius: 28px;
}

/* ---------------------------------------------------------------------------
   Check-mark list
--------------------------------------------------------------------------- */
.wp-block-list.is-style-checks {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}
.wp-block-list.is-style-checks li {
	position: relative;
	padding-left: 2.1rem;
	margin-bottom: 0.85rem;
	line-height: 1.5;
}
.wp-block-list.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.05em;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--surface-cyan);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a93c4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.9rem;
}
/* Checks on dark sections */
.has-contrast-background-color .wp-block-list.is-style-checks li::before,
.has-ink-depth-gradient-background .wp-block-list.is-style-checks li::before {
	background-color: rgba(31, 192, 238, 0.16);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231fc0ee' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------------
   Header — sticky, blurred
--------------------------------------------------------------------------- */
.tv-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
/* Frosted background lives on a pseudo-element so the header itself does NOT
   become a containing block for the fixed mobile-menu overlay (backdrop-filter
   on the header would trap the overlay inside the header's height). */
.tv-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* ---------------------------------------------------------------------------
   Mobile overlay menu — large, tappable links
--------------------------------------------------------------------------- */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: #fff;
	padding: clamp(1.5rem, 7vw, 3rem);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	width: 100%;
	align-items: stretch;
	justify-content: flex-start;
	margin-top: clamp(2.5rem, 9vh, 4.5rem);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	gap: 0;
	flex-direction: column;
	align-items: stretch;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 1.15rem 0.25rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.7rem;
	font-weight: 600;
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--brand-strong);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-buttons {
	margin-top: 2.25rem;
	width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-button,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-button__link {
	width: 100%;
	text-align: center;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-button__link {
	padding-top: 1rem !important;
	padding-bottom: 1rem !important;
	font-size: 1rem;
}
/* Larger, easier-to-hit close button */
.wp-block-navigation__responsive-container-close {
	top: clamp(1.25rem, 4vw, 2rem) !important;
	right: clamp(1.25rem, 4vw, 2rem) !important;
}
.wp-block-navigation__responsive-container-close svg {
	width: 30px;
	height: 30px;
}

/* Wordmark */
.tv-logo {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 600;
	font-size: clamp(1.6rem, 2.4vw, 1.95rem);
	letter-spacing: -0.01em;
	line-height: 1;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	white-space: nowrap;
}
.tv-logo:hover { text-decoration: none; }
.tv-logo .tv-logo-accent { color: var(--wp--preset--color--brand); }
.tv-logo.is-on-dark { color: #fff; }

/* Navigation */
.tv-header .wp-block-navigation {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.95rem;
	font-weight: 500;
}
.tv-header .wp-block-navigation a {
	color: var(--wp--preset--color--contrast);
	transition: color 0.2s var(--tv-ease);
}
.tv-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--brand-strong);
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Step number badge
--------------------------------------------------------------------------- */
.tv-step-num {
	font-family: var(--wp--preset--font-family--sans) !important;
	font-weight: 700 !important;
	font-size: 0.95rem !important;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--brand-strong) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--wp--preset--color--surface-cyan);
	line-height: 1;
}

/* ---------------------------------------------------------------------------
   Hero media — image with a floating stat badge over its corner
--------------------------------------------------------------------------- */
.tv-hero-media {
	position: relative;
}
.tv-hero-media .wp-block-image {
	margin: 0;
}
.tv-hero-badge {
	position: absolute;
	left: clamp(0.75rem, 3%, 1.5rem);
	bottom: clamp(0.75rem, 3%, 1.5rem);
	width: auto !important;
	max-width: calc(100% - 1.5rem);
	margin: 0 !important;
	z-index: 3;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: saturate(160%) blur(6px);
	-webkit-backdrop-filter: saturate(160%) blur(6px);
	box-shadow: 0 20px 45px -22px rgba(14, 17, 22, 0.45);
}

/* ---------------------------------------------------------------------------
   Hero carousel — fading slides with dots + arrows
--------------------------------------------------------------------------- */
.tv-carousel {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 24px;
	background: var(--wp--preset--color--surface, #f3f5f8);
}
.tv-carousel-viewport {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
}
.tv-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.7s ease;
}
.tv-slide.is-active {
	opacity: 1;
	visibility: visible;
}
.tv-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Banner-style slides (wider than tall) show in full, no crop */
.tv-slide:first-child img,
.tv-slide:last-child img {
	object-fit: contain;
	background: var(--wp--preset--color--surface, #f3f5f8);
}
.tv-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: #0e1116;
	cursor: pointer;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 22px -10px rgba(14, 17, 22, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease, background 0.2s ease;
}
.tv-carousel:hover .tv-carousel-arrow,
.tv-carousel:focus-within .tv-carousel-arrow {
	opacity: 1;
}
.tv-carousel-arrow:hover {
	background: #fff;
}
.tv-carousel-prev { left: 0.75rem; }
.tv-carousel-next { right: 0.75rem; }
.tv-carousel-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.9rem;
	z-index: 3;
	display: flex;
	gap: 0.45rem;
	justify-content: center;
}
.tv-dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 1px rgba(14, 17, 22, 0.15);
	transition: background 0.2s ease, transform 0.2s ease;
}
.tv-dot.is-active {
	background: var(--wp--preset--color--brand, #1fc0ee);
	transform: scale(1.25);
}
@media (prefers-reduced-motion: reduce) {
	.tv-slide { transition: none; }
}

/* Big stat numbers */
.tv-stat {
	font-family: var(--wp--preset--font-family--serif) !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------------------
   FAQ — native details/summary accordion
--------------------------------------------------------------------------- */
.tv-faq details {
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.tv-faq summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.4rem 0.25rem;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	font-size: 1.075rem;
	color: var(--wp--preset--color--contrast);
	transition: color 0.2s var(--tv-ease);
}
.tv-faq summary:hover { color: var(--wp--preset--color--brand-strong); }
.tv-faq summary::-webkit-details-marker { display: none; }
.tv-faq summary::after {
	content: "";
	flex: 0 0 auto;
	width: 1.4rem;
	height: 1.4rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a93c4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	transition: transform 0.3s var(--tv-ease);
}
.tv-faq details[open] summary::after {
	transform: rotate(45deg);
}
.tv-faq .tv-faq-answer {
	padding: 0 0.25rem 1.5rem;
	color: var(--wp--preset--color--muted);
	max-width: 60ch;
	line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   Marquee — "available in" states ticker
--------------------------------------------------------------------------- */
.tv-marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tv-marquee__track {
	display: inline-flex;
	gap: 2.75rem;
	white-space: nowrap;
	will-change: transform;
	animation: tv-scroll 38s linear infinite;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--muted);
}
.tv-marquee__track span { display: inline-block; }
@keyframes tv-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.tv-marquee__track { animation: none; }
	html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------------
   Decorative soft blobs / glows
--------------------------------------------------------------------------- */
.tv-glow {
	position: relative;
	isolation: isolate;
}
.tv-glow::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: auto;
	top: -10%;
	right: -8%;
	width: 46vw;
	max-width: 620px;
	aspect-ratio: 1;
	background: radial-gradient(circle at center, rgba(31, 192, 238, 0.32), transparent 62%);
	filter: blur(20px);
	pointer-events: none;
}

/* Pulse line divider (health motif) */
.tv-pulse {
	width: 100%;
	max-width: 220px;
	height: auto;
	display: block;
}

/* ---------------------------------------------------------------------------
   Avatar row (testimonials trust)
--------------------------------------------------------------------------- */
.tv-avatars .wp-block-image img {
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 4px 10px -4px rgba(14,17,22,0.35);
}

/* Generous section rhythm on larger screens */
@media (min-width: 782px) {
	.tv-section { scroll-margin-top: 90px; }
}

/* Star rating */
.tv-stars { color: #1fc0ee; letter-spacing: 0.15em; font-size: 1.1rem; }

/* Trust bar — stack into a centered column on mobile instead of an
   uneven space-between wrap */
@media (max-width: 781px) {
	.tv-trustbar {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		gap: 0.85rem;
	}
}
