/* CognOx Kids — cognox.kids */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #16130e;
  --cream: #f3ead9;
  --paper: #fffaf0;
  --night: #1c2140;
  --night-sub: #d9dcea;
  --sun: #f2b33d;
  --muted: #6b6253;
  --line: #e2d6bf;
  --footer-sub: #cfc6b4;
  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 24px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--muted); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
@media (max-width: 560px) { .wrap { padding-left: 20px; padding-right: 20px; } }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px;
  z-index: 10;
}
.skip:focus { top: 16px; color: var(--cream); }

/* The face: one set of symbols, recoloured through two custom properties. */
.face { display: block; flex: none; aspect-ratio: 1 / 1; --face: var(--ink); --feat: #fff; }
.face-inv { --face: var(--cream); --feat: var(--ink); }
.face-night { --face: var(--cream); --feat: var(--night); }
.ff { fill: var(--face); }
.fe { fill: var(--feat); }
.fs { stroke: var(--feat); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .face { width: 40px; height: 40px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-weight: 700; font-size: 16px; }
.nav a:not(.btn) { text-decoration: none; padding: 10px 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 800;
  border-radius: 999px; padding: 16px 28px; line-height: 1.2;
}
.btn-ink { background: var(--ink); color: var(--cream) !important; padding: 12px 22px; font-weight: 700; }
.btn-ink:hover { background: #3a352c; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #e6a52a; color: var(--ink); }

/* Sections */
.section { padding-top: 96px; padding-bottom: 96px; }
.paper { background: var(--paper); }
.night { background: var(--night); color: var(--cream); }
.night a { color: var(--cream); }
.lead { font-size: 21px; max-width: 560px; }
.muted { color: var(--muted); }
.night .muted { color: var(--night-sub); }
.h2 { font-size: clamp(34px, 4.2vw, 48px); line-height: 1.1; }
.intro { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin-bottom: 48px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 96px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; letter-spacing: -0.02em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.actions .link { font-weight: 700; padding: 16px 8px; }
.hero-visual { flex: 1 1 340px; display: flex; justify-content: center; }
.screen {
  width: 100%; max-width: 460px; aspect-ratio: 4 / 3; background: var(--ink);
  border-radius: 28px; padding: 18px; box-shadow: 0 30px 60px -30px rgba(22, 19, 14, .45);
}
.screen > div { width: 100%; height: 100%; background: var(--cream); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.screen .face { width: 62%; height: auto; }

/* Cards */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--paper); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.paper .card { background: var(--cream); }
.card strong { font-size: 19px; }
.card span { font-size: 16px; }
.card .face { width: 84px; height: 84px; margin-bottom: 4px; }
.card .icon { width: 28px; height: 28px; }

.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > .intro { flex: 1 1 340px; min-width: 0; margin: 0; }
.split > .grid { flex: 2 1 560px; min-width: 0; }

.band { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.band .face { width: 160px; height: 160px; }
.band > div { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.band p { max-width: 640px; }
.band a { font-weight: 700; padding: 8px 0; align-self: flex-start; }

.cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-top: 112px; padding-bottom: 112px; }
.cta .face { width: 96px; height: 96px; }
.cta h2 { max-width: 760px; }
.cta p { max-width: 560px; }
.cta .grid { width: 100%; text-align: left; }

/* Footer */
.site-footer { background: var(--ink); color: var(--cream); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 36px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer .brand .face { width: 36px; height: 36px; }
.site-footer .brand span { font-size: 24px; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--footer-sub); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; font-weight: 700; }
.footer-nav a { padding: 10px 0; }
.legal { border-top: 1px solid #3a352c; padding-top: 24px; font-size: 14px; line-height: 1.7; color: var(--footer-sub); }
.legal strong { color: var(--cream); }

/* Privacy */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; padding-top: 48px; padding-bottom: 56px; }
.page-head > div { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.01em; }
.page-head .lead { font-size: 20px; max-width: 640px; }
.page-head .face { width: 120px; height: 120px; }
.updated { font-size: 15px; color: var(--muted); }

.doc { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-bottom: 112px; }
.toc { flex: 1 1 240px; min-width: 0; background: var(--paper); border-radius: var(--radius); padding: 24px 28px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
@media (min-width: 900px) { .toc { position: sticky; top: 24px; } }
.toc a { text-decoration: none; padding: 6px 0; }
.label { font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.doc article { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 48px; line-height: 1.6; }
.doc section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.doc h2 { font-size: 32px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.facts .card { border-radius: 20px; padding: 22px; gap: 6px; }

/* 404 */
.lost { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-top: 96px; padding-bottom: 128px; }
.lost .face { width: 140px; height: 140px; }
.lost h1 { font-size: clamp(36px, 5vw, 56px); }
