@charset "utf-8";

/*
 * Home page — ebook shell (one screen, no scroll)
 * Portrait: stacked hero → story → cover bar (mobile-first).
 * Landscape (≥4:3): hero & story side-by-side, each stacked vertically inside.
 */
:root {
	--home-mobile-cover-bar: clamp(78px, 12vh, 104px);
}

body.home {
	background: var(--orken-bg, #faf7fc) !important;
	background-image: none !important;
	font-family: system-ui, -apple-system, "Segoe UI", Verdana, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.home #container {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0;
	background: var(--orken-bg, #faf7fc);
	padding-top: calc(var(--mobile-top-nav, 44px) + env(safe-area-inset-top, 0px) + 4px);
	/* Only the tab bar is reserved here — the fixed cover bar is cleared by
	   .home-story-panel's bottom padding, so the panel fills behind it. */
	padding-bottom: calc(var(--mobile-bottom-nav, 48px) + env(safe-area-inset-bottom, 0px));
	padding-left: 0;
	padding-right: 0;
}

body.home #footer {
	display: none;
	background: var(--orken-purple-dark, #2d0e45) !important;
	background-image: none !important;
	padding: 12px 16px;
}

body.home #footer p {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Verdana, Arial, sans-serif;
	font-size: 11px;
	color: rgba(255, 255, 255, 0.65);
}

body.home #mainContent.home-shell {
	padding: 0;
}

body.home .site-header {
	border-radius: 0;
}

.home-shell {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--app-shell-max, 1120px);
	margin: 0 auto;
	padding: 0;
	background: #fff !important;
	background-image: none !important;
	min-height: calc(
		100dvh - var(--mobile-top-nav, 44px) - var(--mobile-bottom-nav, 48px) -
			env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 4px
	);
	text-align: left;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	transition: max-width var(--shell-ease, 0.35s ease);
}

/* ── Hero (mobile base) ── */
.home-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(
		180deg,
		#6b3498 0%,
		#4a1f6e 42%,
		#2d0e45 100%
	);
}

.home-hero-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.home-hero-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(28px);
	opacity: 0.3;
	animation: none;
}

.home-hero-orb--1 {
	width: 160px;
	height: 160px;
	top: -30px;
	right: -24px;
	background: rgba(87, 158, 41, 0.35);
}

.home-hero-orb--2 {
	width: 110px;
	height: 110px;
	bottom: 18%;
	left: -28px;
	background: rgba(255, 255, 255, 0.12);
}

.home-hero-orb--3 {
	width: 90px;
	height: 90px;
	top: 55%;
	right: -20px;
	opacity: 0.2;
	background: rgba(102, 45, 145, 0.4);
}

@keyframes home-orb-float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(12px, -16px) scale(1.05); }
	66% { transform: translate(-8px, 10px) scale(0.95); }
}

.home-hero-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	align-items: center;
	padding: 14px 16px;
}

.home-hero-copy {
	text-align: center;
	margin-top: 20px;
	animation: none;
}

.home-hero-showcase {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
	animation: none;
}

.home-hero-actions,
.home-hero-stats {
	display: none;
}

.home-hero-badge {
	margin: 0 0 14px;
	padding: 6px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.95);
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	backdrop-filter: blur(6px);
}

.home-hero-eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.home-hero-badge,
.home-hero-eyebrow {
	display: none;
}

.home-hero-title {
	margin: 0 0 8px;
	font-size: clamp(24px, 6.8vw, 32px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #fff !important;
	text-align: center;
	text-transform: none;
	text-wrap: balance;
}

.home-hero-subtitle {
	margin: 0 0 24px;
	max-width: 48ch;
	font-size: clamp(15px, 2.2vw, 17px);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

.home-hero-subtitle--full {
	display: none;
}

.home-hero-subtitle--short {
	display: block;
	margin: 0 auto 12px;
	max-width: 32ch;
	font-size: 15px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.86);
}

@keyframes home-fade-up {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.home-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-hero-btn--primary {
	color: var(--orken-purple-dark, #2d0e45);
	background: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.home-hero-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.home-hero-btn--ghost {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	border: 1.5px solid rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(4px);
}

.home-hero-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: translateY(-2px);
}

.home-hero-stats li {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.home-hero-stats strong {
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	color: #fff;
}

.home-hero-stats span {
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.65);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Hero book showcase */
/* Hero book showcase (mobile: two-page spread) */
.home-book-stage {
	position: relative;
	width: 100%;
	max-width: clamp(260px, 78vw, 380px);
	margin: 0 auto;
	transition: max-width var(--shell-ease, 0.35s ease);
}

.home-book-shelf,
.home-book-glow {
	display: none;
}

.home-book-frame {
	position: relative;
	z-index: 1;
	display: block;
	padding: 0 10px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.home-book-frame:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.95);
	outline-offset: 3px;
}

.home-book-carousel {
	position: relative;
	overflow: hidden;
	width: 100%;
	height: clamp(180px, 32vw, 280px);
	min-height: clamp(180px, 32vw, 280px);
	max-height: clamp(220px, 36vw, 320px);
	aspect-ratio: 4 / 3;
	perspective: none;
	transition:
		height var(--shell-ease, 0.35s ease),
		min-height var(--shell-ease, 0.35s ease),
		max-height var(--shell-ease, 0.35s ease);
}

.home-book-spread {
	position: absolute;
	inset: 0;
	display: block;
	text-decoration: none;
	color: inherit;
	opacity: 0;
	transform: scale(0.92) translateY(24px);
	transition:
		opacity 0.6s ease,
		transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.home-book-spread.current {
	opacity: 1;
	transform: scale(1) translateY(0);
	pointer-events: auto;
	z-index: 3;
}

.home-book-carousel.is-expanded {
	height: clamp(180px, 32vw, 280px);
	min-height: clamp(180px, 32vw, 280px);
	max-height: clamp(220px, 36vw, 320px);
}

.home-book-spread:not(.current) {
	visibility: hidden;
	opacity: 0 !important;
}

.home-book-spread.current .home-book-pages--idle {
	animation: none;
	justify-content: center;
	align-items: flex-end;
}

.home-book-pages--inside {
	display: none !important;
}

.home-book-page--cover,
.home-book-page--peek {
	transform: none;
}

.home-book-page--cover {
	width: 52% !important;
	margin: 0;
}

.home-book-page--peek {
	display: block;
	width: 48%;
	margin-left: -10%;
	margin-bottom: 2px;
	opacity: 0.95;
}

.home-book-pages {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 100%;
	transform-style: preserve-3d;
}

.home-book-page {
	background: #fff;
	overflow: hidden;
	box-shadow:
		0 12px 28px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-book-page img {
	display: block;
	width: 100%;
	height: auto;
}

.home-book-page--cover {
	position: relative;
	z-index: 2;
	border-radius: 3px 2px 2px 3px;
	transform-origin: right bottom;
}

.home-book-page--peek {
	border-radius: 2px 3px 3px 2px;
	transform-origin: left bottom;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.home-book-page--inner {
	position: relative;
	border-radius: 2px;
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.4s ease,
		box-shadow 0.4s ease;
}

.home-book-pages--inside .home-book-page--inner:nth-child(1) {
	z-index: 3;
	transform: rotateY(16deg) rotateZ(-1deg);
	transform-origin: right bottom;
	margin-right: -5%;
}

.home-book-pages--inside .home-book-page--inner:nth-child(2) {
	z-index: 4;
	width: min(34%, 170px);
	transform: rotateY(0deg);
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.home-book-pages--inside .home-book-page--inner:nth-child(3) {
	z-index: 2;
	transform: rotateY(-16deg) rotateZ(1deg);
	transform-origin: left bottom;
	margin-left: -5%;
	opacity: 0.9;
}

.home-book-carousel.is-expanded .home-book-spread.current .home-book-pages--inside .home-book-page--inner:nth-child(1) {
	transform: rotateY(10deg) translateX(4px);
}

.home-book-carousel.is-expanded .home-book-spread.current .home-book-pages--inside .home-book-page--inner:nth-child(2) {
	transform: rotateY(0deg) translateY(-4px);
}

.home-book-carousel.is-expanded .home-book-spread.current .home-book-pages--inside .home-book-page--inner:nth-child(3) {
	transform: rotateY(-10deg) translateX(-4px);
}

.home-book-carousel.is-expanded .home-book-spine {
	height: 94%;
	opacity: 0.85;
}

.home-book-spine {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 10px;
	height: 88%;
	transform: translateX(-50%) rotateY(90deg);
	background: linear-gradient(180deg, #4a1f6e 0%, #2d0e45 100%);
	border-radius: 2px;
	box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
	z-index: 1;
}

@keyframes home-book-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

.home-book-caption {
	display: none;
}

.home-book-dots {
	display: none;
}

.home-mobile-hint {
	display: none;
}

/* Story panel (mobile portrait base) */
.home-story-panel {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	flex: 1 1 auto;
	min-height: 0;
	padding: 10px clamp(16px, 4vw, 32px) clamp(20px, 4vh, 32px);
	text-align: left;
}

/* Wrapper exists only to scope scrolling on mobile portrait; elsewhere its
   children must stay direct flex items of the panel. */
.home-story-scroll {
	display: contents;
}

.home-story-kicker {
	display: contents;
}

.home-story-cover,
.home-story-current {
	display: none;
}

.home-story-eyebrow {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--orken-green, #579e29);
}

.home-story-title {
	margin: 0 0 14px;
	font-size: clamp(22px, 5.5vw, 28px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--orken-purple-dark, #2d0e45);
	text-wrap: balance;
}

.home-story-body {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.6;
	color: #444;
	text-wrap: pretty;
}

.home-story-cta {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	min-height: 44px;
	padding: 12px 18px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--orken-purple, #662d91) 0%, #4a1f6e 100%);
	box-shadow: 0 6px 18px rgba(102, 45, 145, 0.22);
}

.home-story-cta:active {
	transform: scale(0.98);
}

.home-mobile-hint {
	display: none;
}

/* Cover picker above the tab bar (mobile) — sticky so it reserves its own
   space in flow instead of relying on padding elsewhere to clear it. */
.home-mobile-cover-bar {
	display: block;
	position: sticky;
	bottom: calc(var(--mobile-bottom-nav, 48px) + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	box-sizing: border-box;
	height: var(--home-mobile-cover-bar);
	padding: 7px 12px 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 247, 252, 0.98) 100%);
	border-top: 1px solid #ebe3f2;
	box-shadow: 0 -3px 14px rgba(45, 14, 69, 0.06);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.home-mobile-cover-bar .home-brochure-covers {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 7px;
	height: 100%;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0;
	align-items: end;
}

.home-brochure-cover-pick {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 3px;
	border: 2px solid transparent;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.72);
	cursor: pointer;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
	box-shadow: 0 2px 10px rgba(45, 14, 69, 0.08);
	transition:
		border-color 0.18s ease,
		background 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease;
}

.home-brochure-cover-pick img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(var(--home-mobile-cover-bar) - 20px);
	aspect-ratio: 3 / 4;
	object-fit: contain;
	object-position: top center;
	border-radius: 5px;
	background: #fff;
	box-shadow:
		0 6px 14px rgba(45, 14, 69, 0.16),
		0 0 0 1px rgba(45, 14, 69, 0.06);
	transition:
		max-height var(--shell-ease, 0.35s ease),
		transform 0.18s ease,
		box-shadow 0.18s ease;
}

.home-brochure-cover-pick.active {
	border-color: var(--orken-purple, #662d91);
	background: #fff;
	box-shadow:
		0 0 0 2px rgba(102, 45, 145, 0.14),
		0 8px 22px rgba(102, 45, 145, 0.18);
	transform: translateY(-2px);
}

.home-brochure-cover-pick.active img {
	transform: translateY(-2px);
	box-shadow:
		0 10px 22px rgba(45, 14, 69, 0.22),
		0 0 0 1px rgba(102, 45, 145, 0.16);
}

.home-brochure-cover-pick:focus-visible {
	outline: 3px solid rgba(102, 45, 145, 0.28);
	outline-offset: 3px;
}

.home-brochure-cover-pick:active {
	transform: scale(0.96);
}

.home-hero-wave {
	position: relative;
	z-index: 2;
	line-height: 0;
	margin-top: -1px;
}

.home-hero-wave svg {
	display: block;
	width: 100%;
	height: 16px;
}

/* Desktop-only sections hidden on mobile base */
.home-publications,
.home-about-strip {
	display: none;
}

/* ── Publications (desktop) ── */
.home-publications {
	padding: 8px 20px 32px;
	scroll-margin-top: calc(var(--mobile-top-nav, 44px) + env(safe-area-inset-top, 0px) + 16px);
}

.home-section-head {
	margin-bottom: 24px;
	text-align: center;
}

.home-section-eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--orken-green, #579e29);
}

.home-section-title {
	margin: 0 0 10px;
	font-size: clamp(22px, 4vw, 28px);
	font-weight: 800;
	color: var(--orken-purple-dark, #2d0e45);
	letter-spacing: -0.02em;
}

.home-section-lead {
	margin: 0 auto;
	max-width: 56ch;
	font-size: 15px;
	line-height: 1.6;
	color: #555;
}

.home-brochure-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-brochure-card {
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e8ddf0;
	box-shadow: 0 4px 16px rgba(45, 14, 69, 0.06);
	transition:
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		transform 0.25s ease;
	overflow: hidden;
}

.home-brochure-card.current {
	border-color: var(--orken-purple, #662d91);
	box-shadow: 0 8px 28px rgba(102, 45, 145, 0.18);
}

.home-brochure-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(102, 45, 145, 0.14);
}

.home-brochure-card a {
	text-decoration: none;
}

.home-brochure-card-trigger {
	display: flex;
	flex-direction: column;
	flex: 1;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.home-brochure-card .brochure-open {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px 18px;
	font-size: 13px;
	font-weight: 700;
	color: var(--orken-purple, #662d91);
	text-decoration: none;
	border-top: 1px solid #ebe3f2;
	background: #faf7fc;
	opacity: 0;
	transform: translateY(4px);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease,
		background 0.2s ease,
		color 0.2s ease;
}

.home-brochure-card:hover .brochure-open,
.home-brochure-card.current .brochure-open,
.home-brochure-card:focus-within .brochure-open {
	opacity: 1;
	transform: translateY(0);
}

.home-brochure-card .brochure-open:hover,
.home-brochure-card .brochure-open:focus-visible {
	background: #f3ebf8;
	color: var(--orken-purple-dark, #2d0e45);
}

.home-brochure-card-visual {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 16px 8px;
	background: linear-gradient(180deg, #f8f2fc 0%, #fff 100%);
}

.home-brochure-cover {
	display: block;
	width: auto;
	max-width: 100px;
	height: auto;
	max-height: 130px;
	border-radius: 3px;
	box-shadow:
		0 8px 20px rgba(45, 14, 69, 0.18),
		0 0 0 1px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-brochure-card:hover .home-brochure-cover,
.home-brochure-card.current .home-brochure-cover {
	transform: scale(1.05) rotate(-1deg);
	box-shadow: 0 12px 28px rgba(102, 45, 145, 0.22);
}

.home-brochure-card .brochure-thumb {
	display: none;
}

.home-brochure-card .brochure-card-body {
	flex: 1;
	padding: 14px 18px 18px;
}

.home-brochure-card .brochure-text {
	margin: 0 0 8px;
	line-height: 1.35;
}

.home-brochure-card .green {
	font-size: 13px;
	font-weight: 600;
	color: var(--orken-green-dark, #24450e);
}

.home-brochure-card .pink {
	font-size: 17px;
	font-weight: 700;
	color: var(--orken-purple-dark, #2d0e45);
}

/* About strip */
.home-about-strip {
	padding: 0 20px 28px;
}

.home-about-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	text-decoration: none;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--orken-green) 0%, #3d7018 100%);
	box-shadow: 0 8px 24px rgba(36, 69, 14, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-about-cta:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(36, 69, 14, 0.3);
}

.home-about-cta-label {
	flex: 1;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	color: #fff !important;
}

.home-about-cta-label .pink {
	color: #d4f0c0 !important;
}

.home-about-cta-arrow {
	font-size: 24px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
	transition: transform 0.2s ease;
}

.home-about-cta:hover .home-about-cta-arrow {
	transform: translateX(6px);
}

/* Legacy overrides */
body.home .home-brochure-card,
body.home #pregnancyHolder,
body.home #drugsHolder,
body.home #aidsHolder,
body.home #alcoholHolder {
	float: none !important;
	clear: both !important;
	margin: 0 !important;
	height: auto !important;
	border-left: none !important;
}

body.home .brochure-thumb.rmenu,
body.home .brochure-thumb.rmenup {
	float: none !important;
}

body.home.kk .home-brochure-card .green,
body.home.ru .home-brochure-card .green {
	color: var(--orken-purple, #662d91);
}

body.home.kk .home-brochure-card .pink,
body.home.ru .home-brochure-card .pink {
	color: var(--orken-green-dark, #24450e);
}

/* ── Stacked layout (tall viewport ratio) ── */
@media (max-aspect-ratio: 4/3) {
	.home-hero-grid {
		grid-template-columns: 1fr;
	}

	.home-hero-copy {
		text-align: center;
		margin-top: 20px;
	}

	.home-hero-title {
		text-align: center;
	
	}

	.home-hero-subtitle--short {
		display: none;
	  }

	.home-book-stage {
		margin-left: auto;
		margin-right: auto;
	}

	.home-mobile-cover-bar .home-brochure-covers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Narrow stacked viewports — keep all covers in one book row */
@media (max-aspect-ratio: 4/3) and (max-width: 400px) {
	.home-mobile-cover-bar .home-brochure-covers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 6px;
	}

	.home-mobile-cover-bar {
		padding: 6px 9px 7px;
	}

	.home-brochure-cover-pick {
		padding: 3px;
		border-radius: 9px;
	}

	.home-brochure-cover-pick img {
		max-height: calc(var(--home-mobile-cover-bar) - 18px);
	}
}

/* ── Landscape ratio (≥4:3): hero | story columns, each stacked vertically ── */
@media (min-aspect-ratio: 4/3) and (min-width: 568px) {
	body.home {
		--home-mobile-cover-bar: clamp(92px, 14vh, 120px);
		overflow: hidden;
		height: 100dvh;
	}

	body.home #container {
		overflow: hidden;
		height: 100dvh;
		max-height: 100dvh;
		min-height: 0;
		display: flex;
		flex-direction: column;
		padding-bottom: calc(
			var(--mobile-bottom-nav, 48px) + clamp(64px, 9.5vh, 88px) +
				env(safe-area-inset-bottom, 0px) + 4px
		);
	}

	body.home #mainContent.home-shell {
		flex: 1 1 auto;
		min-height: 0;
		overflow: hidden;
	}

	.home-shell {
		display: grid;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		grid-template-rows: minmax(0, 1fr) auto;
		grid-template-areas:
			"hero story"
			"covers covers";
		gap: clamp(8px, 1.25vw, 16px);
		padding: clamp(5px, 1vh, 10px) clamp(8px, 1.5vw, 18px) 0;
		min-height: 0;
		max-height: 100%;
		overflow: hidden;
		background: var(--orken-bg, #faf7fc) !important;
	}

	.home-hero {
		grid-area: hero;
		min-height: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		border-radius: clamp(14px, 2vw, 22px);
		box-shadow: 0 10px 30px rgba(45, 14, 69, 0.12);
		background:
			radial-gradient(circle at 82% 16%, rgba(87, 158, 41, 0.26) 0, transparent 34%),
			radial-gradient(circle at 8% 84%, rgba(255, 255, 255, 0.12) 0, transparent 32%),
			linear-gradient(160deg, #6b3498 0%, #4a1f6e 52%, #2d0e45 100%);
	}

	.home-hero-grid {
		grid-template-columns: 1fr;
		flex: 1 1 auto;
		min-height: 0;
		overflow: hidden;
		gap: clamp(5px, 1vh, 12px);
		align-content: center;
		padding: clamp(10px, 1.6vh, 18px) clamp(14px, 2.6vw, 34px) clamp(4px, 0.8vh, 9px);
	}

	.home-hero-copy {
		text-align: center;
		margin-top: 0;
		flex-shrink: 0;
	}

	.home-hero-title {
		text-align: center;
		font-size: clamp(18px, 2.7vw, 30px);
		margin-bottom: clamp(4px, 0.7vh, 8px);
		line-height: 1.12;
		text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
	}

	.home-hero-subtitle--short {
		margin-left: auto;
		margin-right: auto;
		text-align: center;
		max-width: 36ch;
		font-size: clamp(11px, 1.4vw, 15px);
		line-height: 1.4;
		margin-bottom: clamp(4px, 0.8vh, 8px);
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.home-hero-showcase {
		flex: 1 1 auto;
		min-height: 0;
		width: 100%;
		justify-content: center;
		gap: clamp(6px, 1vh, 10px);
	}

	.home-book-stage {
		max-width: min(390px, 88%);
		margin-left: auto;
		margin-right: auto;
	}

	.home-book-frame {
		padding: clamp(6px, 1vh, 10px) clamp(8px, 1.2vw, 12px) clamp(8px, 1.4vh, 14px);
		border-radius: clamp(12px, 1.8vw, 18px);
		background: rgba(255, 255, 255, 0.1);
		box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
	}

	.home-book-carousel,
	.home-book-carousel.is-expanded {
		height: clamp(115px, 29vh, 270px);
		min-height: clamp(96px, 20vh, 165px);
		max-height: clamp(130px, 33vh, 290px);
	}

	.home-book-caption {
		display: block;
		margin: 0;
		font-size: clamp(10px, 1.15vw, 12px);
		font-weight: 650;
		line-height: 1.25;
		text-align: center;
		color: rgba(255, 255, 255, 0.84);
	}

	.home-book-dots {
		display: flex;
		justify-content: center;
		gap: 7px;
		margin-top: 2px;
		padding: 0;
	}

	.home-book-dot {
		width: 7px;
		height: 7px;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.38);
		cursor: pointer;
	}

	.home-book-dot.active {
		width: 18px;
		background: #fff;
	}

	.home-hero-wave {
		display: none;
	}

	.home-hero-wave svg {
		height: clamp(6px, 1vh, 12px);
	}

	.home-story-panel {
		grid-area: story;
		flex: none;
		min-height: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		justify-content: center;
		max-width: none;
		margin: 0;
		padding: clamp(14px, 2.3vh, 26px) clamp(16px, 3vw, 38px);
		border: 1px solid #ece2f4;
		border-radius: clamp(14px, 2vw, 22px);
		background:
			linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #fff 60%),
			radial-gradient(circle at 92% 8%, rgba(102, 45, 145, 0.08) 0, transparent 35%);
		box-shadow: 0 10px 30px rgba(45, 14, 69, 0.1);
	}

	.home-story-kicker {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		gap: clamp(9px, 1.4vw, 14px);
		align-items: center;
		margin-bottom: clamp(10px, 1.6vh, 16px);
		flex-shrink: 0;
	}

	.home-story-cover {
		display: block;
		width: clamp(34px, 5vw, 52px);
		height: auto;
		aspect-ratio: 3 / 4;
		object-fit: cover;
		object-position: top center;
		border-radius: 5px;
		box-shadow:
			0 8px 18px rgba(45, 14, 69, 0.18),
			0 0 0 1px rgba(102, 45, 145, 0.14);
	}

	.home-story-kicker-copy {
		min-width: 0;
	}

	.home-story-eyebrow {
		margin-bottom: 3px;
		font-size: clamp(9px, 1.1vw, 11px);
		flex-shrink: 0;
		color: var(--orken-purple, #662d91);
	}

	.home-story-current {
		display: block;
		margin: 0;
		max-width: 100%;
		overflow: hidden;
		color: var(--orken-green-dark, #24450e);
		font-size: clamp(10px, 1.15vw, 12px);
		font-weight: 750;
		line-height: 1.2;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.home-story-title {
		font-size: clamp(18px, 2.18vw, 27px);
		margin-bottom: clamp(8px, 1.2vh, 14px);
		line-height: 1.16;
		flex-shrink: 0;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.home-story-body {
		font-size: clamp(12px, 1.32vw, 15px);
		line-height: 1.55;
		margin-bottom: clamp(12px, 1.8vh, 18px);
		flex: 0 1 auto;
		min-height: 0;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 5;
		-webkit-box-orient: vertical;
	}

	.home-story-cta {
		flex-shrink: 0;
		align-self: flex-start;
		min-height: 40px;
		padding: 10px 16px;
		font-size: clamp(12px, 1.35vw, 14px);
		box-shadow: 0 8px 22px rgba(102, 45, 145, 0.24);
	}

	.home-mobile-cover-bar {
		position: relative;
		left: auto;
		right: auto;
		bottom: auto;
		z-index: auto;
		grid-area: covers;
		margin-top: 0;
		height: auto;
		min-height: var(--home-mobile-cover-bar);
		overflow: visible;
		padding: clamp(5px, 0.75vh, 8px) clamp(10px, 2vw, 22px) clamp(6px, 0.85vh, 9px);
		border: 1px solid #ece2f4;
		border-bottom: none;
		border-radius: clamp(12px, 1.8vw, 18px) clamp(12px, 1.8vw, 18px) 0 0;
		background:
			linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 247, 252, 0.98) 100%);
		box-shadow: 0 -6px 18px rgba(45, 14, 69, 0.06);
	}

	.home-mobile-cover-bar .home-brochure-covers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: clamp(7px, 1vw, 12px);
		height: auto;
		max-width: min(700px, 100%);
	}

	.home-brochure-cover-pick {
		display: grid;
		grid-template-rows: auto auto;
		gap: 3px;
		align-items: end;
		justify-items: center;
		padding: clamp(3px, 0.55vh, 5px);
		border-radius: 12px;
	}

	.home-brochure-cover-pick img {
		max-height: clamp(48px, 8.5vh, 82px);
		width: auto;
		max-width: 100%;
	}

	.home-brochure-cover-pick::after {
		content: attr(aria-label);
		display: none;
		max-width: 100%;
		overflow: hidden;
		color: var(--orken-purple-dark, #2d0e45);
		font-size: clamp(9px, 1.05vw, 11px);
		font-weight: 700;
		line-height: 1.15;
		text-align: center;
		text-overflow: ellipsis;
		white-space: nowrap;
		opacity: 0.72;
	}

	.home-brochure-cover-pick.active::after {
		color: var(--orken-purple, #662d91);
		opacity: 1;
	}
}

@media (min-aspect-ratio: 4/3) and (min-width: 768px) and (min-height: 560px) {
	body.home {
		--home-mobile-cover-bar: clamp(104px, 15vh, 132px);
	}

	.home-brochure-cover-pick::after {
		display: block;
	}
}

/* Short landscape — tighter fit, still no scroll */
@media (min-aspect-ratio: 4/3) and (max-height: 520px) {
	.home-hero-title {
		font-size: clamp(15px, 3.5vw, 22px);
	}

	.home-hero-subtitle--short {
		font-size: 11px;
		-webkit-line-clamp: 1;
	}

	.home-book-carousel,
	.home-book-carousel.is-expanded {
		height: clamp(64px, 16vh, 120px);
		min-height: 64px;
		max-height: 130px;
	}

	.home-story-title {
		font-size: clamp(14px, 2.5vw, 18px);
		-webkit-line-clamp: 1;
	}

	.home-story-body {
		-webkit-line-clamp: 2;
		font-size: 11px;
	}

	.home-brochure-cover-pick img {
		max-height: 48px;
	}

	.home-brochure-cover-pick::after {
		display: none;
	}
}

/* ── Large portrait viewports — fluid scale-up ── */
@media (min-width: 768px) and (max-aspect-ratio: 4/3) {
	body.home .site-header .nav-bar {
		max-width: var(--app-shell-max, 1120px);
	}

	.home-hero-grid {
		padding: clamp(16px, 3vw, 32px) clamp(20px, 4vw, 48px);
	}

	.home-hero-title {
		font-size: clamp(26px, 4.5vw, 40px);
	}

	.home-story-title {
		font-size: clamp(24px, 3.5vw, 32px);
	}

	.home-story-body {
		font-size: clamp(16px, 2vw, 18px);
	}

	.home-mobile-cover-bar .home-brochure-covers {
		max-width: var(--app-shell-max, 1120px);
		padding: 0 clamp(12px, 2vw, 24px);
	}

	.home-brochure-cover-pick img {
		max-height: clamp(64px, 12vh, 96px);
	}
}

/* iPad portrait — keep the mobile-style stacked ratio */
@media (max-aspect-ratio: 4/3) and (min-width: 768px) {
	body.home {
		--home-mobile-cover-bar: clamp(184px, 24vh, 248px);
	}

	body.home #container {
		min-height: 100dvh;
		height: auto;
		max-height: none;
		overflow: visible;
		padding-bottom: calc(var(--mobile-bottom-nav, 48px) + env(safe-area-inset-bottom, 0px));
	}

	.home-shell {
		min-height: 0;
		max-height: none;
		max-width: min(var(--app-shell-max, 1120px), 100%);
		overflow: visible;
	}

	.home-hero-grid {
		grid-template-columns: 1fr;
		gap: clamp(14px, 2vh, 22px);
		align-items: center;
		padding: clamp(22px, 3vh, 34px) clamp(28px, 5vw, 56px) clamp(14px, 2vh, 24px);
	}

	.home-hero-copy {
		text-align: center;
		margin-top: 0;
	}

	.home-hero-title {
		text-align: center;
		font-size: clamp(30px, 5vw, 42px);
	}

	.home-hero-subtitle--short {
		margin-left: auto;
		margin-right: auto;
		text-align: center;
		max-width: 34ch;
		font-size: clamp(15px, 2vw, 18px);
	}

	.home-book-stage {
		max-width: min(640px, 88vw);
		margin-left: auto;
		margin-right: auto;
	}

	.home-book-frame {
		padding: clamp(6px, 1vh, 10px) clamp(8px, 1.4vw, 14px) clamp(8px, 1.2vh, 12px);
	}

	.home-book-carousel,
	.home-book-carousel.is-expanded {
		height: clamp(300px, 36vh, 420px);
		min-height: clamp(280px, 32vh, 360px);
		max-height: clamp(320px, 40vh, 460px);
	}

	.home-book-spread.current .home-book-pages--idle {
		display: none;
	}

	.home-book-spread.current .home-book-pages--inside {
		display: flex !important;
		align-items: flex-end;
		justify-content: center;
		height: 100%;
		gap: 0;
	}

	.home-book-pages--inside .home-book-page--inner {
		width: min(32%, 220px);
		opacity: 1;
	}

	.home-book-pages--inside .home-book-page--inner:nth-child(1) {
		transform: rotateY(10deg) rotateZ(-1.5deg) translateX(10px);
		margin-right: -5%;
	}

	.home-book-pages--inside .home-book-page--inner:nth-child(2) {
		width: min(36%, 250px);
		transform: translateY(-8px);
	}

	.home-book-pages--inside .home-book-page--inner:nth-child(3) {
		transform: rotateY(-10deg) rotateZ(1.5deg) translateX(-10px);
		margin-left: -5%;
	}

	.home-book-spine {
		display: none;
	}

	.home-hero-wave svg {
		height: clamp(14px, 2vh, 24px);
	}

	.home-story-panel {
		flex: none;
		max-width: min(720px, 88%);
		margin: 0 auto clamp(16px, 2.5vh, 28px);
		padding: clamp(16px, 2vh, 24px) clamp(28px, 5vw, 48px) clamp(18px, 2.4vh, 28px);
		text-align: left;
	}

	.home-story-title {
		font-size: clamp(22px, 3vw, 30px);
		margin-bottom: 8px;
	}

	.home-story-body {
		display: -webkit-box;
		margin-bottom: clamp(14px, 1.8vh, 22px);
		overflow: hidden;
		font-size: clamp(14px, 1.7vw, 17px);
		max-width: 62ch;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.home-story-cta {
		position: static;
		align-self: flex-start;
		white-space: nowrap;
		box-shadow: 0 10px 28px rgba(102, 45, 145, 0.28);
	}

	.home-story-cta:active {
		transform: scale(0.98);
	}

	.home-mobile-cover-bar {
		padding: 8px clamp(18px, 3vw, 32px) 10px;
	}

	.home-mobile-cover-bar .home-brochure-covers {
		gap: clamp(8px, 1.4vw, 14px);
		max-width: var(--app-shell-max, 1120px);
		margin: 0 auto;
		padding: 0;
	}

	.home-brochure-cover-pick {
		padding: 3px;
	}

	.home-brochure-cover-pick img {
		width: auto;
		height: clamp(148px, 19vh, 204px);
		max-height: none;
		max-width: 100%;
		object-fit: contain;
	}
}

/* Mobile — full brochure covers (no crop inside hero frame) */
@media (max-width: 1023px) {
	.home-hero,
	.home-hero-grid,
	.home-hero-showcase,
	.home-book-stage,
	.home-book-frame,
	.home-book-carousel,
	.home-book-carousel.is-expanded,
	.home-book-spread,
	.home-book-page {
		overflow: visible;
	}

	.home-book-carousel,
	.home-book-carousel.is-expanded {
		height: auto;
		min-height: 0;
		max-height: none;
		aspect-ratio: auto;
	}

	.home-book-spread.current {
		position: relative;
		inset: auto;
		height: auto;
	}

	.home-book-pages {
		height: auto;
	}

	.home-book-page img {
		width: 100%;
		height: auto;
		max-height: none;
		object-fit: contain;
	}

	.home-book-page--cover img {
		transform: scale(1.08);
		transform-origin: center bottom;
	}
}

@media (min-width: 1024px) {
	body.home #footer {
		display: none;
	}

	.home-shell {
		border-radius: 0;
		box-shadow: none;
	}
}

/* Mac / wide landscape — roomier ebook frame */
@media (min-aspect-ratio: 4/3) and (min-width: 1024px) {
	.home-shell {
		max-width: var(--app-shell-max, 1120px);
		margin: 0 auto;
		grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
		gap: clamp(14px, 2vw, 24px);
		padding: clamp(10px, 1.4vh, 16px) clamp(14px, 2vw, 24px) 0;
	}

	.home-hero-title {
		font-size: clamp(24px, 2.5vw, 34px);
	}

	.home-hero-subtitle--short {
		font-size: clamp(13px, 1.4vw, 16px);
		max-width: 42ch;
	}

	.home-book-stage {
		max-width: min(420px, 84%);
	}

	.home-book-carousel,
	.home-book-carousel.is-expanded {
		height: clamp(160px, 30vh, 300px);
		min-height: clamp(140px, 24vh, 220px);
		max-height: clamp(180px, 34vh, 320px);
	}

	.home-story-title {
		font-size: clamp(22px, 2.1vw, 30px);
	}

	.home-story-body {
		font-size: clamp(14px, 1.35vw, 17px);
		-webkit-line-clamp: 6;
	}

	.home-story-cta {
		min-height: 40px;
		padding: 10px 16px;
		font-size: 14px;
	}

	.home-brochure-cover-pick img {
		max-height: clamp(58px, 8.5vh, 88px);
	}

	.home-mobile-cover-bar .home-brochure-covers {
		max-width: var(--app-shell-max, 1120px);
	}
}

/* ── Small phones (max-width: 390px) ── */
@media (max-width: 390px) {
	.home-mobile-cover-bar .home-brochure-covers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 5px;
	}

	.home-brochure-cover-pick img {
		max-height: clamp(56px, 10.5vh, 76px);
	}

	.home-story-panel {
		padding: 22px 16px 20px;
	}

	.home-hero-copy {
		text-align: center;
		margin-top: 8px;
		animation: none;
	}
}

/* ── Mobile portrait — compact hero title ── */
@media (max-aspect-ratio: 4/3) and (max-width: 430px) {
	.home-hero-title {
		font-size: 20px;
	}
}

/* ── Mobile portrait — one-screen shell: hero + scrollable story + cover bar ── */
@media (max-aspect-ratio: 4/3) and (max-width: 767px) {
	body.home #container {
		display: flex;
		flex-direction: column;
		height: 100dvh;
		max-height: 100dvh;
		overflow: hidden;
	}

	#mainContent.home-shell {
		flex: 1 1 auto;
		min-height: 0;
	}

	.home-hero {
		flex: none;
	}

	.home-mobile-cover-bar {
		flex: none;
		/* Last item of a viewport-height column, so it is already parked at the
		   bottom — a sticky offset here would lift it over the story panel. */
		position: static;
	}

	.home-story-panel {
		/* Stays unclipped so the CTA can sit above it; the inner wrapper scrolls. */
		position: relative;
		flex: 1 1 auto;
		min-height: 0;
		padding-top: 22px;
	}

	.home-story-scroll {
		display: block;
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	.home-story-cta {
		position: absolute;
		/* Sits above the panel, straddling the book's lower edge:
		   hero grid padding (14px) + wave (16px) clear the book bottom. */
		bottom: 100%;
		margin-bottom: 14px;
		right: clamp(16px, 4vw, 32px);
		/* Beats .home-hero-wave (z-index: 2), which shares the root stack. */
		z-index: 3;
		align-self: auto;
		justify-content: center;
		max-width: calc(100% - 32px);
		padding: 0 18px;
		font-size: 13px;
		line-height: 1.1;
		white-space: nowrap;
		border-radius: 999px;
		box-shadow:
			0 10px 24px rgba(45, 14, 69, 0.34),
			0 0 0 3px rgba(255, 255, 255, 0.92);
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-hero-orb,
	.home-hero-copy,
	.home-hero-showcase,
	.home-book-spread.current .home-book-pages--idle,
	.home-book-carousel.is-expanded .home-book-spread.current .home-book-pages--inside {
		animation: none;
	}

	.home-book-spread,
	.home-brochure-card,
	.home-about-cta,
	.home-hero-btn,
	.home-brochure-cover {
		transition: none;
	}
}
