/*
 * Lempar — Akademi content styles.
 *
 * The Beranda, "Apa itu ultimate frisbee" and Kurikulum pages carry
 * hand-authored `ak-*` classes in their own post content (they came from the
 * old frisbeedotid theme's patterns and are simply text in the database now),
 * so — per lempar_content_stylesheets() in functions.php — this theme is
 * responsible for styling them. The file loads only on the singular pages
 * whose content actually contains `ak-`.
 *
 * Scope: everything the OLD theme owned outright. A handful of classes the
 * wp-frisbee-academy plugin already styles (.ak-chip, .ak-course-card,
 * .ak-curriculum, .ak-toggle and friends) are deliberately left alone here —
 * styling them again would fight the plugin's own CSS.
 *
 * A note on selectors: the real post content nests each section's text in
 * BEM-style children (`ak-hero__title`, `ak-stat__n`, `ak-cta__eyebrow`…)
 * that the old theme's pattern files still emit. Rather than leave that text
 * unstyled, every rule below is scoped under one of this theme's owned
 * classes and reaches those children either by their real class name or,
 * where the markup is simple enough (an eyebrow, a badge, a body paragraph),
 * by tag and position — so a future pattern that drops the BEM suffixes
 * keeps working without a rewrite. See the end-of-task report for the exact
 * classes this file does and does not reach.
 */

/* -------------------------------------------------------------------------
 * 1. Hero
 *
 * Three pages use `.ak-hero`, in two shapes: Beranda and the explainer page
 * wrap a two-column grid (copy + a visual card) built from `ak-hero__*`
 * parts; the Kurikulum page is a plain header with an eyebrow, an `.ak-h1`
 * and an unclassed lead paragraph. Both shapes are handled here.
 * ---------------------------------------------------------------------- */

.ak-hero {
	box-sizing: border-box;
	padding: clamp(var(--wp--preset--spacing--70), 10vw, calc(var(--wp--preset--spacing--70) * 2)) var(--wp--preset--spacing--50) var(--wp--preset--spacing--70);
	background-color: var(--wp--preset--color--base);
}

/* The two-column layout: hero copy alongside the visual card. */
.ak-hero__grid {
	display: grid;
	align-items: center;
	gap: var(--wp--preset--spacing--70);
	grid-template-columns: 1.1fr 1fr;
}

/* One big display headline, whichever element carries it (`ak-h1` on the
   simple Kurikulum header, `ak-hero__title` on the two richer heroes). */
.ak-hero h1 {
	font-size: var(--wp--preset--font-size--display);
	line-height: 0.98;
}

.ak-hero h1 em {
	color: var(--wp--preset--color--accent);
	font-style: italic;
}

/* Eyebrow label, however it's nested. */
.ak-hero__eyebrow {
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: none;
}

/*
 * Lead paragraph. On Kurikulum it's a plain, unclassed <p> as a direct child
 * of .ak-hero — excluding .ak-eyebrow keeps that rule from also catching the
 * eyebrow paragraph, which is a direct child there too.
 */
.ak-hero__lead,
.ak-hero > p:not(.ak-eyebrow) {
	margin-top: var(--wp--preset--spacing--40);
	max-width: 34rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.ak-hero__ctas {
	margin-top: var(--wp--preset--spacing--60);
}

@media (max-width: 899px) {
	.ak-hero__grid {
		grid-template-columns: 1fr;
	}

	/*
	 * The page's column, which lempar.css's phone size for `ak-hero__title`
	 * measures (T-577). Not the hero itself: its padding would make the title
	 * smaller than the homepage's. None from 900px, where the title stays
	 * the display size beside its card.
	 */
	.wp-block-post-content:has(> .ak-hero) {
		container-type: inline-size;
	}
}

/* -------------------------------------------------------------------------
 * 2. Stat strip
 *
 * `.ak-stat` always wraps exactly two lines — a number then a label — as
 * either `ak-stat__n`/`ak-stat__l` paragraphs today or, going forward, any
 * two plain children. Styling by position instead of those class names
 * makes the tile-with-a-big-number-over-a-muted-label look survive either
 * shape; this is the fix for the flat, unstyled stat list on the homepage.
 * ---------------------------------------------------------------------- */

.ak-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--line);
}

/*
 * The row is a block group, so core's flow layout hands every tile but the
 * first an 18px block margin. Stacked that is invisible; in a horizontal flex
 * row it drops the later tiles by exactly that much and the big numbers stop
 * lining up. The row spaces itself with `gap`, so the margins go.
 */
.ak-stats > * {
	margin-block: 0;
}

.ak-stat {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.ak-stat > :first-child {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 900;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.ak-stat > :last-child {
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: none;
}

/* -------------------------------------------------------------------------
 * 3. Hero / field visual card
 *
 * `.ak-visual` wraps a raised, dark card that frames an inline SVG diagram —
 * a playbook sketch on Beranda, a field plan (via `.ak-field`) on the
 * explainer page — plus a badge, a caption and, on Beranda only, a spinning
 * disc and a corner tag. The SVGs size themselves off the card, never the
 * viewport, so they can never push the layout wider than its column.
 * ---------------------------------------------------------------------- */

.ak-visual {
	position: relative;
}

.ak-visual__card {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
	/* Ink in light; in dark the raised surface, not the light ink (T-398). The diagrams in the content are drawn in cream for a dark card. */
	background-color: light-dark(var(--wp--preset--color--contrast), var(--wp--preset--color--surface-raised));
	box-shadow: var(--wp--preset--shadow--card);
}

/* The diagram itself — whether it's the raw SVG (Beranda) or wrapped in
   .ak-field (explainer page) — always fills the card without overflowing it. */
.ak-visual__card > svg,
.ak-field {
	position: absolute;
	inset: 0;
}

.ak-field {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--40);
}

.ak-visual__card > svg,
.ak-field svg {
	display: block;
	width: 100%;
	height: 100%;
}

.ak-visual__badge {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.25rem 0.625rem;
	background-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--highlight-contrast);
	font-size: 0.6875rem;
	font-weight: 800;
	text-transform: none;
}

.ak-visual__caption {
	position: absolute;
	left: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	bottom: var(--wp--preset--spacing--30);
}

.ak-visual__caption-k {
	color: var(--wp--preset--color--highlight);
	font-size: 0.6875rem;
	font-weight: 800;
	text-transform: none;
}

.ak-visual__caption-t {
	margin-top: 0.1875rem;
	color: light-dark(var(--wp--preset--color--base), var(--wp--preset--color--contrast));
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	line-height: 1.15;
}

/* Spinning disc, overlapping the card's top-left corner (Beranda only).
   The sitewide prefers-reduced-motion rule in lempar.css already zeroes out
   this animation's duration, so no local override is needed here. */
.ak-visual__disc {
	position: absolute;
	top: -1.25rem;
	left: -1.25rem;
	width: 4.75rem;
	height: 4.75rem;
	border: 3px solid var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--spirit);
	animation: ak-disc-spin 8s linear infinite;
}

@keyframes ak-disc-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Corner tag, overlapping the card's bottom-right edge (Beranda only). */
.ak-visual__tag {
	position: absolute;
	right: -1.25rem;
	bottom: -0.875rem;
	border-radius: var(--wp--custom--radius--small);
	padding: 0.75rem 1.125rem;
	background-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--highlight-contrast);
	box-shadow: var(--wp--preset--shadow--card);
	font-weight: 800;
	font-size: 0.875rem;
}

/*
 * The tag sits over the card's bottom edge, and its part inside the card
 * (its height less the 0.875rem below) covered the caption's last line:
 * "Vertical stack — lihat t…" at 390 (Academy's reading, 2026-10-17). So
 * where a tag is, the caption starts above it.
 */
.ak-visual:has(> .ak-visual__tag) .ak-visual__caption {
	bottom: calc(1.5rem + 0.875rem * 1.6 - 0.875rem + var(--wp--preset--spacing--30));
}

@media (max-width: 520px) {
	/* Overlapping badges would clip against the viewport edge this narrow. */
	.ak-visual__disc,
	.ak-visual__tag {
		right: 0;
		left: auto;
	}

	.ak-visual__disc {
		left: 0;
		right: auto;
	}
}

/* -------------------------------------------------------------------------
 * 4. Shared section primitives
 *
 * The eyebrow/heading pair that opens most sections, and the two layouts it
 * appears in: centred (`ak-center-head`) or split with a button
 * (`ak-section-head`). `.ak-eyebrow` also covers the CTA and Spirit bands'
 * own eyebrow-shaped text, which reuse the same look under a different name.
 * ---------------------------------------------------------------------- */

.ak-eyebrow,
.ak-cta__eyebrow,
.ak-spirit__eyebrow {
	color: var(--wp--preset--color--accent);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: none;
}

.ak-h2,
.ak-cta__title {
	margin-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.05;
}

.ak-center-head {
	margin: 0 auto var(--wp--preset--spacing--70);
	max-width: 40rem;
	text-align: center;
}

.ak-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--70);
}

.ak-section-head__sub {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--medium);
}

/* -------------------------------------------------------------------------
 * 5. Section wrappers
 *
 * Every `ak-section--*` is a full-bleed band; the constrained content sizes
 * from theme.json's layout settings keep the grids inside them from ever
 * running edge to edge on wide viewports.
 * ---------------------------------------------------------------------- */

.ak-section--modes,
.ak-section--curriculum,
.ak-section--why,
.ak-section--rules,
.ak-section--start {
	padding: clamp(var(--wp--preset--spacing--70), 8vw, calc(var(--wp--preset--spacing--70) * 1.7)) var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--base);
}

/* The Spirit band gets a faint teal wash to read as its own moment without
   a new colour outside the token set — a tint mixed from existing tokens. */
.ak-section--spirit {
	padding: clamp(var(--wp--preset--spacing--60), 7vw, calc(var(--wp--preset--spacing--70) * 1.4)) var(--wp--preset--spacing--50);
	background-color: color-mix(in srgb, var(--wp--preset--color--spirit) 10%, var(--wp--preset--color--surface));
}

/* The closing CTA reuses the site's own teal "feature" treatment. */
.ak-section--cta {
	padding: clamp(var(--wp--preset--spacing--70), 8vw, calc(var(--wp--preset--spacing--70) * 1.7)) var(--wp--preset--spacing--50);
	/* In dark, the dark teal of lempar's feature style, with the page's ink (T-398). */
	background-color: light-dark(var(--wp--preset--color--spirit), color-mix(in srgb, var(--wp--preset--color--spirit) 15%, var(--wp--preset--color--surface)));
	color: light-dark(var(--wp--preset--color--spirit-contrast), var(--wp--preset--color--contrast));
	text-align: center;
}

/* -------------------------------------------------------------------------
 * 6. Practice modes grid
 * ---------------------------------------------------------------------- */

.ak-modes-grid {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	max-width: 60rem;
	margin: 0 auto;
}

.ak-mode-card {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

.ak-mode-card svg {
	width: 2rem;
	height: 2rem;
}

.ak-mode-card h3 {
	margin-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
}

.ak-mode-card p {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}

/* The tag row, however it's wrapped. */
.ak-mode-card > div:last-child {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--40);
}

/* Dark variant — an ink card with a decorative ring behind its icon; in dark, the raised surface and the page's ink (T-398). */
.ak-mode-card--dark {
	position: relative;
	overflow: hidden;
	background-color: light-dark(var(--wp--preset--color--contrast), var(--wp--preset--color--surface-raised));
	color: light-dark(var(--wp--preset--color--base), var(--wp--preset--color--contrast));
}

.ak-mode-card--dark h3 {
	color: inherit;
}

.ak-mode-card--dark p {
	color: light-dark(color-mix(in srgb, var(--wp--preset--color--base) 75%, transparent), color-mix(in srgb, var(--wp--preset--color--contrast) 80%, var(--wp--preset--color--surface-raised)));
}

.ak-mode-card--dark svg {
	stroke: var(--wp--preset--color--highlight);
}

/* The decorative ring graphic sits behind the content, faded. */
.ak-mode-card--dark > div:first-child {
	position: absolute;
	top: -1.875rem;
	right: -1.875rem;
	width: 10rem;
	height: 10rem;
	opacity: 0.12;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * 7. Tags / chips
 * ---------------------------------------------------------------------- */

.ak-tag {
	display: inline-block;
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.25rem 0.625rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: none;
}

/* On the dark mode card, a translucent cream chip. */
.ak-tag--cream {
	background-color: light-dark(color-mix(in srgb, var(--wp--preset--color--base) 16%, transparent), color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent));
	color: light-dark(var(--wp--preset--color--base), var(--wp--preset--color--contrast));
}

/* On the light mode card, a soft teal chip. */
.ak-tag--teal {
	background-color: color-mix(in srgb, var(--wp--preset--color--spirit) 16%, var(--wp--preset--color--surface));
	color: color-mix(in srgb, var(--wp--preset--color--spirit) 60%, var(--wp--preset--color--contrast));
}

/* -------------------------------------------------------------------------
 * 8. Curriculum module tiles
 *
 * Rendered server-side by the wp-frisbee-academy `course-modules` block
 * (blocks/course-modules/render.php); the plugin's own CSS explicitly
 * leaves `.ak-module-grid`/`.ak-module-card` to the theme. The block prints
 * nothing when the site has no course content yet — confirmed against the
 * plugin's source rather than the (currently empty) rendered markup.
 * ---------------------------------------------------------------------- */

.ak-module-grid {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.ak-module-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	min-height: 11rem;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--small);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Module number badge — the card's first child. A single accent colour
   replaces the old theme's five-way hue rotation per module slot. */
.ak-module-card > p:first-child {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
	font-weight: 800;
}

.ak-module-card h3 {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
}

.ak-module-card h3 a {
	color: inherit;
	text-decoration: none;
}

/*
 * The whole tile opens the course (Academy's reading at 390, 2026-10-17:
 * only the module's name was the link, 19px of plain bold text, and nothing
 * said the tile opened anything). The name's link is stretched over the
 * tile, so a tap anywhere on it follows the link, one link for a screen
 * reader still; a chevron after the name says it goes somewhere, as a
 * linked row's does; the tile takes the hover and the focus ring, the link
 * inside it gives up its own.
 */
.ak-module-card {
	position: relative;
}

.ak-module-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.ak-module-card h3::after {
	content: "";
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-inline-start: 0.5rem;
	border-right: 2px solid var(--wp--preset--color--muted);
	border-bottom: 2px solid var(--wp--preset--color--muted);
	vertical-align: 0.1em;
	transform: rotate(-45deg);
}

.ak-module-card:has(h3 a:hover) {
	box-shadow: var(--wp--preset--shadow--card), inset 0 0 0 2px var(--wp--preset--color--line);
}

.ak-module-card:has(h3 a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.ak-module-card h3 a:focus-visible {
	outline: none;
}

/* Week span, directly under the module name. */
.ak-module-card > div p {
	margin-top: 0.25rem;
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
}

/* Description — the card's last paragraph, when present. The :not() guard
   keeps this from also matching the number badge on a card with no
   description, since that badge would then be the only <p>. */
.ak-module-card > p:last-child:not(:first-child) {
	margin-top: auto;
	color: var(--wp--preset--color--muted);
	font-size: 0.8125rem;
	line-height: 1.45;
}

/* -------------------------------------------------------------------------
 * 9. Spirit band
 * ---------------------------------------------------------------------- */

.ak-spirit__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--70);
	max-width: 60rem;
	margin: 0 auto;
}

.ak-spirit__img {
	flex: none;
	width: 7.5rem;
	margin: 0;
}

.ak-spirit__img img {
	display: block;
	width: 100%;
	height: auto;
}

.ak-spirit__body {
	flex: 1 1 16rem;
}

.ak-spirit__quote {
	margin-top: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	font-style: italic;
	line-height: 1.15;
}

/* -------------------------------------------------------------------------
 * 10. Why-play grid
 * ---------------------------------------------------------------------- */

.ak-why-grid {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	max-width: 72rem;
	margin: 0 auto;
}

.ak-why-card {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Kicker — the card's opening line ("1 disc", "Mixed", "0 wasit"…). */
.ak-why-card > p:first-child {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 900;
	line-height: 1;
}

.ak-why-card h3 {
	margin-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
}

.ak-why-card > p:last-child:not(:first-child) {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}

/* -------------------------------------------------------------------------
 * 11. The ten rules
 * ---------------------------------------------------------------------- */

.ak-rules-grid {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	grid-template-columns: 1fr;
	max-width: 72rem;
	margin: 0 auto;
}

.ak-rule {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 3rem 1fr;
	gap: 0.25rem var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Numbered badge — spans both text rows, aligned to the top. */
.ak-rule > p:first-child {
	grid-row: span 2;
	align-self: start;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}

.ak-rule h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
}

.ak-rule > p:last-child:not(:first-child) {
	margin-top: 0.375rem;
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}

.ak-rule em {
	color: color-mix(in srgb, var(--wp--preset--color--spirit) 70%, var(--wp--preset--color--contrast));
	font-style: normal;
	font-weight: 700;
}

/* Rule ten is the capstone: dark, full width, gold badge. In dark, the raised surface and the page's ink (T-398). */
.ak-rule--spirit {
	background-color: light-dark(var(--wp--preset--color--contrast), var(--wp--preset--color--surface-raised));
	color: light-dark(var(--wp--preset--color--base), var(--wp--preset--color--contrast));
}

.ak-rule--spirit > p:first-child {
	background-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--highlight-contrast);
}

.ak-rule--spirit h3 {
	color: light-dark(var(--wp--preset--color--base), var(--wp--preset--color--contrast));
}

.ak-rule--spirit > p:last-child:not(:first-child) {
	color: light-dark(color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent), color-mix(in srgb, var(--wp--preset--color--contrast) 80%, var(--wp--preset--color--surface-raised)));
}

.ak-rule--spirit em {
	color: var(--wp--preset--color--highlight);
}

@media (min-width: 900px) {
	.ak-rules-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ak-rule--spirit {
		grid-column: 1 / -1;
	}
}

@media (max-width: 480px) {
	.ak-rule {
		grid-template-columns: 1fr;
	}

	.ak-rule > p:first-child {
		grid-row: auto;
	}
}

/* -------------------------------------------------------------------------
 * 12. Getting-started kit
 *
 * A simple accent-topped list rather than a full card — it sits inside a
 * section that's already doing the "cards" job elsewhere on the page.
 * ---------------------------------------------------------------------- */

.ak-start-grid {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	max-width: 72rem;
	margin: 0 auto;
}

.ak-start-item {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 3px solid var(--wp--preset--color--accent);
}

.ak-start-item h3 {
	font-size: var(--wp--preset--font-size--medium);
}

.ak-start-item p {
	margin-top: 0.375rem;
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * 13. Closing CTA band
 * ---------------------------------------------------------------------- */

.ak-cta__inner {
	max-width: 44rem;
	margin: 0 auto;
}

.ak-cta__text {
	margin-top: var(--wp--preset--spacing--40);
	color: light-dark(color-mix(in srgb, var(--wp--preset--color--spirit-contrast) 82%, transparent), color-mix(in srgb, var(--wp--preset--color--contrast) 82%, transparent));
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.ak-cta__ctas {
	justify-content: center;
	margin-top: var(--wp--preset--spacing--60);
}

/* -------------------------------------------------------------------------
 * 14. Buttons
 * ---------------------------------------------------------------------- */

.ak-btn-primary.wp-block-button .wp-block-button__link {
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
	font-weight: 800;
}

/* A mouse hover only: a tap leaves the button as it was (T-440). */
@media (hover: hover) {
	.ak-btn-primary.wp-block-button .wp-block-button__link:hover {
		background-color: color-mix(in srgb, var(--wp--preset--color--accent) 85%, var(--wp--preset--color--contrast));
	}
}

.ak-btn-outline.wp-block-button .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--pill);
	background-color: transparent;
	color: var(--wp--preset--color--contrast);
	font-weight: 800;
}

/* A mouse hover only: a tap leaves the button as it was (T-440). */
@media (hover: hover) {
	.ak-btn-outline.wp-block-button .wp-block-button__link:hover {
		background-color: var(--wp--preset--color--contrast);
		color: var(--wp--preset--color--base);
	}
}

/* Gold and ghost buttons only ever appear on the dark/teal CTA band. */
.ak-btn-gold.wp-block-button .wp-block-button__link {
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--highlight-contrast);
	font-weight: 800;
}

/* A mouse hover only: a tap leaves the button as it was (T-440). */
@media (hover: hover) {
	.ak-btn-gold.wp-block-button .wp-block-button__link:hover {
		background-color: color-mix(in srgb, var(--wp--preset--color--highlight) 85%, var(--wp--preset--color--base));
	}
}

.ak-btn-ghost.wp-block-button .wp-block-button__link {
	border: 2px solid currentColor;
	border-radius: var(--wp--custom--radius--pill);
	background-color: transparent;
	color: inherit;
	font-weight: 800;
}

/* A mouse hover only: a tap leaves the button as it was (T-440). */
@media (hover: hover) {
	.ak-btn-ghost.wp-block-button .wp-block-button__link:hover {
		background-color: color-mix(in srgb, var(--wp--preset--color--spirit-contrast) 14%, transparent);
	}
}

.ak-btn--sm.wp-block-button .wp-block-button__link {
	padding: 0.75rem 1.25rem;
	font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
 * 15. Legacy Akademi footer
 *
 * `.ak-footer` was the old theme's own Beranda-only footer pattern
 * (patterns/footer-akademi.php). No page on the current site inserts it —
 * Lempar's sitewide footer template part uses `.lempar-footer` instead — but
 * the class is kept styled here in case the pattern is ever revived, since
 * `ak-` in any page's content is enough to load this stylesheet.
 * ---------------------------------------------------------------------- */

.ak-footer {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.ak-footer__grid {
	display: grid;
	gap: var(--wp--preset--spacing--60);
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	max-width: 72rem;
	margin: 0 auto;
}

.ak-footer__brandrow {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--30);
}

.ak-footer__name {
	font-family: var(--wp--preset--font-family--nunito);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 900;
}

.ak-footer__name span {
	color: var(--wp--preset--color--highlight);
}

.ak-footer__quote {
	max-width: 20rem;
	font-size: var(--wp--preset--font-size--large);
	font-style: italic;
}

.ak-footer__sub {
	margin-top: var(--wp--preset--spacing--20);
	color: color-mix(in srgb, var(--wp--preset--color--base) 65%, transparent);
	font-size: 0.8125rem;
}

.ak-footer__coltitle {
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--highlight);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: none;
}

.ak-footer__item {
	margin-bottom: var(--wp--preset--spacing--20);
}

.ak-footer__link {
	color: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent);
	font-size: 0.875rem;
	text-decoration: none;
}

.ak-footer__link:hover {
	color: var(--wp--preset--color--highlight);
}

.ak-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	max-width: 72rem;
	margin: var(--wp--preset--spacing--70) auto 0;
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--base) 12%, transparent);
	color: color-mix(in srgb, var(--wp--preset--color--base) 55%, transparent);
	font-size: 0.75rem;
}

/*
 * `ak-visual__pattern` is deliberately left unstyled.
 *
 * In the old theme it carried a batik texture (kawung.svg at 8% opacity). The
 * concept this theme implements drops that texture entirely — it sets no block
 * image and builds the hero from type on the flat cream ground — so importing
 * the asset back would contradict the design rather than complete it. The
 * element stays in the content as an empty, zero-height div.
 */
