/* Фірмові кольори */
:root {
  --cream: #FFF8EE;
  --cream-2: #FCEFDF;
  --coral: #D85A30;
  --coral-dark: #993C1D;
  --coral-light: #FAECE7;
  --yellow: #FAC775;
  --yellow-light: #FFF1D6;
  --ink: #2C2C2A;
  --ink-soft: #5F5E5A;
  --white: #fff;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(153, 60, 29, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.15; font-weight: 900; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 800; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }

/* Логотип */
.logo { font-weight: 900; font-size: 1.6rem; letter-spacing: -0.04em; color: var(--ink); }
.logo__slash { color: var(--coral); display: inline-block; transform: skewX(-8deg); margin: 0 1px; }
.logo__city { color: var(--coral); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 800; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--coral); color: var(--white); box-shadow: 0 8px 20px rgba(216, 90, 48, .35); }
.btn--primary:hover { background: var(--coral-dark); box-shadow: 0 12px 26px rgba(216, 90, 48, .4); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--coral-dark); }
.btn--light:hover { background: var(--yellow); }
.btn--lg { padding: 18px 32px; font-size: 1.08rem; }
.btn--sm { padding: 10px 20px; font-size: .95rem; }
.icon { width: 22px; height: 22px; flex-shrink: 0; }

/* Плашки */
.pill {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--coral-light); color: var(--coral-dark);
  font-weight: 800; font-size: .9rem; margin-bottom: 16px;
}
.pill--yellow { background: var(--yellow); color: #633806; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 238, .85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 4px 20px rgba(44, 44, 42, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav { display: flex; align-items: center; gap: 28px; font-weight: 700; }
.nav a:not(.btn):hover { color: var(--coral); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: var(--coral-light); border-radius: 12px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2.5px; background: var(--coral-dark); border-radius: 2px; transition: transform .3s, top .3s; }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger.is-open span:first-child { top: 21px; transform: rotate(45deg); }
.burger.is-open span:last-child { top: 21px; transform: rotate(-45deg); }

/* Перший екран */
.hero { padding: 48px 0 80px; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero__lead { font-size: 1.2rem; color: var(--ink-soft); margin: 20px 0 32px; max-width: 540px; }
.marker { position: relative; color: var(--coral); white-space: nowrap; isolation: isolate; }
.marker::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: .08em; height: .28em;
  background: var(--yellow); border-radius: 8px; z-index: -1; opacity: .8;
}
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 36px; color: var(--ink-soft); font-size: .95rem; }
.hero__facts b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--ink); line-height: 1.2; }

.hero__visual { position: relative; height: 480px; }
.blob {
  position: absolute; inset: 20px 10px 10px 30px;
  background: var(--yellow); border-radius: 46% 54% 42% 58% / 52% 40% 60% 48%;
  animation: blob 12s ease-in-out infinite;
}
@keyframes blob {
  50% { border-radius: 58% 42% 55% 45% / 42% 58% 42% 58%; }
}
.hero__photo {
  position: absolute; object-fit: cover; border-radius: var(--radius);
  border: 6px solid var(--white); box-shadow: var(--shadow);
}
.hero__photo--1 { width: 220px; height: 275px; left: 8%; top: 40px; transform: rotate(-5deg); }
.hero__photo--2 { width: 220px; height: 275px; right: 6%; top: 150px; transform: rotate(5deg); }
.bubble {
  position: absolute; background: var(--white); padding: 10px 18px; border-radius: 18px;
  font-weight: 800; box-shadow: var(--shadow); white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}
.bubble--1 { left: 0; top: 0; border-bottom-left-radius: 4px; }
.bubble--2 { right: 2%; top: 70px; background: var(--coral); color: var(--white); border-bottom-right-radius: 4px; animation-delay: -1.3s; }
.bubble--3 { left: 18%; bottom: 20px; border-bottom-left-radius: 4px; animation-delay: -2.6s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Секції */
.section { padding: 88px 0; }
.section--soft { background: var(--cream-2); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }

/* Переваги */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  background: var(--white); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow); transition: transform .25s;
}
.feature__icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--coral-light);
  display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 18px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: .98rem; }

/* Анімації карток «Чому саме ми» */
.feature { position: relative; overflow: hidden; }
.feature.reveal { transform: translateY(40px) scale(.94); transition-delay: var(--d, 0s); }
.feature.reveal.is-visible { transform: none; }
.feature::after {
  content: ''; position: absolute; left: 24px; bottom: 0; height: 4px; width: 0;
  background: var(--coral); border-radius: 4px 4px 0 0; transition: width .8s ease;
  transition-delay: calc(var(--d, 0s) + .5s);
}
.feature.is-visible::after { width: 48px; }
.feature.reveal .feature__icon { transform: scale(0); }
.feature.reveal.is-visible .feature__icon {
  animation:
    pop .7s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .25s) both,
    bob 5s cubic-bezier(.45, 0, .55, 1) calc(var(--d, 0s) + .95s) infinite;
}
@keyframes pop {
  0% { transform: scale(0) rotate(-30deg); }
  100% { transform: scale(1) rotate(0); }
}
/* Плавне погойдування: м'який підйом і легкий нахил */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-3px) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(0); }
  75% { transform: translateY(-3px) rotate(3deg); }
}
/* Ефект наведення окремими властивостями scale/rotate — він не скидає основну анімацію */
.feature__icon { transition: background .4s ease, scale .4s ease, rotate .4s ease; }

/* Підкреслення, яке «малюється» */
.marker--draw::after { transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.65, 0, .35, 1) .5s; }
.is-visible .marker--draw::after { transform: scaleX(1); }

/* Кроки */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; background: var(--white); border-radius: var(--radius); padding: 32px 28px; }
.step__num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--coral); color: var(--white); font-weight: 900; font-size: 1.4rem; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); }

/* Викладачі */
.teachers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 920px; margin: 0 auto; }
.teacher {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: grid; grid-template-columns: 180px 1fr;
}
.teacher__photo { overflow: hidden; }
.teacher__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.teacher__body { padding: 28px 24px; }
.teacher__exp { color: var(--coral-dark); font-weight: 700; margin: 6px 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--yellow-light); color: #633806; padding: 5px 12px; border-radius: 999px; font-size: .88rem; font-weight: 700; }

/* Сертифікати */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1040px; margin: 0 auto; }
.cert {
  background: var(--white); border: 0; border-radius: var(--radius); padding: 14px; cursor: zoom-in;
  box-shadow: var(--shadow); font-family: inherit; text-align: center; transition: transform .25s;
}
.cert img { width: 100%; height: 240px; object-fit: cover; object-position: top; border-radius: 14px; }
.cert span { display: block; margin-top: 12px; font-weight: 800; font-size: 1rem; color: var(--ink); }

/* Ціни */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price {
  position: relative; background: var(--white); border-radius: var(--radius); padding: 36px 28px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); border: 2px solid transparent;
}
.price--accent { border-color: var(--coral); transform: translateY(-10px); }
.price__badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--coral); color: var(--white); font-weight: 800; font-size: .85rem;
  padding: 4px 16px; border-radius: 999px;
}
.price__value { font-size: 3rem; font-weight: 900; line-height: 1.1; margin-top: 10px; }
.price__value small { font-size: 1.1rem; font-weight: 700; color: var(--ink-soft); }
.price__note { color: var(--coral-dark); font-weight: 700; margin-bottom: 20px; }
.checks { margin-bottom: 28px; flex-grow: 1; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 10px; color: var(--ink-soft); }
.checks li::before {
  content: '✓'; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--coral-light); color: var(--coral); font-weight: 900; font-size: .8rem;
  display: grid; place-items: center;
}

/* Питання */
.faq details { background: var(--white); border-radius: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 60px 22px 26px; font-weight: 800; font-size: 1.08rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--coral-light); color: var(--coral);
  display: grid; place-items: center; font-size: 1.3rem; transition: transform .3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 26px 22px; color: var(--ink-soft); }

/* Заклик */
.cta {
  background: var(--coral); color: var(--white); border-radius: 36px; padding: 64px 32px;
  text-align: center; position: relative; overflow: hidden;
}
.cta::before, .cta::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1);
}
.cta::before { width: 260px; height: 260px; left: -80px; top: -100px; }
.cta::after { width: 200px; height: 200px; right: -50px; bottom: -80px; background: rgba(250, 199, 117, .35); }
.cta h2, .cta p, .cta .btn { position: relative; z-index: 1; }
.cta p { font-size: 1.2rem; margin: 14px 0 30px; opacity: .95; }

/* Підвал */
.footer { padding: 40px 0 48px; border-top: 1px solid rgba(44, 44, 42, .1); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--ink-soft); }
.footer__inner a:not(.logo):hover { color: var(--coral); }

/* Кнопка внизу на телефоні */
.sticky-cta { display: none; }

/* Перегляд сертифіката */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(44, 44, 42, .85);
  display: grid; place-items: center; padding: 20px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; border-radius: 16px; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--cream); font-size: 1.8rem; cursor: pointer; line-height: 1;
}

/* Ефекти при наведенні мишкою — тільки там, де є мишка (на телефоні вони «залипають») */
@media (hover: hover) {
  .btn:hover { transform: translateY(-3px); }
  .feature.is-visible:hover { transform: translateY(-8px) rotate(-1deg); transition-delay: 0s; }
  .feature.is-visible:hover .feature__icon { background: var(--yellow); scale: 1.12; rotate: -8deg; }
  .teacher:hover .teacher__photo img { transform: scale(1.06); }
  .cert:hover { transform: translateY(-6px); }
}

/* Поява при прокрутці */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.price--accent.reveal.is-visible { transform: translateY(-10px); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .bubble { animation: none; }
  .feature.reveal, .feature.reveal .feature__icon { transform: none; animation: none; }
  .marker--draw::after { transform: none; transition: none; }
}

@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

/* Планшет */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 24px; }
  .hero__visual { height: 400px; max-width: 480px; width: 100%; margin: 0 auto; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .prices { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .price--accent, .price--accent.reveal.is-visible { transform: none; }
  .teachers, .certs { grid-template-columns: 1fr; max-width: 520px; }
}

/* Телефон */
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 84px; }
  .burger { display: block; }
  .nav {
    position: absolute; top: 72px; left: 12px; right: 12px; flex-direction: column; gap: 4px;
    background: var(--white); border-radius: 20px; padding: 12px; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: opacity .25s, transform .25s;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav a:not(.btn) { padding: 12px; width: 100%; text-align: center; }
  .nav__cta { width: 100%; }
  .hero { padding: 24px 0 56px; }
  .hero__buttons .btn { width: 100%; }
  .hero__lead { font-size: 1.08rem; }
  .hero__facts { gap: 12px 22px; font-size: .85rem; }
  .hero__facts b { font-size: 1.35rem; }
  .hero__visual { height: 340px; }
  .hero__photo--1, .hero__photo--2 { width: 150px; height: 190px; }
  .hero__photo--1 { top: 50px; }
  .hero__photo--2 { top: 120px; }
  .bubble { font-size: .9rem; padding: 8px 14px; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 32px; }
  .features, .steps { grid-template-columns: 1fr; }
  .features { gap: 14px; }
  .feature { display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; padding: 22px 20px; }
  .feature__icon { grid-row: span 2; margin-bottom: 0; }
  .feature h3 { margin-bottom: 4px; font-size: 1.12rem; }
  .feature p { font-size: .95rem; }
  .feature::after { left: auto; right: 20px; top: 0; bottom: auto; border-radius: 0 0 4px 4px; }
  .feature.is-visible::after { width: 32px; }
  .step { padding: 26px 22px; }
  .teacher { grid-template-columns: 1fr; }
  .teacher__photo { height: 320px; }
  .cert img { height: 200px; }
  .cta { padding: 48px 22px; border-radius: 28px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .sticky-cta {
    display: flex; position: fixed; left: 16px; right: 16px; z-index: 40;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateY(150px); transition: transform .35s;
  }
  .sticky-cta.is-shown { transform: none; }
}

/* Маленькі телефони (iPhone SE і подібні) */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  h1 { font-size: 2rem; }
  .btn--lg { padding: 16px 20px; font-size: 1rem; }
  .hero__visual { height: 300px; }
  .hero__photo--1, .hero__photo--2 { width: 130px; height: 165px; }
  .bubble { font-size: .82rem; padding: 7px 12px; }
  .price { padding: 32px 22px; }
  .price__value { font-size: 2.6rem; }
}

/* Поки відкритий сертифікат, сторінка не прокручується */
body.no-scroll { overflow: hidden; }
