/* Psotkowa Przygoda: strona. Bez frameworka, bez zewnętrznych czcionek i zasobów.
   System kolorów jak w makietach (docs/mockups/kids-strona): baza + kolor filaru (Gry / Nauka / Szkoła).
   Wszystkie pary tekst/tło mają kontrast WCAG AA; sprawdza je kids/web/tests/test_site.py (zmieniając kolor, zmień też test).
   Żadnych atrybutów style="" w HTML (CSP: style-src 'self'): warianty są klasami poniżej. */
:root {
  --bg: #F8F9FC; --surface: #FFFFFF; --ink: #20263D; --muted: #46516A; --navy: #29365B; --line: #DCE3EE;
  --coral: #C74A23; --sun: #F4B63F; --good: #1F7A4D; --focus: #1B57E0;
  --radius: 22px; --fs: 18px; --tap: 56px;
  --font: "Nunito Sans", "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* kolor strony (filar): domyślnie granat; nadpisują go klasy t-games / t-learn / t-school */
  --a: #29365B; --a-on: #FFFFFF; --a-soft: #E7E9ED; --a-line: #C3C7D1; --a-dark: #1D2640;
}
body.t-games { --a: #C74A23; --a-on: #FFFFFF; --a-soft: #F9EBE7; --a-line: #EFCCC1; --a-dark: #8B3418; }
body.t-learn { --a: #F4B63F; --a-on: #20263D; --a-soft: #FEF7EA; --a-line: #FCEBC9; --a-dark: #AB7F2C; }
body.t-school, body.t-parents { --a: #29365B; --a-on: #FFFFFF; --a-soft: #E7E9ED; --a-line: #C3C7D1; --a-dark: #1D2640; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.015em; }
h2 { font-size: clamp(24px, 2.6vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0; }
p a, .note a, td a, .fine a { text-decoration: underline; text-underline-offset: 3px; }
.center-row { justify-content: center; }
code { background: #EEF1FA; border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.lead { font-size: calc(var(--fs) + 3px); color: var(--muted); max-width: 56ch; }
.small { font-size: 16px; color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.center { text-align: center; }
.mt-s { margin-top: 8px; } .mt-m { margin-top: 18px; } .mt-l { margin-top: 32px; } .mt-xl { margin-top: 44px; }
.narrow { max-width: 820px; }

/* dostępność */
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: #fff; color: var(--ink); border: 3px solid var(--focus); border-radius: 12px; padding: 12px 18px; font-weight: 800; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nagłówek */
.head { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-bottom: 2px solid var(--line); }
.head .wrap { display: flex; align-items: center; gap: 22px; min-height: 76px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 24px; letter-spacing: -.01em; line-height: 1.15; }
.brand b { color: var(--coral); }
.logo-psotek { flex: none; width: 46px; height: 46px; border-radius: 16px; background: #FFE9A8; display: grid; place-items: center; overflow: hidden; }
.logo-psotek img { width: 92%; height: auto; display: block; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { padding: 10px 16px; border-radius: 999px; font-weight: 800; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: #F0F3FA; }
.nav a[aria-current="page"] { color: var(--nv-ink); background: var(--nv-soft); }
.nav a.n-games { --nv-soft: #FBE7DF; --nv-ink: #9A3512; }
.nav a.n-learn { --nv-soft: #FCEFCB; --nv-ink: #6B4700; }
.nav a.n-school { --nv-soft: #E3E8F6; --nv-ink: #29365B; }
.nav a.n-parents { --nv-soft: #E9ECF5; --nv-ink: #29365B; }
.burger { display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }

/* przyciski i karty */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 26px; border-radius: 999px; border: 0; font: inherit; font-weight: 800; background: var(--a); color: var(--a-on); box-shadow: 0 4px 0 var(--a-dark); cursor: pointer; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--a-dark); }
.btn.coral { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #8B3418; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.small { min-height: 48px; padding: 0 20px; font-size: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card { display: block; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: var(--radius); padding: 22px; }
a.card { transition: transform .12s, box-shadow .12s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(41, 54, 91, .12); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; font-size: 14px; font-weight: 800; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; align-self: flex-start; background: var(--a); color: var(--a-on); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 800; }

/* stan prac: co działa dziś, co planujemy (kolor + zawsze podpis) */
.st { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.st-now { background: #DDF3E6; color: #0F5132; }
.st-soon { background: #FFF1D6; color: #7A4500; }
.st-plan { background: #E9ECF5; color: #29365B; }

/* sekcje */
section { padding: 56px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.band { background: var(--a-soft); border-block: 2px solid var(--a-line); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.top { align-items: start; }

.hero { padding: 40px 0 64px; background: radial-gradient(900px 420px at 80% 10%, #FFF3D6 0, transparent 70%), radial-gradient(700px 380px at 10% 90%, #E5ECFF 0, transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 span { color: #B8431F; }
.hero .lead { margin: 16px 0 24px; }
.trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.stage { position: relative; display: grid; place-items: center; min-height: 380px; }
.stage .blob { position: absolute; inset: 6% 8%; border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; background: #FFE9A8; }
.stage img { position: relative; z-index: 1; width: auto; max-height: 420px; animation: bob 4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.pillar { display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.pillar .ic { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--p); color: var(--p-on); font-size: 34px; }
.pillar p { color: var(--muted); }
.pillar .go { margin-top: auto; font-weight: 800; }
.pillar.games { --p: var(--coral); --p-on: #fff; border-color: #F0CDBF; }
.pillar.learn { --p: var(--sun); --p-on: var(--ink); border-color: #F6DD9E; }
.pillar.school { --p: var(--navy); --p-on: #fff; border-color: #C9D1E6; }

.pagehead { padding: 36px 0 28px; background: var(--a-soft); border-bottom: 2px solid var(--a-line); }
.pagehead .wrap { display: flex; align-items: center; gap: 28px; justify-content: space-between; }
.pagehead img { flex: none; width: auto; max-height: 150px; }
.pagehead .lead { margin-top: 10px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: underline; }

.tile { display: flex; flex-direction: column; gap: 8px; min-height: 160px; border-color: var(--a-line); background: linear-gradient(180deg, var(--a-soft), #fff 75%); }
.tile .em { font-size: 46px; line-height: 1; }
.tile b { font-size: 19px; line-height: 1.2; }
.tile .st { align-self: flex-start; }
.tile .meta { font-size: 15px; color: var(--muted); margin-top: auto; }
.tile.coral { --a: #C74A23; --a-on: #fff; --a-soft: #F9EBE7; --a-line: #EFCCC1; }
.tile.sun { --a: #F4B63F; --a-on: #20263D; --a-soft: #FEF7EA; --a-line: #FCEBC9; }
.tile.navy { --a: #29365B; --a-on: #fff; --a-soft: #E7E9ED; --a-line: #C3C7D1; }
.s-math { --a: #315FC7; --a-on: #fff; --a-soft: #EBEFFA; --a-line: #C8D4F0; }
.s-polish { --a: #A34588; --a-on: #fff; --a-soft: #F6ECF3; --a-line: #E4C8DB; }
.s-nature { --a: #287B56; --a-on: #fff; --a-soft: #E9F2EE; --a-line: #C3DDD0; }
.s-english { --a: #7550C5; --a-on: #fff; --a-soft: #F0ECF9; --a-line: #D9CDEF; }
.s-art { --a: #A65B18; --a-on: #fff; --a-soft: #F6EEE6; --a-line: #E5CFB9; }
.s-logic { --a: #087D89; --a-on: #fff; --a-soft: #E6F2F3; --a-line: #B9DDE0; }

.end { text-align: center; color: var(--muted); padding: 28px 0 0; }
.end b { display: block; color: var(--ink); }

/* podstrony z tekstem */
.steps { counter-reset: s; display: grid; gap: 16px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 900; }
.nolist { margin: 12px 0 0; padding-left: 20px; line-height: 1.9; }
.prose { max-width: 70ch; }
.prose h2 { margin: 30px 0 8px; font-size: 26px; }
.prose p, .prose li { color: #2C3552; }
.prose ul { padding-left: 22px; }
.draft { background: #FFF6DD; border: 1px solid #D9B44A; border-radius: 12px; padding: 12px 16px; font-size: 16px; margin-bottom: 20px; color: var(--ink); }
.ph { background: #FFF6DD; border: 1px dashed #B58A12; border-radius: 6px; padding: 0 6px; }
.note { background: #EEF1FA; border-radius: 14px; padding: 14px 18px; font-size: 16px; color: #2C3552; }
details { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 800; min-height: 32px; }
details p { margin-top: 8px; color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; border-radius: 12px; overflow: hidden; min-width: 520px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: #EEF1FA; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.moods .card { display: grid; place-items: center; padding: 14px 8px; }
.moods img { width: auto; max-height: 190px; }
.moods b { display: block; margin-top: 6px; font-size: 16px; }
.on-bg { background: var(--a-soft); border-color: var(--a-line); }
.pillar-list { display: grid; gap: 28px; }

/* stopka */
.foot { background: var(--navy); color: #E7EBF6; padding: 44px 0 30px; margin-top: 40px; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.foot a { display: block; padding: 4px 0; color: #C9D1E6; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot :focus-visible { outline-color: #fff; }
.foot .brand { color: #fff; }
.foot .brand b { color: #F4B63F; }
.foot .about { margin-top: 12px; max-width: 34ch; color: #C9D1E6; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid #44527F; padding-top: 16px; font-size: 14px; color: #C9D1E6; }
.foot .legal .ph { background: transparent; border-color: #B4BEDB; }

/* 404 */
.lost { text-align: center; }
.lost img { width: auto; max-height: 230px; }
.lost p { margin: 10px auto 22px; }

/* telefon i wąskie okno */
@media (max-width: 960px) {
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap, .g2 { grid-template-columns: 1fr; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .moods { grid-template-columns: repeat(2, 1fr); }
  .stage { min-height: 300px; }
  /* przycisk menu pojawia się tylko, gdy działa JavaScript (klasa js na <html>); bez JS menu zostaje widoczne i zawija się */
  .js .burger { display: block; }
  .js .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 20px 20px; border-bottom: 2px solid var(--line); }
  .js .nav.open { display: flex; }
  .head .wrap { flex-wrap: wrap; padding-block: 8px; }
  .js .head .wrap { flex-wrap: nowrap; padding-block: 0; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .foot .wrap { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
  .pagehead .wrap { flex-direction: column; align-items: flex-start; }
  .brand { font-size: 21px; }
}

/* tabele ze stanem: na telefonie każdy wiersz to osobna karta */
@media (max-width: 560px) {
  .tbl.stack { min-width: 0; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack td { display: block; border: 0; padding: 3px 14px; }
  .tbl.stack td:first-child { font-weight: 800; }
}
[id] { scroll-margin-top: 92px; }

/* mniej ruchu: preferencja systemu */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
