/* ---------- tokens ---------- */

:root {
  --canvas: #f1eee8;
  --paper: #fbfaf7;
  --ink: #1b1b1a;
  --graphite: #55534f;
  --pencil: #a39b97;
  --rule: rgba(27, 27, 26, 0.16);

  --sans: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;
  --hand: "Patrick Hand", "Comic Neue", cursive;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(88px, 12vw, 168px);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas) url("../img/canvas.png") repeat;
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0; font-weight: 300; }

::selection { background: var(--ink); color: var(--canvas); }

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hand {
  font-family: var(--hand);
  font-weight: 400;
}

.muted { color: var(--graphite); }

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--canvas);
  z-index: 100;
}
.skip:focus { left: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 238, 232, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand img { height: 26px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
  font-size: 16px;
  letter-spacing: 0.01em;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--graphite);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"]:not(.nav__cta) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}
.nav .nav__cta {
  color: var(--ink);
  padding: 6px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav .nav__cta:hover,
.nav .nav__cta[aria-current="page"] { background: var(--ink); color: var(--canvas); }

/* przycisk menu widać tylko na telefonie i tylko z JS */
.nav-toggle {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* ---------- shared ---------- */

.eyebrow {
  margin-bottom: 28px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}

.lead {
  font-size: clamp(21px, 2.1vw, 26px);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--canvas); }

.link {
  position: relative;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.3s ease;
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
/* większe pole dotyku bez zmiany wyglądu */
.link::after { content: ""; position: absolute; inset: -10px -6px; }

.visually-hidden,
.js .tabs__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* a drawing pinned to the canvas */
.frame {
  margin: 0;
  padding: clamp(8px, 1vw, 12px);
  background: var(--paper);
  box-shadow:
    0 1px 1px rgba(27, 27, 26, 0.05),
    0 10px 30px -14px rgba(27, 27, 26, 0.28);
}
.frame img { width: 100%; }

.section { padding-block: var(--section) 0; }
.section--page { padding-top: clamp(40px, 7vw, 96px); }
main > :last-child { padding-bottom: var(--section); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.section__head h1,
.section__head h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.015em;
}

/* hand-drawn marks */
.scribble {
  display: block;
  overflow: visible;
  fill: none;
  stroke: var(--pencil);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scribble text {
  fill: var(--pencil);
  stroke: none;
  font-family: var(--hand);
  font-size: 30px;
  letter-spacing: 0.02em;
}
.js .scribble path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.6, 0, 0.3, 1);
}
.js .scribble path:nth-of-type(2) { transition-delay: 0.5s; }
.js .scribble path:nth-of-type(3) { transition-delay: 0.85s; transition-duration: 0.35s; }
.js .scribble.is-drawn path { stroke-dashoffset: 0; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(40px, 7vw, 96px) 0; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}

.hero__title { margin-bottom: 36px; }
.hero__title .hand {
  display: block;
  font-size: clamp(104px, 15vw, 212px);
  line-height: 0.82;
  letter-spacing: -0.01em;
  margin-left: -0.04em;
}
.hero__sub {
  display: block;
  margin-top: clamp(30px, 3.4vw, 48px);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 300;
  line-height: 1.2;
}

.hero__lead {
  max-width: 34ch;
  font-size: clamp(18px, 1.5vw, 20px);
  color: var(--graphite);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  margin: 32px 0 40px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.facts li {
  padding: 4px 18px;
  border-left: 1px solid var(--rule);
}
.facts li:first-child { padding-left: 0; border-left: 0; }

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 32px;
}
.hero__actions .link { font-size: 18px; letter-spacing: 0.04em; }

.hero__figure {
  justify-self: end;
  width: 100%;
  max-width: 470px;
  transform: rotate(0.6deg);
}

/* ---------- kafelki (strona główna) ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  text-decoration: none;
}
.tile__title {
  margin-bottom: 10px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.tile p { margin-bottom: 14px; color: var(--graphite); }
.tile__arrow {
  width: 56px;
  height: 20px;
  margin-top: auto;
  transition: transform 0.3s ease;
}
.tile:hover .tile__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.tile:hover .tile__arrow { transform: translateX(6px); }

/* ---------- zakładki (zajęcia) ---------- */

/* bez JS przyciski są ukryte, a panele stoją jeden pod drugim z nagłówkami */
.tabs__list { display: none; }
.js .tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(22px, 3vw, 44px);
  margin-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.tabs__tab {
  position: relative;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--graphite);
  font: inherit;
  font-size: clamp(18px, 1.7vw, 21px);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.tabs__tab:hover,
.tabs__tab[aria-selected="true"] { color: var(--ink); }
/* kreska ołówkiem pod aktywną zakładką */
.tabs__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: rotate(-0.8deg);
}
.tabs__panel[hidden] { display: none; }
.tabs__panel + .tabs__panel { margin-top: clamp(64px, 9vw, 120px); }
.js .tabs__panel + .tabs__panel { margin-top: 0; }
/* przy wejściu z kotwicą (#program) zakładki zostają widoczne nad panelem */
.js .tabs__panel { scroll-margin-top: calc(49px + clamp(36px, 5vw, 64px)); }
.tabs__heading {
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
}
.tabs__lead { max-width: 30em; }

.quote {
  position: relative;
  margin: clamp(56px, 8vw, 104px) 0;
  max-width: 820px;
  margin-left: auto;
  margin-right: clamp(0px, 6vw, 80px);
}
.quote p {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
}
.quote .scribble--underline {
  width: 70%;
  height: 22px;
  margin-top: 10px;
  margin-left: auto;
}

.blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(36px, 5vw, 72px);
}
.block {
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.block h3 {
  margin-bottom: 8px;
  font-size: clamp(21px, 1.9vw, 24px);
  font-weight: 400;
  line-height: 1.3;
}
.block p { max-width: 34em; color: var(--graphite); }

/* ---------- prace ---------- */

.gallery__head { justify-content: space-between; align-items: center; }

.gallery__nav { display: flex; gap: 10px; }
.gallery__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.gallery__btn:hover { background: var(--ink); color: var(--canvas); }
.gallery__btn:disabled { opacity: 0.25; pointer-events: none; }
.gallery__btn svg,
.lightbox__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery__note {
  margin: calc(clamp(36px, 5vw, 64px) * -0.55) 0 clamp(28px, 3.5vw, 44px);
  font-size: 24px;
  color: var(--graphite);
}

/* the track runs to the screen edge; its first item lines up with the content column */
.gallery__track {
  --edge: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 12px var(--edge) 40px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -6px; }

.gallery__item {
  flex: none;
  scroll-snap-align: start;
}
.gallery__item:nth-child(odd) .gallery__open { transform: rotate(-0.5deg); }
.gallery__item:nth-child(even) .gallery__open { transform: rotate(0.4deg); }

.gallery__open {
  display: block;
  border: 0;
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery__open:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 1px 1px rgba(27, 27, 26, 0.05),
    0 18px 36px -16px rgba(27, 27, 26, 0.34);
}
.gallery__open img {
  width: auto;
  height: clamp(300px, 36vw, 480px);
}

.gallery__all {
  margin: -12px 0 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}

/* siatka wszystkich prac (prace.html): równe pola, cała praca w powiększeniu */
.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.works .gallery__open { width: 100%; }
.works .gallery__open img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.lightbox {
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 12px;
  border: 0;
  background: var(--paper);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(27, 27, 26, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 24px);
  margin-inline: auto;
}
.lightbox__close {
  position: absolute;
  top: -18px;
  right: -18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--canvas);
  cursor: pointer;
}

/* ---------- program ---------- */

.program {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(40px, 7vw, 112px);
}
.program__intro .lead { margin-bottom: 1.2em; }

.program__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}
.program__list li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.4;
}
.program__list li:last-child { border-bottom: 1px solid var(--rule); }
.program__list li::before {
  content: counter(item, decimal-leading-zero);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--graphite);
}

/* ---------- organizacja ---------- */

.org {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.org__facts {
  margin: 0;
  border-top: 1px solid var(--rule);
}
.org__facts div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.org__facts dt {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.org__facts dd {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.4;
}
.org__price h3 {
  margin-bottom: 16px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
}
.org__price > p { max-width: 30em; }
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 8px 0 12px;
  color: var(--ink);
}
.price__amount {
  font-family: var(--hand);
  font-size: clamp(56px, 7vw, 84px);
  line-height: 1;
}
.price__unit { font-size: clamp(18px, 1.6vw, 21px); }

/* ---------- o mnie ---------- */

.me {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.me__photo {
  position: sticky;
  top: 108px;
  transform: rotate(-0.6deg);
}
.me__text { max-width: 40em; }
.me__text .lead { margin-bottom: 1.4em; }

.points {
  display: grid;
  gap: 0;
  margin: 0 0 2.4em;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.points li {
  position: relative;
  padding: 14px 0 14px 44px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.45;
}
/* a short pencil stroke as the marker */
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(14px + 0.72em);
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--pencil);
  transform: rotate(-4deg);
}

/* rozwijane sekcje: plus z dwóch kresek ołówka, po otwarciu pionowa kładzie się w minus */
.more { border-top: 1px solid var(--rule); }
.more details { border-bottom: 1px solid var(--rule); }
.more summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 10px 0 10px 44px;
  font-size: clamp(20px, 1.8vw, 23px);
  list-style: none;
  cursor: pointer;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before,
.more summary::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 22px;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--graphite);
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
}
.more summary::after { transform: rotate(84deg); }
.more details[open] summary::after { transform: rotate(-4deg); }
.more summary:hover { color: var(--graphite); }
.more__body {
  padding: 0 0 24px 44px;
  color: var(--graphite);
}

/* regulamin: numerowane punkty w rozwijanych paragrafach */
.legal-intro { margin-bottom: 28px; color: var(--graphite); }
.legal-intro a { color: inherit; }
.legal {
  margin: 0;
  padding-left: 1.4em;
  font-size: 16px;
  line-height: 1.6;
}
.legal > li + li { margin-top: 8px; }
.legal > li::marker { color: var(--graphite); font-variant-numeric: tabular-nums; }
.legal__sub { margin: 6px 0 0; padding-left: 1.4em; }
.legal__sub li + li { margin-top: 2px; }
.legal--plain { list-style: none; padding-left: 0; }
.signup__terms {
  margin-top: clamp(40px, 5vw, 64px);
  max-width: 40em;
  color: var(--graphite);
  font-size: 15px;
}

/* ---------- w szkole ---------- */

.school { padding-top: var(--section); }

.school__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: end;
  padding-block: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--ink);
}

.school__title { line-height: 1; }
.school__title .hand {
  display: block;
  font-size: clamp(88px, 12vw, 176px);
  line-height: 0.85;
  margin-left: -0.04em;
}
.school__sub {
  display: block;
  margin-top: clamp(24px, 2.6vw, 36px);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.school__aside { max-width: 26em; }
.school__aside p {
  margin-bottom: 28px;
  font-size: clamp(18px, 1.5vw, 20px);
  color: var(--graphite);
}
.school__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.school__actions .btn { flex: 1 1 200px; }
.school__aside .school__more {
  margin: 24px 0 0;
  font-size: 17px;
  color: var(--ink);
}

/* ---------- zapisy ---------- */

.signup { padding-bottom: var(--section); }

.signup__title {
  margin-bottom: clamp(48px, 7vw, 96px);
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.signup__title span { color: var(--graphite); }

.signup__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: end;
}

.phone {
  display: inline-block;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding-block: 4px;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.phone:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }

.scribble--napisz {
  width: min(260px, 70%);
  margin: 4px 0 18px clamp(0px, 6vw, 80px);
}

.signup__hint {
  max-width: 30em;
  color: var(--graphite);
}
.signup__sms .signup__hint,
.signup__form .signup__hint { margin-bottom: 24px; }

.signup__scan {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 24px;
}
.scribble--skanuj { width: min(300px, 58%); flex: none; }
.qr {
  width: clamp(140px, 14vw, 180px);
  background: var(--paper);
  padding: 10px;
  box-shadow: 0 10px 30px -14px rgba(27, 27, 26, 0.28);
}

.signup__mobile { display: none; }

/* osadzony formularz zapisów */
.embed {
  margin-top: clamp(64px, 9vw, 120px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(49px + clamp(36px, 5vw, 64px));
}
.embed__title {
  margin-bottom: 28px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
}
.embed__frame {
  display: grid;
  justify-items: start;
  gap: 20px;
  max-width: 820px;
}
.embed__note { max-width: 34em; color: var(--graphite); }
.embed__frame.is-loaded {
  display: block;
  background: var(--paper);
  box-shadow: 0 10px 30px -14px rgba(27, 27, 26, 0.28);
}
.embed__frame iframe {
  display: block;
  width: 100%;
  height: clamp(640px, 85vh, 1000px);
  border: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 36px;
  font-size: 15px;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 40px;
}
.site-footer img { height: 20px; width: auto; margin-right: auto; }
.site-footer p { margin: 0; }
.site-footer a {
  display: inline-block;
  padding-block: 11px;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* stały przycisk zapisu na dole ekranu telefonu */
.sticky-cta { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero__grid,
  .program,
  .org,
  .me,
  .school__inner,
  .signup__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__figure { justify-self: start; max-width: 420px; }
  .me__photo { position: static; max-width: 420px; }
  .signup__grid { gap: 64px; }
  .quote { margin-right: 0; }
}

@media (max-width: 759px) {
  /* bez JS linki zawijają się pod logo */
  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 60px;
    padding-block: 8px;
    gap: 0 24px;
  }
  .nav { flex-wrap: wrap; gap: 0 20px; }

  .js .site-header__inner { flex-wrap: nowrap; height: 60px; padding-block: 0; }
  .js .nav-toggle { display: grid; }
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--canvas) url("../img/canvas.png") repeat;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -24px rgba(27, 27, 26, 0.4);
    font-size: 20px;
  }
  .js .site-header.is-open .nav { display: flex; }
  .js .site-header.is-open { border-bottom-color: var(--rule); }
  .js .nav a:not(.nav__cta) { min-height: 52px; border-bottom: 1px solid var(--rule); }
  .js .nav .nav__cta { justify-content: center; min-height: 50px; margin-top: 20px; }

  .tiles,
  .blocks { grid-template-columns: minmax(0, 1fr); }

  .sticky-cta {
    display: flex;
    position: fixed;
    z-index: 40;
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 12px 28px -12px rgba(27, 27, 26, 0.5);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .sticky-cta:hover { background: var(--ink); color: var(--canvas); }
  .sticky-cta.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
  }
  /* miejsce na przycisk, żeby nie zasłaniał stopki */
  .sticky-cta ~ .site-footer { padding-bottom: calc(36px + 62px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 760px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .works { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .brand img { height: 22px; }
  html { scroll-padding-top: 72px; }

  .hero__figure { max-width: none; }

  .facts { font-size: 14px; letter-spacing: 0.02em; }
  .facts li { padding: 4px 12px; }


  /* on a phone you can't scan your own screen */
  .signup__scan { display: none; }
  .signup__mobile { display: inline-flex; width: 100%; }
  .signup__form .btn { width: 100%; }
  .scribble--napisz { margin-left: 24px; }

  .site-footer__inner { display: grid; justify-items: start; gap: 10px; }
  .site-footer img { margin: 0 0 10px; }

  /* przycisk zamykania powiększenia nie wychodzi poza ekran */
  .lightbox__close { top: -8px; right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .scribble path { transition: none; stroke-dashoffset: 0; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; }
  .site-header { position: static; }
  .frame { box-shadow: none; }
  .sticky-cta,
  .nav-toggle { display: none; }
}
