/* Wybierajki – strona („Półka z bajkami”). Bez frameworka, bez skryptów, bez zewnętrznych zasobów. */

@font-face {
  font-family: 'Baloo 2';
  src: url('fonts/baloo2-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f1e4;
  --paper-deep: #f1e8d8;
  --ink: #2c3a45;
  --ink-soft: #6b5e4e;
  --ink-faint: #75685a;
  --line: #e2d6c1;
  --action: #6ba34f;
  --choice-a: #5a97c9;
  --age-34: #b9dda0;
  --age-56: #a6d3f0;
  --age-78: #d9c2f0;
  --theme-vehicles: rgba(79, 100, 168, 0.65);
  --theme-fairies: rgba(199, 125, 168, 0.65);
  --theme-nature: rgba(94, 154, 82, 0.65);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 28px;
  --title: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

a:focus-visible {
  outline: 3px solid var(--choice-a);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}

a.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-sm);
}

/* Watercolour wash: the app's texture multiplied over the colour (WatercolorWash.tsx). */
.wash {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.wash::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: url('img/wash.jpg') center / cover;
  mix-blend-mode: multiply;
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.wash > * {
  position: relative;
  z-index: 1;
}

.wash.v2::before {
  transform: scaleX(-1);
}

.wash.v3::before {
  transform: scale(-1, -1);
  background-position: 20% 70%;
}

.wash.paper::before {
  opacity: 0.28;
}

.page {
  min-height: 100vh;
}

.ttl,
h1,
h2,
h3 {
  font-family: var(--title);
  font-weight: 700;
}

.wt {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

a.wt:hover {
  color: #fff;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
}

.brand span {
  font-family: var(--title);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

.top nav {
  display: flex;
  gap: 8px 24px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 15px;
}

.btn {
  display: inline-block;
  background-color: var(--action);
  border-radius: var(--r-md);
  padding: 12px 20px;
  font-weight: 800;
  font-size: 16px;
}

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.hero-text {
  flex: 1 1 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.05;
}

.lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 520px;
}

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

.ages li {
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.age-34 { background: var(--age-34); }
.age-56 { background: var(--age-56); }
.age-78 { background: var(--age-78); }

.shelf {
  flex: 1 1 440px;
  position: relative;
  height: 440px;
}

.tile {
  margin: 0;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: var(--title);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
}

.shelf .tile {
  position: absolute;
}

.shelf .t1 { width: 56%; left: 0; top: 40px; transform: rotate(-6deg); }
.shelf .t2 { width: 56%; right: 0; top: 0; transform: rotate(5deg); }
.shelf .t3 { width: 52%; left: 24%; bottom: 0; transform: rotate(-1deg); }

.cap-vehicles { background-color: var(--theme-vehicles); }
.cap-fairies { background-color: var(--theme-fairies); }
.cap-nature { background-color: var(--theme-nature); }

/* Sections */
.kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: 24px;
}

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

.card {
  background-color: var(--paper-deep);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 26px;
  line-height: 32px;
}

.card p,
.parents p {
  margin: 0;
  font-size: 17px;
  line-height: 25px;
  color: var(--ink-soft);
}

.parents {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  scroll-margin-top: 24px;
}

.pair {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pair .tile + .tile {
  margin-top: 40px;
}

.parents-text {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.parents h2,
.soon h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 17px;
  line-height: 25px;
}

.checks li {
  display: flex;
  gap: 12px;
}

.checks li::before {
  content: '✓';
  color: var(--action);
  font-weight: 800;
}

.soon {
  background-color: var(--choice-a);
  border-radius: var(--r-xl);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  scroll-margin-top: 24px;
}

.soon p {
  margin: 0;
  font-size: 17px;
  line-height: 25px;
  max-width: 520px;
}

.soon a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  font-size: 15px;
  line-height: 21px;
  color: var(--ink-faint);
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-weight: 700;
}

/* Long-form pages (privacy, terms, account deletion, 404) */
.page.doc-page .wrap {
  gap: 48px;
}

.doc {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 26px;
  line-height: 1.2;
}

.doc h2.flush {
  margin-top: 0;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 21px;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  padding-left: 24px;
}

.doc li {
  margin-bottom: 6px;
}

.doc a {
  color: #3f7aab;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.meta {
  color: var(--ink-faint);
  font-size: 15px;
}

.summary {
  background-color: var(--paper-deep);
  border-radius: var(--r-lg);
  padding: 24px 28px 12px;
  margin: 24px 0 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 15px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.35);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  background-color: var(--paper-deep);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.not-found {
  text-align: center;
  padding: 48px 0;
}

.not-found .lead {
  margin: 0 auto 28px;
}

/* Phone width: 16px gutter, no horizontal scroll. */
@media (max-width: 600px) {
  .wrap {
    padding: 16px 16px 24px;
    gap: 56px;
  }

  .top nav {
    gap: 8px 16px;
  }

  .hero {
    gap: 32px;
  }

  .hero-text,
  .shelf,
  .pair,
  .parents-text {
    flex-basis: 100%;
  }

  .shelf {
    height: auto;
    aspect-ratio: 1;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
  }

  .parents h2,
  .soon h2 {
    font-size: 32px;
  }

  .soon {
    padding: 36px 20px;
  }

  .card {
    padding: 22px;
  }

  .summary {
    padding: 20px 20px 8px;
  }
}

/* <main> on the home page: sections spaced like .wrap. */
.flow {
  display: flex;
  flex-direction: column;
  gap: inherit;
}

.doc a.btn,
.doc a.btn:hover {
  color: #fff;
  text-decoration: none;
}
