/* Arveon homepage — D.O. hero stage and footer. */

:root {
	--av-sky: #cfe0e8;
}

/* ------------------------------------------------------------------ *
 * Scroll container + sticky stage
 * ------------------------------------------------------------------ */

/* The backdrop is only ever seen before the first frame decodes, so it is
   near-black to match the sequence, which opens and closes on black. */
.av-scroll {
	position: relative;
	height: 450vh;
	background: #050403;
}

.av-stage {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow: hidden;
	background: #050403;
}

.av-stage__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 1;
}

/* Loading veil — lifts once the first frames are decoded. */
.av-boot {
	position: absolute;
	inset: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #050403;
	transition: opacity 0.9s ease, visibility 0.9s;
}

body.av-ready .av-boot {
	opacity: 0;
	visibility: hidden;
}

.av-boot__mark {
	width: 48px;
	height: 1px;
	background: rgba(236, 211, 201, 0.25);
	position: relative;
	overflow: hidden;
}

.av-boot__mark::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--av-rose, #c6896e);
	transform: translateX(-100%);
	animation: av-boot-sweep 1.5s ease-in-out infinite;
}

@keyframes av-boot-sweep {
	0% { transform: translateX(-100%); }
	60% { transform: translateX(100%); }
	100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------------ *
 * D.O. mascot
 *
 * Artwork supplied by the site owner — see the HTML comment above the
 * markup in template-home.php for provenance and what was cropped out.
 * It is a single flattened image (no separate limb/eye layers), so the
 * behaviour here is adapted from the original hand-drawn spec: a whole-
 * figure entrance and greeting wiggle stand in for the per-limb wave, and
 * a drop-shadow breathe stands in for a chest-panel pulse. Sits centred
 * on the stage; scroll.js adds the is-visible/is-waving/is-idle classes
 * once the background reveal finishes.
 * ------------------------------------------------------------------ */

.av-do {
	position: absolute;
	left: 50%;
	top: 48%;
	z-index: 3;
	width: clamp(280px, 30vw, 520px);
	transform: translate3d(-50%, -50%, 0) scale(0.85);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	will-change: transform, opacity;
}

.av-do.is-visible {
	visibility: visible;
	animation: av-do-entrance 0.6s ease-out forwards;
}

@keyframes av-do-entrance {
	from { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.85); }
	to   { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
}

.av-do__float {
	width: 100%;
}

/*
 * The wave and the idle float both animate this child, not .av-do itself —
 * deliberately. .av-do's own `animation` property is spoken for by the
 * entrance (.is-visible, with `forwards` holding opacity:1/scale(1) once it
 * finishes). A class that set `animation` on .av-do too would, the instant
 * it took effect, replace that whole property — cancelling the entrance
 * animation and its forwards-held opacity along with it, and since neither
 * replacement keyframe set touched opacity, the element fell back to the
 * base rule's `opacity: 0` for the animation's full duration. That was the
 * "D.O. disappears" bug: it dropped out during the wave, before the idle
 * pulse ever got a chance to start. Keeping wave/idle on a separate element
 * means they can never touch .av-do's opacity or entrance transform at all.
 */
.av-do.is-waving .av-do__float {
	animation: av-do-wiggle 1.2s ease-in-out;
}

@keyframes av-do-wiggle {
	0%   { transform: rotate(0deg); }
	15%  { transform: rotate(-6deg); }
	32%  { transform: rotate(3deg); }
	48%  { transform: rotate(-4deg); }
	64%  { transform: rotate(3deg); }
	80%  { transform: rotate(-2deg); }
	100% { transform: rotate(0deg); }
}

.av-do.is-idle .av-do__float {
	animation: av-do-float 3.6s ease-in-out infinite;
}

@keyframes av-do-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-7px); }
}

.av-do__img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.5;
}

.av-do.is-idle .av-do__img {
	opacity: 0.8;
}

/* ------------------------------------------------------------------ *
 * Hero copy — fades in once D.O.'s reveal completes
 * ------------------------------------------------------------------ */

.av-hero-copy {
	position: absolute;
	top: 50%;
	right: clamp(28px, 6.5vw, 100px);
	z-index: 4;
	max-width: min(30ch, 380px);
	transform: translateY(-50%);
	text-align: left;
	color: var(--av-white-warm, #faf6f3);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.7s ease;
	will-change: opacity;
}

.av-hero-copy.is-visible {
	opacity: 1;
	visibility: visible;
}

.av-hero-copy__label {
	display: block;
	margin-bottom: 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--av-rose, #c6896e);
}

.av-hero-copy__headline {
	margin: 0 0 18px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 600;
	font-size: clamp(30px, 3.6vw, 52px);
	line-height: 1.1;
	text-wrap: balance;
	color: var(--av-white-warm, #faf6f3);
}

.av-hero-copy__sub {
	margin: 0 0 30px;
	max-width: 32ch;
	font-size: clamp(14px, 1.1vw, 16.5px);
	line-height: 1.7;
	color: rgba(250, 246, 243, 0.78);
}

.av-hero-copy__cta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--av-rose, #c6896e);
	color: var(--av-ink, #1a1512);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	padding: 14px 14px 14px 24px;
	border-radius: 6px;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.av-hero-copy__cta:hover {
	background: var(--av-rose-dark, #aa6551);
	transform: translateY(-1px);
}

.av-hero-copy__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--av-ink, #1a1512);
	color: var(--av-cream, #ecd3c9);
	flex: 0 0 auto;
}

/* Scroll cue */

.av-cue {
	position: absolute;
	left: 50%;
	bottom: 34px;
	z-index: 5;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--av-white-warm, #faf6f3);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s ease;
}

body.av-ready .av-cue {
	opacity: 1;
}

.av-cue__line {
	width: 1px;
	height: 46px;
	background: linear-gradient(180deg, currentColor, transparent);
	opacity: 0.6;
	animation: av-cue-drop 2.1s ease-in-out infinite;
	transform-origin: top;
}

@keyframes av-cue-drop {
	0%, 100% { transform: scaleY(0.35); opacity: 0.25; }
	50% { transform: scaleY(1); opacity: 0.7; }
}

/* ------------------------------------------------------------------ *
 * Nav adapting to a dark plate
 * ------------------------------------------------------------------ */

.av-nav-wrap.is-on-dark {
	--av-nav-text: #f0dcd2;
	--av-nav-border: rgba(255, 255, 255, 0.18);
	--av-nav-bg: rgba(12, 10, 9, 0.22);
}

.av-nav-wrap {
	transition: padding 0.45s cubic-bezier(.4, 0, .2, 1);
}

.av-nav-wrap.is-on-dark .av-nav__logo img {
	filter: brightness(1.35) saturate(0.9);
}

/* ------------------------------------------------------------------ *
 * Footer — the D.O. reveal lands on black
 *
 * The top of this gradient is the bottom edge of the last background frame
 * (sampled at pure black, since the "DO" mark and its sparks sit clear of the
 * frame's edges), so the page reads as one continuous image at the handover
 * instead of cutting from the plate to a flat panel. It has to clear to cream
 * inside the footer's own top padding, before the closing headline starts, or
 * the dark text lands on a dark stop — hence the stops in px rather than the
 * percentages used further down, which would move with the footer's height.
 * Re-pick these whenever the background sequence changes.
 * ------------------------------------------------------------------ */

.av-footer {
	position: relative;
	z-index: 3;
	background: linear-gradient(
		180deg,
		#050403 0,
		#241c18 72px,
		#cdc2b8 168px,
		#fbf8f6 380px,
		#fbf8f6 62%,
		#f6efea 100%
	);
	color: #2b2320;
	padding: clamp(80px, 11vw, 160px) clamp(20px, 5vw, 80px) 0;
	font-size: 14px;
}

.av-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
}

/* Closing statement */

.av-footer__close {
	text-align: center;
	max-width: 780px;
	margin: 0 auto clamp(64px, 8vw, 120px);
}

.av-footer__close h2 {
	margin: 0 0 22px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 600;
	font-size: clamp(34px, 5vw, 70px);
	line-height: 1.06;
	letter-spacing: 0.01em;
	color: #1f1a17;
}

.av-footer__close p {
	margin: 0 auto;
	max-width: 54ch;
	font-size: clamp(14px, 1.15vw, 16.5px);
	line-height: 1.8;
	color: #5a4a42;
}

.av-footer__hairline {
	width: 54px;
	height: 1px;
	margin: 30px auto 0;
	background: var(--av-rose, #c6896e);
	opacity: 0.7;
}

/* Three routes onward, mirroring the three scenes */

.av-routes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(14px, 1.6vw, 26px);
	margin-bottom: clamp(64px, 8vw, 118px);
}

.av-route {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: clamp(26px, 2.6vw, 40px);
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(170, 101, 81, 0.16);
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(.4, 0, .2, 1), box-shadow 0.35s ease,
		background-color 0.35s ease, border-color 0.35s ease;
}

.av-route:hover {
	transform: translateY(-4px);
	background: #fff;
	border-color: rgba(170, 101, 81, 0.34);
	box-shadow: 0 18px 40px rgba(90, 60, 45, 0.13);
}

.av-route__eyebrow {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--av-rose-dark, #aa6551);
}

.av-route__name {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: clamp(22px, 2.1vw, 31px);
	line-height: 1.15;
	color: #1f1a17;
}

.av-route__name sup {
	font-size: 0.36em;
	vertical-align: super;
}

.av-route__desc {
	font-size: 13.5px;
	line-height: 1.7;
	color: #5f4f47;
	margin: 0;
}

.av-route__go {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-top: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--av-rose-dark, #aa6551);
}

.av-route__go svg {
	transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.av-route:hover .av-route__go svg {
	transform: translateX(5px);
}

/* Link columns */

.av-footer__grid {
	display: grid;
	grid-template-columns: 1.5fr repeat(3, 1fr) 1.7fr;
	gap: clamp(24px, 3vw, 52px);
	padding-bottom: clamp(48px, 6vw, 84px);
}

.av-footer__brand img {
	height: 30px;
	width: auto;
	display: block;
	margin-bottom: 18px;
}

.av-footer__brand p {
	margin: 0;
	max-width: 30ch;
	font-size: 13px;
	line-height: 1.75;
	color: #6a594f;
}

.av-fcol h3 {
	margin: 0 0 16px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #97806f;
}

.av-fcol ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.av-fcol li + li {
	margin-top: 11px;
}

.av-fcol a {
	font-size: 13.5px;
	color: #3d332e;
	text-decoration: none;
	transition: color 0.2s ease;
}

.av-fcol a:hover {
	color: var(--av-rose-dark, #aa6551);
}

/* Newsletter */

.av-signup p {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.7;
	color: #6a594f;
}

.av-signup__row {
	display: flex;
	gap: 8px;
	max-width: 330px;
}

.av-signup input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 12px 14px;
	font: inherit;
	font-size: 13px;
	color: #2b2320;
	background: rgba(255, 255, 255, 0.75);
	border: 1px solid rgba(170, 101, 81, 0.24);
	border-radius: 5px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.av-signup input:focus {
	outline: none;
	background: #fff;
	border-color: var(--av-rose, #c6896e);
}

.av-signup button {
	flex: 0 0 auto;
	padding: 12px 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--av-cream, #ecd3c9);
	background: var(--av-rose-dark, #aa6551);
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.av-signup button:hover {
	background: #8f5241;
	transform: translateY(-1px);
}

.av-signup__note {
	margin: 12px 0 0;
	font-size: 11.5px;
	color: #8b7668;
}

/* Bottom bar */

.av-footer__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 26px 0 30px;
	border-top: 1px solid rgba(170, 101, 81, 0.16);
	font-size: 12px;
	color: #7d6a5e;
}

.av-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.av-footer__legal a {
	color: #7d6a5e;
	text-decoration: none;
	transition: color 0.2s ease;
}

.av-footer__legal a:hover {
	color: var(--av-rose-dark, #aa6551);
}

.av-footer__social {
	display: flex;
	gap: 6px;
}

.av-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: #7d6a5e;
	border: 1px solid rgba(170, 101, 81, 0.2);
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.av-footer__social a:hover {
	color: var(--av-rose-dark, #aa6551);
	border-color: rgba(170, 101, 81, 0.45);
	background: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1080px) {
	.av-footer__grid {
		grid-template-columns: 1fr 1fr 1fr;
		row-gap: 44px;
	}

	.av-footer__brand,
	.av-signup {
		grid-column: span 3;
	}
}

@media (max-width: 900px) {
	.av-scroll {
		height: 520vh;
	}

	/* D.O. moves up into the top of the stage and the copy stacks below it,
	   centred, instead of the two sitting side by side. */
	.av-do {
		top: 36%;
		width: clamp(100px, 26vw, 160px);
	}

	.av-hero-copy {
		top: auto;
		right: auto;
		bottom: 8%;
		left: 50%;
		max-width: 86vw;
		transform: translateX(-50%);
		text-align: center;
	}

	.av-hero-copy__sub {
		max-width: none;
		margin-left: auto;
		margin-right: auto;
	}

	.av-hero-copy__headline {
		font-size: clamp(28px, 7vw, 44px);
	}

	.av-routes {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.av-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.av-footer__brand,
	.av-signup {
		grid-column: span 2;
	}

	.av-footer__bar {
		justify-content: center;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.av-boot__mark::after,
	.av-cue__line {
		animation: none;
	}

	.av-route,
	.av-route__go svg {
		transition: none;
	}

	/* D.O. still fades in, but skips the scale, wiggle, float and glow loops
	   entirely — resting pose only. */
	.av-do {
		transition: opacity 0.6s ease;
		animation: none !important;
		transform: translate3d(-50%, -50%, 0) scale(1) !important;
	}

	.av-do.is-visible {
		opacity: 1;
	}

	.av-do__float,
	.av-do__img {
		animation: none !important;
	}
}
