/**
 * Hero blocks — shared + Showcase strip + Curved carousel + Platform wall +
 * Sector stories styles (issues #45–#48, spec #36, ADR-0013).
 *
 * The handoff's hero, ported with its own inline values. The centred text column
 * (pill, heading, intro, buttons over the floor pool) is shared by the first three
 * Hero blocks; the tilted scrolling strip is the Showcase strip's own, the rotating
 * 3D drum is the Curved carousel's, the wave-shaped tile wall is the Platform
 * wall's, and the two-column tabs-plus-angled-stage is the Sector stories' (which
 * left-aligns the shared text pieces). Loaded on the front end and in the editor, so
 * the canvas shows a styled static first frame.
 *
 * Motion lives in the per-hero modules (assets/js/hero-showcase.js, hero-curved.js,
 * hero-wall.js, hero-sector.js) and the shared Spotlight in effects.js; all are off
 * in the editor and under reduced motion, where the hero simply holds its first
 * frame.
 */

/* -- Hero shell ----------------------------------------------------------- */

.ap-hero {
	position: relative;
	text-align: center;
	padding: 88px 0 38px;
}

.ap-hero__inner {
	max-width: var(--ap-content-width);
	margin: 0 auto;
	position: relative;
	z-index: 1;
	padding: 0 var(--ap-side-padding);
}

/* -- Text column ---------------------------------------------------------- */

.ap-hero__pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border-radius: var(--ap-radius-pill);
	padding: 8px 18px;
	margin: 0 0 30px;
	font-size: 14px;
	color: rgba(20, 18, 24, 0.88);
	/* The pill's glass is a touch lighter than the shared .ap-glass. */
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(20, 18, 24, 0.13);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ap-hero__pulse {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e32b26;
	animation: apPulse 2s infinite;
}

/* The hero heading keeps the H1 scale whichever tag it uses, so an H2 chosen for
   outline reasons still looks like the handoff hero. */
.ap-hero__heading {
	margin: 0 auto;
	max-width: 980px;
	font-size: var(--ap-h1);
	line-height: 0.98;
	font-weight: 600;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.ap-hero__intro {
	max-width: 680px;
	margin: 28px auto 48px;
	font-size: 19px;
	line-height: 1.55;
	color: rgba(20, 18, 24, 0.72);
	text-wrap: pretty;
}

.ap-hero__cta {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ap-hero__buttons {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
	padding-bottom: 18px;
}

.ap-hero__play {
	display: inline-flex;
	align-items: center;
	margin-right: 2px;
}

/* The floor light pool tucks under the buttons (.ap-floor-pool from effects.css
   carries the glow itself). */
.ap-hero__floor {
	position: relative;
	z-index: 0;
	margin-top: -96px;
}

/* -- Showcase strip ------------------------------------------------------- */

.ap-hero__strip {
	position: relative;
	height: 460px;
	margin-top: 24px;
	overflow: hidden;
}

.ap-hero__strip-tilt {
	position: absolute;
	left: -12%;
	right: -12%;
	top: 70px;
	transform: rotate(-6deg);
}

.ap-hero__track {
	display: flex;
	gap: 24px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	will-change: transform;
}

.ap-hero-card {
	position: relative;
	flex: none;
	display: block;
	width: 352px;
	height: 264px;
	border-radius: var(--ap-radius-card);
	overflow: hidden;
	list-style: none;
	background: linear-gradient(120deg, oklch(0.35 0.09 20), oklch(0.2 0.05 280));
	border: 1px solid rgba(20, 18, 24, 0.13);
	box-shadow: 0 30px 60px rgba(20, 18, 24, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ap-hero-card__media {
	position: absolute;
	inset: 0;
	display: block;
}

.ap-hero-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 18, 24, 0) 45%, rgba(20, 18, 24, 0.78));
}

.ap-hero-card__sector {
	position: absolute;
	left: 16px;
	top: 16px;
	padding: 6px 12px;
	border-radius: var(--ap-radius-pill);
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: blur(20px) saturate(1.5);
	backdrop-filter: blur(20px) saturate(1.5);
	border: 1px solid rgba(20, 18, 24, 0.12);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	font-size: 12px;
	letter-spacing: 0.12em;
	color: var(--ap-accent);
}

.ap-hero-card__meta {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 18px;
	display: flex;
	flex-direction: column;
	text-align: left;
	color: #fff;
}

.ap-hero-card__name {
	font-size: 19px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.ap-hero-card__line {
	margin-top: 2px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.75);
}

/* -- Curved carousel ------------------------------------------------------ */

/* The drum: a perspective container holding a preserve-3d ring of cards, each
   turned to sit on the inside of a cylinder (the handoff's real CSS 3D). The
   radius and depth live in custom properties so the ring's transform and every
   card's depth stay in step when the breakpoints shrink the drum. assets/js/
   hero-curved.js turns the ring (via --ap-base) and fades the cards per frame;
   the inline first-frame opacity from render.php holds without JS. */
.ap-hero--curved {
	--ap-ring-r: 800; /* Cylinder radius, px (unitless for calc). */
	--ap-ring-d: 360; /* How far the drum sits back from the viewer, px. */
	--ap-card-scale: 1; /* Card width multiplier: shrinks with the drum on tablet. */
}

.ap-hero__carousel {
	position: relative;
	z-index: 0;
	height: 440px;
	margin-top: -40px;
	overflow: hidden;
	perspective: 1100px;
	perspective-origin: 50% 45%;
}

.ap-hero__ring {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	transform-style: preserve-3d;
	transform:
		translateZ( calc( ( var(--ap-ring-r) - var(--ap-ring-d) ) * 1px ) )
		rotateY( var(--ap-base, 0deg) );
	will-change: transform;
}

.ap-hero--curved .ap-hero-card {
	position: absolute;
	top: -165px;
	left: calc( var(--card-w, 240px) * var(--ap-card-scale) / -2 );
	width: calc( var(--card-w, 240px) * var(--ap-card-scale) );
	height: 330px;
	border-radius: 18px;
	overflow: hidden;
	background: #dcd9e0;
	border: 0;
	box-shadow: 0 20px 50px rgba(20, 18, 24, 0.18);
	transform: rotateY( var(--ry, 0deg) ) translateZ( calc( var(--ap-ring-r) * -1px ) );
	backface-visibility: hidden;
}

.ap-hero--curved .ap-hero-card__img {
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}

/* The top-left sheen + white inner outline that wakes on hover (the handoff's
   data-hl). Off by default; the card's image also lifts and brightens. Rotation
   itself never pauses on hover (handled in the module). */
.ap-hero-card__sheen {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.5s ease;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 45%);
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75);
}

.ap-hero--curved .ap-hero-card:hover .ap-hero-card__sheen {
	opacity: 1;
}

.ap-hero--curved .ap-hero-card:hover .ap-hero-card__img {
	transform: scale(1.05);
	filter: brightness(1.06);
}

/* The sector label sits bottom-left, a neutral-dark glass chip (the handoff's
   label), not the accented pill the Showcase strip uses. */
.ap-hero--curved .ap-hero-card__sector {
	top: auto;
	left: 14px;
	bottom: 14px;
	padding: 5px 10px;
	border-radius: 8px;
	color: #141218;
}

/* -- Platform wall -------------------------------------------------------- */

/* The eyebrow (the handoff's red kicker) stands in for the pill above the wall. */
.ap-hero__eyebrow {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	color: #d42621;
}

/* The wall's heading is the handoff's single 60px line, not the shared H1 scale. */
.ap-hero--wall .ap-hero__heading {
	max-width: none;
	font-size: 60px;
	line-height: 1;
}

.ap-hero-wall__head {
	padding-top: 12px;
}

/* The stage holds the outlined word, the wall of tiles and the bottom fade. It
   clips so a drifting column and the fade stay inside the hero. */
.ap-hero-wall__stage {
	position: relative;
	z-index: 0;
	margin-top: -8px;
	padding: 32px 0 48px;
	overflow: hidden;
}

/* The giant outlined word sits behind the wall (the handoff's 210px stroke). */
.ap-hero-wall__outline {
	position: absolute;
	left: 0;
	right: 0;
	top: 8px;
	z-index: 0;
	text-align: center;
	white-space: nowrap;
	font-size: 210px;
	line-height: 1;
	font-weight: 600;
	letter-spacing: -0.05em;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(20, 18, 24, 0.09);
}

/* The wall: 11 columns of 3 tiles, the centre columns riding highest. */
.ap-hero-wall__grid {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ap-hero-wall__col {
	display: flex;
	flex-direction: column;
	gap: 14px;
	/* The cosine wave offset from render.php; the module adds the drift on top. */
	margin-top: var(--off, 0px);
	will-change: transform;
}

.ap-hero-wall__tiles {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ap-hero-wall__tile {
	position: relative;
	width: 150px;
	height: 112px;
	border-radius: 12px;
	box-shadow: 0 10px 26px rgba(20, 18, 24, 0.1);
	transition:
		transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
		box-shadow 0.7s ease;
}

.ap-hero-wall__media {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(20, 18, 24, 0.08);
}

.ap-hero-wall__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The lit tile: scaled up, ringed red and glowing, lifted above its neighbours
   (the handoff's highlight). */
.ap-hero-wall__tile.is-hi {
	z-index: 3;
	transform: scale(1.14);
	box-shadow:
		0 0 0 2px #fff,
		0 0 0 4px rgba(227, 43, 38, 0.55),
		0 24px 60px rgba(227, 43, 38, 0.3);
}

/* The dark tooltip with the customer name, shown above the lit tile only. */
.ap-hero-wall__tip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	transform: translateX(-50%);
	z-index: 4;
	white-space: nowrap;
	padding: 6px 12px;
	border-radius: 8px;
	background: #141218;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	box-shadow: 0 10px 24px rgba(20, 18, 24, 0.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.ap-hero-wall__tile.is-hi .ap-hero-wall__tip {
	opacity: 1;
}

/* The bottom of the wall fades into the page background (the handoff's gradient). */
.ap-hero-wall__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 160px;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(241, 239, 244, 0), #f1eff4 62%);
}

.ap-hero-wall__foot {
	position: relative;
	z-index: 3;
	margin-top: -24px;
}

/* -- Sector stories ------------------------------------------------------- */

/* Unlike the other heroes, Sector stories is a two-column, left-aligned layout:
   the shared text column (pill, heading, intro, buttons) plus a grid of sector
   tabs on the left, and the angled screen + phone + caption on the right (the
   handoff's 560px / 1fr split). */
.ap-hero--sector {
	text-align: left;
}

.ap-hero-sector__grid {
	display: grid;
	grid-template-columns: 560px minmax(0, 1fr);
	gap: 40px;
	align-items: start;
}

.ap-hero-sector__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* The heading, intro and buttons use the handoff's 1c values and left-align,
   overriding the shared centred column. */
.ap-hero--sector .ap-hero__heading {
	max-width: none;
	margin: 24px 0 0;
	font-size: 68px;
	line-height: 1.02;
	text-wrap: balance;
}

.ap-hero--sector .ap-hero__intro {
	max-width: 480px;
	margin: 22px 0 0;
	font-size: 17px;
	color: rgba(20, 18, 24, 0.62);
}

.ap-hero--sector .ap-hero__cta {
	align-items: flex-start;
	margin-top: 28px;
}

.ap-hero--sector .ap-hero__buttons {
	justify-content: flex-start;
	gap: 12px;
	padding-bottom: 0;
}

/* The 3×2 grid of sector tabs: a 2px progress bar over a letter-spaced label. */
.ap-hero-sector__tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px 20px;
	width: 100%;
	margin-top: 48px;
}

.ap-hero-sector__tab {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 0;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.ap-hero-sector__bar {
	position: relative;
	display: block;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: rgba(20, 18, 24, 0.1);
	overflow: hidden;
}

/* The active tab's bar fills red as the timer runs (the module sets its width). */
.ap-hero-sector__fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: #e32b26;
}

.ap-hero-sector__tab-label {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	color: rgba(20, 18, 24, 0.45);
	transition: color 0.4s ease;
}

.ap-hero-sector__tab.is-active .ap-hero-sector__tab-label {
	color: #141218;
}

/* The right column: a perspective stage holding the angled screen, the phone and
   the glass caption. */
.ap-hero-sector__visual {
	position: relative;
	height: 700px;
	perspective: 1600px;
}

/* The angled screen (760×500), tilted toward the viewer, holding the crossfading
   customer screenshots over a dark bezel. */
.ap-hero-sector__screen {
	position: absolute;
	left: 30px;
	top: 30px;
	width: 760px;
	height: 500px;
	transform: rotateY(-16deg) rotateX(5deg) rotateZ(1deg);
	transform-origin: 0% 50%;
	border-radius: 20px;
	overflow: hidden;
	background: #141218;
	border: 1px solid rgba(20, 18, 24, 0.12);
	box-shadow:
		40px 50px 90px rgba(20, 18, 24, 0.22),
		0 2px 10px rgba(20, 18, 24, 0.1);
}

.ap-hero-sector__shot {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: scale(1);
	transition:
		opacity 0.9s ease,
		transform 6s ease-out;
}

/* The active screenshot shows and slowly zooms to 1.06 over its 6s on screen. */
.ap-hero-sector__shot.is-active {
	opacity: 1;
	transform: scale(1.06);
}

.ap-hero-sector__shot .ap-image__img,
.ap-hero-sector__shot .ap-image__empty {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The soft top-left highlight over the screen glass. */
.ap-hero-sector__glare {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		115deg,
		rgba(255, 255, 255, 0.18),
		rgba(255, 255, 255, 0) 35%
	);
}

/* The phone (190×360) overlaps the screen bottom-left, crossfading a matching photo. */
.ap-hero-sector__phone {
	position: absolute;
	left: 0;
	top: 330px;
	width: 190px;
	height: 360px;
	transform: rotateY(-10deg) rotateX(4deg);
	border-radius: 28px;
	padding: 7px;
	background: #141218;
	box-shadow: 30px 40px 70px rgba(20, 18, 24, 0.3);
}

.ap-hero-sector__phone-screen {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 22px;
	overflow: hidden;
	background: #222;
}

.ap-hero-sector__photo {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.9s ease 0.15s;
}

.ap-hero-sector__photo.is-active {
	opacity: 1;
}

.ap-hero-sector__photo .ap-image__img,
.ap-hero-sector__photo .ap-image__empty {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The glass caption card names the active sector, customer and line; the captions
   stack in one grid cell and crossfade. */
.ap-hero-sector__caption {
	position: absolute;
	left: 260px;
	top: 560px;
	display: grid;
	min-width: 280px;
	padding: 16px 20px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(20, 18, 24, 0.08);
	box-shadow: 0 20px 50px rgba(20, 18, 24, 0.14);
}

.ap-hero-sector__cap {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.9s ease;
}

.ap-hero-sector__cap.is-active {
	opacity: 1;
}

.ap-hero-sector__cap-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: #d42621;
}

.ap-hero-sector__cap-name {
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.ap-hero-sector__cap-line {
	font-size: 14px;
	color: rgba(20, 18, 24, 0.6);
}

/* -- Editor static frame -------------------------------------------------- */

/* In the editor the strip never scrolls: the card track is laid out statically so
   the cards can be selected and reordered. */
.ap-hero.is-editor .ap-hero__strip--static {
	overflow: visible;
}

.ap-hero.is-editor .ap-hero__track {
	width: auto;
	flex-wrap: nowrap;
}

/* The carousel can't be a turning drum in the editor: flatten it to a static,
   selectable row of upright cards (no perspective, no 3D, no edge fade). */
.ap-hero.is-editor .ap-hero__carousel--static {
	height: auto;
	overflow: visible;
	perspective: none;
}

.ap-hero.is-editor .ap-hero__carousel--static .ap-hero__ring {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	width: auto;
	height: auto;
	transform: none;
}

.ap-hero.is-editor .ap-hero__carousel--static .ap-hero-card {
	position: relative;
	top: auto;
	left: auto;
	width: 200px;
	height: 300px;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none;
}

/* The wall can't drift or light up in the editor: flatten it to a static,
   selectable grid of tile previews (no outline word, no fade, no highlight). */
.ap-hero.is-editor .ap-hero-wall__stage--static {
	overflow: visible;
	padding: 8px 0;
}

.ap-hero.is-editor .ap-hero-wall__grid--static {
	position: static;
	flex-wrap: wrap;
	gap: 14px;
}

.ap-hero.is-editor .ap-hero-wall__grid--static .ap-hero-card {
	width: 150px;
	height: 112px;
}

/* Sector stories can't cycle an angled stage in the editor: show the text column
   over a static, selectable row of sector-card previews (edited in the sidebar). */
.ap-hero-sector__cards--static {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

.ap-hero.is-editor .ap-hero-sector__cards--static .ap-hero-card {
	width: 180px;
	height: 135px;
}

/* -- Reduced motion ------------------------------------------------------- */

/* The module never auto-advances under reduced motion; hold the first sector lit
   with no crossfade and no zoom. */
@media ( prefers-reduced-motion: reduce ) {
	.ap-hero-sector__shot,
	.ap-hero-sector__photo,
	.ap-hero-sector__cap {
		transition: none;
	}

	.ap-hero-sector__shot.is-active {
		transform: none;
	}
}

/* -- Responsive ----------------------------------------------------------- */

@media ( max-width: 1024px ) {
	.ap-hero {
		padding: 66px 0 34px;
	}

	.ap-hero--showcase .ap-hero-card {
		width: 260px;
		height: 196px;
	}

	/* Tablet: pull the drum in and shrink the cards so the arc still fits. */
	.ap-hero--curved {
		--ap-ring-r: 560;
		--ap-ring-d: 280;
		/* The arc between neighbours shrinks with the radius (560/800), so the cards
		   shrink the same way or they touch and overlap. */
		--ap-card-scale: 0.7;
	}

	.ap-hero__carousel {
		height: 360px;
	}

	.ap-hero--curved .ap-hero-card {
		top: -132px; /* Half the 264px height, keeping the card centred on the ring. */
		height: 264px;
	}

	/* Tablet: show 7 columns (hide the outer two on each side) and shrink the
	   outlined word so it still fits the narrower stage. */
	.ap-hero--wall .ap-hero__heading {
		font-size: 44px;
	}

	.ap-hero-wall__outline {
		font-size: 150px;
	}

	.ap-hero-wall__col:nth-child(-n + 2),
	.ap-hero-wall__col:nth-child(n + 10) {
		display: none;
	}

	/* Tablet: stack the angled visual under the text, scale it to fit, and let the
	   tabs scroll sideways in a single row. */
	.ap-hero-sector__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.ap-hero--sector .ap-hero__heading {
		font-size: 56px;
	}

	.ap-hero-sector__tabs {
		display: flex;
		flex-wrap: nowrap;
		gap: 20px;
		margin-top: 40px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ap-hero-sector__tab {
		flex: 0 0 auto;
		min-width: 150px;
	}

	/* The stage is a fixed 790×700 composition; hero-sector.js sets --ap-fit to the
	   column width / 830 (capped at 1) so it always scales to fit, from the top-left. */
	.ap-hero-sector__visual {
		height: calc(700px * var(--ap-fit, 0.8));
		/* `scale`, not `transform`: the stage carries data-reveal, whose inline
		   transform would otherwise override it once revealed. */
		scale: var(--ap-fit, 0.8);
		transform-origin: top left;
	}
}

@media ( max-width: 640px ) {
	.ap-hero__strip-tilt {
		transform: rotate(-3deg);
	}

	.ap-hero--showcase .ap-hero-card {
		width: 220px;
		height: 166px;
	}

	.ap-hero__buttons {
		flex-direction: column;
		width: 100%;
		align-items: stretch;
	}

	.ap-hero__buttons .ap-btn {
		justify-content: center;
		width: 100%;
	}

	/* Mobile: the drum is unworkable, so flatten it to a horizontal row. Without
	   JS the row is simply scrollable; the motion module turns it into a looping
	   marquee (and switches overflow to hidden) when motion is allowed. The
	   first-frame 3D transform and inline edge-fade opacity are overridden here so
	   a reduced-motion or no-JS visitor still sees every card upright. */
	.ap-hero__carousel {
		height: auto;
		overflow-x: auto;
		perspective: none;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
	}

	.ap-hero__carousel.is-flat-enhanced {
		overflow: hidden;
	}

	.ap-hero--curved .ap-hero__ring {
		position: static;
		display: flex;
		gap: 16px;
		width: max-content;
		height: auto;
		padding: 8px 20px;
		transform: none;
	}

	.ap-hero--curved .ap-hero-card {
		position: relative;
		flex: none;
		top: auto;
		left: auto;
		width: 220px;
		height: 300px;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none;
		scroll-snap-align: center;
	}

	/* Mobile: show 4 columns and hold them still (the module adds no drift here). */
	.ap-hero--wall .ap-hero__heading {
		font-size: 34px;
	}

	.ap-hero-wall__outline {
		font-size: 92px;
	}

	.ap-hero-wall__col {
		margin-top: var(--off, 0px);
		transform: none !important;
	}

	.ap-hero-wall__col:nth-child(-n + 4),
	.ap-hero-wall__col:nth-child(n + 9) {
		display: none;
	}

	.ap-hero-wall__tile {
		width: 120px;
		height: 90px;
	}

	/* Mobile: the heading drops to the base H1 scale and the angled visual scales
	   down further so it fits the narrow column; the tabs keep their scrolling row. */
	.ap-hero--sector .ap-hero__heading {
		font-size: 40px;
	}

	.ap-hero--sector .ap-hero__intro {
		margin-top: 18px;
	}

	.ap-hero-sector__tabs {
		margin-top: 32px;
	}

	.ap-hero-sector__tab {
		min-width: 130px;
	}

	.ap-hero-sector__visual {
		--ap-fit: 0.4;
	}
}

/* -- Short laptop screens (e.g. 1366×768) --------------------------------- */

/* On a short desktop viewport the hero is compressed so the top of the next block
   peeks in at the bottom of the screen (--ap-hero-peek), inviting the scroll. Type,
   spacing and the artwork scale down together; taller screens keep the full design.
   The navbar height and the peek are tokens so the inner heroes can share them. */
:root {
	--ap-nav-h: 73px;
	--ap-hero-peek: 80px;
}

@media ( min-width: 1025px ) and ( max-height: 820px ) {
	.ap-hero {
		padding: 28px 0 10px;
	}

	.ap-hero__pill {
		margin-bottom: 12px;
		padding: 6px 16px;
		font-size: 13px;
	}

	.ap-hero__heading {
		font-size: min( var(--ap-h1), 7.2vh );
	}

	.ap-hero__intro {
		margin: 12px auto 20px;
		font-size: 17px;
	}

	.ap-hero__buttons {
		padding-bottom: 0;
	}

	.ap-hero__floor {
		margin-top: -64px;
	}

	/* The curved carousel keeps its full size (drum, cards and stage), so only the text
	   above it is compressed. */

	/* Showcase strip. */
	.ap-hero__strip {
		height: 200px;
		margin-top: 0;
	}

	.ap-hero__strip-tilt {
		top: 14px;
	}

	.ap-hero--showcase .ap-hero-card {
		width: 230px;
		height: 172px;
	}

	/* Wall of tiles. */
	.ap-hero--wall .ap-hero__heading {
		font-size: min( 60px, 6.2vh );
	}

	.ap-hero-wall__head {
		padding-top: 0;
	}

	.ap-hero-wall__stage {
		padding: 16px 0 24px;
	}

	.ap-hero-wall__outline {
		font-size: 130px;
	}

	.ap-hero-wall__grid,
	.ap-hero-wall__col,
	.ap-hero-wall__tiles {
		gap: 9px;
	}

	.ap-hero-wall__tile {
		width: 100px;
		height: 75px;
	}

	.ap-hero-wall__fade {
		height: 100px;
	}

	/* Sector stories: a smaller heading and a smaller angled stage. */
	.ap-hero--sector .ap-hero__heading {
		margin-top: 14px;
		font-size: min( 68px, 7.2vh );
	}

	.ap-hero--sector .ap-hero__intro {
		margin-top: 14px;
		font-size: 16px;
	}

	.ap-hero--sector .ap-hero__cta {
		margin-top: 20px;
	}

	.ap-hero-sector__tabs {
		margin-top: 24px;
	}

	.ap-hero-sector__visual {
		--ap-fit-short: 0.78;
		height: calc( 700px * var(--ap-fit-short) );
		scale: var(--ap-fit-short);
		transform-origin: top left;
	}
}

