/* ==========================================================================
   Home hero slider (jewellery-store style)
   - Full width, edge to edge, straight under the header. Each banner is
     shown in full at its own shape (--hero-ratio / --hero-ratio-mobile, set
     in PHP from the first banner): no shade, no zoom, no crop, no frame.
   - Banners slide sideways. Diamond markers sit over the bottom of the
     banner (the current one is a sparkle). Arrows appear on hover. The
     slideshow holds while it is hovered, focused or touched.
   ========================================================================== */

.has-hero .site-main {
	padding-top: 0;
	padding-bottom: 0; /* home sections set their own spacing */
}

.hero {
	--hero-ease: cubic-bezier(.22, .61, .36, 1);
	--hero-speed: .75s;
	--hero-mark: var(--g-white); /* marker colour */

	position: relative;
	background: var(--g-navy);
	color: var(--g-white);
}

/* ---------- The banner area (one banner visible at a time) ---------- */
.hero__viewport {
	position: relative;
	overflow: hidden;
}

/* The row of banners. */
.hero__track {
	display: flex;
	/* Shows banner number --hero-i; --hero-drag follows a finger while swiping. */
	transform: translate3d(calc(var(--hero-i, 0) * -100% + var(--hero-drag, 0px)), 0, 0);
	transition: transform var(--hero-speed) var(--hero-ease);
	touch-action: pan-y; /* vertical scrolling still works on phones */
	will-change: transform;
}

.hero.is-dragging .hero__track,
.hero.is-jumping .hero__track {
	transition: none;
}

/* ---------- One banner ---------- */
.hero__slide {
	position: relative;
	flex: 0 0 100%;
	aspect-ratio: var(--hero-ratio, 1470 / 630);
	overflow: hidden;
}

.hero__media,
.hero__img {
	display: block;
	width: 100%;
	height: 100%;
}

/* The slide has the banner's own shape, so the banner fills it exactly.
   "contain" is a safety net: a banner of a slightly different shape is
   still shown whole (navy fills the small gap) instead of being cut. */
.hero__img {
	object-fit: contain;
	object-position: center;
}

/* Whole banner clickable (when it has a link but no button). */
.hero__link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ---------- Optional text over a banner ---------- */
.hero__content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	padding: clamp(20px, 5vw, 96px) clamp(20px, 7vw, 140px);
	pointer-events: none; /* never blocks a whole-banner link */
}

.hero__content--left { justify-content: flex-start; text-align: left; }
.hero__content--center { justify-content: center; text-align: center; }
.hero__content--right { justify-content: flex-end; text-align: right; }

.hero__inner {
	max-width: 560px;
	text-shadow: 0 1px 18px rgba(11, 19, 42, .35);
}

.hero__eyebrow {
	margin: 0 0 .8rem;
	color: var(--g-white);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.hero__title {
	margin: 0 0 .9rem;
	color: var(--g-white);
	font-family: var(--g-font-heading);
	font-size: clamp(1.9rem, 4.2vw, 4rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.hero__text {
	max-width: 44ch;
	margin: 0 0 1.6rem;
	color: var(--g-white);
	font-size: clamp(.95rem, 1.2vw, 1.1rem);
	line-height: 1.55;
}

.hero__content--center .hero__text { margin-inline: auto; }
.hero__content--right .hero__text { margin-left: auto; }

/* Outlined button, like most jewellery banners. */
.hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 1.9rem;
	border: 1px solid var(--g-white);
	background: transparent;
	color: var(--g-white);
	font-family: var(--g-font-heading);
	font-size: 1.1rem;
	letter-spacing: .02em;
	text-decoration: none;
	text-shadow: none;
	pointer-events: auto;
	transition: background-color .25s ease, color .25s ease;
}

.hero__btn:hover,
.hero__btn:focus-visible {
	background: var(--g-white);
	color: var(--g-navy);
}

/* Optional text rises in as each banner becomes the current one. */
.hero--multi .hero__slide .hero__inner > * {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .7s var(--hero-ease), transform .7s var(--hero-ease);
}

.hero--multi .hero__slide.is-active .hero__inner > * {
	opacity: 1;
	transform: none;
}

.hero__slide.is-active .hero__inner > :nth-child(1) { transition-delay: .3s; }
.hero__slide.is-active .hero__inner > :nth-child(2) { transition-delay: .42s; }
.hero__slide.is-active .hero__inner > :nth-child(3) { transition-delay: .54s; }
.hero__slide.is-active .hero__inner > :nth-child(4) { transition-delay: .66s; }

/* ---------- Arrows: show on hover, at the left and right edges ---------- */
.hero button.hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--g-white);
	border-radius: 50%;
	background: rgba(11, 19, 42, .22);
	color: var(--g-white);
	cursor: pointer;
	opacity: 0;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transform: translateY(-50%);
	transition: opacity .25s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.hero__arrow--prev {
	left: clamp(12px, 2vw, 32px);
}

.hero__arrow--next {
	right: clamp(12px, 2vw, 32px);
}

.hero:hover button.hero__arrow,
.hero button.hero__arrow:focus-visible {
	opacity: 1;
}

.hero button.hero__arrow:hover {
	border-color: var(--g-white);
	background: var(--g-white);
	color: var(--g-navy);
}

.hero__arrow .icon {
	width: 20px;
	height: 20px;
}

/* ---------- Diamond markers, over the bottom of the banner ---------- */
.hero__dots {
	position: absolute;
	bottom: clamp(8px, 2.2vw, 28px);
	left: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	/* Soft shadow keeps the light markers visible on light banners. */
	filter: drop-shadow(0 1px 2px rgba(11, 19, 42, .45));
	transform: translateX(-50%);
}

/* The 32px button is the tap area; the marker inside is small. */
.hero button.hero__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--hero-mark);
	cursor: pointer;
}

/* Other banners: a small outlined diamond. */
.hero__dot-mark {
	display: block;
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--hero-mark);
	opacity: .85;
	transform: rotate(45deg);
	transition: transform .3s var(--hero-ease), opacity .3s ease;
}

.hero__dot:hover .hero__dot-mark {
	opacity: 1;
	transform: rotate(45deg) scale(1.2);
}

/* Current banner: a filled four-point sparkle. */
.hero__dot[aria-current="true"] .hero__dot-mark {
	width: 17px;
	height: 17px;
	border: 0;
	background: var(--hero-mark);
	opacity: 1;
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	transform: none;
}

/* Touch screens: swipe instead of arrows; touching the banner holds it. */
@media (hover: none) {
	.hero button.hero__arrow {
		display: none;
	}
}

/* Invisible timer: its animation lasts one banner's time. */
.hero__timer {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	pointer-events: none;
}

.hero.is-playing .hero__timer {
	animation: galleria-hero-timer var(--hero-interval, 6s) linear forwards;
}

.hero.is-held .hero__timer {
	animation-play-state: paused;
}

@keyframes galleria-hero-timer {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

.hero :focus-visible {
	outline: 2px solid var(--g-white);
	outline-offset: 3px;
}

/* ---------- No banners yet: a navy welcome block ---------- */
.hero--fallback .hero__content {
	position: relative;
	inset: auto;
	min-height: 60vh;
	background: var(--g-navy);
	pointer-events: auto;
}

.hero__admin-hint {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	padding: .4rem .8rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, .12);
	color: var(--g-white);
	font-size: .8rem;
}

/* ---------- Phones ----------
   The phone banner's own shape when every banner has a phone image. */
@media (max-width: 767px) {
	.hero__slide {
		aspect-ratio: var(--hero-ratio-mobile, var(--hero-ratio, 1470 / 630));
	}

	.hero__content {
		align-items: flex-end;
		padding: 20px 20px 40px;
	}

	.hero__title {
		font-size: clamp(1.6rem, 7.5vw, 2.4rem);
	}

	.hero button.hero__dot {
		width: 24px;
		height: 28px;
	}

	.hero__dot-mark {
		width: 7px;
		height: 7px;
	}

	.hero__dot[aria-current="true"] .hero__dot-mark {
		width: 13px;
		height: 13px;
	}

	.hero__dots {
		bottom: 2px;
	}
}

/* ---------- Less motion: no sliding or rising, just a swap ---------- */
@media (prefers-reduced-motion: reduce) {
	.hero__track,
	.hero__slide .hero__inner > *,
	.hero__dot-mark {
		transition: none !important;
	}

	.hero__slide .hero__inner > * {
		opacity: 1;
		transform: none;
	}
}
