/**
 * Viora About widget.
 *
 * Metrics come from the design frame (1440 artboard, 1082 content width) and
 * are expressed in vw so the whole composition scales as one. The px values in
 * the comments are the measured design values at 1440.
 */

.viora-about {
	--viora-about-cols: 59.94%;                                     /* 648.57 */
	--viora-about-pad-top: clamp(3rem, 6.896vw, 6.2rem);            /* 99.3 */
	--viora-about-pad-bottom: clamp(3.5rem, 10.15vw, 9.14rem);      /* 146 */

	--viora-about-heading-size: clamp(3.25rem, 9.722vw, 8.75rem);   /* 140 */
	--viora-about-heading-space: clamp(1rem, 1.708vw, 1.54rem);     /* 24.6 */
	--viora-about-role-space: clamp(2rem, 3.785vw, 3.4rem);         /* 54.5 */
	--viora-about-text-space: clamp(1.25rem, 1.965vw, 1.77rem);     /* 28.3 */
	--viora-about-actions-space: clamp(2rem, 3.403vw, 3.06rem);     /* 49 */

	position: relative;
	background-color: var(--viora-color-surface-cream);
	color: var(--viora-color-heading);
	padding-block: var(--viora-about-pad-top) var(--viora-about-pad-bottom);
	overflow: hidden;
}

.viora-about__inner {
	position: relative;
	display: grid;
	grid-template-columns: var(--viora-about-cols, 59.94%) 1fr;
	align-items: start;
	/* Exactly 1082 at 1440 (179 either side), with room to breathe below. */
	width: min(1082px, 100% - 2 * var(--viora-layout-container-pad));
	margin-inline: auto;
}

/* -------------------------------------------------- *
 * Text column
 * -------------------------------------------------- */

.viora-about__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

/* Label 70 wide, 42 gap, rule 125 → 237 total. */
.viora-about__subheading-row {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.917vw, 2.625rem);
	width: 100%;
	max-width: clamp(12rem, 16.47vw, 14.83rem);
}

.viora-about__heading-block {
	margin-top: var(--viora-about-heading-space);
	width: 100%;
}

.viora-about__heading {
	margin: 0;
	font-family: var(--viora-font-display);
	font-size: var(--viora-about-heading-size);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.04em;
	/* 321 at the 140px design size — keeps "Meet / Viora" on two lines. */
	max-width: 2.3em;
}

/* 293 × 27, starting flush with the bottom of the name's line box. */
.viora-about__underline {
	display: block;
	width: clamp(11rem, 20.35vw, 18.31rem);
	height: clamp(1rem, 1.892vw, 1.7rem);
	margin-top: 0;
	color: var(--viora-color-heading);
}

.viora-about__role {
	margin: var(--viora-about-role-space) 0 0;
	/* 346 at the 14px design size — breaks after "&" like the design. */
	max-width: 24.75em;
	color: var(--viora-color-heading-soft);
}

.viora-about__text {
	margin-top: var(--viora-about-text-space);
	/* 460 in the design. */
	max-width: clamp(18rem, 31.95vw, 28.75rem);
	color: var(--viora-color-heading);
	font-family: var(--viora-font-ui);
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	line-height: 1.643;
}

.viora-about__text p {
	margin: 0 0 var(--viora-space-2xs);
}

.viora-about__text p:last-child {
	margin-bottom: 0;
}

/* Flex, not a block: an inline-flex button would sit on the parent's text
   baseline and drift as soon as its line-height changes. */
.viora-about__actions {
	display: flex;
	margin-top: var(--viora-about-actions-space);
}

/* 231×58: 16px block padding, 30/23 inline, 38 gap, 15px text at 1.7. */
.viora-about__button {
	gap: clamp(1.25rem, 2.639vw, 2.375rem);
	padding: 1rem 1.4375rem 1rem 1.875rem;
	border: 0;
	background-color: var(--viora-color-accent);
	color: var(--viora-color-on-invert);
	font-family: var(--viora-font-ui);
	font-size: 0.9375rem;
	line-height: 1.7;
	letter-spacing: -0.025em;
	text-transform: uppercase;
	box-shadow: none;
}

.viora-about__button:hover {
	background-color: var(--viora-color-heading-soft);
	color: var(--viora-color-on-invert);
	box-shadow: none;
}

.viora-about__button .viora-btn__arrow {
	display: block;
	width: 1.875rem;
	height: 0.875rem;
}

/* -------------------------------------------------- *
 * Portrait
 * -------------------------------------------------- */

/*
 * The portrait starts 54 lower than the text column (153.7 vs 99.3). The
 * offset lives here rather than on the figure: Elementor resets figure margins
 * with `.elementor .elementor-widget:not(…):not(…) figure`, which is 0-5-1 and
 * beats any sane selector of ours.
 */
.viora-about__aside {
	position: relative;
	min-width: 0;
	padding-top: clamp(1.5rem, 3.78vw, 3.4rem);
}

/*
 * 398.43 wide inside the 433.4 column — left aligned, leaving the right edge
 * for the vertical label.
 */
/*
 * Two classes on purpose: Elementor resets `.elementor figure { margin: 0 }`
 * at 0-1-1, which outranks a single class and would drop the offset.
 */
.viora-about__aside .viora-about__media {
	position: relative;
	width: 91.93%;
	margin: 0;
	aspect-ratio: 0.64;
	overflow: hidden;
	will-change: transform;
}

.viora-about__media-inner {
	position: absolute;
	inset: 0;
}

.viora-about__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.viora-about__media-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.2);
	pointer-events: none;
}

/* -------------------------------------------------- *
 * Circular badge
 *
 * Centre sits 153 left of the portrait and 54.8% down it, straddling the two
 * columns exactly as in the design.
 * -------------------------------------------------- */

.viora-about__badge {
	--viora-badge-size: 141px;

	position: absolute;
	/* Centre at (674, 494) in the design: 153 left of the portrait, 58.4%
	   down the column. */
	left: -35.4%;
	top: 58.4%;
	z-index: 2;
	width: var(--viora-badge-size);
	height: var(--viora-badge-size);
	color: var(--viora-color-heading);
	text-decoration: none;
	transform: translate(-50%, -50%);
}

.viora-about__badge-ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	animation: viora-about-spin 26s linear infinite;
}

.viora-about__badge:hover .viora-about__badge-ring {
	animation-play-state: paused;
}

@keyframes viora-about-spin {
	to {
		transform: rotate(360deg);
	}
}

/*
 * The ring text runs along the SVG path, so the browser advances by each
 * glyph's real width and the spacing comes out even without any per-character
 * maths here. Sized in user units — the viewBox scales it with the badge.
 */
.viora-about__badge-text {
	fill: currentColor;
	font-family: var(--viora-font-ui);
	font-size: 8.2px;
	font-weight: var(--viora-weight-medium);
	text-transform: uppercase;
}

.viora-about__badge-center {
	--viora-badge-center-tracking: -0.05em;

	/*
	 * Optically centred, not box-centred. A display face puts its ink between
	 * the baseline and the cap line, nowhere near the middle of the line box,
	 * so centring the box alone leaves the glyph riding high — 6.6px of a 141px
	 * badge with Butler. The correction is (descent - ascent) / 2 + cap / 2,
	 * which is independent of line-height; for Butler (0.27, 0.74, 0.704 per em)
	 * that is 0.117em. Retune only if the display face changes.
	 */
	--viora-badge-center-rise: 0.117em;

	position: absolute;
	left: 50%;
	top: 50%;
	font-family: var(--viora-font-display);
	font-size: clamp(1.75rem, 3.967vw, 3.57rem);
	font-weight: 400;
	line-height: 1.03;
	letter-spacing: var(--viora-badge-center-tracking);
	/* Tracking lands after the last glyph too, so it drags the box edge in and
	   the glyph off centre by half of it. Half the tracking back cancels it. */
	transform: translate(
		calc(-50% + var(--viora-badge-center-tracking) / 2),
		calc(-50% + var(--viora-badge-center-rise))
	);
}

/* -------------------------------------------------- *
 * Vertical edge label
 * -------------------------------------------------- */

.viora-about__side-label {
	position: absolute;
	right: 0;
	top: 50%;
	writing-mode: vertical-rl;
	color: var(--viora-color-heading-soft);
	font-size: clamp(0.625rem, 0.833vw, 0.75rem);
	/* Vertical text: line-height becomes the band's width, so the subheading's
	   2.14 would make it nearly three times too thick. */
	line-height: 1.643;
	white-space: nowrap;
	transform: translateY(-50%) rotate(180deg);
}

/* -------------------------------------------------- *
 * Reveal
 * -------------------------------------------------- */

.viora-about.is-animated {
	--viora-about-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.viora-about.is-animated .viora-about__item {
	opacity: 0;
	transform: translateY(26px);
}

.viora-about.is-animated .viora-about__item.is-in {
	opacity: 1;
	transform: none;
	transition:
		opacity 0.95s var(--viora-about-ease),
		transform 0.95s var(--viora-about-ease);
}

.viora-about.is-animated .viora-about__underline path {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.viora-about.is-animated .viora-about__heading-block.is-in .viora-about__underline path {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1.1s var(--viora-about-ease) 0.35s;
}

.viora-about.is-animated .viora-about__heading-block.is-in .viora-about__underline path:nth-child(2) {
	transition-delay: 0.5s;
}

.viora-about.is-animated .viora-about__heading-block.is-in .viora-about__underline path:nth-child(3) {
	transition-delay: 0.65s;
}

/* The portrait keeps its own curtain: the figure animates opacity, the inner
   layer lifts the clip once the image has actually loaded. */
.viora-about.is-animated .viora-about__media {
	transform: none;
}

.viora-about.is-animated .viora-about__media-inner {
	clip-path: inset(0 0 100% 0);
}

.viora-about.is-animated .viora-about__media img {
	transform: scale(1.18);
	transform-origin: center;
}

.viora-about.is-animated .viora-about__media.is-in.is-loaded .viora-about__media-inner {
	clip-path: inset(0 0 0 0);
	transition: clip-path 0.9s var(--viora-about-ease);
}

.viora-about.is-animated .viora-about__media.is-in.is-loaded img {
	transform: none;
	transition: transform 1.3s var(--viora-about-ease);
}

/* -------------------------------------------------- *
 * Tablet
 * -------------------------------------------------- */

@media (max-width: 1024px) {
	.viora-about {
		--viora-about-pad-top: clamp(3rem, 6vw, 4.5rem);
		--viora-about-pad-bottom: clamp(3rem, 6vw, 4.5rem);
		--viora-about-heading-size: clamp(3rem, 12vw, 6rem);
		--viora-about-heading-space: 1rem;
		--viora-about-role-space: clamp(1.5rem, 3.5vw, 2.5rem);
		--viora-about-text-space: 1rem;
		--viora-about-actions-space: clamp(1.75rem, 4vw, 2.75rem);
	}

	.viora-about__inner {
		grid-template-columns: 1fr;
		row-gap: clamp(3.5rem, 8vw, 5.5rem);
	}

	.viora-about__heading {
		max-width: none;
	}

	.viora-about__text {
		max-width: 34rem;
	}

	.viora-about__aside {
		padding-top: 0;
	}

	.viora-about__aside .viora-about__media {
		width: 100%;
		aspect-ratio: 1.4;
	}

	/* The badge moves to the corner of the portrait so it stops covering the
	   copy once the columns stack. */
	.viora-about__badge {
		left: auto;
		right: 0;
		top: 0;
		transform: translate(30%, -50%);
	}

	.viora-about__side-label {
		display: none;
	}
}

/* -------------------------------------------------- *
 * Mobile
 * -------------------------------------------------- */

@media (max-width: 767px) {
	.viora-about {
		--viora-about-pad-top: 3rem;
		--viora-about-pad-bottom: 3.5rem;
		/* Continuous with the tablet ramp at 767 (≈92px). */
		--viora-about-heading-size: clamp(2.75rem, 12vw, 5.75rem);
		--viora-about-role-space: 1.5rem;
		--viora-about-actions-space: 2rem;
	}

	.viora-about__inner {
		row-gap: 2.75rem;
	}

	.viora-about__media {
		aspect-ratio: 0.9;
	}

	.viora-about__badge {
		--viora-badge-size: clamp(88px, 26vw, 120px);
		transform: translate(25%, -45%);
	}

	.viora-about__button {
		width: 100%;
		justify-content: space-between;
	}
}

@media (prefers-reduced-motion: reduce) {
	.viora-about.is-animated .viora-about__item {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.viora-about.is-animated .viora-about__underline path {
		stroke-dashoffset: 0;
	}

	.viora-about.is-animated .viora-about__media-inner {
		clip-path: none;
	}

	.viora-about.is-animated .viora-about__media img {
		transform: none;
	}

	.viora-about__badge-ring {
		animation: none;
	}

	.viora-about__media {
		transform: none !important;
	}
}
