/* Taaza Mind — site-wide styles (branding + layout).
   The game and guide components use kids-math-game.css. */

:root {
	--brand: #1e7d4f;
	--brand-dark: #14603c;
	--brand-ink: #ffffff;
	--accent: #f2a33c;
	--accent-ink: #4a2500;
	--cream: #faf6ec;
	--ink: #1f2328;
	--muted: #4b5563;
	--card: #ffffff;
	--line: #e3ddcd;
	/* Share the guide palette with kids-math-game.css */
	--kmg-primary: #2456b8;
	--kmg-primary-dark: #1b4390;
	--kmg-accent: #e8862e;
	--kmg-ink: #1f2328;
	--kmg-muted: #4b5563;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 18px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--cream);
}

img {
	max-width: 100%;
}

a {
	color: var(--brand-dark);
	text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
	outline: 3px solid #2456b8;
	outline-offset: 3px;
	border-radius: 6px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #fff;
	padding: 10px 16px;
	z-index: 100;
}

.skip-link:focus {
	left: 8px;
	top: 8px;
}

.wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 20px;
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #ffffff;
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 12px;
	padding-bottom: 12px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink);
}

.brand-mark {
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
}

.brand-name {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.3px;
}

.brand-name em {
	font-style: normal;
	color: var(--brand);
}

.brand-domain {
	font-size: 13px;
	color: var(--muted);
	background: var(--cream);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px 10px;
}

.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
	color: var(--ink);
}

.site-nav a:hover {
	background: #eef4ef;
}

.site-nav a.is-active {
	background: var(--brand);
	color: #fff;
}

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

.hero {
	background:
		radial-gradient(circle at 85% 20%, rgba(242, 163, 60, 0.18), transparent 40%),
		radial-gradient(circle at 10% 90%, rgba(30, 125, 79, 0.12), transparent 45%),
		#f3f8f3;
	padding: 64px 0 72px;
	border-bottom: 1px solid var(--line);
}

.hero-inner {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 40px;
	align-items: center;
}

.eyebrow {
	display: inline-block;
	background: #e3f0e6;
	color: var(--brand-dark);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 999px;
	padding: 6px 14px;
	margin: 0 0 18px;
}

.hero h1 {
	font-size: clamp(40px, 6vw, 64px);
	line-height: 1.05;
	margin: 0 0 18px;
	letter-spacing: -1px;
}

.hero-sub {
	font-size: 20px;
	color: var(--muted);
	max-width: 46ch;
	margin: 0 0 26px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 26px;
}

.btn {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 14px;
	font-weight: 800;
	font-size: 18px;
	text-decoration: none;
	line-height: 1.2;
	min-height: 54px;
}

.btn-primary {
	background: var(--brand);
	color: #fff;
	border: 2px solid var(--brand);
}

.btn-primary:hover {
	background: var(--brand-dark);
	border-color: var(--brand-dark);
}

.btn-ghost {
	background: #ffffff;
	color: var(--ink);
	border: 2px solid var(--line);
}

.btn-ghost:hover {
	border-color: var(--brand);
	color: var(--brand-dark);
}

.trust-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.trust-chips li {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 15px;
	font-weight: 600;
}

.hero-card {
	background: #ffffff;
	border-radius: 24px;
	padding: 34px 26px;
	text-align: center;
	box-shadow: 0 14px 40px rgba(31, 35, 40, 0.12);
	border: 1px solid var(--line);
}

.hero-card-q {
	font-size: 42px;
	font-weight: 800;
	margin: 0 0 8px;
	color: var(--ink);
}

.hero-card-a {
	font-size: 64px;
	font-weight: 800;
	color: var(--brand);
	margin: 0 0 10px;
}

.hero-card-streak {
	display: inline-block;
	background: #fff3de;
	color: var(--accent-ink);
	font-weight: 700;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 16px;
}

/* ------------------------------------------------------------------ *
 * Sections
 * ------------------------------------------------------------------ */

.section {
	padding: 64px 0;
}

.section-tint {
	background: #f2f6f2;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.section-title {
	font-size: 32px;
	line-height: 1.2;
	margin: 0 0 12px;
	letter-spacing: -0.4px;
}

.section-sub {
	color: var(--muted);
	font-size: 18px;
	max-width: 60ch;
	margin: 0 0 30px;
}

.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
}

.feature-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 24px;
}

.feature-icon {
	font-size: 30px;
	display: block;
	margin-bottom: 10px;
}

.feature-card h3 {
	margin: 0 0 8px;
	font-size: 20px;
}

.feature-card p {
	margin: 0;
	color: var(--muted);
	font-size: 16.5px;
}

/* Steps */
.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}

.steps li {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 24px;
}

.step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	font-weight: 800;
	font-size: 19px;
	margin-bottom: 12px;
}

.steps h3 {
	margin: 0 0 8px;
	font-size: 19px;
}

.steps p {
	margin: 0;
	color: var(--muted);
	font-size: 16.5px;
}

/* Guides grid */
.guide-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}

.guide-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 22px 14px;
	text-decoration: none;
	color: var(--ink);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guide-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(31, 35, 40, 0.1);
	border-color: var(--brand);
}

.guide-card-icon {
	font-size: 34px;
	color: var(--brand);
	line-height: 1;
}

.guide-card-name {
	font-weight: 800;
	font-size: 18px;
}

.guide-card-link {
	font-size: 14px;
	color: var(--muted);
}

/* Commitments */
.commit-list {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
}

.commit-list li {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 16px 20px;
	font-size: 17px;
}

.commit-list strong {
	color: var(--brand-dark);
}

.commit-cta {
	margin: 0;
}

/* CTA banner */
.cta-banner {
	background: var(--brand);
	color: #fff;
}

.cta-inner {
	text-align: center;
}

.cta-inner h2 {
	font-size: 34px;
	margin: 0 0 10px;
}

.cta-inner p {
	margin: 0 0 18px;
	font-size: 19px;
	opacity: 0.95;
}

.cta-banner .btn-primary {
	background: #ffffff;
	color: var(--brand-dark);
	border-color: #ffffff;
}

/* ------------------------------------------------------------------ *
 * Inner pages (game, guides, about, privacy)
 * ------------------------------------------------------------------ */

.page-section {
	padding: 40px 0 72px;
}

.page-narrow {
	max-width: 860px;
}

.breadcrumb {
	font-size: 15px;
	color: var(--muted);
	margin-bottom: 6px;
}

.breadcrumb a {
	color: var(--muted);
}

.page-title {
	font-size: 38px;
	margin: 0 0 8px;
	letter-spacing: -0.5px;
}

.page-lede {
	color: var(--muted);
	font-size: 19px;
	margin: 0 0 24px;
	max-width: 60ch;
}

.page-note {
	margin-top: 18px;
	color: var(--muted);
	font-size: 15px;
}

.guide-play-cta {
	margin-top: 40px;
	background: #fff7e2;
	border: 1px solid #e9b04a;
	border-radius: 18px;
	padding: 24px;
}

.guide-play-cta h2 {
	margin: 0 0 8px;
	font-size: 24px;
}

.guide-play-cta p {
	margin: 0 0 14px;
}

/* Guide typography from the plugin (kids-math-game.css) needs its colour
   variables available outside the .kmg-app scope. */
.kmg-guide {
	max-width: 760px;
	line-height: 1.7;
	font-size: 18px;
	color: var(--ink);
}

.kmg-guide-h2 {
	margin: 1.6em 0 0.5em;
	font-size: 28px;
	line-height: 1.25;
	color: var(--kmg-primary-dark);
	border-bottom: 3px solid var(--kmg-accent);
	padding-bottom: 0.25em;
}

/* Content components shared across guides, About, Privacy and policy
   pages. Kept here (instead of the game stylesheet) so article and guide
   pages never have to load the game CSS. */
.kmg-guide,
.kmg-about,
.kmg-privacy {
	max-width: 760px;
	line-height: 1.7;
	font-size: 18px;
	color: var(--ink);
}

.kmg-guide-cta {
	background: #fff7e2;
	border: 1px solid #e9b04a;
	border-radius: 12px;
	padding: 12px 16px;
}

.kmg-guide-cta code {
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 2px 6px;
}

.kmg-list {
	padding-left: 22px;
}

.kmg-list li {
	margin-bottom: 0.6em;
}

.kmg-examples {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.kmg-example {
	background: #ffffff;
	border: 1px solid #e5e0d5;
	border-radius: 14px;
	padding: 14px 16px;
}

.kmg-example-problem {
	margin: 0 0 8px;
	font-size: 22px;
	color: var(--kmg-primary-dark);
}

.kmg-example-steps {
	margin: 0;
	padding-left: 20px;
}

.kmg-example-steps li {
	margin-bottom: 0.3em;
}

.kmg-faq-item {
	background: #ffffff;
	border: 1px solid #e5e0d5;
	border-radius: 12px;
	padding: 10px 14px;
	margin-bottom: 10px;
}

.kmg-faq-item summary {
	font-weight: 700;
	cursor: pointer;
	font-size: 17px;
	padding: 4px 0;
}

.kmg-faq-item p {
	margin: 8px 0 4px;
}

.kmg-meta {
	color: var(--muted);
	font-size: 15px;
}

.kmg-note {
	font-size: 15px;
	color: var(--muted);
	border-top: 1px dashed #cfc8b8;
	padding-top: 12px;
	margin-top: 24px;
}

/* Ad slot — below the fold, non-personalized only, never in the game.
   Kept here so content pages can use it without the game stylesheet. */
.kmg-ad-slot {
	margin: 28px auto 0;
	max-width: 720px;
	text-align: center;
	clear: both;
}

.kmg-ad-slot__inner {
	display: inline-block;
	min-height: 40px;
	border-top: 1px dashed #cfc8b8;
	padding-top: 10px;
}

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

.site-footer {
	background: #14402a;
	color: #e9f2ec;
	margin-top: 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 30px;
	padding-top: 48px;
	padding-bottom: 32px;
}

.footer-logo {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 10px;
}

.footer-logo em {
	font-style: normal;
	color: #f2c14e;
}

.footer-brand p {
	margin: 0;
	font-size: 15.5px;
	color: #cfe3d6;
	max-width: 34ch;
}

.footer-col h2 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #9cc7ad;
	margin: 0 0 12px;
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-col a {
	color: #e9f2ec;
	text-decoration: none;
	font-size: 15.5px;
	line-height: 2;
}

.footer-col a:hover {
	text-decoration: underline;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: space-between;
	padding-top: 20px;
	padding-bottom: 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 14px;
	color: #b9d4c2;
}

.footer-bottom p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 860px) {
	.hero-inner {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 520px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.site-header .header-inner {
		justify-content: center;
	}

	.site-nav {
		width: 100%;
		overflow-x: auto;
	}

	.hero {
		padding: 44px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.guide-card {
		transition: none;
	}
}

/* ------------------------------------------------------------------ *
 * Articles (blog)
 * ------------------------------------------------------------------ */

.article-meta {
	color: var(--muted);
	font-size: 15px;
	margin: 0 0 10px;
}

.article-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.article-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 22px;
	text-decoration: none;
	color: var(--ink);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(31, 35, 40, 0.1);
	border-color: var(--brand);
}

.article-card--small {
	padding: 16px 18px;
}

.article-card-meta {
	font-size: 14px;
	color: var(--muted);
	font-weight: 600;
}

.article-card-title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--brand-dark);
}

.article-card-excerpt {
	font-size: 16px;
	color: var(--muted);
}

.section-more {
	margin: 24px 0 0;
}

.article-pager {
	margin-top: 32px;
	font-weight: 700;
}

.author-box {
	margin-top: 36px;
	background: #eef4ef;
	border: 1px solid #cfe0d4;
	border-radius: 18px;
	padding: 22px 24px;
}

.author-box h3 {
	margin: 0 0 8px;
	font-size: 19px;
	color: var(--brand-dark);
}

.author-box p {
	margin: 0 0 8px;
	font-size: 16px;
}

.author-box p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ *
 * FAQ
 * ------------------------------------------------------------------ */

.faq-list {
	display: grid;
	gap: 10px;
}

.faq-item {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 14px 18px;
}

.faq-item summary {
	font-weight: 700;
	cursor: pointer;
	font-size: 18px;
	padding: 4px 0;
}

.faq-item p {
	margin: 10px 0 4px;
	color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Ad slot (below the fold, non-personalized only, never in the game)
 * ------------------------------------------------------------------ */

.ad-slot {
	margin: 36px auto 0;
	max-width: 720px;
	min-height: 90px;
	text-align: center;
	border-top: 1px dashed #cfc8b8;
	padding-top: 14px;
	font-size: 13px;
	color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Related reading, teams, contacts, policy additions
 * ------------------------------------------------------------------ */

.related-block {
	margin-top: 40px;
}

.related-block h2 {
	font-size: 24px;
	margin: 0 0 14px;
}

.team-block,
.policy-additional,
.contact-card {
	margin-top: 36px;
}

.contact-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 24px 26px;
}

.contact-card h2 {
	margin: 0 0 10px;
	font-size: 22px;
}

.contact-card p {
	margin: 0 0 10px;
}

.policy-additional h2 {
	font-size: 24px;
	margin: 1.2em 0 0.4em;
}

/* ------------------------------------------------------------------ *
 * Arcade banner (home page)
 * ------------------------------------------------------------------ */

.arcade-banner {
	display: flex;
	gap: 28px;
	align-items: center;
	background: linear-gradient(135deg, #0b1e3a, #16356b);
	border-radius: 20px;
	padding: 28px 32px;
	color: #fff;
	margin-top: 8px;
}

.arcade-copy h3 {
	margin: 0 0 8px;
	font-size: 24px;
	color: #f2c14e;
}

.arcade-copy p {
	color: #e6ecf5;
	margin: 0 0 10px;
}

.arcade-points {
	list-style: none;
	padding: 0;
	margin: 0 0 14px;
	display: grid;
	gap: 6px;
}

.arcade-points li::before {
	content: "★ ";
	color: #f2c14e;
}

.arcade-art {
	position: relative;
	flex: 0 0 170px;
	height: 170px;
}

.arcade-bubble {
	position: absolute;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	font-weight: 800;
	color: #fff;
	background: #1e7d4f;
	border: 3px solid rgba(255, 255, 255, 0.7);
	animation: bob 3s ease-in-out infinite;
}

.arcade-bubble:nth-child(1) { left: 0; top: 90px; animation-delay: 0s; }
.arcade-bubble:nth-child(2) { left: 55px; top: 8px; animation-delay: 0.5s; }
.arcade-bubble--gold { background: #f2c14e; color: #27303a; left: 108px; top: 60px; animation-delay: 1s; }

@keyframes bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

/* ------------------------------------------------------------------ *
 * Printable worksheets
 * ------------------------------------------------------------------ */

.ws-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	align-items: end;
}

.ws-form label {
	font-weight: 700;
	font-size: 14px;
}

.ws-form select {
	font: inherit;
	font-size: 16px;
	padding: 8px 12px;
	border: 2px solid var(--line);
	border-radius: 10px;
	background: #fff;
	width: 100%;
}

.ws-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }

.ws-sheet {
	margin-top: 28px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 28px 32px;
}

.ws-head h2 { margin: 0 0 6px; color: var(--brand-dark); font-size: 22px; }
.ws-meta { color: var(--muted); font-size: 15px; margin: 0 0 16px; }

.ws-problems {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 18px 22px;
}

.ws-line {
	font-size: 19px;
	font-weight: 600;
	border-bottom: 1px solid #e7e2d3;
	padding-bottom: 6px;
}

.ws-blank {
	display: inline-block;
	width: 44px;
	border-bottom: 2px solid #27303a;
}

@media (max-width: 700px) {
	.arcade-banner { flex-direction: column; text-align: center; }
	.arcade-art { flex-basis: auto; height: 150px; }
}
