/* ============================================================
   PLAMA — artystyczne przedszkole
   estetyka: kartka papieru na kolorowym stole, kredkowa paleta,
   polaroidy z taśmą, bazgroły, naklejki
   ============================================================ */

:root {
  --paper: #fffaf1;
  --paper-2: #fff3df;
  --ink: #2d2a26;
  --ink-soft: #6b645c;
  --red: #ff5d5d;
  --yellow: #ffc933;
  --blue: #4aa8ff;
  --green: #43c465;
  --violet: #9b6bff;
  --pink: #ff8fc7;
  --font-display: "Baloo 2", sans-serif;
  --font-body: "Atkinson Hyperlegible", sans-serif;
  --w: 1060px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  /* kolorowy "stół" pod kartką */
  background: #f4ede2;
  background-image:
    radial-gradient(var(--red) 2.2px, transparent 2.6px),
    radial-gradient(var(--blue) 2.2px, transparent 2.6px),
    radial-gradient(var(--yellow) 2.2px, transparent 2.6px),
    radial-gradient(var(--green) 2.2px, transparent 2.6px);
  background-size: 96px 96px, 96px 96px, 96px 96px, 96px 96px;
  background-position: 0 0, 48px 48px, 48px 0, 0 48px;
}

::selection { background: var(--yellow); }

/* ---------- kartka ---------- */
.page {
  max-width: var(--w);
  margin: clamp(.8rem, 3vw, 2.5rem) auto;
  background: var(--paper);
  border-radius: 26px;
  border: 3px solid var(--ink);
  box-shadow: 10px 12px 0 rgba(45, 42, 38, .9);
  overflow: clip;
}
@media (max-width: 1100px) { .page { margin-inline: clamp(.6rem, 2vw, 1.5rem); } }

/* ---------- topbar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 3px dashed rgba(45,42,38,.18);
}
.top__logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .6rem; position: relative;
}
.top__logo small {
  font-family: var(--font-body); font-weight: 400; font-size: .68rem; color: var(--ink-soft);
  max-width: 90px; line-height: 1.25;
}
.top__blob {
  width: 34px; height: 34px; flex: none; background: var(--red);
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  border: 3px solid var(--ink);
  animation: blobSpin 14s linear infinite;
}
@keyframes blobSpin { to { transform: rotate(360deg); } }
.top__nav { display: flex; align-items: center; gap: 1.4rem; }
.top__nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.top__nav a:not(.top__cta):hover { text-decoration: underline wavy var(--blue) 2px; text-underline-offset: 5px; }
.top__cta {
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px;
  padding: .45em 1.2em; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.top__cta:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
@media (max-width: 720px) { .top__nav a:not(.top__cta) { display: none; } }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: .6em 1.5em; background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, filter .2s;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--red { background: var(--red); color: #fff; }
.btn--green { background: var(--green); color: #fff; }
.btn--outline { background: var(--paper); }
.btn__spinner {
  display: none; width: 1em; height: 1em; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; filter: saturate(.7); }

/* ---------- marker highlight ---------- */
.mark { padding: .04em .18em; border-radius: .35em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mark--yellow { background: linear-gradient(104deg, transparent 2%, var(--yellow) 5%, var(--yellow) 95%, transparent 98%); }
.mark--blue   { background: linear-gradient(100deg, transparent 2%, #b5dcff 5%, #b5dcff 96%, transparent 98%); }
.mark--pink   { background: linear-gradient(97deg,  transparent 2%, #ffd2ea 6%, #ffd2ea 95%, transparent 98%); }
.mark--green  { background: linear-gradient(101deg, transparent 2%, #c3efcf 5%, #c3efcf 96%, transparent 98%); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero__hello { font-weight: 700; color: var(--ink-soft); letter-spacing: .06em; margin-bottom: .6rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.18; letter-spacing: -.01em;
}
.hero__lead { margin: 1.3rem 0 1.8rem; max-width: 50ch; color: var(--ink-soft); font-size: 1.04rem; }
.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero__scribble { width: 190px; margin-top: 1.6rem; display: block; }
.hero__scribble path { stroke-dasharray: 320; stroke-dashoffset: 320; }
.reveal.is-in .hero__scribble path, .hero__scribble.is-in path { animation: draw 1.1s ease-out forwards .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* kolaż polaroidów */
.hero__collage { position: relative; min-height: 420px; }
@media (max-width: 860px) { .hero__collage { min-height: 360px; margin-top: 1rem; } }
.polaroid {
  position: absolute; background: #fff; border: 3px solid var(--ink);
  padding: .6rem .6rem 0; border-radius: 6px;
  box-shadow: 6px 7px 0 rgba(45,42,38,.85);
}
.polaroid::before {
  /* taśma klejąca */
  content: ""; position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  width: 92px; height: 26px; background: rgba(255,201,51,.75);
  border-left: 2px dashed rgba(45,42,38,.35); border-right: 2px dashed rgba(45,42,38,.35);
}
.polaroid img { width: 100%; height: auto; display: block; border: 2px solid rgba(45,42,38,.2); }
.polaroid figcaption {
  font-family: var(--font-display); font-weight: 700; text-align: center;
  padding: .45rem 0 .6rem; font-size: .95rem; color: var(--ink-soft);
}
.polaroid { --rot: 0deg; transform: rotate(var(--rot)); }
.polaroid--a { width: min(62%, 300px); top: 0; left: 2%; --rot: -4deg; z-index: 2; }
.polaroid--b { width: min(56%, 270px); bottom: 0; right: 0; --rot: 5deg; z-index: 3; }
.polaroid:hover { --rot: -1deg; transform: rotate(var(--rot)) scale(1.03); transition: transform .3s cubic-bezier(.34,1.6,.64,1); }
.polaroid--b:hover { --rot: 2deg; }

.sticker { position: absolute; font-size: 2.4rem; line-height: 1; user-select: none; }
.sticker--sun { top: -6px; right: 8%; color: var(--yellow); text-shadow: 2px 2px 0 var(--ink); animation: bob 4s ease-in-out infinite; }
.sticker--star { bottom: 34%; left: -6px; color: var(--violet); text-shadow: 2px 2px 0 var(--ink); animation: bob 5s ease-in-out infinite reverse; }
@keyframes bob { 50% { transform: translateY(-9px) rotate(8deg); } }

/* ---------- fala / sekcje ---------- */
.wave { line-height: 0; }
.wave svg { width: 100%; height: 40px; display: block; }
.section { padding: clamp(2.2rem, 5vw, 3.8rem) clamp(1.2rem, 4vw, 3rem); }
.section--tinted { background: var(--paper-2); }
.h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.25; margin-bottom: 1rem;
}
.section__lead { color: var(--ink-soft); max-width: 58ch; margin-bottom: 2rem; }

/* ---------- wartości ---------- */
.values { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(min(220px,100%), 1fr)); margin-top: 1.6rem; }
.value {
  --vc: var(--red);
  background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: 1.4rem 1.3rem 1.5rem; position: relative;
  box-shadow: 5px 6px 0 var(--vc);
  transition: transform .2s;
}
.value:nth-child(odd) { transform: rotate(-.8deg); }
.value:nth-child(even) { transform: rotate(.9deg); }
.value:hover { transform: rotate(0) translateY(-4px); }
.value--red { --vc: var(--red); } .value--blue { --vc: var(--blue); }
.value--yellow { --vc: var(--yellow); } .value--violet { --vc: var(--violet); }
.value__icon {
  width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.6rem;
  background: color-mix(in srgb, var(--vc) 22%, #fff);
  border: 3px solid var(--ink); border-radius: 50% 44% 52% 48% / 46% 54% 46% 54%;
  margin-bottom: .9rem;
}
.value h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin-bottom: .4rem; }
.value p { font-size: .92rem; color: var(--ink-soft); }

/* ---------- grupy ---------- */
.groups { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(260px,100%), 1fr)); }
.group {
  border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; background: #fff;
  box-shadow: 6px 7px 0 var(--gc); transition: transform .2s;
}
.group:hover { transform: translateY(-5px); }
.group__photo { aspect-ratio: 4/2.9; overflow: hidden; border-bottom: 3px solid var(--ink); }
.group__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.group:hover .group__photo img { transform: scale(1.06); }
.group__body { padding: 1.2rem 1.3rem 1.4rem; }
.group__age {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  background: var(--gc); color: #fff; border: 2px solid var(--ink);
  border-radius: 999px; padding: .15em .9em; margin-bottom: .5rem;
}
.group h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.group p { font-size: .92rem; color: var(--ink-soft); margin-top: .3rem; }

/* ---------- pasek zdjęć ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip img { width: 100%; height: clamp(140px, 22vw, 240px); object-fit: cover; display: block; border-block: 3px solid var(--ink); }
.strip img + img { border-left: 3px solid var(--ink); }

/* ---------- plan dnia ---------- */
.day { list-style: none; max-width: 620px; position: relative; padding-left: 2rem; }
.day::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 3px;
  background: repeating-linear-gradient(var(--ink) 0 9px, transparent 9px 17px);
  border-radius: 2px;
}
.day li { position: relative; padding: .55rem 0 .55rem .6rem; display: flex; gap: 1rem; align-items: baseline; }
.day li::before {
  content: ""; position: absolute; left: -2rem; top: 1.05em; width: 13px; height: 13px;
  border: 3px solid var(--ink); border-radius: 50%;
  background: var(--yellow);
}
.day li:nth-child(4n+1)::before { background: var(--red); }
.day li:nth-child(4n+2)::before { background: var(--blue); }
.day li:nth-child(4n+3)::before { background: var(--green); }
.day b { font-family: var(--font-display); font-size: 1.05rem; min-width: 3.4em; }
.day span { color: var(--ink-soft); }

/* ---------- wizard rekrutacji ---------- */
.wizard {
  max-width: 640px; background: #fff; border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 8px 9px 0 var(--blue);
  padding: clamp(1.4rem, 3.5vw, 2.4rem); position: relative; overflow: hidden;
}
.wizard__steps {
  list-style: none; display: flex; gap: .6rem; margin-bottom: 1.8rem;
}
.wizard__steps li {
  flex: 1; text-align: center; font-family: var(--font-display); font-weight: 800;
  border: 3px solid var(--ink); border-radius: 14px; padding: .35rem 0 .45rem;
  background: var(--paper); color: var(--ink-soft); font-size: 1.05rem;
  display: grid; line-height: 1.1; transition: background .25s, color .25s, transform .25s;
}
.wizard__steps li span { font-family: var(--font-body); font-weight: 400; font-size: .7rem; }
.wizard__steps li.is-active { background: var(--yellow); color: var(--ink); transform: rotate(-1.5deg) scale(1.04); }
.wizard__steps li.is-done { background: var(--green); color: #fff; }

.wizard__panel { border: 0; display: none; }
.wizard__panel.is-active { display: block; animation: slideIn .35s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } }
.wizard__panel legend {
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin-bottom: 1.1rem;
}

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .35rem; }
.field label em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; background: var(--paper);
  padding: .65em .9em; outline: none; transition: box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; box-shadow: 4px 4px 0 var(--yellow); }
.field input.is-invalid, .field select.is-invalid { box-shadow: 4px 4px 0 var(--red); background: #fff2f2; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }

/* chipy grup */
.chips { display: flex; gap: .7rem; flex-wrap: wrap; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; font-weight: 700; font-size: .88rem;
  border: 3px solid var(--ink); border-radius: 999px; padding: .4em 1.1em;
  background: var(--paper); transition: background .2s, color .2s, transform .15s, box-shadow .15s;
}
.chip:hover span { transform: translateY(-2px); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue); }
.chip--red input:checked + span { background: var(--red); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.chip--blue input:checked + span { background: var(--blue); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.chip--green input:checked + span { background: var(--green); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.chips.is-invalid .chip span { box-shadow: 3px 3px 0 var(--red); }

.wizard__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; }
.wizard__error { color: #d02f2f; font-weight: 700; font-size: .9rem; margin-top: .6rem; }
.wizard__legal { font-size: .74rem; color: var(--ink-soft); text-align: center; margin-top: 1.1rem; }

/* sukces */
.wizard__done { text-align: center; position: relative; animation: slideIn .4s ease both; }
.wizard__done-badge {
  font-size: 3rem; line-height: 1; display: inline-block; margin-bottom: .4rem;
  animation: pop .6s cubic-bezier(.34,1.7,.64,1) both .1s;
}
@keyframes pop { from { transform: scale(0) rotate(-30deg); } }
.wizard__done h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.wizard__done-id { color: var(--ink-soft); margin-top: .2rem; }
.wizard__done-id b { color: var(--ink); }
.wizard__summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem;
  margin: 1.4rem 0; padding: 1rem .6rem;
  border-block: 3px dashed rgba(45,42,38,.25);
}
.wizard__summary dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.wizard__summary dd { font-family: var(--font-display); font-weight: 700; margin-top: .15rem; }
.wizard__done > p:last-of-type { max-width: 42ch; margin: 0 auto 1.4rem; color: var(--ink-soft); }
.wizard__done #doneMail { font-weight: 700; color: var(--ink); }

/* konfetti */
.wizard__confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wizard__confetti i {
  position: absolute; top: -12px; width: 10px; height: 14px;
  animation: confetti linear both;
}
@keyframes confetti {
  from { transform: translateY(-10px) rotate(0); opacity: 1; }
  to { transform: translateY(480px) rotate(720deg); opacity: 0; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%); z-index: 99;
  font-family: var(--font-display); font-weight: 700;
  background: var(--green); color: #fff; border: 3px solid var(--ink);
  padding: .6em 1.6em; border-radius: 999px; box-shadow: 4px 5px 0 var(--ink);
  animation: toastIn .4s cubic-bezier(.34,1.5,.64,1) both;
}
@keyframes toastIn { from { transform: translate(-50%, 200%); opacity: 0; } }
.toast.is-hiding { animation: toastOut .35s ease both; }
@keyframes toastOut { to { transform: translate(-50%, 200%); opacity: 0; } }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #efe9e1; padding: 2.4rem clamp(1.2rem, 4vw, 3rem) 1.6rem; }
.foot__cols { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(min(220px,100%), 1fr)); font-size: .9rem; }
.foot__logo { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--yellow); }
.foot a { color: var(--pink); text-decoration: none; }
.foot a:hover { text-decoration: underline wavy; text-underline-offset: 4px; }
.foot__muted { opacity: .55; }
.foot__fine { margin-top: 1.8rem; font-size: .75rem; opacity: .6; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.polaroid.reveal { transform: rotate(var(--rot)) translateY(22px); }
.polaroid.reveal.is-in { transform: rotate(var(--rot)); }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; } .reveal.d4 { transition-delay: .4s; }
.reveal.d5 { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
