/* =========================================================================
   Homepage copy panels and cards (specs/home-content-v1.md). Homepage only.
   Card, grid, tag, badge, status and breakpoint rules are copied from the approved
   mock-up (concept/reference/gpt-asta-homepage-v2.html) and mapped to our tokens:
     --cyan -> --primary   --amber -> --accent   --muted -> --text-2
     --line -> --dg-line   --surface -> --bg-2   --text -> --text   --bg -> --bg
   Everything is scoped to .dg-chapters so it cannot collide with the archive cards.
   ========================================================================= */

.digiai-world {
	position: relative;
	--dg-line: rgba(138, 148, 176, 0.18);
}

/* The engine's own copy blocks are replaced by the chapters below. */
.digiai-world .sw-copylayer {
	display: none;
}

/* ---- chapters: real in-flow panels laid over the fixed stage ----------------
   hero.js sets each chapter's top and height so its panel is stuck on screen for
   exactly that scene's rest zone. A panel taller than the screen gets a negative
   sticky top (--dg-sticky-top), so it scrolls through first and then holds. */
.dg-chapters {
	position: absolute;
	inset: 0;
	z-index: 25;
	pointer-events: none;
}

/* Chapters get their top and height from hero.js. Until then they are hidden, so the first
   paint never shifts (Lighthouse CLS 1.0 on phones came from the hero chapter moving). */
.digiai-world:not(.is-placed) .dg-chapter {
	visibility: hidden;
}

.dg-chapter {
	position: absolute;
	left: 0;
	right: 0;
}

.dg-panel {
	position: sticky;
	top: var(--dg-sticky-top, 0px);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	min-height: 100vh;
	min-height: 100svh;
	max-width: 1800px;
	margin: auto;
	padding: 132px var(--hg) 100px;
}

.dg-chapter--hero .dg-panel {
	padding-top: 186px;
	padding-bottom: 130px;
}

.dg-panel__content {
	position: relative;
	width: min(66.666%, 900px);
	opacity: var(--dg-cop, 0);
	pointer-events: var(--dg-pe, none);
}

.dg-chapters svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.dg-chapters h1,
.dg-chapters h2,
.dg-chapters h3,
.dg-chapters p {
	margin: 0;
}

/* ---- text ---- */
.dg-chapters .eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 25px;
	font-size: 12px;
	font-weight: 550;
	letter-spacing: 0.17em;
	text-transform: uppercase;
	color: var(--primary);
}

.dg-chapters .eyebrow::before {
	content: "";
	width: 23px;
	height: 1px;
	background: var(--primary);
}

.dg-chapters .dg-h1 {
	max-width: 850px;
	font-size: clamp(54px, 6.1vw, 96px);
	font-weight: 530;
	line-height: 1.025;
	letter-spacing: -0.065em;
	text-shadow: 0 2px 28px rgba(11, 15, 26, 0.75);
}

.dg-chapters .dg-h1 span {
	display: block;
}

.dg-chapters h2 {
	font-size: clamp(38px, 3.75vw, 60px);
	font-weight: 510;
	line-height: 1.08;
	letter-spacing: -0.052em;
	text-shadow: 0 2px 28px rgba(11, 15, 26, 0.75);
}

.dg-chapters .intro {
	max-width: 580px;
	margin-top: 22px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--text-2);
	text-shadow: 0 1px 16px rgba(11, 15, 26, 0.9);
}

.dg-chapter--hero .intro {
	max-width: 455px;
	margin-top: 28px;
	font-size: 18px;
}

.dg-chapters .proof {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin-top: 31px;
	font-size: 12px;
	color: var(--text-2);
}

.dg-chapters .proof span {
	display: flex;
	align-items: center;
	gap: 9px;
}

.dg-chapters .proof svg {
	width: 16px;
	height: 16px;
	color: var(--text);
}

.dg-chapters .proof span + span {
	padding-left: 24px;
	border-left: 1px solid var(--dg-line);
}

.dg-chapters .button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 35px;
}

.dg-chapters .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	min-height: 50px;
	padding: 0 23px;
	border: 1px solid var(--dg-line);
	border-radius: 6px;
	background: rgba(11, 15, 26, 0.3);
	color: var(--text);
	font-size: 13px;
	font-weight: 550;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.dg-chapters .button.primary {
	color: var(--bg);
	background: var(--primary);
	border-color: var(--primary);
}

.dg-chapters .button.primary:hover {
	background: var(--text);
	border-color: var(--text);
}

.dg-chapters .button.secondary:hover {
	border-color: var(--text-2);
	background: var(--bg-2);
}

.dg-chapters .button svg {
	width: 17px;
	height: 17px;
}

/* ---- section header, grids, cards ---- */
.dg-chapters .section-header {
	max-width: 720px;
}

.dg-chapters .section-header .intro {
	max-width: 590px;
	margin-top: 18px;
}

.dg-chapters .tutorial-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 38px;
}

.dg-chapters .card {
	display: block;
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(138, 148, 176, 0.17);
	border-radius: 0 0 10px 10px;   /* square top: cover frame lines stay whole */
	background: rgba(19, 26, 43, 0.87);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: transform 0.3s, border-color 0.3s;
}

.dg-chapters .card:hover {
	transform: translateY(-4px);
	border-color: rgba(34, 211, 238, 0.42);
}

.dg-chapters .card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.dg-chapters .card-link:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: -2px;
}

.dg-chapters .visual {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1460 / 752;   /* Skool cover ratio, never cropped */
	background: var(--bg);
}

.dg-chapters .visual img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transition: transform 0.6s;
}

.dg-chapters .card:hover .visual img {
	transform: scale(1.035);
}

.dg-chapters .visual::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 30px rgba(11, 15, 26, 0.2);
	pointer-events: none;
}

.dg-chapters .play {
	position: absolute;
	left: 14px;
	bottom: 13px;
	display: grid;
	place-items: center;
	width: 29px;
	height: 29px;
	border: 1px solid rgba(234, 240, 255, 0.3);
	border-radius: 50%;
	background: rgba(11, 15, 26, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.dg-chapters .play svg {
	width: 12px;
	height: 12px;
	margin-left: 1px;
	fill: var(--text);
	stroke: none;
}

.dg-chapters .card-body {
	padding: 20px 18px 16px;
}

.dg-chapters .tool-tag {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.025em;
	color: var(--primary);
}

.dg-chapters .card h3 {
	min-height: 46px;
	margin-top: 10px;
	font-size: 17px;
	font-weight: 520;
	line-height: 1.35;
	letter-spacing: -0.035em;
	color: var(--text);
}

.dg-chapters .card-summary {
	min-height: 45px;
	margin-top: 9px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-2);
}

.dg-chapters .card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 17px;
	padding-top: 15px;
	border-top: 1px solid var(--dg-line);
	font-size: 12px;
	color: var(--text-2);
}

/* Free is muted, Paid uses the same amber as Pro. */
.dg-chapters .access--paid {
	color: var(--accent);
	font-weight: 550;
}

.dg-chapters .prompt-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-width: 790px;
	margin-top: 32px;
}

.dg-chapters .prompt-card .visual {
	aspect-ratio: 1460 / 752;
}

.dg-chapters .prompt-card .card-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 19px 18px;
}

.dg-chapters .prompt-card h3 {
	min-height: 0;
	margin-top: 7px;
	font-size: 17px;
}

.dg-chapters .prompt-card .card-body > svg {
	width: 18px;
	height: 18px;
	color: var(--text-2);
}

.dg-chapters .pro-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 7px;
	border: 1px solid rgba(245, 166, 35, 0.35);
	border-radius: 4px;
	background: rgba(11, 15, 26, 0.84);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--accent);
	font-size: 11px;
	font-weight: 550;
}

.dg-chapters .pro-badge svg {
	width: 11px;
	height: 11px;
}

/* Course cards: cover on top at its own ratio (never cropped, like the cards on /courses/),
   title and text below. Two columns on desktop, one on phones. Changed 2026-10-15: the
   side-by-side layout cropped the cover and cut the title printed on it. */
.dg-chapters .course-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 37px;
}

.dg-chapters .course-card {
	overflow: hidden;
	border: 1px solid var(--dg-line);
	border-radius: 0 0 10px 10px;   /* square top: the cover's own frame line stays whole */
	background: rgba(19, 26, 43, 0.87);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: transform 0.3s, border-color 0.3s;
}

.dg-chapters .course-card:hover {
	transform: translateY(-4px);
	border-color: rgba(34, 211, 238, 0.42);
}

.dg-chapters .course-card .card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.dg-chapters .course-cover {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1460 / 752;   /* Skool cover ratio; another ratio letterboxes on navy */
	/* no cover yet: a quiet gradient in our palette */
	background: linear-gradient(135deg, #16223a 0%, #0f1626 55%, rgba(34, 211, 238, 0.18) 100%);
}

.dg-chapters .course-cover img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	background: var(--bg);
	transition: transform 0.6s;
}

.dg-chapters .course-card:hover .course-cover img {
	transform: scale(1.035);
}

.dg-chapters .course-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	padding: 16px 18px 16px;
}

.dg-chapters .status {
	padding: 6px 9px;
	border: 1px solid rgba(138, 148, 176, 0.3);
	border-radius: 4px;
	font-size: 11px;
	color: var(--text-2);
}

.dg-chapters .status--live_here {
	color: var(--primary);
	border-color: rgba(34, 211, 238, 0.4);
}

.dg-chapters .course-info h3 {
	margin-top: 14px;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.035em;
	color: var(--text);
}

.dg-chapters .course-info p {
	max-width: 290px;
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--text-2);
}

.dg-chapters .course-info .course-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	font-size: 11px;
	color: var(--text-2);
}

.dg-chapters .course-meta svg {
	width: 14px;
	height: 14px;
}

/* "All tutorials ->" under a grid, right aligned. */
.dg-chapters .grid-more {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
	font-size: 13px;
	font-weight: 550;
}

.dg-chapters .grid-more--prompts {
	max-width: 790px;
}

.dg-chapters .grid-more a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--primary);
	text-decoration: none;
}

.dg-chapters .grid-more a:hover {
	color: var(--text);
}

.dg-chapters .grid-more svg {
	width: 15px;
	height: 15px;
}

/* Empty state: no grid, one muted line. */
.dg-chapters .empty-line {
	margin-top: 32px;
	font-size: 14px;
	color: var(--text-2);
}

/* ---- membership ---- */
.dg-chapter--membership h2 {
	font-size: clamp(52px, 5.2vw, 83px);
	letter-spacing: -0.06em;
}

.dg-chapter--membership .intro {
	max-width: 460px;
}

.dg-chapter--membership .eyebrow {
	display: inline-flex;
	margin-bottom: 30px;
	padding: 7px 9px;
	border: 1px solid rgba(245, 166, 35, 0.3);
	border-radius: 5px;
	background: rgba(245, 166, 35, 0.05);
	color: var(--accent);
	font-size: 11px;
	letter-spacing: 0.04em;
}

.dg-chapter--membership .eyebrow::before {
	display: none;
}

.dg-chapter--membership .eyebrow svg {
	width: 13px;
	height: 13px;
}

.dg-chapters .skool-line {
	max-width: 460px;
	margin-top: 18px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--text-2);
}

.dg-chapters .skool-line a {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.dg-chapters .skool-line a:hover {
	color: var(--primary);
}

/* ---- breakpoints, from the mock-up ---- */
@media (min-width: 1600px) {
	.dg-panel__content {
		width: 67%;
	}
}

@media (max-height: 760px) and (min-width: 761px) {
	.dg-panel {
		padding-top: 112px;
		padding-bottom: 75px;
	}

	.dg-chapters .eyebrow {
		margin-bottom: 18px;
	}

	.dg-chapters .dg-h1 {
		font-size: 70px;
	}

	.dg-chapters h2 {
		font-size: 46px;
	}

	.dg-chapters .intro {
		margin-top: 14px;
	}

	.dg-chapters .tutorial-grid {
		margin-top: 27px;
	}

	.dg-chapters .card-body {
		padding-top: 15px;
	}

	.dg-chapters .card-summary {
		min-height: 32px;
	}

	.dg-chapters .prompt-grid {
		margin-top: 23px;
	}

	.dg-chapters .prompt-card .visual {
		aspect-ratio: 1460 / 752;
	}

	.dg-chapters .course-grid {
		margin-top: 24px;
	}
}

@media (max-width: 1100px) and (min-width: 761px) {
	.dg-panel__content {
		width: 76%;
	}

	.dg-chapters .card h3 {
		font-size: 15px;
	}

	.dg-chapters .card-body {
		padding: 16px 13px;
	}

	.dg-chapters .tutorial-grid {
		gap: 12px;
	}

	.dg-chapters .course-info h3 {
		font-size: 15px;
	}
}

@media (max-width: 760px) {
	.dg-panel {
		display: block;
		padding: 92px var(--hg);
	}

	.dg-panel__content {
		width: 100%;
	}

	/* The hero panel stays one screen tall, copy anchored low so it clears the jellyfish bell. */
	.dg-chapter--hero .dg-panel {
		display: flex;
		align-items: flex-end;
		padding-top: 112px;
		padding-bottom: 75px;
	}

	.dg-chapters .dg-h1 {
		max-width: 327px;
		font-size: 51px;
		line-height: 1.075;
	}

	.dg-chapters h2 {
		max-width: 320px;
		font-size: 37px;
		line-height: 1.13;
		letter-spacing: -0.05em;
	}

	.dg-chapter--membership h2 {
		max-width: 300px;
		font-size: 47px;
	}

	.dg-chapters .eyebrow {
		gap: 9px;
		margin-bottom: 24px;
		font-size: 10px;
		letter-spacing: 0.16em;
	}

	.dg-chapters .eyebrow::before {
		width: 18px;
	}

	.dg-chapters .intro {
		margin-top: 20px;
		font-size: 15px;
		line-height: 1.75;
	}

	.dg-chapter--hero .intro {
		max-width: 280px;
		margin-top: 24px;
		font-size: 15px;
		line-height: 1.8;
	}

	.dg-chapters .proof {
		gap: 14px;
		margin-top: 25px;
		font-size: 10px;
	}

	.dg-chapters .proof span {
		gap: 6px;
	}

	.dg-chapters .proof span + span {
		padding-left: 14px;
	}

	.dg-chapters .proof svg {
		width: 13px;
		height: 13px;
	}

	.dg-chapters .button-row {
		flex-wrap: nowrap;
		gap: 9px;
		margin-top: 30px;
	}

	.dg-chapter--membership .button-row {
		flex-wrap: wrap;
	}

	.dg-chapters .button {
		min-height: 48px;
		padding: 0 16px;
		gap: 9px;
		font-size: 11px;
	}

	.dg-chapters .button svg {
		width: 14px;
		height: 14px;
	}

	.dg-chapters .tutorial-grid {
		grid-template-columns: 1fr;
		gap: 24px;
		margin-top: 32px;
	}

	.dg-chapters .card {
		border-radius: 0 0 9px 9px;
		background: var(--bg-2);
	}

	.dg-chapters .card-body {
		padding: 21px;
	}

	.dg-chapters .card h3 {
		min-height: 0;
		margin-top: 11px;
		font-size: 20px;
	}

	.dg-chapters .card-summary {
		min-height: 0;
		margin-top: 10px;
	}

	.dg-chapters .card-meta {
		margin-top: 22px;
		padding-top: 17px;
		font-size: 11px;
	}

	.dg-chapters .play {
		left: 17px;
		bottom: 16px;
		width: 33px;
		height: 33px;
	}

	.dg-chapters .prompt-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-top: 33px;
	}

	.dg-chapters .prompt-card .visual {
		aspect-ratio: 1460 / 752;
	}

	.dg-chapters .prompt-card .card-body {
		padding: 19px 21px 22px;
	}

	.dg-chapters .prompt-card h3 {
		margin-top: 9px;
		font-size: 20px;
	}

	.dg-chapters .pro-badge {
		top: 14px;
		right: 14px;
		padding: 6px 9px;
		font-size: 12px;
	}

	.dg-chapters .course-grid {
		grid-template-columns: 1fr;
		margin-top: 32px;
	}

	.dg-chapters .course-card {
		background: var(--bg-2);
	}

	/* Cards are solid on a phone, so a live blur behind them shows nothing, but every blurred
	   card is its own GPU layer over the playing videos. Phones drop it (2026-10-14). */
	.dg-chapters .card,
	.dg-chapters .course-card,
	.dg-chapters .pro-badge,
	.dg-chapters .play {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.dg-chapters .course-info {
		padding: 21px;
	}

	.dg-chapters .course-info h3 {
		font-size: 20px;
	}
}
