/* ATP Kids — taniec-olesnica.pl
   Mobile first. Kolory marki z logo ATP Kids; żółty tylko jako tło pod ciemnym tekstem albo detal. */

/* ---------- Fonty (Sofia Sans, licencja OFL, hostowane lokalnie) ----------
   Podzbiór: łacina z polskimi znakami; tylko używane grubości (tekst 400–700, nagłówki 800–900).
   Nowe znaki spoza zestawu (np. inne języki) wyświetlą się czcionką zapasową. */
@font-face {
  font-family: "Sofia Sans Condensed";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../fonts/sofia-sans-condensed.woff2") format("woff2");
}
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/sofia-sans.woff2") format("woff2");
}

/* ---------- Tokeny ---------- */
:root {
  /* marka (z logo) */
  --red: #C3344C;
  --yellow: #FFEE38;
  --blue: #2F7CBA;
  --green: #009846;
  --text: #1A1A1A;

  /* odcienie do tekstu (kontrast AA na białym i na jasnych tłach) */
  --red-ink: #A82A40;
  --blue-ink: #266598;
  --green-ink: #006E33;

  /* jasne tła kafelków */
  --red-tint: #FBEBEE;
  --blue-tint: #EAF2F9;
  --green-tint: #E6F5EC;
  --yellow-tint: #FFF7B8;

  /* neutralne */
  --bg: #FFFFFF;
  --bg-soft: #F4F4F4; /* kolor tła kolażu ze zdjęciem, dzięki temu zdjęcie wtapia się w sekcję */
  --text-muted: #55555A;
  --line: #E2E2E5;
  --field-border: #76767C;
  --on-dark: #E4E4E7;
  --white: #FFFFFF;
  --shadow-rgb: 26 26 26;          /* --text jako składowe, do cieni: rgb(var(--shadow-rgb) / 0.3) */
  --on-dark-hover: rgb(255 255 255 / 0.12);
  --on-dark-hover-strong: rgb(255 255 255 / 0.24);
  --lightbox-bg: rgb(18 18 20 / 0.96);
  --todo-bg: #FFF59D;
  --todo-block-bg: #FFFCE0;
  --todo-line: #C9A900;  /* ciemniejszy żółty, żeby ramka była widoczna na jasnym tle */

  --font-display: "Sofia Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-todo: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.55rem + 1.5vw, 2.5rem);
  --step-4: clamp(2.125rem, 1.5rem + 3vw, 3.75rem);
  --step-5: clamp(2.75rem, 1.6rem + 4.6vw, 4.75rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section-y: clamp(64px, 9vw, 120px);
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --z-sticky: 10;
  --z-menu: 20;
  --z-skip: 50;
  --z-top: 100;

  --header-h: 68px;
  color-scheme: light;
}
/* Progi nagłówka w em: przy powiększonym tekście (ustawienie przeglądarki) wcześniej włącza się menu z hamburgerem. */
@media (min-width: 64em) {
  :root { --header-h: 84px; }
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  /* Słowo albo ciąg ze spacjami nierozdzielającymi łamie się w środku tylko wtedy, gdy nie mieści się w całym wierszu
     (np. tekst powiększony w przeglądarce na wąskim telefonie). Przy zwykłym rozmiarze nic to nie zmienia. */
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0) / 1.6 var(--font-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1024px) {
  body { font-size: 1.125rem; }
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
/* anywhere: przy powiększeniu tekstu 200% długie słowo („przedszkolach”) łamie się zamiast rozpychać stronę */
h1, h2, h3 { margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
p, li { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 4px; }
.topbar :focus-visible, .footer :focus-visible, .lightbox :focus-visible { outline-color: var(--yellow); }

/* przewijanie do kotwic i do pola z fokusem zostawia miejsce na przyklejony nagłówek */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
#formularz { scroll-margin-top: 40px; }
/* „Start” i logo wracają na samą górę strony (razem z paskiem kontaktu). */
#start { scroll-margin-top: 100vh; }
/* Fokus na przycisku w przyklejonym nagłówku nie przewija strony w górę. */
.header a, .header button { scroll-margin-top: calc(-1 * (var(--header-h) + 16px)); }
@media (max-width: 63.99em) { .header .nav__panel a { scroll-margin-top: 0; } }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Nie rozdzielaj (nazwy, numery): całość przechodzi do nowego wiersza; gdy nie mieści się nawet sama
   (np. tekst powiększony w przeglądarce), łamie się w środku zamiast rozpychać stronę. */
.nowrap { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
/* Numer telefonu (+48 537 93 93 43): w całości w jednym wierszu; przy bardzo dużym tekście na wąskim ekranie
   łamie się tylko między grupami cyfr, nigdy w środku grupy. */
a[href^="tel:"] { overflow-wrap: normal; }
@media (min-width: 22em) { a[href^="tel:"] { white-space: nowrap; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: var(--z-top);
  padding: 12px 18px; border-radius: var(--radius-s);
  background: var(--text); color: var(--white); font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.skip-link:focus-visible { outline-color: var(--yellow); }

/* ---------- Znaczniki do uzupełnienia (usuń, gdy treść będzie gotowa) ----------
   Wyraźne, ale spokojne: żółta przerywana ramka w kolorze marki, zwykła czcionka strony. */
.todo {
  font: 600 0.85em/1.45 var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  background: var(--yellow-tint);
  color: var(--text);
  outline: 1.5px dashed var(--todo-line);
  outline-offset: 0;
  border-radius: 6px;
  padding: 0.08em 0.45em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  margin-inline: 0.15em;
  overflow-wrap: anywhere;
}
.todo-block {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 2px dashed var(--todo-line);
  border-radius: var(--radius-m);
  background: var(--todo-block-bg);
  color: var(--text);
  font: 400 0.9375rem/1.55 var(--font-body);
}
.todo-block strong { font-weight: 700; }

/* ---------- Przyciski i linki ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.4em;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 1rem/1.1 var(--font-body); letter-spacing: 0.01em;
  text-decoration: none; text-align: center; text-wrap: balance;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: var(--white); box-shadow: 0 6px 18px -8px rgb(195 52 76 / 0.7); }
.btn--primary:hover { background: var(--red-ink); box-shadow: 0 10px 22px -10px rgb(168 42 64 / 0.8); }
.btn--outline { border-color: currentColor; background: transparent; }
.btn--outline:hover { background: var(--text); border-color: var(--text); color: var(--white); }
.btn--lg { min-height: 56px; padding: 0.85em min(1.75em, 28px); font-size: 1.0625rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 44px;
  font-weight: 700; color: var(--text);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em;
  text-decoration-color: var(--red);
  transition: text-decoration-color 0.2s, color 0.2s;
}
.link-arrow .icon { color: var(--red); transition: transform 0.25s var(--ease-out); }
.link-arrow:hover { color: var(--red-ink); }
.link-arrow:hover .icon { transform: translateX(4px); }

.icon-link {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: inherit; transition: background-color 0.2s;
}
.icon-link .icon { width: 20px; height: 20px; }
.icon-link:hover { background: var(--on-dark-hover); }

/* ---------- Pasek górny ---------- */
.topbar { background: var(--text); color: var(--white); font-size: 0.875rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.topbar__group { display: flex; align-items: center; gap: 2px; list-style: none; }
.topbar__link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; justify-content: center; padding: 0 6px;
  border-radius: 999px; text-decoration: none;
  transition: background-color 0.2s;
}
.topbar__link .icon { width: 18px; height: 18px; }
.topbar__link:hover { background: var(--on-dark-hover); }
.topbar__text { display: none; }
/* telefon i tablet: Facebook i Instagram po lewej, kontakt po prawej; od 1024 px (pełne menu) wszystko po prawej: telefon, mail, Facebook, Instagram.
   Ikony są w kodzie dwa razy (przed i za kontaktem), żeby kolejność Tab zawsze zgadzała się z tym, co widać. */
.topbar__group--social-desk { display: none; }
@media (min-width: 64em) {
  .topbar__inner { justify-content: flex-end; gap: 16px; }
  .topbar__group--social-mob { display: none; }
  .topbar__group--social-desk { display: flex; }
}
.topbar .todo { font-size: 0.75rem; }
@media (min-width: 640px) {
  .topbar__group--contact { gap: 12px; }
  .topbar__link { padding: 0 10px; }
  .topbar__text { display: inline; }
  .topbar__sr { display: none; }
}

/* ---------- Nagłówek i menu ---------- */
.header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgb(255 255 255 / 0.97);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.header.is-scrolled { box-shadow: 0 8px 24px -16px rgb(var(--shadow-rgb) / 0.35); border-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 8px; min-height: var(--header-h); }
/* Logo zmniejsza się proporcjonalnie, gdy w wierszu brakuje miejsca (nie ściska się w bok). */
.header__logo { display: block; flex: 0 1 88px; min-width: 32px; margin-right: auto; padding: 4px 0; border-radius: 6px; }
.header__logo img { width: 100%; height: auto; }
.header__cta { flex: none; min-height: 44px; padding: 0.55em min(1.1em, 16px); font-size: 0.9375rem; overflow-wrap: normal; }
/* Na wąskim ekranie widać „Zapytaj”, a czytnik ekranu nadal czyta pełne „Zapytaj o zajęcia”. */
.header__cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 30em) {
  .header__cta-long { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .header__cta-short { display: none; }
}
@media (min-width: 64em) {
  .header__logo { flex-basis: 109px; }
  .header__cta { margin-left: 12px; }
}

.nav { order: 2; }
.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 6px;
  border: 0; border-radius: 12px; background: transparent;
}
.nav__toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav__burger { display: grid; gap: 5px; width: 24px; }
.nav__burger span {
  display: block; height: 2.5px; border-radius: 2px; background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] .nav__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__burger span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav__panel {
  position: fixed; left: 0; right: 0; top: var(--menu-top, var(--header-h)); bottom: 0;
  z-index: var(--z-menu);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  border-top: 1px solid var(--line);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.22s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.nav__toggle[aria-expanded="true"] + .nav__panel {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.22s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s;
}
.nav__list { list-style: none; display: grid; }
.nav__link {
  display: flex; align-items: center; min-height: 56px;
  font: 800 2rem/1 var(--font-display); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav__link:hover { color: var(--red-ink); }
.nav__link[aria-current="true"], .nav__link[aria-current="page"] { color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.18em; }
.nav__extra { display: grid; gap: 16px; }
.nav__mail { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-weight: 600; overflow-wrap: anywhere; text-align: center; }
html.menu-open { overflow: hidden; }

@media (min-width: 64em) {
  .nav__toggle { display: none; }
  .nav__panel {
    position: static; display: block; padding: 0; overflow: visible;
    visibility: visible; opacity: 1; transform: none; transition: none;
    border: 0; background: none;
  }
  .nav__list { display: flex; gap: 4px; }
  .nav__link {
    position: relative; min-height: 44px; padding: 0 14px;
    font: 700 1.0625rem/1 var(--font-body); border: 0;
  }
  .nav__link::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 7px;
    background: var(--yellow); border-radius: 4px; z-index: -1;
    transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out);
  }
  .nav__link:hover { color: var(--text); }
  .nav__link:hover::after, .nav__link[aria-current="true"]::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
  .nav__link[aria-current="true"], .nav__link[aria-current="page"] { color: var(--text); text-decoration: none; }
  .nav__extra { display: none; }
  .nav { order: 0; }
}

/* ---------- Wspólne dla sekcji ---------- */
.section-title {
  font: 850 var(--step-4) / 0.98 var(--font-display);
  letter-spacing: -0.005em;
}
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 46rem; }
.section-lead { font-size: var(--step-1); color: var(--text-muted); line-height: 1.5; }
.doodle { pointer-events: none; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-soft); padding-block: clamp(28px, 5vw, 64px) clamp(40px, 6vw, 72px); overflow: clip; }
.hero__inner { display: grid; gap: clamp(28px, 4vw, 48px); }
.hero__copy { display: grid; gap: 20px; }
.hero__title {
  font: 900 var(--step-5) / 0.94 var(--font-display);
  letter-spacing: -0.01em;
}
.hero__line { display: block; text-wrap: balance; } /* gdy zdanie się nie mieści, dzieli się na dwie równe linie */
.hero__burst {
  display: inline-block; vertical-align: top;
  width: 0.5em; height: 0.5em; margin: -0.12em 0 0 0.08em;
  color: var(--red);
}
.marker {
  position: relative;
  padding: 0 0.06em; margin: 0 -0.06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath fill='%23FFEE38' d='M3 8.5C38 4 92 6.5 196 3.2c2 0 2.6 2.4 1.3 4.6l-1 4.8c.6 3.4.4 6.6-1.8 7.2C130 22 70 19 6 21.2c-2.6.1-4-1.8-3.4-4.2L4 13C2 11.4 1.4 9 3 8.5z'/%3E%3C/svg%3E") no-repeat 0 88% / 100% 0.46em;
}
.hero__side { display: grid; gap: 24px; max-width: 30rem; } /* ok. 50 znaków w wierszu leadu na tablecie */
.hero__lead { font-size: var(--step-1); line-height: 1.5; }
/* nagłówek i blok obok: mały napis marki nad hasłem, opis i tagi (tekst od klienta) */
.hero__head { display: grid; gap: 14px; }
.hero__intro { display: grid; gap: 12px; }
.hero__eyebrow { font-weight: 800; font-size: 0.9375rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hero__tagi {
  list-style: none; display: flex; flex-wrap: wrap; row-gap: 4px;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid rgb(var(--shadow-rgb) / 0.14);
  font-weight: 800; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
.hero__tagi li { white-space: nowrap; }
.hero__tagi li:not(:last-child)::after { content: "•" / ""; margin-inline: 0.55em; } /* kropka zostaje na końcu linii, gdy tagi się zawiną */
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero__media { position: relative; margin: 0; }
.hero__media img { width: 100%; border-radius: var(--radius-m); }
@media (min-width: 768px) {
  .hero__media img {
    border-radius: 0;
    /* krawędzie kolażu wtapiają się w tło sekcji */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to bottom, transparent, #000 2%, #000 96%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to bottom, transparent, #000 2%, #000 96%, transparent);
    mask-composite: intersect;
  }
}
/* 1024–1279 px: nagłówek na całą szerokość, a pod nim opis z tagami i przyciski obok siebie (bez pustej prawej połowy) */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .hero__side { grid-template-columns: minmax(0, 30rem) auto; justify-content: space-between; align-items: end; column-gap: 48px; max-width: none; }
}
/* dwie kolumny dopiero od 1280 px: blok z opisem i tagami potrzebuje ok. 380 px szerokości */
@media (min-width: 1280px) {
  .hero__copy { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; column-gap: 48px; }
}

/* ---------- Korzyści ---------- */
.benefits { padding-block: var(--section-y); }
.benefits__title { margin-bottom: clamp(28px, 4vw, 52px); max-width: 18ch; }
.benefits__star {
  display: inline-block; vertical-align: top;
  width: 0.62em; height: 0.62em; margin: -0.18em 0 0 0.12em;
  color: var(--yellow); rotate: 12deg;
  filter: drop-shadow(0 1px 0 rgb(var(--shadow-rgb) / 0.18));
}
.benefits__list { list-style: none; display: grid; gap: 20px; }
.benefit {
  --tint: var(--blue-tint); --ink: var(--blue-ink); --tone: var(--blue);
  display: grid; align-content: start; gap: 10px;
  padding: 24px 24px 28px;
  border-radius: var(--radius-l);
  background: var(--tint);
  rotate: var(--tilt, 0deg);
}
.benefit--green { --tint: var(--green-tint); --ink: var(--green-ink); --tone: var(--green); --tilt: 0.8deg; }
.benefit--red { --tint: var(--red-tint); --ink: var(--red-ink); --tone: var(--red); --tilt: -0.7deg; }
.benefit--blue { --tilt: -1.1deg; }
.benefit__icon {
  width: 72px; height: 72px; padding: 10px; margin-bottom: 6px;
  border-radius: 50%; background: var(--white);
  fill: none; stroke: var(--tone); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.benefit__title { font: 850 var(--step-3) / 1 var(--font-display); color: var(--ink); }
.benefit p { color: var(--text); max-width: 62ch; }
/* tablet: kafelki jeden pod drugim, ikona obok tekstu; trzy kolumny dopiero gdy mają dość miejsca */
@media (min-width: 37.5em) and (max-width: 59.99em) {
  .benefit { grid-template-columns: auto 1fr; column-gap: 24px; align-items: start; padding: 28px; }
  .benefit__icon { grid-row: span 2; margin-bottom: 0; }
}
@media (min-width: 60em) {
  .benefits__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
  .benefit { padding: 28px 28px 32px; }
  .benefit--green { translate: 0 18px; }
}

/* ---------- O mnie ---------- */
.about { background: var(--bg-soft); padding-block: var(--section-y); }
.about__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 72px); align-items: center; }
.about__photo {
  position: relative; margin: 12px auto 0; width: min(100%, 380px);
  padding: 10px 10px 12px; background: var(--white);
  box-shadow: 0 2px 4px rgb(var(--shadow-rgb) / 0.06), 0 22px 40px -22px rgb(var(--shadow-rgb) / 0.45);
  rotate: -2deg;
}
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 32%; }
.about__tape {
  position: absolute; top: -14px; left: 50%; width: 112px; height: 30px; translate: -50% 0; rotate: 4deg;
  background: rgb(255 238 56 / 0.82);
  box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.12);
}
.about__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: start; max-width: 34rem; }
.about__links { display: flex; flex-wrap: wrap; gap: 0 28px; }
.about__hello { max-width: 100%; font-size: var(--step-1); line-height: 1.5; }
.about__firma { display: inline-block; max-width: 100%; font-weight: 700; }
/* krótki cytat Bartka */
.about__cytat {
  margin: 0; padding: 2px 0 2px 18px;
  border-left: 4px solid var(--yellow);
  font: 800 var(--step-2) / 1.2 var(--font-display);
}
@media (min-width: 1024px) { .tylko-waski { display: none; } }
@media (min-width: 768px) {
  .about__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  /* zdjęcie u góry i przyklejone (po rozwinięciu „Więcej o mnie” przewija się razem z tekstem, przy zwijaniu nie skacze) */
  .about__inner { align-items: start; }
  .about__photo { position: sticky; top: calc(var(--header-h) + 40px); }
  .about__photo { width: 100%; max-width: 440px; margin: 0; }
}

/* ---------- Oferta ---------- */
.offer { padding-block: var(--section-y); }
.offer__grid { display: grid; gap: 20px; align-items: start; } /* rozwinięcie jednej karty nie rozciąga drugiej */
.offer-card {
  --tint: var(--blue-tint); --ink: var(--blue-ink);
  display: flex; flex-direction: column; gap: 20px;
  padding: 0 0 24px; overflow: hidden;
  border: 2px solid var(--tint); border-radius: var(--radius-l);
  background: var(--bg);
}
.offer-card--green { --tint: var(--green-tint); --ink: var(--green-ink); }
.offer-card > :not(.offer-card__head):not(.offer-card__img) { margin-inline: 20px; }
.offer-card__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.offer-card__img + .offer-card__head { margin-top: -20px; }
.offer-card__age {
  padding: 0.25em 0.8em; border-radius: 999px;
  background: var(--bg); color: var(--ink); font-weight: 700; font-size: 0.9375rem; white-space: nowrap;
}
.offer-card__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  padding: 22px 20px 20px; background: var(--tint);
}
.offer-card__title { font: 900 clamp(2rem, 1.6rem + 1.6vw, 2.875rem) / 1 var(--font-display); color: var(--ink); }
.offer-card__cta { align-self: flex-start; margin-top: auto; background: var(--ink); border-color: var(--ink); color: var(--white); }
.offer-card__cta:hover { background: var(--text); border-color: var(--text); }
@media (min-width: 48em) {
  .offer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
  /* zwinięte karty tej samej wysokości, „Więcej…” i przycisk w jednej linii; po rozwinięciu jednej druga wraca do swojej wysokości */
  .offer__grid:not(:has(.rozwin[open])) { align-items: stretch; }
  .offer-card__text { flex-grow: 1; }
  .offer-card { padding-bottom: 28px; }
  .offer-card > :not(.offer-card__head):not(.offer-card__img) { margin-inline: 28px; }
  .offer-card__head { padding: 28px 28px 24px; }
}

.program {
  display: grid; gap: 28px;
  margin-top: clamp(28px, 4vw, 40px);
  padding: 24px 20px;
  border: 2px solid var(--line); border-radius: var(--radius-l);
}
.program__style { display: grid; gap: 12px; align-content: start; }
.program__title { font: 850 var(--step-3) / 1.05 var(--font-display); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  padding: 0.4em 0.9em; border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem; line-height: 1.3;
  background: var(--red-tint); color: var(--red-ink);
}
.chip--blue { background: var(--blue-tint); color: var(--blue-ink); }
.chip--green { background: var(--green-tint); color: var(--green-ink); }
.chip--yellow { background: var(--yellow-tint); color: var(--text); }
.program__info { list-style: none; display: grid; gap: 16px; align-content: start; }
.program__info li { display: flex; align-items: flex-start; gap: 14px; line-height: 1.45; }
.program__info .icon {
  width: 40px; height: 40px; padding: 9px; margin-top: -6px; flex: none;
  border-radius: 50%; background: var(--red-tint); color: var(--red-ink);
}
.program__info li:nth-child(2) .icon { background: var(--blue-tint); color: var(--blue-ink); }
.program__info li:nth-child(3) .icon { background: var(--green-tint); color: var(--green-ink); }
.program__info li:nth-child(4) .icon { background: var(--yellow-tint); color: var(--text); }
@media (min-width: 900px) {
  .program { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 36px 40px; }
}

.parents {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center;
  margin-top: clamp(28px, 4vw, 40px);
  padding: 24px 20px;
  border-radius: var(--radius-l);
  background: var(--yellow-tint);
}
.parents__heart { width: 44px; height: 44px; color: var(--red); rotate: -8deg; }
.parents__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-width: 40rem; }
.parents__title { font: 850 var(--step-2) / 1.05 var(--font-display); }
.parents__actions { display: grid; gap: 8px; justify-items: start; }
.parents__msg { font-size: 0.9375rem; font-weight: 600; min-height: 1.5em; }
.parents__msg:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 768px) {
  .parents { grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; padding: 28px 32px; }
  .parents__actions { justify-items: end; }
}

/* ---------- Rozwijane „Więcej…” (O mnie, karty oferty): <details> działa bez JavaScriptu ---------- */
.rozwin { justify-self: stretch; }
/* blok zamiast flexa: przy zawiniętym tekście strzałka zostaje przy ostatnim słowie, a nie ucieka do prawej krawędzi */
.rozwin__przycisk {
  display: block; width: fit-content; max-width: 100%; padding-block: 10px; line-height: 1.5;
  font-weight: 700; color: var(--text); cursor: pointer; list-style: none;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; text-decoration-color: var(--red);
}
.rozwin__przycisk::-webkit-details-marker { display: none; }
.rozwin__przycisk:hover { color: var(--red-ink); }
.rozwin__koniec { white-space: nowrap; } /* ostatnie słowo + strzałka nigdy się nie rozdzielają */
.rozwin__ikona { display: inline-block; vertical-align: -0.25em; margin-left: 0.4em; color: var(--red); transition: rotate 0.25s var(--ease-out); }
.rozwin[open] .rozwin__ikona { rotate: 180deg; }
.rozwin__ukryj, .rozwin[open] .rozwin__pokaz { display: none; }
.rozwin[open] .rozwin__ukryj { display: inline; }
.rozwin__tresc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 8px; }
.rozwin__tytul { font: 850 var(--step-1) / 1.15 var(--font-display); margin: 8px 0 0; text-wrap: balance; }
.rozwin__lista { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.rozwin__lista li::marker { color: var(--red); font-weight: 700; }
ol.rozwin__lista { gap: 8px; }
.rozwin__haslo { font: 850 var(--step-1) / 1.2 var(--font-display); margin-top: 4px; }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .rozwin { interpolate-size: allow-keywords; }
    .rozwin::details-content { height: 0; overflow: clip; transition: height 0.35s var(--ease-out), content-visibility 0.35s allow-discrete; }
    .rozwin[open]::details-content { height: auto; }
  }
}
@media (prefers-reduced-motion: reduce) { .rozwin__ikona { transition: none; } }
@media (max-width: 22em) {
  .offer-card > :not(.offer-card__head):not(.offer-card__img) { margin-inline: 12px; }
  .offer-card__head { padding-inline: 12px; }
  .rozwin__lista { padding-left: 1em; }
  .program { padding-inline: 12px; }
  .program__info li { gap: 8px; }
}

/* ---------- Galeria (podstrona galeria.html) ---------- */
.page-head { background: var(--bg-soft); padding-block: clamp(32px, 6vw, 80px) clamp(32px, 5vw, 64px); }
.page-head__inner { display: grid; gap: 16px; }
.page-head__title { font: 900 var(--step-5) / 0.94 var(--font-display); letter-spacing: -0.01em; }
.page-head__star {
  display: inline-block; vertical-align: top;
  width: 0.48em; height: 0.48em; margin: -0.08em 0 0 0.1em;
  color: var(--yellow); rotate: 12deg;
  filter: drop-shadow(0 1px 0 rgb(var(--shadow-rgb) / 0.18));
}
.page-head__lead { max-width: 34rem; font-size: var(--step-1); line-height: 1.5; }

.gallery { padding-block: clamp(40px, 6vw, 80px) 0; }
.gallery__head { display: grid; gap: 8px; margin-bottom: clamp(20px, 3vw, 32px); max-width: 46rem; }
.gallery__title { font: 850 var(--step-3) / 1 var(--font-display); }
.gallery__lead { color: var(--text-muted); }

/* Zdjęcia: wiersze o równej wysokości (sizes w narzedzia/obrazy.mjs liczy ten sam układ). */
.gallery__list {
  --row-h: 300px;
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.gallery__item {
  --r: calc(var(--w) / var(--h));
  flex: 1 1 100%;
}
.gallery__link {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius-m); background: var(--bg-soft);
}
.gallery__link img {
  width: 100%; height: 100%; max-height: 72svh;
  aspect-ratio: var(--w) / var(--h); object-fit: cover;
  transition: scale 0.6s var(--ease-out);
}
.gallery__link:hover img { scale: 1.035; }
.gallery__link:focus-visible { outline-offset: 4px; }
@media (min-width: 640px) {
  /* wysokość wiersza rośnie z szerokością ekranu, żeby poziome zdjęcia i pion mieściły się razem w jednym rzędzie */
  .gallery__list { --row-h: clamp(130px, 20.5vw, 280px); }
  /* Wiersze o równej wysokości: każde zdjęcie dostaje szerokość proporcjonalną do swoich proporcji. */
  .gallery__item {
    flex: var(--r) 1 calc(var(--r) * var(--row-h));
    max-width: calc(var(--r) * var(--row-h) * 1.7);
  }
  .gallery__link img { max-height: none; }
}
@media (min-width: 1024px) {
  .gallery__list { gap: 16px; }
}

/* Plakaty: równa siatka 2:3 (2, 3, potem 4 kolumny). */
.posters { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.posters > .gallery__item { max-width: none; }
.posters .gallery__link {
  border-radius: var(--radius-s);
  box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.06), 0 16px 30px -20px rgb(var(--shadow-rgb) / 0.5);
}
.posters .gallery__link img { aspect-ratio: 2 / 3; max-height: none; }
/* plakat w innych proporcjach (np. kwadratowy) mieści się w kafelku w całości, bez przycinania tekstu */
.posters .gallery__item--inny .gallery__link img { object-fit: contain; background: var(--bg-soft); }
@media (min-width: 640px) { .posters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (orientation: landscape) and (max-height: 560px) { .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gallery-cta { padding-block: var(--section-y); }
.gallery-cta__box {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 24px 20px;
  border-radius: var(--radius-l);
  background: var(--yellow-tint);
}
.gallery-cta__heart { width: 44px; height: 44px; color: var(--red); rotate: -8deg; }
.gallery-cta__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 36rem; }
.gallery-cta__title { font: 850 var(--step-3) / 1.02 var(--font-display); }
.gallery-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.gallery-cta__actions > * { min-width: 0; max-width: 100%; }
@media (min-width: 56.25em) {
  .gallery-cta__box { grid-template-columns: auto minmax(14em, 1fr) auto; gap: 28px; padding: 36px 40px; }
}

/* ---------- Lightbox (powiększenie w galerii) ----------
   Szerokość obrazu ustawia main.js (fit) z miejsca, które naprawdę zostaje: pod paskiem, nad strzałkami, z podpisem.
   Dzięki temu podpis nigdy nie wchodzi pod przyciski, a po obróceniu telefonu obraz liczy się od nowa. */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: var(--lightbox-bg); color: var(--white);
  touch-action: pan-y pinch-zoom; overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgb(18 18 20 / 0.6); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox[open] { animation: fade-in 0.25s var(--ease-out); }
.lightbox__frame {
  position: relative; height: 100%;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
.lightbox__bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; }
.lightbox__counter { flex: none; margin-right: auto; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.lightbox__figure {
  margin: 0; min-height: 0; overflow: hidden;
  display: grid; grid-template-rows: auto auto; align-content: center; justify-items: start; gap: 12px;
  padding: 0 16px 8px;
}
.lightbox__img {
  display: block; margin-inline: auto; max-width: none; height: auto;
  border-radius: 6px;
  /* do czasu wczytania dużego pliku widać już pobraną miniaturę (main.js) */
  background: rgb(255 255 255 / 0.06) center / cover no-repeat;
  animation: zoom-in 0.35s var(--ease-out);
}
.lightbox.can-zoom .lightbox__img { cursor: zoom-in; }
.lightbox.is-zoomed .lightbox__img { cursor: zoom-out; }
.lightbox__caption { margin-inline: auto; max-width: 60ch; text-align: center; text-wrap: pretty; font-size: 0.9375rem; line-height: 1.45; color: var(--on-dark); }
.lightbox__nav { display: flex; justify-content: center; gap: 16px; padding: 4px 16px max(16px, env(safe-area-inset-bottom)); }
.lightbox__btn {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: var(--on-dark-hover); color: var(--white);
  transition: background-color 0.2s;
}
.lightbox__btn:hover { background: var(--on-dark-hover-strong); }
.lightbox__btn .icon { width: 26px; height: 26px; }
.lightbox__zoom {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 2px solid rgb(255 255 255 / 0.55); border-radius: 999px;
  background: transparent; color: var(--white); font-weight: 700; font-size: 0.9375rem;
  transition: background-color 0.2s;
}
.lightbox__zoom:hover { background: var(--on-dark-hover); }
.lightbox__zoom .icon { width: 20px; height: 20px; }
.lightbox.is-zoomed .lightbox__zoom-plus { display: none; }
/* Wąski ekran (albo duży tekst): „Powiększ” jako sama ikona, żeby „Zamknij” zawsze się mieścił. */
@media (max-width: 22em) {
  .lightbox__zoom { padding: 0; width: 44px; justify-content: center; }
  .lightbox__zoom-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.lightbox--single .lightbox__nav { display: none; }
.lightbox--single .lightbox__counter { visibility: hidden; }
/* Powiększenie 1:1 (plakaty): oryginalna wielkość, przewijanie w obu kierunkach. */
.lightbox.is-zoomed .lightbox__figure { overflow: auto; align-content: start; touch-action: pan-x pan-y pinch-zoom; }
.lightbox__figure:focus-visible { outline-offset: -3px; }
/* W powiększeniu plakat przewija się pod przyciskami: przyciski i licznik dostają ciemne, prawie pełne tło. */
.lightbox.is-zoomed .lightbox__btn, .lightbox.is-zoomed .lightbox__zoom { background: rgb(18 18 20 / 0.88); }
.lightbox.is-zoomed .lightbox__btn:hover, .lightbox.is-zoomed .lightbox__zoom:hover { background: rgb(60 60 66 / 0.95); }
.lightbox.is-zoomed .lightbox__counter { padding: 2px 10px; border-radius: 999px; background: rgb(18 18 20 / 0.88); }
.lightbox.is-zoomed .lightbox__btn:focus-visible, .lightbox.is-zoomed .lightbox__zoom:focus-visible { outline-offset: 0; box-shadow: 0 0 0 6px rgb(18 18 20 / 0.92); }
.lightbox.is-zoomed .lightbox__caption { display: none; }
/* Duży ekran albo telefon trzymany poziomo: strzałki po bokach, więcej wysokości dla obrazu. */
@media (min-width: 900px), (orientation: landscape) and (max-height: 560px) {
  .lightbox__frame { grid-template-rows: auto minmax(0, 1fr); }
  .lightbox__nav {
    position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%;
    justify-content: space-between; padding: 0 16px; pointer-events: none;
  }
  .lightbox__nav .lightbox__btn { pointer-events: auto; }
  .lightbox__figure { padding: 0 84px 16px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  /* Mało wysokości: pasek nad obrazem, podpis w jednym wierszu, „Powiększ” jako sama ikona. */
  .lightbox__frame { grid-template-rows: minmax(0, 1fr); }
  /* „Zamknij”, „Powiększ” i licznik w kolumnie przy prawej krawędzi, strzałki w dolnych rogach
     (wszystko w wolnych pasach obok obrazu; pasy rosną razem z tekstem) */
  .lightbox__bar {
    position: absolute; top: 8px; right: 16px; z-index: 1;
    flex-direction: column-reverse; align-items: center; padding: 0;
  }
  .lightbox__counter { margin: 0; }
  .lightbox__nav { top: auto; bottom: 8px; translate: none; }
  .lightbox__figure { padding: 8px max(84px, 5.5rem); gap: 6px; }
  /* podpis w dwóch wierszach, wyrównany do lewej (przy wyśrodkowaniu Chrome ucina trzecią kropkę wielokropka) */
  .lightbox__caption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-align: start; }
  .lightbox__zoom { padding: 0; width: 44px; justify-content: center; }
  .lightbox__zoom-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Kontakt i formularz ---------- */
.contact { background: var(--bg-soft); padding-block: var(--section-y); }
.contact__inner { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact__inner > * { min-width: 0; }
.contact__info { display: grid; gap: 22px; max-width: 34rem; }
.contact__lead { font-size: var(--step-1); line-height: 1.5; }
.contact__list { list-style: none; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: flex-start; gap: 12px; }
.contact__list .icon { width: 22px; height: 22px; margin-top: 0.15em; color: var(--red); }
.contact__list a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 0.25em; text-decoration-color: var(--red); overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--red-ink); }
.contact__social { display: grid; gap: 10px; }
.contact__social-label { font-weight: 700; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.social__link {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 6px 16px;
  border: 2px solid var(--text); border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.social__link:hover { background: var(--text); color: var(--white); }

.contact__form-wrap {
  padding: 24px 20px 28px;
  border-radius: var(--radius-l);
  background: var(--bg);
  box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.05), 0 24px 48px -32px rgb(var(--shadow-rgb) / 0.35);
}
.form__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 700; }
.field__opt { font-weight: 500; color: var(--text-muted); }
.field__hint { font-size: 0.9375rem; color: var(--text-muted); }
.field__input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 2px solid var(--field-border); border-radius: var(--radius-s);
  background: var(--white); font-size: 1.0625rem; line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__input--area { min-height: 132px; resize: vertical; }
.field__input:hover { border-color: var(--text); }
.field__input:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; border-color: var(--blue-ink); border-radius: var(--radius-s); }
.field__input[aria-invalid="true"] { border-color: var(--red-ink); }
.field__error, .form__error {
  display: flex; align-items: flex-start; gap: 6px;
  color: var(--red-ink); font-size: 0.9375rem; font-weight: 700;
}
.field__error::before, .form__error::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 0.12em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form__error { padding: 12px 14px; border-radius: var(--radius-s); background: var(--red-tint); }
.form__error a { color: inherit; overflow-wrap: anywhere; }
.form__info {
  padding: 12px 14px; border-radius: var(--radius-s);
  background: var(--blue-tint); color: var(--text); font-size: 0.9375rem; font-weight: 600;
}
.form__info a { color: var(--blue-ink); font-weight: 700; overflow-wrap: anywhere; }

.field--check { grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.field--check .field__error { grid-column: 1 / -1; }
.check {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 26px; height: 26px; margin-top: 1px;
  border: 2px solid var(--field-border); border-radius: 7px; background: var(--white);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.check::after {
  content: ""; width: 14px; height: 14px; background: var(--white); scale: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: scale 0.2s var(--ease-out);
}
.check:checked { background: var(--red); border-color: var(--red); }
.check:checked::after { scale: 1; }
.check:hover { border-color: var(--text); }
.check[aria-invalid="true"] { border-color: var(--red-ink); }
.check__label { font-size: 0.9375rem; line-height: 1.5; cursor: pointer; }
.check__label a { font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }

.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form__submit { position: relative; margin-top: 4px; }
.form__spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 0.35); border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}
.form.is-sending .form__spinner { display: block; }
.form.is-sending .form__submit { pointer-events: none; opacity: 0.85; }

.form__done { display: grid; gap: 12px; justify-items: start; padding: 8px 0; }
.form__done:focus { outline: none; }
.form__done-icon {
  width: 56px; height: 56px; padding: 14px; border-radius: 50%;
  background: var(--green-tint); color: var(--green-ink);
}
.form__done-title { font: 850 var(--step-3) / 1 var(--font-display); }
.form__done-text { color: var(--text); overflow-wrap: anywhere; }

@media (min-width: 640px) {
  .contact__form-wrap { padding: 36px 36px 40px; }
}
@media (min-width: 960px) {
  .contact__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .contact__info { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---------- Stopka ---------- */
.footer { background: var(--text); color: var(--on-dark); padding-block: clamp(48px, 7vw, 72px) 28px; font-size: 1rem; }
.footer__inner { display: grid; gap: 32px; }
.footer__brand { display: grid; gap: 14px; max-width: 26rem; }
.footer__logo { display: inline-block; justify-self: start; border-radius: 6px; }
.footer__logo img { width: 180px; height: auto; } /* logo akademii z napisem pod znakiem: szersze, żeby „akademia tańca piasecki” było czytelne */
.footer__tagline { line-height: 1.5; }
.footer__nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__nav a, .footer__mail { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); font-weight: 700; text-decoration: none; }
.footer__nav a:hover, .footer__mail:hover, .footer__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.footer__contact { display: grid; gap: 4px; justify-items: start; }
.footer__social { list-style: none; display: flex; gap: 6px; margin-left: -10px; }
.icon-link--light { color: var(--white); }
.footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px;
  padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 0.14);
  font-size: 0.9375rem; color: var(--on-dark);
}
/* kropka między nazwą a linkiem tylko wtedy, gdy oba mieszczą się w jednym wierszu */
.footer__sep { display: none; }
@media (min-width: 640px) { .footer__sep { display: inline; } }
/* poniżej 640 px każda pozycja w osobnym wierszu; 640–799 px podpis autora w osobnym wierszu (bez wiszącej kropki); od 800 px wszystko w jednym */
@media (max-width: 639.98px) { .footer__legal { flex-direction: column; align-items: flex-start; } }
@media (min-width: 640px) and (max-width: 799.98px) { .footer__autor { flex-basis: 100%; } }
@media (max-width: 799.98px) { .footer__sep--autor { display: none; } }
@media (min-width: 640px) { .footer__legal > .nowrap, .footer__legal > a { white-space: nowrap; } }
.footer__legal a { display: inline-block; padding-block: 10px; color: var(--white); font-weight: 600; text-underline-offset: 0.25em; }
/* podpis autora strony: mały, przygaszony akcent obok polityki prywatności */
.footer__autor { font-size: 0.8125rem; color: rgb(255 255 255 / 0.62); }
.footer__autor b { font-weight: 700; color: rgb(255 255 255 / 0.85); }
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: 1.4fr 1fr auto; align-items: start; column-gap: 48px; }
  .footer__nav ul { display: grid; gap: 0; }
  .footer__legal { grid-column: 1 / -1; }
}

/* ---------- Ruch ---------- */
@keyframes rise { from { opacity: 0; translate: 0 22px; } }
@keyframes rise-soft { from { opacity: 0; translate: 0 36px; } }
@keyframes reveal { from { clip-path: inset(7% 4% 7% 4% round 28px); scale: 1.03; } to { clip-path: inset(0 0 0 0 round 0); scale: 1; } }
@keyframes marker { from { background-size: 0% 0.46em; } }
@keyframes pop { from { opacity: 0; scale: 0.4; rotate: -30deg; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; scale: 0.97; } }
@keyframes spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* klasa .anim (skrypt w <head>) włącza animację wejścia tylko w widocznej karcie */
  .anim .hero__line { animation: rise 0.9s var(--ease-expo) both; }
  .anim .hero__line:nth-child(2) { animation-delay: 0.08s; }
  .anim .hero__line:nth-child(3) { animation-delay: 0.16s; }
  .anim .hero .marker { animation: marker 0.8s var(--ease-expo) 0.55s both; }
  .anim .hero__burst { animation: pop 0.6s var(--ease-expo) 0.8s both; }
  .anim .hero__side { animation: rise 0.9s var(--ease-expo) 0.28s both; }
  .anim .hero__media { animation: reveal 1.1s var(--ease-expo) 0.1s both; }

  @supports (animation-timeline: view()) {
    .benefit, .offer-card, .parents, .gallery__item, .about__photo, .gallery-cta__box {
      animation: rise-soft linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
    .benefit--green { animation-range: entry 12% entry 62%; }
    .benefit--red { animation-range: entry 19% entry 69%; }
  }
}
/* Ograniczony ruch: bez przesuwania, skalowania i wjazdów. Zostają krótkie przejścia kolorów i przenikania,
   bo mówią, że coś się zmieniło (menu, podgląd zdjęcia, stan przycisku). Kręciołek wysyłki zwalnia, ale działa. */
@media (prefers-reduced-motion: reduce) {
  .nav__panel, .nav__toggle[aria-expanded="true"] + .nav__panel { transform: none; transition: opacity 0.15s linear, visibility 0s linear 0.15s; }
  .nav__toggle[aria-expanded="true"] + .nav__panel { transition: opacity 0.15s linear, visibility 0s; }
  .nav__burger span, .nav__link::after, .link-arrow .icon, .gallery__link img, .check::after { transition: none; }
  .btn { transition: background-color 0.15s linear, color 0.15s linear, border-color 0.15s linear; }
  .btn:active { transform: none; }
  .link-arrow:hover .icon { transform: none; }
  .gallery__link:hover img { scale: 1; }
  .lightbox[open] { animation: fade-in 0.15s linear; }
  .lightbox__img { animation: none; }
  .form__spinner { animation-duration: 1.6s; }
}

@media (forced-colors: active) {
  /* kreski hamburgera i oznaczenie bieżącej strony w menu (w tym trybie tła z CSS znikają) */
  .nav__burger span { forced-color-adjust: none; background: ButtonText; }
  .nav__link[aria-current="true"], .nav__link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
  .check, .check::after { forced-color-adjust: none; }
  .check { background: Canvas; border-color: CanvasText; }
  .check:checked { background: Highlight; border-color: Highlight; }
  .check::after { background: HighlightText; }
}

/* ---------- Druk ---------- */
@media print {
  .topbar, .header, .nav__panel, .lightbox, .form, .parents__actions,
  .contact__form-wrap, .footer__social, .footer__logo { display: none !important; }
  .hero, .about, .contact, .page-head { background: none; }
  .footer { background: none; color: #000; padding-block: 16px; }
  .footer a, .footer__legal { color: #000; }
  .btn { background: none !important; color: #000 !important; border-color: #000 !important; box-shadow: none !important; }
  .rozwin::details-content { content-visibility: visible; height: auto; }
  .rozwin__przycisk { display: none; }
}

/* ---------- Podstrona: polityka prywatności ---------- */
.doc { padding-block: clamp(40px, 7vw, 88px); }
.doc__inner { max-width: 36rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; } /* ok. 70 znaków w linii */
.doc__title { font: 900 var(--step-4) / 1 var(--font-display); margin-bottom: 4px; }
.doc__meta { color: var(--text-muted); font-size: 0.9375rem; }
.doc h2 { font: 850 var(--step-2) / 1.1 var(--font-display); margin-top: 20px; }
.doc ul { padding-left: 1.2em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.doc a:not(.link-arrow) { font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; text-decoration-color: var(--red); }
/* adres e-mail w całości w jednym wierszu (bez „atp@taniec-” / „olesnica.pl”); przy bardzo dużym powiększeniu może się zawinąć */
@media (min-width: 20em) { .doc a[href^="mailto:"] { white-space: nowrap; } }
.doc__back { margin-top: 16px; }
.doc-back { display: none; }
@media (min-width: 640px) { .doc-back { display: inline-flex; } }
.doc-footer { padding-block: 28px; }
.doc-footer .footer__legal { border: 0; padding: 0; }
.notfound { min-height: 100svh; display: grid; align-items: center; }
.notfound .header__logo img { height: 64px; margin-bottom: 16px; }
