/**
 * ErgVoxi visual redesign layer.
 *
 * Consumes the tokens declared in style.css. Organized as:
 *   1. Typography scale
 *   2. Button / action system
 *   3. Section rhythm (dark sections)
 *   4. Header / nav polish
 *   5. Mobile drawer navigation
 *   6. Hero
 *   7. Live Demo
 *   8. Component refinements (mockup, cards, footer) for dark context
 */

/* ==========================================================================
   1. Typography scale
   ========================================================================== */

.vai-h1 {
	font-size: clamp( 2.5rem, 5vw, 3.75rem );
	line-height: 1.08;
	letter-spacing: -0.01em;
	font-weight: 700;
	color: var( --vai-color-ink );
	margin-bottom: 22px;
}

.vai-h2 {
	font-size: clamp( 1.75rem, 3.2vw, 2.625rem );
	line-height: 1.18;
	letter-spacing: -0.005em;
	font-weight: 700;
	color: var( --vai-color-ink );
	margin-bottom: 16px;
}

.vai-lede {
	font-size: 1.1875rem;
	line-height: 1.65;
}

.vai-eyebrow {
	letter-spacing: 0.1em;
	font-size: 12.5px;
}

/* ==========================================================================
   2. Button / action system
   ========================================================================== */

.wp-block-button__link {
	font-size: 1rem;
	font-weight: 600;
	padding: 15px 30px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	transform: translateY( -1px );
}

.wp-block-button__link:focus-visible {
	outline: 3px solid var( --vai-color-accent );
	outline-offset: 2px;
}

/* Live Demo / call CTA — its own recognizable treatment everywhere. */
.vai-btn-livedemo .wp-block-button__link,
a.vai-btn-livedemo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background-color: var( --vai-color-live-demo );
	color: #fff;
	border-radius: 999px;
	padding: 15px 30px;
}

.vai-btn-livedemo .wp-block-button__link:hover,
.vai-btn-livedemo .wp-block-button__link:focus-visible,
a.vai-btn-livedemo:hover,
a.vai-btn-livedemo:focus-visible {
	background-color: var( --vai-color-live-demo-hover );
	color: #fff;
}

.vai-btn-livedemo svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Text links inside body copy — subtle but clearly interactive. */
.vai-lede a,
.vai-icon-card__body a,
.vai-card p a {
	color: var( --vai-color-primary );
	text-decoration: underline;
	text-decoration-color: rgba( 27, 75, 145, 0.35 );
	text-underline-offset: 3px;
	font-weight: 600;
}

.vai-lede a:hover,
.vai-icon-card__body a:hover,
.vai-card p a:hover {
	text-decoration-color: currentColor;
}

/* ==========================================================================
   3. Section rhythm — dark sections
   ========================================================================== */

.vai-section--dark {
	background: var( --vai-color-dark-bg );
	color: var( --vai-color-dark-text );
}

.vai-section--dark .vai-h1,
.vai-section--dark .vai-h2,
.vai-section--dark .vai-h3,
.vai-section--dark .vai-step-number + .vai-h3 {
	color: var( --vai-color-dark-text );
}

.vai-section--dark .vai-lede,
.vai-section--dark p {
	color: var( --vai-color-dark-muted );
}

.vai-section--dark .vai-eyebrow {
	color: var( --vai-color-accent );
}

/* Primary/secondary buttons need a high-contrast treatment on navy —
   the brand navy primary button would nearly disappear on a navy section.
   .vai-hero is included here too since it carries the same dark treatment
   (see section 6) on every page that uses it, not only the homepage. */
.vai-section--dark .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link,
.vai-hero .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link {
	background-color: #ffffff;
	color: var( --vai-color-primary );
}

.vai-section--dark .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link:hover,
.vai-section--dark .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link:focus-visible,
.vai-hero .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link:hover,
.vai-hero .wp-block-button:not(.is-style-outline):not(.vai-btn-livedemo) .wp-block-button__link:focus-visible {
	background-color: #e7ecf5;
	color: var( --vai-color-primary-hover );
}

.vai-section--dark .is-style-outline .wp-block-button__link,
.vai-hero .is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: #ffffff;
	border-color: rgba( 255, 255, 255, 0.55 );
}

.vai-section--dark .is-style-outline .wp-block-button__link:hover,
.vai-section--dark .is-style-outline .wp-block-button__link:focus-visible,
.vai-hero .is-style-outline .wp-block-button__link:hover,
.vai-hero .is-style-outline .wp-block-button__link:focus-visible {
	background-color: rgba( 255, 255, 255, 0.1 );
	border-color: #ffffff;
}

.vai-section--dark .vai-icon-card,
.vai-section--dark .vai-card {
	background: var( --vai-color-dark-surface );
	border-color: var( --vai-color-dark-border );
}

.vai-section--dark .vai-icon-card__title {
	color: var( --vai-color-dark-text );
}

.vai-section--dark .vai-icon-card__body {
	color: var( --vai-color-dark-muted );
}

.vai-section--dark .vai-icon-chip {
	background: rgba( 255, 255, 255, 0.1 );
	color: #fff;
}

.vai-section--dark .vai-icon-chip--accent {
	background: rgba( 14, 165, 164, 0.22 );
	color: #5eead4;
}

/* ==========================================================================
   4. Header / nav polish
   ========================================================================== */

/* Astra centers header content via a large line-height (80px by default),
   making the whole bar much taller than the actual logo/nav text needs.
   Set an explicit, shorter line-height/padding instead. */
.ast-site-identity {
	padding-top: 10px !important;
	padding-bottom: 10px !important;
}

.main-header-bar-navigation,
.main-header-menu,
.main-header-menu > .menu-item > a,
.menu-item-cta > a {
	line-height: 44px;
}

.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-primary-header-bar .site-primary-header-wrap {
	min-height: 58px !important;
}

/* Astra's own accordion-style mobile menu panel is fully replaced by the
   left-side drawer below — force it off regardless of its internal
   .toggled/aria-expanded state, so it can never appear alongside the
   drawer even if something re-attaches a listener to the toggle button. */
#ast-hf-mobile-menu {
	display: none !important;
}

.menu-item-cta > a {
	padding-top: 8px !important;
	padding-bottom: 8px !important;
}

.main-header-menu .menu-item > a {
	font-weight: 600;
	color: var( --vai-color-body );
	position: relative;
}

.main-header-menu .menu-item > a:hover,
.main-header-menu .menu-item > a:focus-visible {
	color: var( --vai-color-primary );
}

.main-header-menu .menu-item.menu-item-cta > a {
	font-weight: 600;
}

/* ==========================================================================
   5. Mobile drawer navigation
   ========================================================================== */

.vai-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.vai-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.vai-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 8, 16, 30, 0.6 );
	opacity: 0;
	transition: opacity 0.25s ease;
}

.vai-drawer.is-open .vai-drawer__backdrop {
	opacity: 1;
}

.vai-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 84%;
	max-width: 340px;
	background: var( --vai-color-dark-bg );
	color: var( --vai-color-dark-text );
	box-sizing: border-box;
	padding: 24px 28px 40px;
	overflow-y: auto;
	box-shadow: 16px 0 48px rgba( 0, 0, 0, 0.3 );
	transform: translateX( -100% );
	transition: transform 0.3s ease;
}

.vai-drawer.is-open .vai-drawer__panel {
	transform: translateX( 0 );
}

@media ( prefers-reduced-motion: reduce ) {
	.vai-drawer__panel,
	.vai-drawer__backdrop {
		transition: none;
	}
}

.vai-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba( 255, 255, 255, 0.14 );
	border: 1px solid rgba( 255, 255, 255, 0.22 );
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
}

/* Some global reset (Astra's base svg/img normalization) was collapsing this
   icon's width to 0 despite its own width/height attributes — force it. */
.vai-drawer__close svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	display: block;
}

.vai-drawer__close:hover,
.vai-drawer__close:focus-visible {
	background: rgba( 255, 255, 255, 0.24 );
}

.vai-drawer__menu {
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
}

.vai-drawer__menu li {
	border-bottom: 1px solid rgba( 255, 255, 255, 0.12 );
}

.vai-drawer__menu a {
	display: block;
	padding: 18px 4px;
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
}

.vai-drawer__menu a:hover,
.vai-drawer__menu a:focus-visible {
	color: var( --vai-color-accent );
}

.vai-drawer__menu .menu-item-cta {
	border-bottom: none;
	margin-top: 20px;
}

.vai-drawer__menu .menu-item-cta a {
	background: var( --vai-color-accent );
	color: #fff !important;
	border-radius: var( --vai-radius-sm );
	padding: 14px 18px;
	text-align: center;
}

body.vai-drawer-open {
	overflow: hidden;
}

@media ( min-width: 922px ) {
	.vai-drawer {
		display: none;
	}
}

/* ==========================================================================
   6. Hero — dark, image bleeds directly out of the section background
   ========================================================================== */

.vai-hero {
	/* Flat, not a gradient — Live Demo sits directly below at the exact same
	   color, so the two read as one continuous dark surface, not two
	   mismatched blues with a seam between them. */
	background: var( --vai-color-dark-bg );
	padding-top: 76px;
	padding-bottom: 0;
	overflow: hidden;
}

.vai-hero .vai-h1,
.vai-hero .vai-eyebrow {
	color: var( --vai-color-dark-text );
}

.vai-hero .vai-eyebrow {
	color: var( --vai-color-accent );
}

.vai-hero .vai-lede {
	color: var( --vai-color-dark-muted );
}

.vai-hero-media-layout {
	align-items: flex-end;
}

.vai-hero-visual img {
	box-shadow: 0 30px 70px rgba( 0, 0, 0, 0.45 );
	margin-bottom: -1px; /* seam-free join with the section's bottom edge */
}

@media ( min-width: 901px ) {
	.vai-hero-copy {
		padding-bottom: 76px;
	}
}

@media ( max-width: 900px ) {
	.vai-hero {
		padding-top: 56px;
	}

	.vai-hero-visual img {
		border-radius: var( --vai-radius ) var( --vai-radius ) 0 0;
		margin-bottom: 0;
	}

	.vai-hero .vai-section {
		padding-bottom: 0;
	}
}

/* ==========================================================================
   7. Live Demo section
   ========================================================================== */

.vai-livedemo {
	/* Same exact color as the hero above it — same reasoning as .vai-hero:
	   one continuous dark surface, no border seam between the two. */
	background: var( --vai-color-dark-bg );
}

.vai-livedemo-layout {
	display: flex;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
}

.vai-livedemo-copy {
	flex: 1 1 380px;
}

.vai-livedemo-action {
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.vai-livedemo-note {
	color: var( --vai-color-dark-muted );
	font-size: 0.9rem;
	margin: 0;
}

.vai-livedemo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba( 14, 165, 164, 0.18 );
	color: var( --vai-color-live-demo );
	margin-bottom: 18px;
}

.vai-livedemo-icon svg {
	width: 28px;
	height: 28px;
}

@media ( max-width: 767px ) {
	.vai-livedemo-layout {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.vai-livedemo-action {
		width: 100%;
	}

	.vai-livedemo-action .wp-block-button {
		width: 100%;
	}

	.vai-btn-livedemo .wp-block-button__link {
		width: 100%;
		justify-content: center;
	}
}

/* ==========================================================================
   8. Component refinements for dark context
   ========================================================================== */

.vai-section--dark .vai-mockup {
	box-shadow: 0 30px 60px rgba( 0, 0, 0, 0.35 );
}

.vai-section--dark .vai-howworks-visual img,
.vai-section--dark .vai-hero-visual img {
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.3 );
}

/* .vai-final-cta uses the plain .vai-section--dark flat background — same
   exact color as every other dark section (hero, live demo, product
   visual) and the footer directly below it, for one consistent surface. */

/* Footer — dark, closing the section rhythm on the same navy used by the
   hero/final-CTA so the page ends on the same intentional brand surface.
   Astra paints its own #fafafa widget background on the nested
   .footer-widget-area, not the outer wrap, so both need overriding. */
.site-primary-footer-wrap,
.site-below-footer-wrap,
.site-footer .footer-widget-area,
.site-footer .ast-builder-grid-row {
	background-color: var( --vai-color-dark-bg ) !important;
}

/* The footer's own content wrapper carries none of Astra's usual .ast-container
   padding, so with the site-wide full-width fix its columns and copyright
   text sat flush against the browser edge. Give it the exact same 20px
   inset the header's content already uses, so the two align — full-bleed
   dark background, content indented like the header, not touching the wall. */
.site-footer .ast-builder-grid-row-container-inner {
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

.site-footer .footer-widget-area a,
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright a {
	color: var( --vai-color-dark-muted );
}

.site-footer .footer-widget-area a:hover {
	color: #fff;
}

.site-footer .vai-footer-heading {
	color: var( --vai-color-dark-muted );
}

.site-footer .vai-footer-cta-link {
	color: var( --vai-color-accent );
}

.site-footer .vai-footer-tagline,
.site-footer .vai-footer-legal {
	color: var( --vai-color-dark-muted );
}

/* Astra reserves top/bottom margin around #primary (60px each, at >=1200px)
   regardless of section backgrounds — that's a real gap between the header
   and the hero, and between the final section and the footer, on every
   page, not just the front page. Close both, site-wide. */
#primary {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* #primary's own direct wrapper (.site-content > .ast-container) carries
   20px of left/right padding + a max-width, which insets every full-bleed
   section background from the true viewport edge. Zero it out — scoped to
   this one wrapper (not `.ast-container` generally) so the header/footer
   builder rows, which use the same class and still need their padding,
   are untouched. */
.site-content > .ast-container {
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ==========================================================================
   9. "How ErgVoxi works" — voice journey (replaces the four-card 2x2 grid
   that used to sit under the how-it-works banner). Existing tokens only.
   ========================================================================== */

.vai-journey {
	margin-top: 48px;
}

.vai-journey__wave {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 8px;
}

.vai-journey__wave-path {
	fill: none;
	stroke: var( --vai-color-accent );
	stroke-width: 2.5;
	stroke-linecap: round;
	opacity: 0.55;
}

.vai-journey__node-ring {
	fill: var( --vai-color-surface );
	stroke: var( --vai-color-accent );
	stroke-width: 2;
}

.vai-journey__node-text {
	fill: var( --vai-color-accent );
	font-size: 20px;
	font-weight: 700;
	font-family: inherit;
	text-anchor: middle;
	dominant-baseline: central;
}

.vai-journey__node--done .vai-journey__node-ring {
	fill: var( --vai-color-accent );
}

.vai-journey__node--done .vai-journey__node-text {
	fill: #ffffff;
}

@media ( prefers-reduced-motion: no-preference ) {
	.vai-journey__node--done .vai-journey__node-pulse {
		animation: vai-journey-pulse 3.2s ease-in-out infinite;
		transform-origin: center;
		transform-box: fill-box;
	}
}

@keyframes vai-journey-pulse {
	0%, 100% {
		opacity: 0.35;
		transform: scale( 1 );
	}
	50% {
		opacity: 0;
		transform: scale( 1.6 );
	}
}

.vai-journey__stages {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 28px;
	text-align: center;
}

.vai-journey__label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	font-weight: 700;
	color: var( --vai-color-accent );
	margin: 0 0 6px;
}

.vai-journey__title {
	font-size: 1.0625rem;
	font-weight: 700;
	color: var( --vai-color-ink );
	line-height: 1.3;
	margin: 0 0 6px;
}

.vai-journey__copy {
	font-size: 0.9rem;
	line-height: 1.5;
	color: var( --vai-color-muted );
	margin: 0;
}

/* Mobile / tablet-portrait: hide the SVG wave, switch to a vertical
   timeline — a node badge + connecting line to the left of each stage. */
@media ( max-width: 900px ) {
	.vai-journey__wave {
		display: none;
	}

	.vai-journey__stages {
		grid-template-columns: 1fr;
		gap: 0;
		text-align: left;
	}

	.vai-journey__stage {
		position: relative;
		padding: 0 0 32px 52px;
	}

	.vai-journey__stage:last-child {
		padding-bottom: 0;
	}

	.vai-journey__number {
		position: absolute;
		left: 0;
		top: 0;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: var( --vai-color-surface );
		border: 2px solid var( --vai-color-accent );
		color: var( --vai-color-accent );
		font-weight: 700;
		font-size: 0.9rem;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 1;
	}

	.vai-journey__stage:last-child .vai-journey__number {
		background: var( --vai-color-accent );
		color: #fff;
	}

	/* Connecting line between this stage's node and the next one. */
	.vai-journey__stage:not( :last-child )::before {
		content: "";
		position: absolute;
		left: 17px;
		top: 36px;
		bottom: 0;
		width: 2px;
		background: var( --vai-color-border );
	}
}

@media ( min-width: 901px ) {
	.vai-journey__stage {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.vai-journey__number {
		display: none;
	}
}

/* ==========================================================================
   10. Small shared primitives for Features/Pricing — text+visual split,
   compact inline icon stats, and a 4-up grid. Existing tokens/components
   only (.vai-icon-chip, .vai-mockup, .vai-card, .vai-h2, .vai-lede, etc.).
   ========================================================================== */

.vai-split {
	display: flex;
	align-items: center;
	gap: 56px;
	flex-wrap: wrap;
}

.vai-split--reverse {
	flex-direction: row-reverse;
}

.vai-split__text {
	flex: 1 1 380px;
}

.vai-split__visual {
	flex: 1 1 320px;
	min-width: 0;
}

@media ( max-width: 781px ) {
	.vai-split,
	.vai-split--reverse {
		flex-direction: column;
	}

	/* In column mode the flex-basis above (380px/320px) is read as a
	   height, not a width — with flex-grow:1 that stretches each half to
	   fill the container's vertical space, opening a large blank gap
	   between the text and the visual. Size to content instead. */
	.vai-split__text,
	.vai-split__visual {
		flex: none;
		width: 100%;
	}
}

.vai-inline-stats {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 40px;
	margin-top: 36px;
}

.vai-inline-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 260px;
}

.vai-inline-stat .vai-icon-chip {
	flex-shrink: 0;
}

.vai-inline-stat__label {
	font-weight: 700;
	color: var( --vai-color-ink );
	font-size: 0.95rem;
	margin: 0 0 2px;
}

.vai-inline-stat__detail {
	color: var( --vai-color-muted );
	font-size: 0.85rem;
	margin: 0;
}

.vai-section--dark .vai-inline-stat__label {
	color: var( --vai-color-dark-text );
}

.vai-section--dark .vai-inline-stat__detail {
	color: var( --vai-color-dark-muted );
}

.vai-grid-4 {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 24px;
}

@media ( max-width: 900px ) {
	.vai-grid-4 {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 480px ) {
	.vai-grid-4 {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   11. Pricing plan comparison rows (Free Trial / Basic / Advanced) — a
   scannable label:value spec list inside the existing .vai-pricing-card,
   in place of a generic bullet list. Existing tokens only.
   ========================================================================== */

.vai-plan-specs {
	list-style: none;
	margin: 18px 0;
	padding: 0;
	text-align: left;
}

.vai-plan-specs li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var( --vai-color-border );
	font-size: 0.9rem;
}

.vai-plan-specs li:last-child {
	border-bottom: none;
}

.vai-plan-specs .vai-plan-specs__label {
	color: var( --vai-color-muted );
}

.vai-plan-specs .vai-plan-specs__value {
	font-weight: 700;
	color: var( --vai-color-ink );
	text-align: right;
}

.vai-pricing-card__badge {
	display: inline-block;
	background: var( --vai-color-primary );
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}
