/* =================================================================
 * Tourwill — Homepage Cinematic Hero
 * File: assets/css/components/home-hero.css
 *
 * Mobile-first, BEM-style. Scoped to the .hh block so it cannot leak.
 * Depends on:
 *   • Swiper 11 base styles (.swiper / .swiper-slide / .swiper-wrapper)
 *   • Google Fonts: Playfair Display, Caveat (enqueued in functions.php)
 * ================================================================= */

/* Defensive box-sizing reset, scoped — prevents padding from
   pushing the layout wider than the viewport on mobile. */
.hh,
.hh *,
.hh *::before,
.hh *::after {
	box-sizing: border-box;
}

/* -----------------------------------------------------------------
 * 1. Local design tokens — keep the hero visually self-contained
 *    so its palette can't collide with other components.
 * --------------------------------------------------------------- */
.hh {
	--hh-bg:        #062322;
	--hh-bg-soft:   #0a3331;
	--hh-primary:   #134e4a;
	--hh-accent:    #eab308;
	--hh-accent-hi: #f5c542;
	--hh-text:      #f8f8f6;
	--hh-text-dim:  rgba(248, 248, 246, 0.78);
	--hh-line:      rgba(248, 248, 246, 0.18);

	--hh-font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--hh-font-hand:  "Caveat", "Brush Script MT", cursive;
	--hh-font-sans:  var(--font-main, "Inter", system-ui, sans-serif);

	--hh-radius:     22px;
	--hh-radius-sm:  14px;

	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	isolation: isolate;
	background: var(--hh-bg);
	color: var(--hh-text);

	/* Mobile-first: stack content, no rigid height — let it grow */
	padding: 0 0 32px;
}

/* -----------------------------------------------------------------
 * 2. Background media + gradient overlay
 * --------------------------------------------------------------- */
.hh__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}
.hh__bg-video,
.hh__bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
/* When a video is the main background, hide the duplicate fallback image
   on capable viewports (we surface it again on small/landscape via media query) */
.hh__bg-video + .hh__bg-img--mobile-fallback {
	display: none;
}

.hh__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			180deg,
			rgba(6, 35, 34, 0.55) 0%,
			rgba(6, 35, 34, 0.35) 40%,
			rgba(6, 35, 34, 0.92) 100%
		),
		linear-gradient(
			90deg,
			rgba(6, 35, 34, 0.92) 0%,
			rgba(6, 35, 34, 0.72) 35%,
			rgba(6, 35, 34, 0.18) 100%
		);
	pointer-events: none;
}

/* -----------------------------------------------------------------
 * 3. Inner content shell (text + path live here)
 * --------------------------------------------------------------- */
.hh__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
	padding: 130px 24px 56px; /* clears the fixed navbar pill on mobile */
	min-height: 70vh;
}

/* -----------------------------------------------------------------
 * 4. Hero content (eyebrow / title / description / CTA)
 *    Mobile-first: centered. Desktop overrides to left-aligned.
 * --------------------------------------------------------------- */
.hh__content {
	position: relative;
	z-index: 3;
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.hh__eyebrow {
	display: inline-block;
	font-family: var(--hh-font-hand);
	font-size: clamp(1.5rem, 3.2vw, 2rem);
	font-weight: 500;
	line-height: 1.1;
	color: var(--hh-accent);
	margin-bottom: 14px;
	letter-spacing: 0.5px;
}

.hh__title {
	font-family: var(--hh-font-serif);
	font-weight: 600;
	font-size: clamp(2.1rem, 6.2vw, 4.6rem);
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: var(--hh-text);
	margin: 0 0 18px;
}
.hh__title-main,
.hh__title-accent {
	display: inline;
}
.hh__title-accent {
	color: var(--hh-accent);
	font-style: italic;
	/* Natural inline whitespace between spans provides the spacing.
	   Avoid extra margin which causes a visible gap when the line wraps. */
}

.hh__description {
	font-family: var(--hh-font-sans);
	font-size: clamp(0.95rem, 1.6vw, 1.05rem);
	line-height: 1.65;
	color: var(--hh-text-dim);
	max-width: 460px;
	margin: 0 auto 28px;
}

.hh__actions {
	display: flex;
	justify-content: center;
}

.hh__cta-primary {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 16px 28px;
	background: var(--hh-accent);
	color: #1f1404;
	font-family: var(--hh-font-sans);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 12px;
	box-shadow: 0 12px 32px -8px rgba(234, 179, 8, 0.45);
	transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
	-webkit-tap-highlight-color: transparent;
}
.hh__cta-primary:hover {
	transform: translateY(-2px);
	background: var(--hh-accent-hi);
	box-shadow: 0 18px 40px -10px rgba(234, 179, 8, 0.6);
	opacity: 1; /* override global a:hover { opacity: 0.7 } */
}
.hh__cta-arrow {
	width: 18px;
	height: 18px;
	transition: transform 0.35s ease;
}
.hh__cta-primary:hover .hh__cta-arrow {
	transform: translateX(4px);
}

/* -----------------------------------------------------------------
 * 5. Story Path Journey Markers (decorative, desktop only)
 * --------------------------------------------------------------- */
.hh__path {
	display: none; /* mobile-first hidden — re-enabled on desktop */
}

/* -----------------------------------------------------------------
 * 6. Cards container (floating glassmorphism)
 *    Mobile-first: full-bleed, single column.
 * --------------------------------------------------------------- */
.hh__cards-wrap {
	position: relative;
	z-index: 4;
	width: 100%;
	max-width: 1340px;
	margin: 24px auto 0;
	padding: 0 16px;
}
.hh__cards {
	position: relative;
	background: linear-gradient(180deg, rgba(6, 35, 34, 0.72), rgba(6, 35, 34, 0.85));
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid var(--hh-line);
	border-radius: var(--hh-radius);
	padding: 24px 20px 28px;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.hh__cards-intro {
	margin-bottom: 22px;
}
.hh__cards-eyebrow {
	display: block;
	font-family: var(--hh-font-sans);
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--hh-accent);
	margin-bottom: 10px;
}
.hh__cards-heading {
	font-family: var(--hh-font-serif);
	font-weight: 600;
	font-size: clamp(1.3rem, 3.4vw, 1.7rem);
	line-height: 1.2;
	color: var(--hh-text);
	margin: 0 0 18px;
}
.hh__cards-heading-accent {
	color: var(--hh-accent);
	font-style: italic;
	margin-left: 0.18em;
}

.hh__cards-nav {
	display: flex;
	align-items: center;
	gap: 14px;
}
.hh__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: transparent;
	color: var(--hh-text);
	border: 1px solid rgba(248, 248, 246, 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}
.hh__nav-btn svg {
	width: 18px;
	height: 18px;
}
.hh__nav-btn:hover {
	transform: translateY(-1px);
	border-color: rgba(248, 248, 246, 0.55);
}
.hh__nav-btn.is-primary {
	background: var(--hh-accent);
	color: #1f1404;
	border-color: transparent;
	box-shadow: 0 8px 20px -6px rgba(234, 179, 8, 0.45);
}
.hh__nav-btn.is-primary:hover {
	background: var(--hh-accent-hi);
}
.hh__nav-btn.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.hh__counter {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-left: 6px;
	font-family: var(--hh-font-sans);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--hh-text-dim);
	font-variant-numeric: tabular-nums;
}
.hh__counter-current {
	color: var(--hh-accent);
	font-weight: 600;
}
.hh__counter-divider {
	display: inline-block;
	width: 28px;
	height: 1px;
	background: rgba(248, 248, 246, 0.4);
}

/* Slider */
.hh__cards-slider {
	width: 100%;
	overflow: hidden;
}
.hh__cards-slider .swiper-wrapper {
	box-sizing: content-box;
}

/* Individual card */
.hh__card {
	position: relative;
	height: auto;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--hh-radius-sm);
	overflow: hidden;
	transition: transform 0.35s ease, border-color 0.35s ease;
}
.hh__card:hover {
	transform: translateY(-3px);
	border-color: rgba(234, 179, 8, 0.35);
}
.hh__card-media {
	position: relative;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--hh-primary);
}
.hh__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}
.hh__card:hover .hh__card-media img {
	transform: scale(1.05);
}
.hh__card-media-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--hh-primary), var(--hh-bg));
}
.hh__card-icon {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--hh-accent);
	color: #1f1404;
	border-radius: 50%;
	box-shadow: 0 6px 16px -4px rgba(234, 179, 8, 0.55);
}
.hh__card-icon svg {
	width: 22px;
	height: 22px;
}
.hh__card-body {
	padding: 16px 18px 20px;
}
.hh__card-title {
	font-family: var(--hh-font-sans);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--hh-text);
	margin: 0 0 8px;
}
.hh__card-desc {
	font-family: var(--hh-font-sans);
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--hh-text-dim);
	margin: 0;
}

/* -----------------------------------------------------------------
 * 7. Entrance animations (respects prefers-reduced-motion)
 * --------------------------------------------------------------- */
@keyframes hh-fade-up {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}
.hh__eyebrow,
.hh__title,
.hh__description,
.hh__actions,
.hh__marker,
.hh__cards {
	opacity: 0;
	transform: translateY(24px);
	animation: hh-fade-up 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hh__eyebrow      { animation-delay: 0.15s; }
.hh__title        { animation-delay: 0.30s; }
.hh__description  { animation-delay: 0.50s; }
.hh__actions      { animation-delay: 0.70s; }
.hh__marker--1    { animation-delay: 0.90s; }
.hh__marker--2    { animation-delay: 1.00s; }
.hh__marker--3    { animation-delay: 1.10s; }
.hh__marker--4    { animation-delay: 1.20s; }
.hh__cards        { animation-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
	.hh__eyebrow,
	.hh__title,
	.hh__description,
	.hh__actions,
	.hh__marker,
	.hh__cards {
		animation: none;
		opacity: 1;
		transform: none;
	}
	.hh__bg-video {
		display: none;
	}
}

/* -----------------------------------------------------------------
 * 8. TABLET (>= 640px) — 2-up cards, slightly more breathing room
 * --------------------------------------------------------------- */
@media (min-width: 640px) {
	.hh {
		padding-bottom: 48px;
	}
	.hh__inner {
		padding: 130px 32px 64px;
		min-height: 76vh;
	}
	.hh__cards {
		padding: 28px 28px 32px;
	}
	.hh__cards-heading {
		font-size: clamp(1.45rem, 2.6vw, 1.85rem);
	}
}

/* -----------------------------------------------------------------
 * 9. DESKTOP (>= 1024px) — left-aligned content + journey path + 4-card row
 * --------------------------------------------------------------- */
@media (min-width: 1024px) {

	.hh__inner {
		padding: 170px 56px 80px; /* extra top padding so content clears the fixed navbar */
		min-height: 88vh;
	}
	.hh__content {
		max-width: 580px;
		margin: 0;
		text-align: left;
	}
	.hh__description {
		margin-left: 0;
		margin-right: 0;
	}
	.hh__actions {
		justify-content: flex-start;
	}

	/* ── Journey path (decorative, desktop+ only) ──
	   Anchored to match the inner content padding so the top marker
	   sits BELOW the fixed navbar instead of getting clipped behind it. */
	.hh__path {
		display: block;
		position: absolute;
		top: 160px;       /* clears the fixed navbar (~80–90px) + breathing room */
		right: 6%;
		width: 32%;
		max-width: 460px;
		bottom: 120px;    /* leaves room for the floating cards container below */
		height: auto;
		pointer-events: none;
	}
	.hh__path-svg {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}
	.hh__marker {
		position: absolute;
		display: flex;
		align-items: center;
		gap: 12px;
		white-space: nowrap;
	}
	.hh__marker-dot {
		position: relative;
		display: inline-block;
		width: 14px;
		height: 14px;
		border-radius: 50%;
		background: transparent;
		border: 1.5px solid rgba(248, 248, 246, 0.85);
		flex: 0 0 14px;
	}
	.hh__marker-dot::after {
		content: "";
		position: absolute;
		inset: 3px;
		border-radius: 50%;
		background: var(--hh-text);
	}
	.hh__marker--4 .hh__marker-dot,
	.hh__marker--3 .hh__marker-dot { border-color: var(--hh-accent); }
	.hh__marker--3 .hh__marker-dot::after,
	.hh__marker--4 .hh__marker-dot::after { background: var(--hh-accent); }

	.hh__marker-label {
		font-family: var(--hh-font-hand);
		font-size: 1.55rem;
		font-weight: 500;
		color: var(--hh-text);
		text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
	}

	/* Marker positions — computed mathematically from the SVG path's
	   parametric equation so each dot lands ON the dotted curve.
	   Path: M 220,30 Q -80,300 220,570  (viewBox 400x600)
	   y(t) = 30 + 540t   (linear)
	   x(t) = 220 - 600t + 600t²
	   Marker (top%, left%) pairs:
	     M1 t=0.011 → (6%,  53%)   top of curve, right side
	     M2 t=0.278 → (30%, 25%)   curve sweeping left
	     M3 t=0.589 → (58%, 19%)   leftmost bulge
	     M4 t=0.944 → (90%, 47%)   bottom of curve, right side
	   Editing the path? Recompute these. */
	.hh__marker--1 { top:  6%; left: 53%; }
	.hh__marker--2 { top: 30%; left: 25%; }
	.hh__marker--3 { top: 58%; left: 19%; }
	.hh__marker--4 { top: 90%; left: 47%; }

	/* ── Cards row: 4-up, larger and more editorial ── */
	.hh__cards-wrap {
		margin-top: -90px; /* overlap the hero base for the "floating" look */
		padding: 0 32px;
	}
	.hh__cards {
		display: grid;
		grid-template-columns: minmax(240px, 290px) 1fr;
		gap: 36px;
		align-items: center;
		padding: 32px 36px;
	}
	.hh__cards-intro {
		margin-bottom: 0;
	}
	.hh__cards-heading {
		font-size: clamp(1.55rem, 1.9vw, 1.85rem);
	}

	/* Slide widths are managed by Swiper JS; CSS only sets visual polish */
}

/* -----------------------------------------------------------------
 * 10. LARGE DESKTOP polish (>= 1280px)
 * --------------------------------------------------------------- */
@media (min-width: 1280px) {
	.hh__inner {
		padding: 180px 64px 100px;
	}
	.hh__title {
		font-size: clamp(2.8rem, 4.6vw, 4.6rem);
	}
	.hh__cards-wrap {
		margin-top: -110px;
	}
}

/* -----------------------------------------------------------------
 * 10b. NAV CLEANUP — when all 4 cards fit (>= 1180px), the prev/next
 *      arrows become permanently disabled and look broken, so we
 *      hide them. The intro panel keeps just the eyebrow + heading.
 * --------------------------------------------------------------- */
@media (min-width: 1180px) {
	.hh__cards-nav {
		display: none;
	}
	/* Heading no longer needs bottom margin to push the nav down */
	.hh__cards-heading {
		margin-bottom: 0;
	}
}

/* -----------------------------------------------------------------
 * 11. SMALL PHONES (<= 380px) — squeeze padding
 * --------------------------------------------------------------- */
@media (max-width: 380px) {
	.hh__inner {
		padding: 96px 18px 48px;
	}
	.hh__cards-wrap {
		padding: 0 12px;
	}
	.hh__cta-primary {
		padding: 14px 22px;
		font-size: 0.72rem;
		letter-spacing: 0.14em;
		gap: 10px;
	}
}

/* -----------------------------------------------------------------
 * 12. Landscape phones — bring height down so hero isn't 1000px tall
 * --------------------------------------------------------------- */
@media (max-height: 560px) and (orientation: landscape) {
	.hh__inner {
		min-height: auto;
		padding-top: 100px;
		padding-bottom: 40px;
	}
}

/* -----------------------------------------------------------------
 * 13. Performance: on cellular / narrow viewports, swap the video
 *     for the poster image to save bandwidth and battery.
 * --------------------------------------------------------------- */
@media (max-width: 768px) {
	.hh__bg-video {
		display: none;
	}
	.hh__bg-video + .hh__bg-img--mobile-fallback {
		display: block;
	}
}

/* -----------------------------------------------------------------
 * 14. Large desktop (>= 1180px) — when all 4 cards fit on-screen,
 *     the prev/next buttons and counter become decorative noise
 *     and the prev arrow always reads as "disabled". Hide them.
 *     Wraps automatically on tablet/mobile where slider paginates.
 * --------------------------------------------------------------- */
@media (min-width: 1180px) {
	.hh__cards-nav {
		display: none;
	}
}
