/*
 * Home page sections. Loaded on the front page only. Colours: tokens from
 * style.css only. Bands (2026-10-21): hero (frame, red), mission (section,
 * brown), counters (section, ruled), curriculum (surface-alt, cream), School
 * life (section), LINE (frame). On the section brown: white text 8.5:1, gold
 * accents and focus rings 5.4:1.
 */

.site-main--home {
	max-width: none;
	padding: 0;
}

.home-hero__inner,
.home-mission__inner,
.home-counters__list,
.home-curriculum__inner,
.home-instagram__inner,
.home-line__inner {
	margin-inline: auto;
	padding-inline: var(--space);
}

/* Hero — text-only on the dark colour until a photo is set; with a photo, the
   photo fills the band behind the text (see "Hero photo" below). */
.home-hero {
	position: relative;
	overflow: hidden;
	background: var(--color-frame);
	color: var(--color-on-dark);
	padding-block: clamp(3rem, 9vw, 6.5rem);
}

/* Organic shapes (inc/shapes.php): palette colours, decoration only, behind
   the text. The red blob stays clear of the title and far from the LINE
   button: in the top corner on phones, bottom right on wide screens. */
.shape {
	display: block;
	pointer-events: none;
}

.home-hero__loop,
.home-hero__blob {
	position: absolute;
	height: auto;
}

.home-hero__loop {
	top: -6rem;
	right: -5rem;
	width: clamp(14rem, 40vw, 30rem);
	color: var(--color-accent);
	opacity: 0.5;
}

.home-hero__loop path {
	stroke-width: 2px;
	vector-effect: non-scaling-stroke;
}

.home-hero__blob {
	top: -1.25rem;
	right: 1.5rem;
	width: 4.5rem;
	color: var(--color-primary);
	opacity: 0.9;
}

@media (min-width: 48em) {
	.home-hero__blob {
		top: auto;
		bottom: clamp(1.5rem, 4vw, 3rem);
		right: max(var(--space), calc((100% - var(--content-width)) / 2));
		width: clamp(5rem, 9vw, 7.5rem);
	}
}

.home-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 2rem;
	max-width: var(--content-width);
}

/* Hero photo (layout approved 2026-10-17): photo on top, text below on the
   dark band, at every width. The photo box shows the photo's top 80 %
   (2048×1090: the bottom fifth cut, every child's face inside) and its bottom
   fades into the dark band ("brown shadow"). The img is the whole photo
   (125 % of the box), so the desktop parallax can slide it up inside the box
   without ever showing an edge.
   Phones and portrait screens: the box is full width.
   Landscape screens from 48em: the hero is one viewport tall below the header
   (plus the cloud divider's room at the bottom), the text takes what it needs
   and the photo the rest: it keeps its ratio and centres, its sides fading into
   the dark; only on near-square screens, where that ratio would be wider than
   the screen, do its sides crop (slightly). */
.home-hero--media {
	--header-h: 5.5625rem; /* the header on wide screens (89 px) */
	--hero-tail: clamp(2.25rem, 5vw, 4rem); /* = the cloud divider's height */
	padding-block: 0 calc(var(--hero-tail) + 1.5rem);
}

.home-hero__media {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 2048 / 1090;
	margin-inline: auto;
}

.home-hero__media img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 125%;
	object-fit: cover;
	object-position: 50% 0;
}

.home-hero__media::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 22%;
	background: linear-gradient(
		180deg,
		transparent 0%,
		color-mix(in srgb, var(--color-frame) 65%, transparent) 55%,
		var(--color-frame) 100%
	);
}

.home-hero--media .home-hero__inner {
	padding-top: 1.25rem;
}

@media (min-width: 48em) and (min-aspect-ratio: 5/4) {
	.home-hero--media {
		display: grid;
		grid-template-rows: minmax(0, 1fr) auto;
		height: calc(100svh - var(--header-h) + var(--hero-tail));
		min-height: 32rem;
	}

	.home-hero__media {
		width: auto;
		max-width: 100%;
		height: 100%;
	}

	/* Sides fade into the dark band (the box is narrower than the screen). */
	.home-hero__media::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
		background: linear-gradient(
			90deg,
			var(--color-frame) 0%,
			transparent 7%,
			transparent 93%,
			var(--color-frame) 100%
		);
	}

	.home-hero--media .home-hero__inner {
		width: 100%;
		padding-top: 0.5rem;
	}
}

/* Wide screens: titles left, actions right (bottom-aligned). */
@media (min-width: 56em) {
	.home-hero__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		column-gap: 3rem;
	}
}

.home-hero__title {
	margin: 0;
	font-size: clamp(1.75rem, 1rem + 3.4vw, 3.25rem);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.02em;
	word-break: keep-all;     /* break only at the <wbr> marks */
	overflow-wrap: anywhere;  /* … unless a part is still too wide */
}

.home-hero__sub {
	margin: 0.75rem 0 0;
	font-family: var(--font-latin); /* Latin in Outfit; the katakana name falls through to the system font */
	color: var(--color-accent); /* on the frame 5.7:1 */
	font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
	letter-spacing: 0.08em;
	word-break: keep-all;    /* break only at the <wbr> marks */
	overflow-wrap: anywhere;
}

.home-hero__tagline {
	display: inline-block;
	margin: 1.5rem 0 0;
	padding-top: 0.75rem;
	border-top: 3px solid var(--color-accent);
	font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.125rem);
}

/* LINE (the main action) first, then Instagram (secondary, outline). */
.home-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

@media (min-width: 56em) {
	.home-hero__actions {
		align-items: stretch;
	}
}

/* Instagram button: white outline + Instagram's white glyph on the red band
   (9.0:1). Tap target 44 px. */
.instagram-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 1.25rem;
	border: 2px solid var(--color-on-dark);
	border-radius: 999px;
	color: var(--color-on-dark);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.instagram-button:hover {
	background: color-mix(in srgb, var(--color-on-dark) 14%, transparent);
	color: var(--color-on-dark);
}

.instagram-button__glyph {
	flex: none;
	display: block;
	width: 29px;
	height: 29px;
}

.home-hero :focus-visible {
	outline-color: var(--color-accent);
}



/* Mission — the page's own content. A drawn wave marks the heading (drawn on
   scroll by front-page.js; complete without JS). The heading and paragraphs
   fade in at the end of the photo stack sequence (front-page.js; the
   paragraphs only while the hero photo, the LCP element, exists). */
.home-mission {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	overflow: clip; /* clips like hidden, but lets the stack stick (below) */
	background: var(--color-section);
	color: var(--color-on-dark); /* 8.5:1 */
	padding-block: clamp(3rem, 8vw, 5.5rem);
}

.home-mission .entry-content h2 {
	color: var(--color-on-dark);
}

.home-mission a {
	color: var(--color-on-dark);
}

.home-mission :focus-visible,
.home-counters :focus-visible,
.home-instagram :focus-visible {
	outline-color: var(--color-accent);
}

.home-mission__inner {
	max-width: var(--text-width);
}

/* Mission photo stack (victoryis_mission_stack(), 2026-10-21): three
   polaroids fanned inside a crayon frame with doodles. Phones and tablets:
   the stack, then the heading, then the paragraphs (visual order only: the
   heading stays first in the DOM; the text wrapper steps aside with
   display: contents and the stack moves up with order). From 76em: text
   left, stack right. The stack box has a fixed ratio (1:1), so nothing moves
   when the photos load or the cards animate (transforms only).
   Sizes are fluid at every width (2026-10-21): gutters 3vw (1rem to 4rem);
   in one column the stack fills the text column's width up to 72vh (so it
   fits while held at 18 %). The switch to two columns is at 76em, where the
   two-column stack is about as big as the one-column one, so it doesn't jump;
   the hanging heading then grows in over 76em–80em (--hang). */
.home-mission__inner--photo {
	--hang: 0rem;
	--gutter: clamp(1rem, 3vw, 4rem);
	display: grid;
	max-width: calc(min(var(--text-width), 44rem) + 2 * var(--gutter)); /* ≤ 44 Japanese characters */
	padding-inline: var(--gutter);
}

@media (max-width: 75.99em) {
	.home-mission__inner--photo .home-mission__text {
		display: contents;
	}

	.home-mission__inner--photo .mission-stack-track {
		order: -1;
		margin-bottom: 2rem;
	}
}

.mission-stack-track {
	width: 100%;
	max-width: min(100%, 72vh);
	margin-inline: auto;
}

.mission-stack {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	/* Not clipped: the cards come in from below the screen (front-page.js);
	   the section clips them at its own edges. */
}

.mission-stack__doodles {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	color: var(--color-accent);
}

.doodle--light {
	color: var(--color-on-dark);
}

.doodle--frame--light {
	opacity: 0.55;
}

.doodle {
	stroke-dasharray: 1;
}

/* A polaroid: white card (the photo's own ratio: 4:3 in front, 3:2 behind,
   no face cropped), a thick bottom edge, a strip of tape in a palette
   colour. Fanned by --tilt (front-page.js reads it to fan them in). */
.polaroid {
	position: absolute;
	width: 60%;
	margin: 0;
	padding: 3% 3% 10%;
	background: var(--color-surface);
	box-shadow: 0 0.4rem 1.1rem color-mix(in srgb, var(--color-dark) 55%, transparent);
}

.polaroid img {
	display: block;
	width: 100%;
	height: auto;
}

.polaroid--1 {
	z-index: 3;
	top: 36%;
	left: 20%;
	--tilt: -3deg;
	rotate: var(--tilt);
}

.polaroid--2 {
	z-index: 2;
	top: 11%;
	left: 34%;
	--tilt: 7deg;
	rotate: var(--tilt);
}

.polaroid--3 {
	z-index: 1;
	top: 18%;
	left: 6%;
	--tilt: -8deg;
	rotate: var(--tilt);
}

.polaroid__tape {
	position: absolute;
	top: min(-0.55rem, -4%);
	left: 50%;
	width: 34%;
	height: max(1.25rem, 9%); /* of the card: grows with a large stack */
	translate: -50% 0;
	rotate: -4deg;
	background: color-mix(in srgb, var(--color-accent) 80%, transparent);
}

.polaroid--2 .polaroid__tape {
	rotate: 5deg;
	background: color-mix(in srgb, var(--color-border) 90%, transparent);
}

.polaroid--3 .polaroid__tape {
	rotate: -2deg;
	background: color-mix(in srgb, var(--color-primary) 70%, transparent);
}

/* From 76em the section scales with the page (2026-10-21): a wide container
   (up to 120rem) with small gutters; the text keeps a readable measure
   (35–40 Japanese characters per line at 16px: 35rem to 40rem as the screen
   widens) and the stack takes the rest of the width, capped at 72% of the
   screen height so it always fits while held (caught at 18% from the top). */
@media (min-width: 76em) {
	.home-mission__inner--photo {
		--hang: clamp(0rem, (100vw - 76rem) * 0.75, 3rem); /* 0 at 76em, 3rem from 80em */
		grid-template-columns: clamp(35rem, 27rem + 10vw, 40rem) minmax(0, 1fr);
		gap: clamp(2rem, 2.5vw, 4rem);
		align-items: center;
		max-width: 120rem;
		padding-inline: calc(var(--gutter) + var(--hang)) var(--gutter); /* start: room for the hanging heading */
	}

	.home-mission__inner--photo .mission-stack-track {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
	}

	.home-mission__inner--photo .home-mission__text {
		grid-column: 1;
		grid-row: 1;
	}
}

/* The pin (front-page.js builds the stack while it holds): CSS sticky, so
   the browser keeps it in place without any layout shift. Wide: the whole
   content (text + stack) sticks for 100vh of scrolling; narrower: only the
   stack, for 60vh. The run elements are that room; they exist only with JS
   and motion (no JS, reduced motion: no pin, no extra room). --pin-top
   (front-page.js) catches the stack's top at 18 % of the screen. */
.home-mission__run,
.mission-stack__run {
	height: 0;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 76em) {
	.js .home-mission__inner--photo {
		position: sticky;
		top: var(--pin-top, 18vh);
	}

	.js .home-mission__run {
		height: 100vh;
	}
}

@media (prefers-reduced-motion: no-preference) and (max-width: 75.99em) {
	.js .mission-stack {
		position: sticky;
		top: var(--pin-top, 18vh);
	}

	.js .mission-stack__run {
		height: 60vh;
	}
}

.home-mission__wave {
	width: 9rem;
	height: auto;
	margin: 0 0 0.75rem;
	color: var(--color-accent);
}

/* Offset: wave and heading hang left of the text column (--hang: 3rem from
   64em without photos; with the photo stack it grows in over 76em–80em). */
@media (min-width: 64em) {
	.home-mission__inner:not(.home-mission__inner--photo) {
		--hang: 3rem;
	}
}

.home-mission__wave,
.home-mission .entry-content h2 {
	margin-left: calc(-1 * var(--hang, 0rem));
}

.entry-content h2 {
	margin: 0 0 1.5rem;
	color: var(--color-dark);
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
	line-height: 1.45;
}

.entry-content p {
	margin: 0 0 1.25em;
	line-height: 2;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

/* Counters — only rendered with real rows. Brown like the mission above,
   set apart by gold rules; gold numbers (5.4:1), white labels (8.5:1). */
.home-counters {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-block: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-section));
	background: var(--color-section);
	color: var(--color-on-dark);
	padding-block: clamp(2.5rem, 6vw, 4rem);
}

.home-counters__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem 1rem;
	max-width: var(--content-width);
	margin-block: 0;
	list-style: none;
	text-align: center;
}

@media (min-width: 48em) {
	.home-counters__list {
		grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	}
}

.home-counter {
	display: grid;
	gap: 0.25rem;
}

/* Live may show a single (non-sample) row: centre it across the band. */
.home-counter:only-child {
	grid-column: 1 / -1;
}

.home-counter__number {
	color: var(--color-accent); /* on the section brown 5.4:1 */
	font-family: var(--font-latin);
	font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.home-counter__suffix {
	margin-left: 0.1em;
	font-size: 0.6em;
}

.home-counter__label {
	font-size: 0.9375rem;
	text-wrap: balance;
}

/* One counter with a founding year (春日部での歩み, 2026-10-23; layout
   2026-10-23 rev.): line 1, centred — the label, then the big number with its
   smaller unit beside it, all on one baseline (wrapping label-above-number
   when they don't fit); line 2 — a gold line (at most ~560px, centred) from
   the founding year to this year. Phones: the years go under the line's ends.
   Gold (accent) on the section brown 5.4:1, white text 8.5:1. */
.home-since {
	max-width: var(--content-width);
	margin-inline: auto;
	padding-inline: var(--space);
}

.home-since__body {
	display: grid;
	gap: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.home-since__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 0.25rem 0.625rem; /* tabular digits already leave room before a "1" */
	margin: 0;
	text-align: center;
}

.home-since__label {
	font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
	font-weight: 700;
	letter-spacing: 0.04em;
}

.home-since__count {
	display: inline-flex;
	align-items: baseline;
	gap: 0.25em;
	color: var(--color-accent);
	font-family: var(--font-latin);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

/* Reserves the final number's width (tabular digits), so the count-up
   doesn't move the centred line. */
.home-since__count .home-counter__value {
	min-width: calc(var(--digits, 2) * 1ch);
	font-size: clamp(3.5rem, 2.75rem + 3.2vw, 5rem); /* 56px at 375, 80px from ~1100 */
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.home-since__unit {
	font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
}

.home-since__line {
	display: grid;
	width: 100%;
	max-width: 35rem; /* about 560px, centred under line 1; full width below */
	margin-inline: auto;
	grid-template-columns: 1fr 1fr;
	grid-template-areas: "track track" "start end";
	align-items: center;
	gap: 0.5rem 0.75rem;
	font-family: var(--font-latin);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.home-since__year--start {
	grid-area: start;
}

.home-since__year--end {
	grid-area: end;
	justify-self: end;
}

.home-since__track {
	grid-area: track;
	position: relative;
	height: 0.875rem;
}

.home-since__fill {
	position: absolute;
	top: calc(50% - 1.5px);
	right: 0.4375rem;
	left: 0.4375rem;
	height: 3px;
	border-radius: 2px;
	background: var(--color-accent);
	transform-origin: left center;
}

.home-since__dot {
	position: absolute;
	top: 0;
	left: 0;
	width: 0.875rem;
	height: 0.875rem;
	border-radius: 50%;
	background: var(--color-accent);
}

.home-since__dot--end {
	right: 0;
	left: auto;
}

@media (min-width: 48em) {
	.home-since__line {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "start track end";
		gap: 0.75rem;
	}
}

/* What We Value Most (2026-10-24): brown like the timeline above it, white
   heading (8.5:1), the shared cards (style.css → .values), a white text link
   to About (8.5:1). */
.home-values {
	background: var(--color-section);
	color: var(--color-on-dark);
	padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 4.5rem);
}

.home-values__inner {
	max-width: var(--content-width);
	margin-inline: auto;
	padding-inline: var(--space);
}

.home-values__heading {
	margin: 0 0 1.25rem;
	color: var(--color-on-dark);
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
	line-height: 1.45;
	text-align: center;
}

.home-values__more {
	margin: 1.5rem 0 0;
	text-align: center;
}

.home-values__more a {
	color: var(--color-on-dark);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.home-values__more a::after {
	content: " →" / ""; /* decoration: not read out */
}

/* Curriculum teaser — surface-alt band. Body text 11.7:1, heading 13.3:1,
   links 7.2:1. */
.home-curriculum {
	position: relative;
	isolation: isolate;
	background: var(--color-surface-alt);
	color: var(--color-text);
	padding-block: clamp(3rem, 8vw, 5rem);
}

.home-curriculum__inner {
	position: relative;
	max-width: var(--text-width);
}

.home-curriculum__blob {
	display: none;
}

@media (min-width: 56em) {
	/* Overlap: the blob rises out of the band into the one above (only its
	   padding); the text column lines up with the content edge. */
	.home-curriculum__blob {
		display: block;
		position: absolute;
		top: -3rem;
		right: max(var(--space), calc((100% - var(--content-width)) / 2));
		width: clamp(12rem, 22vw, 18rem);
		height: auto;
		color: var(--color-border);
	}

	.home-curriculum__inner {
		margin-left: max(0px, calc((100% - var(--content-width)) / 2));
	}
}

.home-curriculum__heading {
	margin: 0 0 1.25rem;
	color: var(--color-dark);
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
	line-height: 1.5;
}

.home-curriculum__text p {
	margin: 0 0 1em;
	line-height: 2;
}

.home-curriculum__more {
	margin: 1.75rem 0 0;
}

/* Instagram — feed, or a plain link to the profile. */
.home-instagram {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--color-section);
	color: var(--color-on-dark);
	padding-block: clamp(3rem, 8vw, 5rem);
}

/* The drifting blob stays clear of the heading and the pills (2026-10-21):
   up to 52em, mostly off the top-right corner; from 52em (where the side
   beside the centred pair is wide enough), to its right, at its height. */
.home-instagram__blob {
	position: absolute;
	top: -4.5rem;
	right: -3.5rem;
	width: 8rem;
	height: auto;
	color: var(--color-accent);
	opacity: 0.18;
}

@media (min-width: 52em) {
	.home-instagram__blob {
		top: auto;
		bottom: clamp(1.5rem, 4vw, 3rem);
		right: max(1rem, calc(50% - 22rem - clamp(8rem, 14vw, 12rem)));
		width: clamp(8rem, 14vw, 12rem);
	}
}

.home-instagram__inner {
	position: relative;
	max-width: var(--content-width);
	text-align: center;
}

.home-instagram__heading {
	margin: 0 0 1.25rem;
	color: var(--color-on-dark);
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
	line-height: 1.45;
}

/* Instagram and Facebook (2026-10-21): two pills of the same width — the
   longer label plus padding (about 210–220 px), never full width.
   Phones: stacked; from 36em: side by side; centred either way (the list is
   as wide as its content; equal grid columns make both pills the widest
   one's width). Inside, icon and label are one unit with a fixed icon column
   and the same start padding in both pills, so the icons and the labels line
   up; the icon side is slimmer (2.25rem) than the label side (3.5rem).
   52 px tall. White on the brown band, brown text
   14.3:1, the icon on the left (decorative, the text names the network);
   hover: crimson border and text (7.8:1); focus: the band's gold ring
   (5.4:1). */
.social-pills {
	display: grid;
	grid-auto-columns: 1fr;
	gap: 0.875rem 1.25rem;
	width: max-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

@media (min-width: 36em) { /* two pills + gap + gutters fit from about 34em */
	.social-pills {
		grid-auto-flow: column;
	}
}

.social-pill {
	display: grid;
	grid-template-columns: 2rem auto;
	justify-content: start;
	align-items: center;
	column-gap: 0.75rem;
	min-height: 3.25rem;
	padding: 0.375rem 3.5rem 0.375rem 2.25rem; /* slimmer on the icon side (owner, 2026-10-21) */
	border: 2px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface);
	color: var(--color-dark);
	font-family: var(--font-latin);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.social-pill picture {
	display: contents;
}

.social-pill source {
	display: none; /* with picture as contents, it would take the icon's cell */
}

.social-pill__icon {
	width: 2rem;
	height: 2rem;
}

.social-pill:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

/* LINE call to action — its own red band, so the LINE button never sits
   beside a red button. White text 9.0:1. */
.home-line {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--color-frame);
	color: var(--color-on-dark);
	padding-block: clamp(3rem, 8vw, 5rem);
}

.home-line__loop {
	position: absolute;
	top: -2rem;
	right: -3rem;
	width: clamp(10rem, 32vw, 22rem);
	height: auto;
	color: var(--color-accent);
	opacity: 0.35;
}

@media (min-width: 48em) {
	.home-line__loop {
		top: 50%;
		margin-top: calc(clamp(10rem, 32vw, 22rem) / -2);
		right: max(var(--space), calc((100% - var(--content-width)) / 2));
		opacity: 0.6;
	}
}

.home-line__inner {
	position: relative;
	max-width: var(--text-width);
}

.home-line__heading {
	margin: 0 0 1rem;
	color: var(--color-on-dark);
	font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
	line-height: 1.45;
}

.home-line__text p {
	margin: 0 0 0.75em;
	line-height: 2;
}

.home-line__action {
	margin: 1.5rem 0 0;
}

.home-line a:not(.button) {
	color: var(--color-on-dark);
}

.home-line :focus-visible {
	outline-color: var(--color-accent);
}

/* Small shapes per section (victoryis_decor()): at the edges, in the
   padding, never over text. Gold on the red and brown bands, crimson and gold
   on cream. They draw with the scroll (motion.js; School life's within its
   blob drift, front-page.js); static and complete without motion. */
/* Hero: its only free space is the red beside the centred photo on wide
   landscape screens (the text has no spare padding: the buttons sit right
   above the clouds), so the shapes show there only. */
.home-hero {
	isolation: isolate;
}

.home-hero .deco {
	display: none;
	color: var(--color-accent);
}

@media (min-width: 64em) and (min-aspect-ratio: 3/2) {
	.home-hero .deco {
		display: block;
	}

	.home-hero .deco--a {
		top: 2rem;
		left: 1.5rem;
	}

	.home-hero .deco--b {
		top: 38%;
		right: 1.25rem;
		opacity: 0.75;
	}
}

.home-mission .deco {
	color: var(--color-accent);
}

.home-mission .deco--a {
	top: clamp(0.75rem, 2.5vw, 1.75rem);
	right: 1rem;
}

.home-mission .deco--b {
	right: -1.5rem;
	bottom: -1.5rem;
	opacity: 0.45;
}

.home-mission .deco--c {
	bottom: 0.75rem;
	left: 1rem;
	opacity: 0.8;
}

.home-counters .deco {
	top: 0.5rem;
	color: var(--color-accent);
}

.home-counters .deco--a {
	left: 0.75rem;
}

.home-counters .deco--b {
	right: 0.75rem;
	opacity: 0.7;
}

.home-curriculum .deco--a {
	top: 0.75rem;
	left: 1rem;
	color: var(--color-primary);
	opacity: 0.45;
}

.home-curriculum .deco--b {
	top: 1rem;
	right: 1rem;
	color: var(--color-accent);
}

@media (min-width: 56em) {
	.home-curriculum .deco--b {
		right: auto;
		left: 4.5rem;
	}
}

.home-curriculum .deco--c {
	top: 1rem;
	left: 42%;
	color: var(--color-primary);
	opacity: 0.6;
}

.home-instagram .deco {
	color: var(--color-accent);
}

.home-instagram .deco--a {
	top: 0.75rem;
	left: -1rem;
	opacity: 0.45;
}

.home-instagram .deco--b {
	top: 55%;
	left: 0.5rem;
}

.home-line .deco--a {
	top: 0.75rem;
	left: 1rem;
	color: var(--color-accent);
	opacity: 0.8;
}

.home-line .deco--b {
	right: 1rem;
	bottom: 1rem;
	color: var(--color-on-dark);
	opacity: 0.35;
}

.home-line .deco--c {
	top: 1rem;
	left: 42%;
	color: var(--color-accent);
	opacity: 0.6;
}

/* Split hero title (front-page.js): a mask per word / <wbr> part, so lines
   still break only where they did before. */
.split__mask {
	display: inline-block;
	overflow: hidden;
	padding-bottom: 0.08em;
	margin-bottom: -0.08em;
	vertical-align: top;
	white-space: nowrap;
}

.split__item {
	display: inline-block;
}

/*
 * Motion (front-page.js). Hidden states only under html.js (set in <head>)
 * and only without a reduced-motion preference: no JS or reduced motion =
 * everything visible, final numbers, drawn strokes.
 */
@media (prefers-reduced-motion: no-preference) {
	.js .home-hero__title,
	.js .home-counter,
	.js .home-curriculum__inner > *,
	.js .home-instagram__inner {
		opacity: 0;
	}

	.js .home-since__fill {
		transform: scaleX(0);
	}

	.js .home-since__dot--end {
		transform: scale(0);
	}

	.js .home-mission__wave path,
	.js .home-line__loop path {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
	}
}

@media print {
	.js .home-hero__title,
	.js .home-counter,
	.js .home-since__fill,
	.js .home-since__dot--end,
	.js .home-curriculum__inner > *,
	.js .home-instagram__inner {
		opacity: 1 !important;
		transform: none !important;
	}

	.js .shape path,
	.js .doodle {
		stroke-dashoffset: 0 !important;
	}

	.js .polaroid {
		opacity: 1 !important;
		transform: none !important;
	}
}
