/* =====================================================================
   Become Brand — premium scroll experience layer
   Pairs with assets/js/premium.js (GSAP + ScrollTrigger + SplitText + Lenis).
   RTL-first. All motion is transform/opacity only.
   ===================================================================== */

/* ---- 1. scroll progress indicator -------------------------------- */

.bb-progress {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	height: 3px;
	z-index: 60;
	pointer-events: none;
	background: transparent;
}

.bb-progress__bar {
	height: 100%;
	background: linear-gradient(90deg, var(--bb-primary), #ff7aa8);
	transform: scaleX(0);
	/* RTL: the bar must grow from the right edge */
	transform-origin: right center;
	will-change: transform;
}

/* ---- 2. header: centered nav, shrink on scroll -------------------- */

.bb-nav__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 16px;
	transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* nav links sit in the centre column */
.bb-nav__links {
	justify-content: center;
	grid-column: 2;
}

/* the CTA now lives outside the <ul>, so it needs its own responsive rule */
.bb-nav__cta { grid-column: 3; display: none; }
.bb-nav__burger { grid-column: 3; }

@media (min-width: 768px) {
	.bb-nav__cta { display: inline-block; }
}

/* shrink + deepen the blur once scrolled */
.bb-nav--scrolled .bb-nav__inner { height: 58px; }
.bb-nav--scrolled { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.bb-nav--scrolled .bb-nav__logo { font-size: 20px; }

.bb-nav__logo { transition: font-size 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

/* animated underline + active state */
.bb-nav__link {
	position: relative;
	padding-bottom: 4px;
}

.bb-nav__link::after {
	content: "";
	position: absolute;
	bottom: 0;
	right: 0;
	width: 100%;
	height: 1.5px;
	background: var(--bb-primary);
	transform: scaleX(0);
	transform-origin: right center; /* RTL */
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-nav__link:hover::after,
.bb-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.bb-nav__link[aria-current="page"] { color: #fff; }

/* ---- 3. pre-hide states (only while the premium layer is active) --
   html.bb-premium is added by an inline head script and removed by a
   failsafe timeout, so content stays visible if JS/CDN never arrives. */

html.bb-premium .bb-pg-hero__kicker,
html.bb-premium .bb-pg-hero__title,
html.bb-premium .bb-pg-hero__sub,
html.bb-premium .bb-pg-hero__actions { opacity: 0; }

/* line-mask wrapper produced by SplitText */
.bb-line-mask { overflow: hidden; display: block; }

/* ---- 4. reveal primitives ---------------------------------------- */

.bb-reveal-img {
	overflow: hidden;
	border-radius: 18px;
}

.bb-reveal-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	will-change: transform;
}

/* ---- 5. editorial sticky (pinned visual + scrolling text) --------- */

.bb-editorial { background: var(--bb-dark); color: #fff; padding: 72px 0; }

.bb-editorial__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: start;
}

/* Base first, then the desktop override — order matters here: both rules
   have the same specificity, so the media query must come last to win. */
.bb-editorial__visual {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: #000;
	aspect-ratio: 9 / 11;
}

@media (min-width: 900px) {
	.bb-editorial__grid { grid-template-columns: 0.95fr 1fr; gap: 64px; }
	.bb-editorial__visual {
		position: sticky;
		top: 108px;
		height: 68vh;
		aspect-ratio: auto;
	}
}

.bb-editorial__visual img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	will-change: opacity, transform;
}

.bb-editorial__visual img:first-child { opacity: 1; }

/* no-JS / reduced motion: show only the first panel, stacked layout stays fine */
html:not(.bb-premium) .bb-editorial__visual img:not(:first-child) { display: none; }

.bb-editorial__chapter { padding: 8vh 0; }

@media (min-width: 900px) {
	.bb-editorial__chapter { padding: 18vh 0; }
	.bb-editorial__chapter:first-child { padding-top: 4vh; }
	.bb-editorial__chapter:last-child { padding-bottom: 8vh; }
}

.bb-editorial__num {
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.16em;
	color: var(--bb-primary);
	margin-bottom: 14px;
}

.bb-editorial__title {
	font-size: clamp(26px, 3.6vw, 42px);
	font-weight: 900;
	letter-spacing: -1.5px;
	line-height: 1.12;
	color: #fff;
	margin: 0 0 16px;
}

.bb-editorial__title em { font-style: normal; color: var(--bb-primary); }

.bb-editorial__body {
	font-size: 17px;
	line-height: 1.85;
	color: rgba(255, 255, 255, 0.55);
	max-width: 520px;
	margin: 0;
}

/* ---- 6. pinned horizontal scroll (process) ------------------------ */

.bb-hscroll {
	background: var(--bb-dark);
	color: #fff;
	overflow: hidden;
	padding: 72px 0;
}

.bb-hscroll__head { margin-bottom: 36px; }

.bb-hscroll__track {
	display: flex;
	gap: 22px;
	will-change: transform;
	padding-inline: 24px;
}

@media (min-width: 768px) { .bb-hscroll__track { padding-inline: 48px; } }

.bb-hpanel {
	flex: 0 0 min(78vw, 420px);
	background: var(--bb-dark-card);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 20px;
	padding: 34px 30px;
	display: flex;
	flex-direction: column;
	min-height: 320px;
}

.bb-hpanel__num {
	font-size: 62px;
	font-weight: 900;
	letter-spacing: -3px;
	line-height: 1;
	color: rgba(255, 255, 255, 0.1);
	margin-bottom: 18px;
}

.bb-hpanel__tag {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	color: var(--bb-primary);
	margin-bottom: 10px;
}

.bb-hpanel__title {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: #fff;
	margin-bottom: 12px;
}

.bb-hpanel__body {
	font-size: 15.5px;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.5);
	margin: 0;
}

/* mobile / no-JS: the track simply scrolls horizontally by touch */
@media (max-width: 899px) {
	.bb-hscroll__track {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 12px;
	}
	.bb-hpanel { scroll-snap-align: start; }
}

/* ---- 7. showcase strip (ad videos) ------------------------------- */

.bb-showcase { background: var(--bb-dark); padding: 72px 0; }

.bb-showcase__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin-top: 28px;
}

@media (min-width: 900px) { .bb-showcase__grid { grid-template-columns: repeat(4, 1fr); } }

.bb-showcase__item {
	aspect-ratio: 9 / 16;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: #111;
}

.bb-showcase__item iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- 8. micro-interactions --------------------------------------- */

/* magnetic buttons need their own transform layer */
.bb-magnetic { will-change: transform; }

/* card tilt */
.bb-tilt { transform-style: preserve-3d; will-change: transform; }

/* cursor glow — desktop, fine pointer only */
.bb-cursor {
	position: fixed;
	top: 0;
	left: 0;
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	border-radius: 50%;
	border: 1.5px solid rgba(230, 55, 120, 0.7);
	pointer-events: none;
	z-index: 9999;
	opacity: 0;
	will-change: transform;
	transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
}

.bb-cursor--active {
	background: rgba(230, 55, 120, 0.15);
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
}

@media (hover: none), (pointer: coarse) {
	.bb-cursor { display: none !important; }
}

/* ---- 9. section intro copy (added content) ----------------------- */

.bb-pg-intro {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--bb-primary);
	margin: 0 0 10px;
}

.bb-pg-caption {
	font-size: 14px;
	color: var(--bb-muted);
	margin-top: 14px;
}

.bb-pg-section--dark .bb-pg-caption { color: rgba(255, 255, 255, 0.4); }

/* ---- 10. reduced motion: strip everything down ------------------- */

@media (prefers-reduced-motion: reduce) {
	html.bb-premium .bb-pg-hero__kicker,
	html.bb-premium .bb-pg-hero__title,
	html.bb-premium .bb-pg-hero__sub,
	html.bb-premium .bb-pg-hero__actions { opacity: 1 !important; }

	.bb-editorial__visual img { opacity: 1; }
	.bb-editorial__visual img:not(:first-child) { display: none; }
	.bb-cursor { display: none !important; }
	.bb-progress { display: none; }

	.bb-nav__inner,
	.bb-nav__logo,
	.bb-nav__link::after { transition: none !important; }

	.bb-hscroll__track { overflow-x: auto; }
}
