@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ============================================================
   Стилі. Змінні відтворюють токени з Figma (кольори за номерами,
   accent, R, типографіка Montserrat). Світла тема. Mobile-first.
   ============================================================ */

:root {
  --c-0: #ffffff;
  --c-1: #fafafa;
  --c-3: #f1f1f1;
  --c-4: #e4e4e4;
  --c-8: #696969;
  --c-10: #262626;
  --accent: #fdc8d4;
  --purple: #a259ff;
  --R: 16px;
  --section-padding: 52px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tracking: -0.02em;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; interpolate-size: allow-keywords; }

body {
  margin: 0;
  font-family: var(--font);
  letter-spacing: var(--tracking);
  color: var(--c-10);
  background: var(--c-1);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* Колонка сторінки (макет 430px) */
.page { max-width: 460px; margin: 0 auto; }

/* Заголовки секцій — Title-big, по центру */
.h-sec {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.05;
  text-align: center;
  color: var(--c-10);
  margin: 0 0 24px;
}
.sec { padding: var(--section-padding) 0; }
#workshops, #faq, #booking, #useful, #about, #how { padding-left: 16px; padding-right: 16px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: var(--tracking);
  font-weight: 600;
  font-size: 19px;
  padding: 0 24px;
  border-radius: var(--R);
  text-decoration: none;
  background: var(--c-10);
  color: var(--c-0);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.25); }
.btn--outlined {
  background: transparent;
  border: 1px solid var(--c-10);
  color: var(--c-10);
  height: auto;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
  letter-spacing: -0.32px;
  gap: 10px;
}
.btn--outlined:hover { filter: none; background: var(--c-3); }
.btn--outlined img { width: 20px; height: 20px; display: block; }
.wshop-header { padding: 16px 16px 0; }
.back-sec { display: flex; justify-content: center; }
.btn-back {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--c-10); color: var(--c-0);
  font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: var(--tracking);
  padding: 12px 24px 12px 16px; text-decoration: none;
}
.btn-back:hover { filter: brightness(1.25); }
.btn-back svg, .btn-back img { width: 24px; height: 24px; flex: 0 0 24px; display: block; }

/* Сторінка воркшопу: темний боді, світлий контент із заокругленим верхом hero */
body.wshop-page { background: var(--c-10); }
body.wshop-page .hero { background: var(--c-1); border-radius: 32px 32px 0 0; gap: 36px; }
body.wshop-page .sec { background: var(--c-1); }
body.wshop-page .site-footer { background: var(--c-1); }
.btn:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
/* Герой — за Figma (node 109:697): 430×400, gap 64, padding 52/16/0 */
.hero {
  display: flex; flex-direction: column; align-items: center;
  gap: 64px; padding: var(--section-padding) 16px 0; text-align: center;
}
.logo-img { width: 168px; max-width: 80%; height: auto; display: block; }
.hero-intro { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-intro h1 { font-weight: 700; font-size: 36px; line-height: 1.22; margin: 0; }
/* Підзаголовок: 16px Regular, колір як у Figma (#262626) */
.hero-sub { margin: 0; font-weight: 400; font-size: 16px; line-height: 1.25; color: var(--c-10); }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--c-8); border-radius: 8px;
  height: 28px; padding: 0 8px; font-size: 14px; color: var(--c-10);
  display: inline-flex; align-items: center;
}

/* Hero сторінки воркшопу — блок вартості */
.pricing { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pricing-label { margin: 0; font-weight: 400; font-size: 14px; color: var(--c-10); }
.pricing-info { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pricing-amount { margin: 0; font-weight: 700; font-size: 14px; color: var(--c-10); }
.pricing-purpose { margin: 0; font-weight: 400; font-size: 14px; color: var(--c-10); }

/* ---------- Як це працює ---------- */
.hiw { padding: var(--section-padding) 0; }
.hiw .h-sec { margin-bottom: 40px; }
.steps2 { display: flex; flex-direction: column; gap: 4px; max-width: 300px; margin: 0 auto; position: relative; left: 12px; }
.step2 { position: relative; display: flex; gap: 16px; padding-bottom: 32px; }
.step2:last-child { padding-bottom: 0; }
.step2:not(:last-child)::before {
  content: ""; position: absolute; left: 17.5px; top: 40px; bottom: 0;
  width: 1px; background: #c4c4c4;
}
.num2 {
  width: 36px; height: 36px; flex: 0 0 36px;
  border: 1px solid var(--c-10); border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px;
  background: var(--c-1); z-index: 1;
}
.step2 .txt { display: flex; flex-direction: column; gap: 4px; padding-top: 5px; }
.step2 .txt b { font-weight: 700; font-size: 19px; color: var(--c-10); }
.step2 .txt span { font-weight: 400; font-size: 14px; color: var(--c-8); line-height: 1.4; }

/* ---------- Воркшопи (сітка + картки) ---------- */
/* «Обери тему воркшопу» + шеврон — за Figma (Frame 26): gap 4, відступ до списку 24 */
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 24px; }
.pick-title { margin: 0; font-weight: 600; font-size: 19px; line-height: 1.2; color: var(--c-10); }
.pick-chevron {
  width: 24px; height: 24px; display: block; color: var(--c-8);
  animation: chevronBob 1.8s ease-in-out infinite;
}
/* Стрілка плавно ходить угору-вниз — підказка «гортай сюди» */
@keyframes chevronBob {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(6px); }
}

/* ============================================================
   ВЕРСІЯ Б (b.html) — хедер+меню, чіпи з іконками, нова картка.
   Класи не перетинаються з версією А, обидві живуть в одному styles.css.
   ============================================================ */

/* Хедер у героєві: лого ліворуч, кнопка-меню праворуч (за Figma — +16px внутрішнього падінгу) */
.hero-header { width: 100%; padding: 0 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hero-header .logo-img { width: 168px; }
.menu-btn {
  flex: 0 0 48px; width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--c-10); border-radius: var(--R);
  background: none; cursor: pointer;
}
.menu-btn img { width: 20px; height: 20px; display: block; }

/* Чіпи з 3D-іконкою */
.chips2 { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip2 {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--c-8); border-radius: 10px;
  font-weight: 400; font-size: 14px; color: var(--c-10);
}
.chip2 img { width: 16px; height: 16px; display: block; }

/* Кнопка з іконкою (герой / CTA / меню версії Б) */
.btn-ico { width: 20px; height: 20px; display: block; }

/* Повноекранне меню */
.menu-overlay {
  position: fixed; inset: 0; z-index: 1200; background: var(--c-1);
  display: flex; flex-direction: column; gap: 40px;
  padding: 52px 16px; overflow-y: auto;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.menu-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.menu-top { width: 100%; padding: 0 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.menu-nav { display: flex; flex-direction: column; gap: 20px; padding: 12px 16px; }
.menu-nav a { font-weight: 700; font-size: 36px; line-height: 1.2; color: var(--c-10); text-decoration: none; }
.menu-cta { align-self: center; margin-top: auto; }

/* ---------- Картка воркшопу версії Б (component 123:848) ---------- */
.card2 {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 20px 24px;
  /* декоративне рожеве сяйво зверху (Ellipse 2 з компонента): #fdc8d4 → білий */
  background: radial-gradient(240px 240px at 50% -50px, var(--accent), var(--c-0));
  border: 1px solid var(--c-3); border-radius: var(--R);
  box-shadow: 0 1px 5px -4px #242424b3, 0 4px 8px #2424240d;
}
.card2-illo { width: 96px; height: 96px; object-fit: contain; display: block; }
.card2-main { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; text-decoration: none; }
.card2-title { margin: 0; font-weight: 700; font-size: 19px; line-height: 1.2; color: var(--c-10); text-align: center; }
.card2-bottom {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-top: 16px; border-top: 1px solid var(--c-4);
}
.card2-mentor { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card2-mentor .lbl { font-weight: 400; font-size: 14px; color: var(--c-8); }
.card2-mentor .who { display: flex; align-items: center; gap: 8px; }
.card2-mentor .who img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--c-3); }
.card2-mentor .who .name { font-weight: 600; font-size: 19px; line-height: 1.15; color: var(--c-10); }
.card2-price { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.card2-price .lbl { font-weight: 400; font-size: 14px; color: var(--c-8); }
.card2-price .val { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.card2-price .from { font-weight: 400; font-size: 14px; color: var(--c-10); }
.card2-price .amount { font-weight: 600; font-size: 19px; color: var(--c-10); }
.card2-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.card2-btn {
  height: 54px; border-radius: var(--R);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); letter-spacing: var(--tracking);
  font-weight: 600; text-decoration: none; cursor: pointer; border: none;
}
.card2-btn img { width: 20px; height: 20px; display: block; }
.card2-btn--primary { background: var(--c-10); color: #fff; font-size: 19px; }
.card2-btn--ghost { background: var(--c-1); color: var(--c-10); border: 1px solid var(--c-10); font-size: 16px; }

/* ---------- Картка воркшопу — за Figma (component 112:983) ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  text-decoration: none;
  background: var(--c-0); border: 1px solid var(--c-4); border-radius: var(--R);
  padding: 20px 24px;
  box-shadow: 0 1px 5px -4px #242424b3, 0 4px 8px #2424240d;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.card:active { transform: scale(.99); }
.card:hover { border-color: var(--c-10); }

/* Виділена картка («популярний»): рожева обводка + рожева тінь */
.card--popular {
  border-color: var(--accent);
  box-shadow: 0 1px 5px -4px #ff93a5, 0 4px 8px #ff93a51a;
}
.card--popular:hover { border-color: #ff93a5; }
.card-badge {
  position: absolute; top: 12px; right: 12px;
  height: 24px; padding: 1px 8px 0;
  display: inline-flex; align-items: center;
  border: 1px solid #ff667f; border-radius: 8px;
  background: rgba(255, 102, 127, .1);
  font-weight: 500; font-size: 11px; color: #ff6680;
  white-space: nowrap;
}

/* Workshop Info: заголовок + рядок вигоди */
.card-info { display: flex; flex-direction: column; gap: 8px; padding-left: 2px; }
.card-info h3 { margin: 0; font-weight: 700; font-size: 19px; line-height: 1.2; color: var(--c-10); }
.card-benefit { margin: 0; font-weight: 400; font-size: 14px; line-height: 1.2; color: var(--c-8); }

/* Bottom: менторка ліворуч, ціна праворуч, зверху роздільник */
.card-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding-top: 16px; border-top: 1px solid var(--c-4);
}
.card-mentor { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.card-mentor .avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  object-fit: cover; background: var(--c-3);
}
.card-mentor .avatar--initials {
  color: var(--c-8); display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.card-mentor .name { font-weight: 400; font-size: 16px; color: var(--c-8); }
.card-price { flex: 0 0 auto; margin: 0; text-align: right; white-space: nowrap; color: var(--c-10); }
.card-price .lbl { font-weight: 400; font-size: 14px; }
.card-price .amount { font-weight: 600; font-size: 19px; }

/* ---------- Відгуки / Звіти (поки заглушки) ---------- */
.placeholder { text-align: center; color: var(--c-8); font-size: 14px; margin: 0; }

/* Секція «Звіти» — фанний стос скріншотів (без радіусів) */
.reports-stack { position: relative; width: 100%; height: 443px; cursor: pointer; }
.rs-card {
  position: absolute; width: 282px; height: 400px; overflow: hidden;
  box-shadow: 0 4px 8px #2424240d, 0 1px 5px -4px #242424b3;
  transition: transform .46s cubic-bezier(.4, 0, .2, 1);
}
.rs-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.rs-3 { left: calc(50% + 2px);  top: 50%;              transform: translate(-50%, -50%) rotate(10deg); z-index: 1; }
.rs-2 { left: calc(50% - 17px); top: calc(50% - 10px); transform: translate(-50%, -50%) rotate(-5deg); z-index: 2; }
.rs-1 { left: calc(50% - 8px);  top: calc(50% + 10px); transform: translate(-50%, -50%); z-index: 3; }
/* Розкриття в галерею — дзеркало відгуків (передня картка в центр, бічні за екран) */
.reports-stack.lift { z-index: 1001; }
.reports-stack.spread .rs-1 { transform: translate(calc(-50% + 8px), calc(-50% - 10px)) scale(1.37); z-index: 3; }
.reports-stack.spread .rs-2 { transform: translate(calc(-50% - 120vw), -50%) rotate(0deg) scale(1.25); }
.reports-stack.spread .rs-3 { transform: translate(calc(-50% + 120vw), -50%) rotate(0deg) scale(1.25); }

/* Секція «Відгуки» — фанний стос скрінів (білі рамки вшиті в самі картинки) */
.feedback-stack { position: relative; width: 100%; height: 380px; cursor: pointer; }
.fb {
  position: absolute; left: 50%; top: 50%; width: 288px; height: auto;
  border: 1px solid var(--c-4); border-radius: 16px;
  box-shadow: 0 4px 8px #2424240d, 0 1px 5px -4px #242424b3;
}
.fb-3 { transform: translate(-50%, -50%) rotate(6deg); z-index: 1; }
.fb-4 { transform: translate(-50%, calc(-50% + 6px)) rotate(-4deg); z-index: 2; }
.fb-1 { transform: translate(calc(-50% - 18px), calc(-50% - 38px)) rotate(0deg); z-index: 3; }

/* Варіації стосу під менторку (trainer.html): у кожної свої висота секції і розкладка карток,
   бо скріни відгуків різних пропорцій. Значення зняті з макетів testimonials-olha/veronika/nastia.
   Мають стояти ДО правил .spread, щоб анімація розкриття перекривала ці трансформи. */
.feedback-stack.m-olha { height: 300px; }
.feedback-stack.m-olha .fb-3 { transform: translate(calc(-50% - 5px), calc(-50% - 21px)) rotate(6deg); }
.feedback-stack.m-olha .fb-4 { transform: translate(calc(-50% + 1px), calc(-50% + 36px)) rotate(-4deg); }
.feedback-stack.m-olha .fb-1 { transform: translate(calc(-50% - 18px), calc(-50% - 7px)) rotate(0deg); }

.feedback-stack.m-veronika { height: 282px; }
.feedback-stack.m-veronika .fb-3 { transform: translate(calc(-50% - 4px), -50%) rotate(6deg); }
.feedback-stack.m-veronika .fb-4 { transform: translate(-50%, calc(-50% + 35px)) rotate(-4deg); }
.feedback-stack.m-veronika .fb-1 { transform: translate(calc(-50% - 18px), calc(-50% - 27px)) rotate(0deg); }

.feedback-stack.m-nastia { height: 436px; }
.feedback-stack.m-nastia .fb-3 { transform: translate(calc(-50% - 2px), calc(-50% - 144px)) rotate(6deg); }
.feedback-stack.m-nastia .fb-4 { transform: translate(calc(-50% + 27px), calc(-50% + 52px)) rotate(-4deg); }
.feedback-stack.m-nastia .fb-1 { transform: translate(calc(-50% - 25px), calc(-50% - 7px)) rotate(0deg); }

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .38s ease, visibility .38s ease;
}
.lightbox.show { opacity: 1; visibility: visible; pointer-events: auto; }
.lb-img {
  max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity .22s ease;
}
.lightbox.revealed .lb-img { opacity: 1; }
.lightbox.reports .lb-img { border-radius: 0; } /* звіти — без радіусів */
.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  transform: translateY(-96px);
  transition: transform .34s cubic-bezier(.22, .61, .36, 1);
}
.lightbox.revealed .lb-close { transform: translateY(0); }
.lb-nav {
  position: absolute; top: 50%; z-index: 2;
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 30px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  transition: transform .34s cubic-bezier(.22, .61, .36, 1);
}
.lb-nav:hover, .lb-close:hover { background: rgba(0, 0, 0, 0.65); }
.lb-nav img { width: 24px; height: 24px; display: block; }
.lb-prev { left: 12px; transform: translate(-96px, -50%); }
.lightbox.revealed .lb-prev { transform: translate(0, -50%); }
.lb-next { right: 12px; transform: translate(96px, -50%); }
.lightbox.revealed .lb-next { transform: translate(0, -50%); }
.lb-counter {
  position: absolute; bottom: 16px; left: 50%; z-index: 2;
  color: #fff; font-size: 14px; background: rgba(0, 0, 0, 0.45); padding: 4px 10px; border-radius: 999px;
  transform: translate(-50%, 96px);
  transition: transform .34s cubic-bezier(.22, .61, .36, 1);
}
.lightbox.revealed .lb-counter { transform: translate(-50%, 0); }

/* ---------- Менторки ---------- */
.mentors-sec { padding: var(--section-padding) 0; }
.mentors-inner { max-width: 460px; margin: 0 auto; }
.mentors-row {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 0 16px 4px;
  scroll-padding-inline: 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mentors-row::-webkit-scrollbar { display: none; }
.mentor-card {
  flex: 0 0 288px; scroll-snap-align: center;
  background: var(--c-0); border: 1px solid var(--c-4); border-radius: var(--R);
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  cursor: pointer;
}
.mentor-card .photo { width: 100%; height: 166px; background: var(--c-3); border-radius: 8px; object-fit: cover; }
.mentor-card .m-info { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.mentor-card .m-info b { font-weight: 700; font-size: 19px; color: var(--c-10); }
.mentor-card .m-info span { font-weight: 400; font-size: 14px; color: var(--c-8); }
.mentor-card .socials { display: flex; gap: 2px; }
.mentor-card .socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--c-10); text-decoration: none;
}
.mentor-card .socials a:hover { color: var(--c-8); }
.mentor-card .socials img, .mentor-card .socials svg { width: 24px; height: 24px; display: block; }
.mentor-single { display: flex; justify-content: center; }
.mentor-card .collects { font-size: 14px; color: var(--c-8); line-height: 1.4; margin: 0; }

/* ---------- FAQ ---------- */
.faq-card {
  background: var(--c-0); border: 1px solid var(--c-4); border-radius: var(--R);
  overflow: hidden; text-align: left;
}
.faq-card details { border-top: 1px solid var(--c-4); }
.faq-card details:first-child { border-top: none; }
.faq-card summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 46px 16px 16px;
  font-weight: 600; font-size: 16px; color: var(--c-10);
}
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 20px; height: 20px;
  background: url("img/Toggle%20icon.svg") center / contain no-repeat;
  transform: translateY(-50%) rotate(45deg);
  transition: transform .15s ease;
}
.faq-card details[open] summary::after { transform: translateY(-50%) rotate(0deg); }
.faq-card .ans { padding: 0 16px 16px; font-size: 14px; color: var(--c-8); line-height: 1.5; }

/* ============================================================
   Мікроанімації
   ============================================================ */

/* 1) FAQ — плавне відкривання/закривання акордеона */
.faq-card details::details-content {
  block-size: 0; overflow: clip; opacity: 0;
  transition: block-size .28s ease, opacity .25s ease, content-visibility .28s allow-discrete;
}
.faq-card details[open]::details-content { block-size: auto; opacity: 1; }

/* 2) Hero — контент «виплаває» знизу з прозорості (один раз при завантаженні) */
@keyframes floatUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero > *, .hero + section > * { animation: floatUp .4s ease both; }
.hero > *:nth-child(1) { animation-delay: .04s; }
.hero > *:nth-child(2) { animation-delay: .1s; }
.hero > *:nth-child(3) { animation-delay: .16s; }
.hero > *:nth-child(4) { animation-delay: .22s; }
.hero + section > *:nth-child(1) { animation-delay: .28s; }
.hero + section > *:nth-child(2) { animation-delay: .34s; }
.hero + section > *:nth-child(3) { animation-delay: .4s; }

/* 3) Стос відгуків — картки роз'їжджаються за екран і більшають до розміру галереї,
      вуаль темніє під ними; в кінці показуємо саму галерею. */
.fb { transition: transform .46s cubic-bezier(.4, 0, .2, 1), border-radius .46s cubic-bezier(.4, 0, .2, 1), border-color .3s ease; }
.feedback-stack.lift { z-index: 1001; } /* картки над вуаллю — під час відкриття і зворотної анімації */
.feedback-stack.spread .fb-1 { transform: translate(-50%, -50%) rotate(0deg) scale(1.34); z-index: 3; border-radius: 12px; border-color: transparent; } /* 12 × 1.34 ≈ 16 = радіус фото; бордер прибираємо — у фото його нема */
.feedback-stack.spread .fb-3 { transform: translate(calc(-50% - 118vw), -50%) rotate(0deg) scale(1.25); }
.feedback-stack.spread .fb-4 { transform: translate(calc(-50% + 118vw), -50%) rotate(0deg) scale(1.25); }

@media (prefers-reduced-motion: reduce) {
  .hero > *, .hero + section > * { animation: none; }
  .pick-chevron { animation: none; }
  .fb, .rs-card { transition: none; }
  .faq-card details::details-content { transition: none; }
}

/* ---------- CTA ---------- */
.cta { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: var(--section-padding) 24px; }
.cta .h-sec { margin: 0; }
.cta-sub { font-size: 14px; color: var(--c-10); line-height: 1.4; margin: 0; }
.cta-image { align-self: stretch; margin: 8px -24px calc(-1 * var(--section-padding)); overflow: hidden; }
.cta-image img { display: block; width: 100%; height: auto; }

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--c-4);
  padding: 8px 16px; color: var(--c-8); font-size: 14px; text-align: center;
}

/* Десктоп: менторки — три в ряд, без свайпу */
@media (min-width: 940px) {
  .mentors-inner { max-width: 900px; }
  .mentors-row { justify-content: center; overflow: visible; }
  .mentor-card { flex: 0 0 288px; }
}

/* ============================================================
   Сторінка воркшопу (trainer.html)
   ============================================================ */
.site-header { padding: 18px 0 10px; }
.brand { font-weight: 700; font-size: 19px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand .dot { color: var(--accent); }

.back { display: inline-block; margin: 18px 0 6px; font-size: 14px; color: var(--c-8); text-decoration: none; }
.trainer h1 { font-weight: 700; font-size: 32px; line-height: 1.05; margin: 10px 0 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { font-size: 14px; color: var(--c-8); background: var(--c-3); border-radius: 999px; padding: 6px 12px; }
.trainer .lead { font-size: 16px; color: var(--c-10); line-height: 1.4; }

.step-block { margin: 28px 0; }
.step-label { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; margin-bottom: 14px; }
.step-n {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
  background: var(--accent); color: var(--c-10); border-radius: 50%; font-size: 14px; font-weight: 600;
}
.cal-wrap { background: var(--c-0); border: 1px solid var(--c-4); border-radius: var(--R); overflow: hidden; min-height: 560px; }

.donate-copy { font-size: 16px; color: var(--c-8); line-height: 1.4; margin: 0 0 14px; }

.donate-btn { display: flex; width: 100%; }
.donate-btn.is-waiting { background: var(--c-3); color: var(--c-8); }
.donate-btn.is-ready { background: var(--c-10); color: var(--c-0); animation: pulse 1.4s ease-out 3; }
#donate-block.active { scroll-margin-top: 24px; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 0 16px rgba(0, 0, 0, 0); }
}
.hint { margin-top: 12px; font-size: 14px; color: var(--c-8); text-align: center; }

/* Booking — нумеровані кроки (крок 1 = ембед, крок 2 = донат) */
#booking .h-sec { margin-bottom: 40px; }
.booking-steps { display: flex; flex-direction: column; gap: 4px; }
.bstep { position: relative; display: flex; gap: 14px; align-items: flex-start; padding-bottom: 32px; }
.bstep:last-child { padding-bottom: 0; }
.bstep:not(:last-child)::before {
  content: ""; position: absolute; left: 17.5px; top: 40px; bottom: 0; width: 1px; background: #c4c4c4;
}
.bstep-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.bstep-head { display: flex; flex-direction: column; gap: 4px; }
.bstep-title { margin: 0; font-weight: 700; font-size: 19px; line-height: 1.15; color: var(--c-10); }
.bstep-desc { margin: 0; font-weight: 400; font-size: 16px; color: var(--c-10); }
.bstep-note { margin: 0; font-weight: 400; font-size: 14px; color: var(--c-8); line-height: 1.4; }

/* «Цей воркшоп буде тобі корисний, якщо» — картки з емодзі (без акценту) */
#useful .h-sec, #about .h-sec { font-size: 30px; }
.pains-list { display: flex; flex-direction: column; gap: 12px; }
.pain-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--c-0); border: 1px solid var(--c-4); border-radius: 16px; padding: 16px;
}
.pain-badge {
  flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center; font-size: 24px;
}
.pain-text { flex: 1 1 0; min-width: 0; font-size: 16px; color: var(--c-10); line-height: 1.4; }

/* «Для кого це?» + «Необхідний рівень» */
.about-intro { text-align: center; font-weight: 600; font-size: 16px; color: var(--c-10); line-height: 1.4; margin: 0 0 24px; }
.level-card { background: #f7f1ff; border: 1px solid var(--purple); border-radius: 16px; padding: 24px; }
.level-title { font-weight: 600; font-size: 16px; color: var(--purple); margin-bottom: 16px; }
.level-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.level-list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--c-10); line-height: 1.6; }
.level-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--c-10); font-weight: 400; }

/* «Файл воркшопу» — лінк на файл-тренажер у Figma Community */
#practice { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; padding-left: 32px; padding-right: 32px; }
#practice .h-sec { font-size: 30px; margin: 0; }
.practice-sub { font-size: 14px; color: var(--c-10); line-height: 1.4; margin: 0; }

/* «Як це відбувається» — темні бейджі з білими іконками (без карток) */
#how { display: flex; flex-direction: column; align-items: center; gap: 36px; }
#how .h-sec { font-size: 30px; margin: 0; }
.how-list { display: flex; flex-direction: column; gap: 20px; align-self: stretch; }
.how-row { display: flex; align-items: center; gap: 14px; }
.how-badge {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-10); display: grid; place-items: center;
}
.how-badge img { width: 24px; height: 24px; display: block; filter: brightness(0) invert(1); }
.how-text { flex: 1 1 0; min-width: 0; font-size: 16px; color: var(--c-10); line-height: 1.4; }

/* ============================================================
   Hero — зациклена анімація «малювання у Фігмі» (12s цикл):
   Ти малюєш кружечки як виходить → Менторка виділяє їх рамкою
   → кружечки стають в акуратний автолеяут → пауза → спочатку.
   Кольори курсорів: Ти #00b5ce, Менторка #907cff (як в SVG).
   Полотно — 398×144 (фрейм «drawing» з макета); на вузьких
   екранах масштабується скриптом у index.html.
   ============================================================ */

.drawing { width: 100%; display: flex; justify-content: center; overflow: visible; }
.fig-canvas {
  position: relative;
  width: 398px; height: 144px;
  flex: 0 0 auto;
  transform-origin: top center;
}

/* Кружечки — «щойно намальовані» еліпси, дефолтний фігмівський сірий */
.fc {
  position: absolute;
  border-radius: 50%;
  background: #d9d9d9;
  transform-origin: 0 0;
  transform: scale(0);
}
.fc-1 { width: 44px; height: 44px; left: 40px;  top: 20px; animation: fc1-run 12s ease infinite; }
.fc-2 { width: 64px; height: 64px; left: 200px; top: 60px; animation: fc2-run 12s ease infinite; }
.fc-3 { width: 36px; height: 36px; left: 295px; top: 15px; animation: fc3-run 12s ease infinite; }

/* Рамка виділення, яку тягне Менторка */
.fig-marquee {
  position: absolute; left: 25px; top: 8px; width: 310px; height: 116px;
  border: 1px solid #907cff; background: rgba(144, 124, 255, .08);
  transform-origin: 0 0; transform: scale(0, 0); opacity: 0;
  animation: marquee-run 12s ease infinite;
  z-index: 2;
}

/* Контур автолеяут-фрейму навколо вирівняного ряду */
.fig-frame {
  position: absolute; left: 107px; top: 32px; width: 184px; height: 80px;
  border: 1.5px solid #907cff; border-radius: 6px;
  opacity: 0;
  animation: frame-run 12s ease infinite;
  z-index: 1;
}

/* Курсори — рідний розмір SVG (44×43 і 87×43, з полями під тінь),
   без масштабування, щоб вектор лишався чітким.
   Вістря стрілки ≈ (5,3) в SVG — компенсуємо маргіном. */
.fig-cursor { position: absolute; z-index: 3; margin: -3px 0 0 -5px; height: auto; }
.fig-cursor--you    { left: 177px; top: 54px; width: 44px; animation: cursor-you-run 12s ease infinite; }
.fig-cursor--mentor { left: 238px; top: 96px; width: 87px; animation: cursor-mentor-run 12s ease infinite; }

/* Ти: малює три кружечки (тягне еліпс по діагоналі) і вертається */
@keyframes cursor-you-run {
  0%, 7% { left: 177px; top: 54px; }
  11%    { left: 40px;  top: 20px; animation-timing-function: linear; }
  17%    { left: 84px;  top: 64px; }
  21%    { left: 200px; top: 60px; animation-timing-function: linear; }
  27%    { left: 264px; top: 124px; }
  31%    { left: 295px; top: 15px; animation-timing-function: linear; }
  37%    { left: 331px; top: 51px; }
  45%, 100% { left: 177px; top: 54px; }
}

/* Менторка: чекає → тягне рамку виділення → застосовує автолеяут → вертається */
@keyframes cursor-mentor-run {
  0%, 40% { left: 238px; top: 96px; }
  46%     { left: 25px;  top: 8px; animation-timing-function: linear; }
  54%     { left: 335px; top: 124px; }
  60%     { left: 312px; top: 110px; }
  68%, 100% { left: 238px; top: 96px; }
}

/* Кружечок 1: намальований у (40,20), стає в ряд у (115,50) */
@keyframes fc1-run {
  0%, 11%   { left: 40px;  top: 20px; transform: scale(0); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; animation-timing-function: linear; }
  17%       { left: 40px;  top: 20px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; }
  20%, 51%  { left: 40px;  top: 20px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(0, 181, 206, 0); }
  53%, 56%  { left: 40px;  top: 20px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; animation-timing-function: cubic-bezier(.3, .7, .3, 1.2); }
  62%       { left: 115px; top: 50px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; }
  70%, 95%  { left: 115px; top: 50px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
  98%, 100% { left: 115px; top: 50px; transform: scale(1); opacity: 0; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
}

/* Кружечок 2: намальований у (200,60), стає в ряд у (171,40) */
@keyframes fc2-run {
  0%, 21%   { left: 200px; top: 60px; transform: scale(0); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; animation-timing-function: linear; }
  27%       { left: 200px; top: 60px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; }
  30%, 51%  { left: 200px; top: 60px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(0, 181, 206, 0); }
  53%, 56%  { left: 200px; top: 60px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; animation-timing-function: cubic-bezier(.3, .7, .3, 1.2); }
  62%       { left: 171px; top: 40px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; }
  70%, 95%  { left: 171px; top: 40px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
  98%, 100% { left: 171px; top: 40px; transform: scale(1); opacity: 0; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
}

/* Кружечок 3: намальований у (295,15), стає в ряд у (247,54) */
@keyframes fc3-run {
  0%, 31%   { left: 295px; top: 15px; transform: scale(0); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; animation-timing-function: linear; }
  37%       { left: 295px; top: 15px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #00b5ce; }
  40%, 51%  { left: 295px; top: 15px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(0, 181, 206, 0); }
  53%, 56%  { left: 295px; top: 15px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; animation-timing-function: cubic-bezier(.3, .7, .3, 1.2); }
  62%       { left: 247px; top: 54px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px #907cff; }
  70%, 95%  { left: 247px; top: 54px; transform: scale(1); opacity: 1; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
  98%, 100% { left: 247px; top: 54px; transform: scale(1); opacity: 0; box-shadow: 0 0 0 1.5px rgba(144, 124, 255, 0); }
}

/* Рамка виділення: росте з кута синхронно з курсором Менторки */
@keyframes marquee-run {
  0%, 45.9% { transform: scale(0, 0); opacity: 0; }
  46%       { transform: scale(0, 0); opacity: 1; animation-timing-function: linear; }
  54%       { transform: scale(1, 1); opacity: 1; }
  56%, 100% { transform: scale(1, 1); opacity: 0; }
}

/* Контур автолеяуту: з'являється після вирівнювання, тримається і тане */
@keyframes frame-run {
  0%, 61%   { opacity: 0; }
  64%, 78%  { opacity: 1; }
  84%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* Статичний кадр = макет: порожнє полотно і два курсори на місцях */
  .fc, .fig-marquee, .fig-frame, .fig-cursor { animation: none; }
}
