/*
 * Away Digital – Homepage hero intro (2026-11-13)
 * Loaded only on the front page (functions.php → away_home_hero_assets).
 * Markup: sections/hero_home_intro.php · Animation: assets/js/home-hero.js
 *
 * Default rules = FINAL layout (title above, image left, text + links right).
 * html.away-hero-pending = FIRST VIEW (full image, white title), set by an inline
 * script before the hero is parsed and removed by the JS when the animation starts.
 */

#hero.away-home-hero {
	--away-header-h: 120px;   /* same offsets as the old .hero-full-image branch */
	--away-gutter: 80px;
	--away-ink: #222222;
	--away-muted: #222222;

	position: relative;
	box-sizing: border-box;
	padding: calc(var(--away-header-h) + 40px) var(--away-gutter) 80px;
}

/* ---------- Title ---------- */
.away-home-hero__title-wrap {
	margin: 0 0 clamp(32px, 5.5vw, 110px);
}

#hero.away-home-hero .away-home-hero__title {
	display: block;
	margin: 0;
	color: var(--away-ink);
	text-transform: uppercase;
}

/* The parent theme hides ".hero-title span" until its own JS reveals it – not used here. */
#hero.away-home-hero .away-home-hero__title span {
	display: block;
	opacity: 1;
	transform: none;
}

/* ---------- Image + content grid ---------- */
.away-home-hero__grid {
	display: grid;
	grid-template-columns: 46% minmax(0, 1fr);
	column-gap: 12%;
	align-items: start;
}

.away-home-hero__media {
	position: relative;
	aspect-ratio: 2.18 / 1;
}

.away-home-hero__frame {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #cfcfcf;
}

.away-home-hero__frame img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.away-home-hero__content {
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 3.4vw, 64px);
	max-width: 560px;
}

.away-home-hero__text,
.away-home-hero__text p {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--away-muted);
}

.away-home-hero__text span {
	display: block;
	opacity: 1;
	transform: none;
}

/* Defensive reset (the wrapper is a div[role=navigation], not <nav>, because the theme JS paints every <nav>). */
#hero.away-home-hero .away-home-hero__links {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

.away-home-hero__links-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.away-home-hero__links-list li {
	margin: 0;
	padding: 0;
}

.away-home-hero__links-list li::before {
	display: none;
}

.away-home-hero__links-list a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--away-ink);
	transition: opacity 0.25s ease;
}

.away-home-hero__links-list a:hover {
	opacity: 0.6;
}

/* The parent theme wraps every menu label in .before-span > span[data-hover] for its
   fullscreen-menu animation (hidden by default) – neutralise it here. */
#hero.away-home-hero .away-home-hero__links-list .before-span,
#hero.away-home-hero .away-home-hero__links-list .before-span span {
	display: inline;
	position: static;
	opacity: 1 !important;
	transform: none !important;
	visibility: visible !important;
}

.away-home-hero__links-list .before-span span::before,
.away-home-hero__links-list .before-span span::after {
	content: none !important;
}

/* Arrow (same icon as "VIEW NOW" links) on the first link, like the design. */
.away-home-hero__links-list li:first-child a::after {
	content: "";
	flex: 0 0 auto;
	width: 12px;
	height: 13px;
	background: url("data:image/svg+xml,%3Csvg width='12' height='13' viewBox='0 0 12 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.2219 11.6403L0.749849 0.750008M11.1951 3.96207L10.2219 11.6403L2.48293 11.5397' stroke='%23222222' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- FIRST VIEW (before / at the start of the animation) ---------- */
html.away-hero-pending #hero.away-home-hero {
	height: 100vh;
	height: 100svh;
	min-height: 520px;
	padding: 0;
	overflow: hidden;
}

html.away-hero-pending .away-home-hero__inner,
html.away-hero-pending .away-home-hero__grid,
html.away-hero-pending .away-home-hero__media {
	position: static;
}

html.away-hero-pending .away-home-hero__frame {
	position: absolute;
	top: var(--away-header-h);
	right: 0;
	bottom: 0;
	left: 0;
	width: auto;
	height: auto;
	z-index: 1;
}

html.away-hero-pending .away-home-hero__title-wrap {
	position: absolute;
	right: var(--away-gutter);
	bottom: clamp(40px, 6vw, 110px);
	left: var(--away-gutter);
	z-index: 2;
	margin: 0;
}

html.away-hero-pending #hero.away-home-hero .away-home-hero__title {
	color: #ffffff;
}

html.away-hero-pending .away-home-hero__content {
	visibility: hidden;
	opacity: 0;
}

/* While animating, the frame is positioned against #hero (set inline by GSAP). */
#hero.away-home-hero.away-hero-animating .away-home-hero__inner,
#hero.away-home-hero.away-hero-animating .away-home-hero__grid,
#hero.away-home-hero.away-hero-animating .away-home-hero__media {
	position: static;
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 1466px) {
	#hero.away-home-hero {
		--away-header-h: 100px;
		--away-gutter: 60px;
	}
}

@media only screen and (max-width: 1024px) {
	#hero.away-home-hero {
		--away-header-h: 80px;
		--away-gutter: 40px;
	}

	.away-home-hero__grid {
		column-gap: 6%;
	}
}

@media only screen and (max-width: 767px) {
	#hero.away-home-hero {
		--away-gutter: 20px;
		padding-bottom: 56px;
	}

	.away-home-hero__grid {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 32px;
	}

	.away-home-hero__media {
		aspect-ratio: 16 / 10;
	}

	.away-home-hero__content {
		max-width: none;
	}

	.away-home-hero__links-list {
		justify-content: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.away-home-hero__links-list a {
		transition: none;
	}
}
