/* Front page: bottle ring hero + sections below */
.ring { position: relative; height: 320vh; }
.ring__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }

.ring__copy { text-align: center; padding-top: calc(var(--header-h) + var(--space-4)); padding-inline: var(--gutter); position: relative; z-index: 5; transition: color var(--dur); }
.ring__copy h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: .6rem; }
.ring__copy .lead { max-width: 560px; margin-inline: auto; }
.ring__stage.is-on-brand .ring__copy { color: var(--rp-on-brand); }
.ring__stage.is-on-brand .ring__copy .lead { color: inherit; opacity: .85; }

/* Scene: bottles + disc. --px/--py = pointer parallax (hero-ring.js). */
.ring__scene { position: relative; --px: 0; --py: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ring__item img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.ring__scene.is-dragging { cursor: grabbing; }
.ring__scene.is-dragging .ring__item { pointer-events: none; }

/* Floor disc (sized/positioned by JS) with faint logo bars */
.ring__disc {
	position: absolute; left: 50%; top: 70%; width: 520px; height: 180px;
	transform: translate(calc(-50% + var(--px) * .4px), calc(-50% + var(--py) * .4px)) scale(var(--ds, 1));
	border-radius: 50%; background: var(--rp-red);
	box-shadow: 0 30px 60px -20px rgba(227, 0, 27, .45);
	z-index: 100; transition: background var(--dur);
}
.ring__disc::after { content: ""; position: absolute; inset: 18% 38%; background: url("../img/icons/logo-bars.svg") center / contain no-repeat; opacity: .22; }

/* Bottles — anchored at their bottom centre (--x/--y = floor point), scaled by depth.
 * --bf/--bb (hero-ring.php, from rp_bottle_box) normalise each file's transparent margins:
 * the opaque bottle is --bottle-h tall and its real bottom sits on the floor point. */
.ring__item {
	position: absolute; left: 50%; top: 0;
	height: calc(var(--bottle-h, 60vh) / var(--bf, 1)); width: auto;
	transform:
		translate(-50%, calc(-100% + var(--bb, 0) * 100%))
		translate3d(calc(var(--x, 0px) + var(--px) * 1px * (var(--s, 1) - .3)), calc(var(--y, 0px) + var(--py) * 1px * (var(--s, 1) - .3)), 0)
		scale(var(--s, 1));
	transform-origin: 50% 100%;
	filter: blur(var(--blur, 0px));
	opacity: var(--o, 1);
	z-index: var(--z, 100);
	will-change: transform, filter;
	cursor: pointer;
}
.ring__item img {
	height: 100%; width: auto; max-width: none; display: block;
	filter: drop-shadow(0 28px 22px rgba(0, 0, 0, .24));
	transition: transform var(--dur) var(--ease-out);
	animation: bottle-float 5s ease-in-out infinite;
	animation-delay: calc(var(--i, 0) * -.9s);
}
.ring__item:nth-child(odd) img { animation-duration: 5.8s; }
.ring__item.is-focus img { animation-duration: 4s; }
.ring__item:hover img { transform: translateY(-8px) scale(1.03); }
@keyframes bottle-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* Contact shadow under each bottle */
.ring__item::after {
	content: ""; position: absolute; left: 50%; bottom: calc(var(--bb, 0) * 100% - 2%); width: 90%; height: 7%;
	transform: translateX(-50%); border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, .35), transparent 70%);
	opacity: .8;
}

/* Focused brand caption + controls */
.ring__caption { position: absolute; left: 50%; bottom: 2.5%; transform: translateX(-50%); text-align: center; z-index: 110; transition: color var(--dur), opacity var(--dur); opacity: 0; line-height: 1.2; }
.ring.is-interacted .ring__caption { opacity: 1; }
.ring__caption strong { display: block; font-size: var(--fs-h3); }
.ring__caption span { font-size: var(--fs-small); color: var(--rp-muted); }
.ring__stage.is-on-brand .ring__caption { color: var(--rp-on-brand); }
.ring__stage.is-on-brand .ring__caption span { color: inherit; opacity: .8; }

.ring__nav { position: absolute; inset: 55% var(--gutter) auto; display: flex; justify-content: space-between; transform: translateY(-50%); z-index: 120; pointer-events: none; }
.ring__nav button { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--rp-ink); backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast); }
.ring__nav button:hover { transform: scale(1.08); background: #fff; }
.ring__nav button:first-child svg { transform: rotate(180deg); }

.ring__hint { position: absolute; left: 50%; bottom: var(--space-3); transform: translateX(-50%); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--rp-muted); z-index: 110; animation: hint 2.2s ease-in-out infinite; transition: opacity var(--dur); }
.ring.is-interacted .ring__hint { opacity: 0 !important; }
@keyframes hint { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.ring__stage .foot-bar--stage { position: absolute; z-index: 115; }
.ring.is-interacted .foot-bar--stage { opacity: 0; transition: opacity var(--dur); }

/* Hide bottles until the entrance runs (JS on); not when arriving via a view transition */
html.js:not(.vt) .ring:not(.is-in) .ring__item, html.js:not(.vt) .ring:not(.is-in) .ring__disc { opacity: 0; }

/* The focused bottle is the morph source for the label page (see base.css) */
.ring__item.is-focus img { view-transition-name: bottle; }
.ring.is-leaving .ring__item img { animation: none; }
.ring.is-leaving .ring__item::after { opacity: 0; transition: opacity .3s; }

/* Sections below the ring */
.home-intro { background: #fff; padding-block: var(--space-7); text-align: center; }
.home-intro h2 { max-width: 720px; margin: 0 auto var(--space-3); font-size: var(--fs-h1); }
.home-intro .entry-content { max-width: 620px; margin-inline: auto; color: var(--rp-muted); font-size: var(--fs-lead); }

.home-labels { background: #fff; padding-bottom: var(--space-6); }
.home-labels .cards { margin-top: var(--space-4); }
.home-labels__more { text-align: center; margin-top: var(--space-4); }

.home-cta { background: linear-gradient(to bottom, #fff, var(--rp-bg-2)); }

@media (max-width: 768px) {
	.ring { height: 260vh; }
	.ring__nav { inset: auto var(--gutter) 22%; transform: none; }
	.ring__caption { bottom: 9%; }
	.ring__hint { display: none; }
	.ring__item::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ring { height: auto; }
	.ring__stage { position: relative; height: 100svh; }
	.ring__item img { animation: none; }
	.ring__caption { opacity: 1; }
	html.js .ring:not(.is-in) .ring__item, html.js .ring:not(.is-in) .ring__disc { opacity: 1; }
}
