/* ════════════════════════════════════════════════════════════════
   HOW AROA WORKS — page styles
   Inherits: style.css (base variables, nav, footer, .final-cta, .fade-in)
   ════════════════════════════════════════════════════════════════ */

/* ── ACTIVE NAV STATE ── */
.nav-link--active {
	color: var(--text) !important;
	border-bottom: 1.5px solid var(--text);
	padding-bottom: 1px;
}

/* ── PAGE HEADER ── */
.hiw-header {
	text-align: center;
	padding: 72px 24px 64px;
	max-width: 680px;
	margin: 0 auto;
}

.hiw-page-title {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(32px, 5vw, 52px);
	font-weight: 500;
	letter-spacing: -0.03em;
	color: var(--text);
	margin: 0 0 20px;
	line-height: 1.08;
}

.hiw-page-intro {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(15px, 1.7vw, 18px);
	font-weight: 300;
	color: var(--text-light);
	line-height: 1.75;
	margin: 0 0 28px;
}

/* Subtle anchor below the intro paragraph */
.hiw-faq-shortcut {
	display: inline-block;
	font-family: "Gilroy", sans-serif;
	font-size: 13px;
	font-weight: 300;
	color: var(--text-light);
	text-decoration: none;
	border-bottom: 1px solid var(--border);
	padding-bottom: 1px;
	transition: color 0.2s, border-color 0.2s;
	letter-spacing: 0.01em;
}

.hiw-faq-shortcut:hover {
	color: var(--text);
	border-color: var(--text-light);
}

/* ── SCROLLYTELLING SECTION ── */
.hiw-section {
	background: var(--hiw-bg, var(--bg));
	transition: background 0.8s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative; /* needed for sticky children */
}

/* ── DESKTOP: STICKY VIEWPORT PANEL ──────────────────────────────
   One sticky 100vh panel that spans the full width, split left/right.
   The scroll space below provides the height that drives transitions.
   ────────────────────────────────────────────────────────────────── */
.hiw-viewport {
	position: sticky;
	top: 73px; /* sit below the sticky nav (73px tall) */
	height: calc(100vh - 73px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 40px;
	padding: 0 clamp(32px, 6vw, 100px);
	max-width: 1200px;
	margin: 0 auto;
	background: transparent; /* .hiw-section carries the bg colour */
}

.hiw-vp-left {
	/* Left half — text content */
}

.hiw-vp-right {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Scroll space: 7 × 100vh — no visible content, just provides scroll height */
.hiw-scrollspace {
	/* Height set by 7 trigger children */
}

.hiw-trigger {
	height: 100vh;
}

/* ── TEXT CONTENT (inside viewport left) ── */
.hiw-text-inner {
	/* Opacity-only fade — children carry their own translateY entrance,
	   so no compound translation that would cause a double-move shake */
	transition: opacity 0.25s ease;
}

.hiw-text-inner.is-fading {
	opacity: 0;
}

.hiw-feature-label {
	display: block;
	font-family: "Gilroy", sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-light);
	margin-bottom: 18px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-feature-label.is-visible {
	opacity: 1;
	transform: none;
}

/* Feature name heading — the big title that replaces the small eyebrow-only treatment */
.hiw-feature-title {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 500;
	letter-spacing: -0.025em;
	color: var(--text);
	line-height: 1.1;
	margin: 0 0 20px;
	opacity: 0;
	transform: translateY(7px);
	/* No transition-delay — removes the "late start" that leaves elements
	   at an intermediate translateY when the container becomes opaque */
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-feature-title.is-visible {
	opacity: 1;
	transform: none;
}

.hiw-feature-body {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(16px, 1.7vw, 21px);
	font-weight: 300;
	color: var(--text);
	line-height: 1.72;
	margin: 0 0 28px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-feature-body.is-visible {
	opacity: 1;
	transform: none;
}

/* Sub-option cards (Journal/Breathe) */
.hiw-sub-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hiw-sub-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px 20px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-sub-card.is-visible {
	opacity: 1;
	transform: none;
}

.hiw-sub-card-name {
	display: block;
	font-family: "Gilroy", sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 4px;
	letter-spacing: 0.01em;
}

.hiw-sub-card-desc {
	font-family: "Gilroy", sans-serif;
	font-size: 13px;
	font-weight: 300;
	color: var(--text-light);
	line-height: 1.6;
	margin: 0;
}

/* Pill-style tags (Take Action categories) */
.hiw-sub-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.hiw-sub-tag {
	font-family: "Gilroy", sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--text-light);
	border: 1px solid var(--border);
	border-radius: 50px;
	padding: 6px 16px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-sub-tag.is-visible {
	opacity: 1;
	transform: none;
}

/* ── PHONE SCREENSHOTS (inside viewport right) ── */
.hiw-screens {
	position: relative;
	width: 260px;
	/* Use the exact screenshot pixel ratio (738 × 1600) so nothing gets clipped */
	aspect-ratio: 738 / 1600;
}

/* Screens stack — current one shown via opacity crossfade */
.hiw-screen {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	border-radius: 22px;
	overflow: hidden;
	/* No border or bg — let the screenshot float naturally, like the mobile version */
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.hiw-screen.is-active {
	opacity: 1;
}

/* Screenshot fills the phone mock container */
.hiw-screen img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── MOBILE STACK ── */
/* Hidden on desktop, shown on mobile */
.hiw-mobile-stack {
	display: none;
}

.hiw-mobile-block {
	padding: 52px 24px 40px;
	border-bottom: 1px solid var(--border);
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hiw-mobile-block.is-visible {
	opacity: 1;
	transform: none;
}

.hiw-mobile-label {
	display: block;
	font-family: "Gilroy", sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-light);
	margin-bottom: 16px;
}

.hiw-mobile-title {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(22px, 6vw, 28px);
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--text);
	line-height: 1.15;
	margin: 0 0 16px;
}

.hiw-mobile-body {
	font-family: "Gilroy", sans-serif;
	font-size: 17px;
	font-weight: 300;
	color: var(--text);
	line-height: 1.72;
	margin: 0 0 24px;
}

.hiw-mobile-visual {
	width: 100%;
	max-width: 220px;
	margin: 28px auto 0;
	border-radius: 36px;
	overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10);
}

.hiw-mobile-visual img {
	width: 100%;
	height: auto;
	display: block;
}

/* Sub items in mobile */
.hiw-mobile-sub {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 16px;
}

.hiw-mobile-sub-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px 18px;
}

.hiw-mobile-sub-name {
	display: block;
	font-family: "Gilroy", sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 3px;
}

.hiw-mobile-sub-desc {
	font-family: "Gilroy", sans-serif;
	font-size: 13px;
	font-weight: 300;
	color: var(--text-light);
	line-height: 1.55;
	margin: 0;
}

.hiw-mobile-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.hiw-mobile-tag {
	font-family: "Gilroy", sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--text-light);
	border: 1px solid var(--border);
	border-radius: 50px;
	padding: 6px 16px;
}

/* ── SECTION DIVIDER ── */
.hiw-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 80px 24px 64px;
}

.hiw-rule {
	width: 100%;
	max-width: 680px;
	border: none;
	border-top: 1px solid var(--border);
	margin: 0;
}

.hiw-divider-label {
	font-family: "Gilroy", sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-light);
}

/* ── FAQ ACCORDION ── */
.hiw-faq {
	padding: 0 24px 96px;
}

.hiw-faq-col {
	max-width: 680px;
	margin: 0 auto;
}

.faq-item {
	border-bottom: 1px solid var(--border);
}

.faq-q {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: "Gilroy", sans-serif;
	font-size: clamp(15px, 1.6vw, 17px);
	font-weight: 300;
	color: var(--text);
	line-height: 1.55;
}

/* Plus / X icon */
.faq-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	position: relative;
}

.faq-icon::before,
.faq-icon::after {
	content: '';
	position: absolute;
	background: var(--text-light);
	border-radius: 2px;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
	            opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Horizontal bar */
.faq-icon::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.5px;
	transform: translateY(-50%);
}

/* Vertical bar (becomes hidden when open) */
.faq-icon::after {
	top: 0;
	left: 50%;
	width: 1.5px;
	height: 100%;
	transform: translateX(-50%);
}

.faq-q[aria-expanded="true"] .faq-icon::after {
	transform: translateX(-50%) rotate(90deg);
	opacity: 0;
}

.faq-a {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-a:not([hidden]) {
	/* max-height set by JS */
}

.faq-a p {
	font-family: "Gilroy", sans-serif;
	font-size: clamp(14px, 1.5vw, 16px);
	font-weight: 300;
	color: var(--text-light);
	line-height: 1.75;
	margin: 0 0 28px;
	padding-left: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
	/* Hide desktop sticky layout and scroll space */
	.hiw-viewport,
	.hiw-scrollspace {
		display: none;
	}

	/* Show mobile stacked layout */
	.hiw-mobile-stack {
		display: block;
	}

	.hiw-header {
		padding: 52px 24px 48px;
	}

	.hiw-divider {
		padding: 52px 24px 44px;
	}

	.hiw-faq {
		padding: 0 20px 72px;
	}

	.faq-q {
		font-size: 15px;
		padding: 20px 0;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.hiw-viewport {
		gap: 28px;
		padding: 0 32px;
	}

	.hiw-screens {
		width: 200px;
		/* aspect-ratio (738/1600) on the base rule handles height automatically */
	}
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
	.hiw-feature-label,
	.hiw-feature-title,
	.hiw-feature-body,
	.hiw-sub-card,
	.hiw-sub-tag,
	.hiw-screen,
	.hiw-text-inner,
	.hiw-mobile-block {
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.hiw-section {
		transition: none !important;
	}
}
