/* 02 Models. Desktop: tabbed switcher (desktop.html). <=760px: swipe rail of cards (mobile.html).
   Model switch motion from the design system: 700ms cross-fade + 40px parallax on the vehicle. */
.rx-models { background: var(--rx-charcoal); padding-top: 120px; }
.rx-models__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.rx-models__swipe { display: none; }

/* Segmented tabs (components.css values) */
.rx-tabs { display: flex; border: 1px solid rgba(244, 240, 232, .18); }
.rx-tab {
	min-height: 48px; padding: 14px 24px; background: transparent; color: var(--rx-on-dark-control); border: 0;
	font-family: var(--rx-font-ui); font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
	transition: background-color .35s var(--rx-ease), color .35s var(--rx-ease);
}
.rx-tab:hover { color: var(--rx-on-dark); }
.rx-tab[aria-selected="true"] { background: var(--rx-ivory); color: var(--rx-ink); }

.rx-models__stage { margin-top: 56px; display: flex; flex-direction: column; gap: 72px; }
.js .rx-models__stage { display: grid; gap: 0; }
.rx-model { position: relative; min-width: 0; }
/* Sequential switch: the outgoing model fades out completely before the incoming one fades in,
   so one model's photograph is never seen behind another model's panel. */
.js .rx-model {
	grid-area: 1 / 1;
	transition: opacity .55s var(--rx-ease) .3s, visibility 0s linear .3s;
}
.js .rx-model:not(.is-active) { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }

.rx-model__inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; }
.rx-model__media { position: relative; flex: 999 1 640px; min-width: 0; height: 620px; overflow: hidden; }
.rx-model__media img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform 1s var(--rx-ease);
}
.js .rx-model:not(.is-active) .rx-model__media img { transform: translateX(40px) scale(1.02); }

.rx-model__numeral {
	position: absolute; inset-inline-start: 28px; bottom: 24px;
	font-family: var(--rx-font-display); font-size: clamp(90px, 12vw, 180px); line-height: .8; letter-spacing: -.02em;
	color: rgba(244, 240, 232, .92); pointer-events: none;
}

/* Missing photography: the approved "asset required" panel, never a substitute vehicle. */
.rx-model__media--empty {
	isolation: isolate; background-color: var(--rx-charcoal); /* fully opaque */
	display: flex; align-items: center; justify-content: center;
	background: radial-gradient(120% 90% at 60% 70%, var(--rx-placeholder-glow) 0%, var(--rx-charcoal) 70%);
	border: 1px dashed rgba(197, 168, 120, .45);
}
.rx-model__asset { max-width: 360px; padding: 24px; text-align: center; }
.rx-model__asset svg { margin-inline: auto; }
.rx-model__asset-title { margin-top: 16px; font-size: var(--rx-fs-label); letter-spacing: .3em; text-transform: uppercase; color: var(--rx-accent); }
.rx-model__asset-text { margin-top: 10px; font-size: 14px; line-height: 1.6; color: #B5AEA2; }
.rx-model__media--empty .rx-model__numeral { font-size: clamp(70px, 9vw, 140px); color: rgba(244, 240, 232, .16); }

.rx-model__info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 36px; padding: 8px 0; }
.rx-model__label { font-size: var(--rx-fs-label); letter-spacing: var(--rx-track-label); text-transform: uppercase; color: var(--rx-on-dark-muted); }
.rx-model__name { margin-top: 14px; font-family: var(--rx-font-display); font-weight: 500; font-size: 52px; line-height: 1; }
.rx-model__desc { margin-top: 18px; font-size: 17px; line-height: 1.65; font-weight: 300; color: var(--rx-on-dark-copy); }

.rx-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rx-line-dark); }
.rx-specs__item { padding: 18px 0; border-bottom: 1px solid var(--rx-line-dark); }
.rx-specs__item:nth-child(even) { padding-inline-start: 20px; border-inline-start: 1px solid var(--rx-line-dark); }
.rx-specs dt { font-size: var(--rx-fs-label); letter-spacing: var(--rx-track-label); text-transform: uppercase; color: var(--rx-on-dark-muted); }
.rx-specs dd { margin-top: 6px; font-size: 22px; }

.rx-model__note { margin-top: -16px; font-size: var(--rx-fs-label); line-height: 1.5; letter-spacing: .04em; color: var(--rx-on-dark-fine); }
.rx-model__note--provisional { color: var(--rx-accent); }
.rx-model__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.rx-models__foot { display: flex; align-items: center; gap: 10px; padding-top: 28px; padding-bottom: 108px; }
/* Indicator bars are buttons with a 44px touch target around the 2px line. */
.rx-bar { position: relative; width: 64px; height: 44px; padding: 0; border: 0; background: none; }
.rx-bar::before { content: ''; position: absolute; inset-inline: 0; top: 50%; height: 2px; background: rgba(244, 240, 232, .2); transition: background-color .5s var(--rx-ease); }
.rx-bar.is-on::before { background: var(--rx-accent); }
.rx-bar:hover::before { background: rgba(244, 240, 232, .45); }
.rx-bar.is-on:hover::before { background: var(--rx-gold-hover); }
.rx-models__count { margin-inline-start: 14px; font-size: var(--rx-fs-label); letter-spacing: .2em; color: var(--rx-on-dark-muted); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
	.rx-model__media { height: 480px; }
}

/* ---------- Mobile: swipe rail (mobile.html) ---------- */
@media (max-width: 760px) {
	.rx-models { padding-top: 72px; }
	.rx-models__head { flex-wrap: nowrap; gap: 16px; }
	.rx-models .rx-h2 { margin-top: 12px; font-size: 44px; }
	.rx-models .rx-eyebrow { letter-spacing: .32em; }
	.rx-tabs { display: none; }
	.rx-models__swipe { display: block; flex-shrink: 0; font-size: var(--rx-fs-label); letter-spacing: .14em; color: var(--rx-on-dark-muted); text-transform: uppercase; }

	.rx-models__stage.rx-container {
		margin-top: 28px; padding-inline: 16px;
		display: flex; flex-direction: row; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
		scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
	}
	/* Trailing space so the last card can snap to the same left edge as the first. */
	/* % resolves against the content box (stage width - 32px padding): end spacer = content - card - gap. */
	.rx-models__stage.rx-container::after { content: ''; flex: 0 0 calc(100% - min(318px, 100vw - 72px) - 12px); }
	.rx-models__stage::-webkit-scrollbar { display: none; }
	.rx-model, .js .rx-model, .js .rx-model:not(.is-active) {
		flex: 0 0 min(318px, calc(100vw - 72px)); scroll-snap-align: start; scroll-snap-stop: always;
		opacity: 1; visibility: visible; transition: opacity .4s var(--rx-ease); background: var(--rx-ink);
	}
	/* The card not in view is dimmed, so a neighbour's photo never reads as part of the current card. */
	.js .rx-models__stage .rx-model:not(.is-current) { opacity: .4; }
	.rx-model__inner { flex-direction: column; flex-wrap: nowrap; gap: 0; }
	.rx-model__media { flex: none; height: 300px; }
	.rx-model__media img, .js .rx-model:not(.is-active) .rx-model__media img { transform: none; transition: none; }
	.rx-model__numeral { inset-inline-start: 18px; bottom: 14px; font-size: 72px; }
	.rx-model__media--empty .rx-model__numeral { font-size: 48px; }
	.rx-model__asset-text { font-size: 13px; }
	.rx-model__info { flex: none; gap: 18px; padding: 22px 20px 24px; justify-content: flex-start; }
	.rx-model__label { letter-spacing: .24em; }
	.rx-model__name { margin-top: 8px; font-size: 36px; }
	.rx-model__desc { display: none; }
	.rx-specs dd { font-size: 18px; margin-top: 4px; }
	.rx-specs__item { padding: 12px 0; }
	.rx-specs__item:nth-child(even) { padding-inline-start: 14px; }
	.rx-model__note { margin-top: -4px; }
	.rx-model__actions { flex-wrap: nowrap; gap: 8px; }
	.rx-model__actions .rx-btn { flex: 1; height: 48px; min-height: 48px; padding: 0 10px; font-size: 12px; letter-spacing: .14em; }
	.rx-model__actions .rx-link { display: none; }

	.rx-models__foot { padding: 8px 16px 52px; gap: 8px; }
	.rx-bar { width: 40px; }
	.rx-models__count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rx-model, .rx-model:not(.is-active), .rx-model__media img, .rx-tab, .rx-bar { transition: none !important; }
	.rx-model__media img { transform: none !important; }
}
