/* ---- copied from copycub-game/design/tokens.css — do not edit here ----
 * The game is the source of these colours. Change them there, then copy
 * the file across; the game's CI fails if its own copy drifts. */
:root {
	/* The page: home, the splash, the installed app's own background.
	   game/src/Main.gd, game/src/loop/LoopHarness.gd _build_home,
	   project.godot boot_splash/bg_color */
	--cc-page: #1c1f2b;

	/* The play surface, one step up from the page.
	   game/src/loop/LoopHarness.gd _bg */
	--cc-surface: #292b38;

	/* Text. White on the page; the example word at 62%; the quietest
	   text — the build number — in a blue-grey.
	   game/src/loop/LoopHarness.gd font_color */
	--cc-text: #ffffff;
	--cc-text-soft: rgba(255, 255, 255, 0.62);
	--cc-text-quiet: #8c94ad;

	/* The frame round a picture, and the letters drifting behind play.
	   game/src/loop/LoopHarness.gd _frame, game/src/fx/LetterField.gd ink */
	--cc-frame: rgba(255, 255, 255, 0.55);
	--cc-letters: rgba(255, 255, 255, 0.05);

	/* The brand shades, from the characters.
	   game/src/ui/BrandBadge.gd SHADES */
	--cc-green: #6fc48c;
	--cc-red: #f4756b;
	--cc-blue: #6ac0db;
	--cc-pink: #fc889d;
	--cc-peach: #fb9c85;
	--cc-magenta: #db6ba3;
	--cc-teal: #72cac1;
	--cc-plum: #441b4e;
	--cc-yellow: #f6c85f;

	/* The languages' colours: Afrikaans green, English purple; pastel, and
	   far from every avatar colour and brand shade.
	   game/src/ui/LanguagePicker.gd COLOURS */
	--cc-lang-af: #a6e8b4;
	--cc-lang-en: #bba0f0;

	/* Children's avatars: vivid where the characters are pastel, so a
	   child's figure never reads as a language character or a badge.
	   game/src/ui/Avatar.gd COLOURS */
	--cc-avatar-violet: #9b6bff;
	--cc-avatar-lime: #9bd93b;
	--cc-avatar-orange: #ff9230;
	--cc-avatar-cobalt: #3d8bff;
	--cc-avatar-raspberry: #f0457a;
	--cc-avatar-fuchsia: #d555f2;
	--cc-avatar-emerald: #2bc27a;
	--cc-avatar-gold: #ffc21a;
}

/* ---- end of the copy ---- */

/* CopyCub — the marketing site.
 *
 * The game's own palette, taken from the artwork: plum for anything that has
 * to be read, the pastels for surfaces only. White on a pastel fails contrast
 * at every size, so it never happens here.
 *
 * Cartoon Fun, which the game's menus use, is licensed for personal use only
 * (#1339) and is deliberately not here. */

:root {
	--paper: var(--cc-page);
	--paper-warm: var(--cc-surface);
	--ink: var(--cc-text);
	--ink-soft: var(--cc-text-soft);
	--ink-quiet: var(--cc-text-quiet);
	--line: rgba(255, 255, 255, 0.10);
	--edge: rgba(255, 255, 255, 0.22);

	--pink: var(--cc-pink);
	--pink-wash: var(--cc-surface);
	--teal: var(--cc-teal);
	--teal-wash: var(--cc-surface);
	--peach: var(--cc-peach);
	--peach-wash: var(--cc-surface);
	--magenta: var(--cc-magenta);
	--green: var(--cc-green);
	--green-wash: var(--cc-surface);

	--gutter: clamp(20px, 5vw, 80px);
	--display: "Fraunces", Georgia, "Times New Roman", serif;
	--body: "Nunito Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	/* The page colour, and the game's drifting letters standing still: the
	   same 5% white (--cc-letters) the LetterField paints. */
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' font-family='Nunito Sans,sans-serif' font-weight='700' fill='rgba(255,255,255,0.05)'%3E%3Ctext x='18' y='62' font-size='54' transform='rotate(-12 40 50)'%3Ea%3C/text%3E%3Ctext x='150' y='44' font-size='40' transform='rotate(9 160 34)'%3Ek%3C/text%3E%3Ctext x='96' y='150' font-size='62' transform='rotate(6 110 130)'%3Eb%3C/text%3E%3Ctext x='20' y='208' font-size='42' transform='rotate(-7 30 196)'%3E3%3C/text%3E%3Ccircle cx='196' cy='182' r='16' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='5'/%3E%3C/svg%3E") repeat;
	color: var(--ink);
	font-family: var(--body);
	font-size: 18px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 68px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
p { margin: 0; }
img { max-width: 100%; height: auto; }

a { color: var(--ink); }
a:hover { color: var(--magenta); }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }

/* Anything that can be tapped is at least 44px tall, everywhere. */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 30px;
	border: 2px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.btn-solid { background: var(--cc-text); color: var(--cc-page); }
.btn-solid:hover { background: #e4e6ef; color: var(--cc-page); }
.btn-go { background: var(--green); color: var(--cc-plum); }
.btn-go:hover { background: #5cb87b; color: var(--cc-plum); }
.btn-line { border-color: var(--edge); background: transparent; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }

/* Keyboard focus has to stay visible on every one of these. */
a:focus-visible, button:focus-visible {
	outline: 3px solid var(--magenta);
	outline-offset: 3px;
}

.skip {
	position: absolute;
	left: -9999px;
}
.skip:focus {
	left: var(--gutter);
	top: 12px;
	z-index: 10;
	padding: 12px 20px;
	background: var(--ink);
	color: var(--paper);
	border-radius: 999px;
	text-decoration: none;
}

/* Header ------------------------------------------------------------------ */

.site-head {
	border-bottom: 1px solid var(--line);
}
.site-head .wrap {
	display: flex;
	align-items: center;
	gap: clamp(12px, 3vw, 32px);
	flex-wrap: wrap;
	padding-block: 16px;
}
.site-head img { height: 44px; width: auto; }
/* The wordmark is lettering, so it reads at a smaller height than the
   characters did and wants a little more room around it. */
.site-head img.mark { height: 38px; margin-block: 3px; }
.site-nav {
	display: flex;
	gap: clamp(14px, 2.5vw, 28px);
	flex-grow: 1;
	font-weight: 600;
	font-size: 16px;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--magenta); }
.site-head .btn { min-height: 44px; padding: 10px 22px; font-size: 16px; }
.btn-ghost { border-color: var(--ink); }
/* The language switch, the same as app.'s: EN | AF, the current one filled.
   Each half is a link to this page in that language. */
.lang-switch { display: inline-flex; border: 2px solid var(--edge); border-radius: 999px; padding: 2px; gap: 2px; }
.lang-switch a {
	font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink-soft);
	border-radius: 999px; padding: 6px 12px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.lang-switch a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* No label in the header ever breaks over two lines, in either language. */
.site-nav a, .site-head .btn, .lang-switch a { white-space: nowrap; }

/* On a phone the header is the same three rows in both languages: the logo
   with the language switch on its right, the menu, then the two buttons
   sharing the width. Left to wrap on its own, Afrikaans's longer labels
   ("Begin gratis") pushed the last button onto a fourth row of its own. */
@media (max-width: 599px) {
	.site-head .wrap { row-gap: 12px; column-gap: 10px; }
	.site-head .lang-switch { order: 1; margin-left: auto; }
	.site-nav { order: 2; flex-basis: 100%; justify-content: space-between; }
	.site-head .btn { order: 3; flex: 1 1 0; padding-inline: 12px; }
}

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

.hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(28px, 5vw, 64px);
	align-items: center;
	padding-block: clamp(40px, 6vw, 76px) clamp(32px, 5vw, 64px);
}
@media (min-width: 900px) { .hero { grid-template-columns: 5fr 4fr; } }

.eyebrow {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cc-pink);
}
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); }
.hero-copy { display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 26px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.small { font-size: 16px; color: var(--ink-quiet); }

.hero-art {
	background: var(--paper-warm);
	border-radius: 40px;
	padding: clamp(24px, 4vw, 48px);
	display: flex;
	justify-content: center;
}

/* Bands ------------------------------------------------------------------- */

.band { padding-block: clamp(36px, 5vw, 72px); }
.band-quiet { background: var(--cc-surface); border-radius: 40px; padding: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 64px); }
.stack { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 34px); }

/* The games: one, two, three or four across as the page widens. A card left
   on a row of its own (Match the pairs, four across three) stands in the
   middle of it, not against the left: each card spans two of twice as many
   columns, and the last one, alone, starts one card's width in. */
.cards {
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) {
	.cards { grid-template-columns: repeat(4, 1fr); }
	.cards > .card { grid-column: span 2; }
	.cards > .card:last-child:nth-child(2n+1) { grid-column: 2 / span 2; }
}
@media (min-width: 960px) {
	.cards { grid-template-columns: repeat(6, 1fr); }
	.cards > .card:last-child:nth-child(2n+1) { grid-column: span 2; }
	.cards > .card:last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
	.cards > .card:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
}
@media (min-width: 1280px) {
	.cards { grid-template-columns: repeat(8, 1fr); }
	.cards > .card:last-child:nth-child(3n+1),
	.cards > .card:nth-last-child(2):nth-child(3n+1) { grid-column: span 2; }
}
.card {
	border-radius: 28px;
	padding: clamp(24px, 3vw, 36px);
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.card p { font-size: 17px; color: var(--ink-soft); }
.card-pink { background: var(--pink-wash); }
.card-teal { background: var(--teal-wash); }
.card-peach { background: var(--peach-wash); }

.steps { display: grid; gap: clamp(24px, 4vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.step { display: flex; flex-direction: column; gap: 12px; }
.step span { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.step p { font-size: 17px; color: var(--ink-soft); }

.points { display: grid; gap: 28px 44px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.points p { font-size: 17px; color: var(--ink-soft); }
.points h3 { font-size: 20px; margin-bottom: 6px; }

.with-art { display: flex; gap: clamp(24px, 4vw, 56px); align-items: center; flex-wrap: wrap; }
.with-art > img { width: clamp(120px, 14vw, 190px); }
.with-art > div { flex: 1 1 320px; }

/* The words band -------------------------------------------------------- */

.words {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.word {
	background: var(--cc-surface);
	border: 1px solid var(--line);
	border-radius: 26px;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
}
.word img { width: 140px; height: 140px; object-fit: contain; }
/* The page's language on top and large, the other under it. */
.word-main { font-family: var(--display); font-size: 28px; font-weight: 700; }
.word-other { font-size: 17px; color: var(--ink-quiet); }
.word-say { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.say {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid var(--edge);
	border-radius: 999px;
	background: var(--cc-surface);
	color: var(--ink);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.say:hover { border-color: var(--ink); background: var(--paper-warm); }
.say:active { transform: scale(0.97); }

/* Call to action ---------------------------------------------------------- */

.cta {
	/* Plum is the characters' outline colour: a warm band on the navy page. */
	background: var(--cc-plum);
	color: var(--cc-text);
	border-radius: 40px;
	padding: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 64px);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(20px, 3vw, 48px);
	margin-bottom: clamp(36px, 5vw, 72px);
}
.cta h2 { color: var(--cc-text); }
.cta p { color: var(--cc-text-soft); font-size: clamp(17px, 1.8vw, 19px); }
.cta > div { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; }

/* Pricing ----------------------------------------------------------------- */

.centre { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.centre .lede { max-width: 720px; }

.plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: stretch; }
.plan {
	border: 2px solid var(--edge);
	border-radius: 32px;
	padding: clamp(28px, 3vw, 40px) clamp(24px, 3vw, 36px);
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: relative;
}
.plan-pick { border: 3px solid var(--green); background: var(--green-wash); }
.flag {
	position: absolute;
	top: -16px;
	left: 36px;
	background: var(--green);
	color: var(--cc-plum);
	font-size: 14px;
	font-weight: 700;
	padding: 6px 16px;
	border-radius: 999px;
}
.price { font-family: var(--display); font-size: 42px; font-weight: 700; line-height: 1; }
.price small { font-family: var(--body); font-size: 18px; font-weight: 400; color: var(--ink-soft); }
.plan ul { margin: 8px 0 0; padding-left: 20px; font-size: 17px; line-height: 1.9; color: var(--ink-soft); }
.plan p { font-size: 17px; color: var(--ink-soft); }
.plan .btn { margin-top: auto; width: 100%; }

/* The Schools tab, hidden until schools go live (env.js shows it off
   production), which the link's own display would otherwise beat. */
.schools[hidden] { display: none; }
/* Schools' one plan, the width of one of a family's three. */
.plans-one { grid-template-columns: minmax(0, 384px); justify-content: center; }

.faq { display: grid; gap: 32px 56px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.faq h3 { font-size: 19px; margin-bottom: 8px; }
.faq p { font-size: 17px; color: var(--ink-soft); }

/* Free and paid, side by side (pricing) ---------------------------------- */

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--cc-surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.compare th, .compare td { padding: 16px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.compare thead th, .compare thead td { border-top: 0; font-family: var(--display); font-size: 20px; }
.compare tbody th { color: var(--ink-quiet); font-weight: 600; width: 22%; }
.compare .n { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.compare .of { display: block; color: var(--ink-quiet); font-size: 15px; margin-top: 4px; }
.compare .same { color: var(--ink-soft); }
.steps td { color: var(--ink-soft); }
.compare .cats { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 560px) {
	.compare th, .compare td { padding: 12px 10px; }
	.compare tbody th { width: auto; }
	.compare .n { font-size: 24px; }
}

/* Footer ------------------------------------------------------------------ */

.site-foot { border-top: 1px solid var(--line); margin-top: auto; }
.site-foot .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	align-items: center;
	padding-block: 28px;
	font-size: 15px;
	color: var(--ink-quiet);
}
.site-foot a { text-decoration: none; }
.site-foot .grow { flex-grow: 1; }
/* On a phone the copyright and Privacy shared a row and the other links
 * wrapped below them: there the copyright takes its own row, and the links
 * one together. */
@media (max-width: 640px) {
	.site-foot .wrap { column-gap: 16px; }
	.site-foot .grow { flex-basis: 100%; }
}
.ver { font-variant-numeric: tabular-nums; }

/* The pastels are already gentle; this only stops anything from moving for
 * someone who has asked for that. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The Schools page's table: each category with its words, every game. */
.cats small { color: var(--ink-quiet); margin-left: 4px; }
.cats.games { font-size: 16px; line-height: 1.6; }
.cats.games li + li { margin-top: 6px; }
/* Schools: each game with the CAPS it practises. */
.caps-map td p { margin: 0; }
.caps-map td .caps { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-quiet); }
