:root {
  --ink: #17263a;
  --muted: #566475;
  --paper: #f7f8fa;
  --white: #ffffff;
  --violet: #285b8f;
  --violet-dark: #1b456f;
  --coral: #c75a3a;
  --yellow: #d6a23c;
  --mint: #eef2f5;
  --blue: #e7edf3;
  --lilac: #edf1f5;
  --cream: #f3eee5;
  --line: rgba(23, 38, 58, .18);
  --shadow: 0 16px 42px rgba(23, 38, 58, .11);
  --sans: "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid rgba(32, 27, 53, .08);
  background: rgba(247, 248, 250, .96);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: .01em; text-decoration: none; }
.brand-mark { position: relative; width: 31px; height: 31px; border: 2px solid var(--ink); }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-left: 7px solid var(--coral); border-right: 2px solid var(--ink); }
.brand-mark i { display: none; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 650; text-decoration: none; }
.site-nav a:hover { color: var(--violet); }
.site-nav .nav-cta { padding: 8px 18px; border-radius: 4px; color: var(--white); background: var(--ink); }
.nav-toggle { display: none; min-width: 64px; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }

/* Шапка липка і накриває верх блоку, коли до блоку стрибають з меню. Доки відступи блоків були
   по 104-124 px, заголовок виринав з-під неї сам; після зменшення до 68-72 px - вже ні.
   Зсув дорівнює висоті шапки, тож блок стає рівно під нею; на вигляд сторінки не впливає. */
#about, #format, #team, #price, #register, #top { scroll-margin-top: 76px; }
.section-shell { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(500px, 1.05fr);
  align-items: center;
  padding-block: 56px 64px;
  gap: clamp(48px, 7vw, 112px);
}
.eyebrow, .kicker { margin: 0 0 22px; color: var(--violet); font-size: 14px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 38px; height: 3px; background: var(--coral); }
/* Переносити рядок лише між словами. Було `h1, h2, h3, p { overflow-wrap: break-word }` -
   і заголовок рвався посеред слова («Психологічни/й»), бо колонка першого екрана вужча за слово. */
p { overflow-wrap: break-word; }
/* Колонка тексту першого екрана - своя система координат, щоб заголовок міряв себе по ній,
   а не по вікну: на 1024 і на 1600 колонка вужча, ніж вимагає 5vw, звідси й був розрив слова. */
.hero-copy { container-type: inline-size; }
h1 { max-width: 760px; margin: 0; font: 700 clamp(48px, 5vw, 72px)/1.02 var(--serif); letter-spacing: -.035em; }
/* 12cqi: найдовше слово назви - 7,87 свого кегля, отже 12 % ширини колонки лишає запас ~4 %. */
h1 { font-size: min(clamp(48px, 5vw, 72px), 12cqi); }
h1 em { display: block; margin-top: 6px; color: var(--violet); font-weight: 700; font-style: normal; }
.hero-lead { max-width: 650px; margin: 30px 0 0; color: var(--muted); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.5; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: 0; border-radius: 4px; font-weight: 780; text-decoration: none; cursor: pointer; }
.button-primary { color: var(--white); background: var(--violet); box-shadow: 0 10px 24px rgba(40, 91, 143, .18); }
.button-primary:hover { background: var(--violet-dark); transform: translateY(-2px); }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 760; text-underline-offset: 5px; }
.hero-facts { display: flex; gap: 34px; margin: 44px 0 0; }
.hero-facts div { min-width: 104px; padding-left: 16px; border-left: 2px solid var(--line); }
.hero-facts dt { color: var(--muted); font-size: 14px; }
.hero-facts dd { margin: 2px 0 0; font-weight: 780; }
.hero-visual { position: relative; min-height: 620px; }
.photo-window { position: absolute; inset: 30px 0 0 46px; overflow: hidden; border-radius: 3px; box-shadow: var(--shadow); }
.photo-window img { width: 100%; height: 100%; object-fit: cover; object-position: 51% center; filter: saturate(.88) contrast(1.03); }
.orbit { display: none; }
.photo-note { position: absolute; right: -1px; bottom: 0; margin: 0; padding: 14px 20px; color: var(--white); background: rgba(23, 38, 58, .94); font: 700 18px/1.3 var(--serif); border-left: 5px solid var(--coral); }

.about { padding-block: 68px 72px; }
.section-heading { max-width: 820px; margin-bottom: 54px; }
h2 { margin: 0; font: 700 clamp(38px, 4.4vw, 68px)/1.03 var(--serif); letter-spacing: -.04em; }
.about-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(42px, 7vw, 100px); align-items: start; }
.about-copy { position: sticky; top: 120px; color: var(--muted); }
.about-copy p { margin: 0 0 20px; }
.about-copy .large-copy { color: var(--ink); font: 600 27px/1.4 var(--serif); }
.benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.benefit { min-height: 190px; padding: 26px; border: 1px solid var(--line); border-left: 5px solid var(--violet); border-radius: 5px; background: var(--white); }
.benefit span { font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.benefit h3 { max-width: 320px; margin: 48px 0 0; font: 700 24px/1.22 var(--serif); }
.benefit:nth-child(3n+2) { border-left-color: var(--coral); }
.benefit:nth-child(3n) { border-left-color: var(--yellow); }

.format-section { overflow: hidden; padding-block: 72px; color: var(--white); background: #172b45; }
.format-shell { display: grid; grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr); gap: clamp(54px, 8vw, 120px); align-items: center; }
.format-photo { position: relative; min-height: 760px; }
.format-photo::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; border: 1px solid rgba(255,255,255,.38); }
.format-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 51% center; border-radius: 2px; filter: saturate(.72) contrast(1.08); }
.photo-stamp { position: absolute; right: 0; bottom: 0; padding: 16px 22px; color: var(--white); background: rgba(23,38,58,.94); border-left: 5px solid var(--coral); font: 700 20px/1.25 var(--serif); }
.kicker-light { color: #e4b85f; }
.format-content h2 { max-width: 700px; }
.format-intro { max-width: 700px; margin: 28px 0 44px; color: rgba(255,255,255,.72); font-size: 19px; }
.day-flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.day-flow li { display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: 25px 0; border-top: 1px solid rgba(255,255,255,.16); }
.day-flow li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.day-flow li > span { color: #e4b85f; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.day-flow h3 { margin: 0 0 6px; font: 700 24px/1.2 var(--serif); }
.day-flow p { margin: 0; color: rgba(255,255,255,.68); }

.quote-band { padding-block: 44px; background: #e8eef4; color: var(--ink); border-block: 1px solid var(--line); }
.quote-inner { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 28px; padding-left: 34px; border-left: 6px solid var(--coral); }
.quote-inner p { max-width: 1050px; margin: 0; font: 700 clamp(28px, 3.2vw, 46px)/1.25 var(--serif); }
.quote-symbol { color: var(--violet); font: 800 64px/.8 var(--serif); }
.quote-dot { display: none; }

.team { padding-block: 72px; }
.team-heading, .price-heading { display: grid; grid-template-columns: 1fr minmax(280px, .44fr); gap: 60px; align-items: end; margin-bottom: 64px; }
.team-heading > p, .price-heading > p { max-width: 430px; margin: 0 0 7px; color: var(--muted); font-size: 19px; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trainer-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: 0 9px 24px rgba(23,38,58,.06); }
.trainer-card img { width: calc(100% / 1.5); margin-inline: auto; aspect-ratio: 1.2; object-fit: cover; object-position: center 16%; filter: saturate(.9); }
.trainer-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.trainer-card h3 { margin: 0 0 13px; font: 700 28px/1.16 var(--serif); }
.trainer-body > p { margin: 0 0 9px; color: var(--muted); }
.trainer-body > p:last-child { margin-bottom: 0; }
.trainer-more { margin-top: auto; padding-top: 14px; }
.trainer-more summary { min-height: 30px; display: flex; align-items: center; gap: 8px; color: var(--violet); font-size: 16px; font-weight: 800; cursor: pointer; }
.trainer-more summary:hover { color: var(--violet-dark); }
.trainer-more > p { margin: 13px 0 0; color: var(--muted); }
.trainer-featured { border-top: 5px solid var(--coral); }

.price-section { padding-block: 72px 76px; background: #e9eff5; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { position: relative; min-height: 330px; display: flex; flex-direction: column; padding: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.price-card > p { margin: 0; color: var(--muted); font-weight: 700; }
.price-card strong { margin-top: 32px; font: 700 clamp(48px, 5vw, 72px)/1 var(--serif); letter-spacing: -.04em; }
.price-card strong span { display: block; margin-top: 10px; font: 700 17px/1.3 var(--sans); letter-spacing: 0; }
.price-card a { width: fit-content; min-height: 44px; display: inline-flex; align-items: center; margin-top: auto; color: var(--violet); font-weight: 800; text-underline-offset: 5px; }
.price-current { color: var(--white); background: var(--violet-dark); transform: translateY(-12px); box-shadow: 0 18px 36px rgba(27,69,111,.2); }
.price-current > p, .price-current a { color: var(--white); }

.register-section { position: relative; overflow: hidden; padding-block: 72px; color: var(--white); background: #213b5b; border-top: 8px solid var(--coral); }
.register-section::after { display: none; }
.register-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,.9fr) minmax(480px,1.1fr); gap: clamp(50px, 8vw, 110px); align-items: start; }
.register-copy h2 { max-width: 650px; }
.register-copy > p:not(.kicker) { max-width: 560px; margin: 28px 0 34px; font-size: 19px; }
.contacts { display: grid; gap: 10px; }
.contacts a { min-height: 54px; display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 14px; width: fit-content; text-decoration: none; }
.contacts span { color: rgba(255,255,255,.72); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.register-card { display: grid; justify-items: start; gap: 24px; padding: clamp(28px,4vw,48px); border-radius: 6px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.register-lead { margin: 0; font: 600 25px/1.38 var(--serif); }
.register-note { margin: 0; color: var(--muted); }
.button-submit { color: var(--white); background: var(--coral); }
.button-submit:hover { background: #a9472d; }
.site-footer { padding-block: 32px; background: var(--ink); color: var(--white); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.62); }
.footer-inner > a:last-child { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 980px) {
  .site-nav { position: fixed; inset: 76px 16px auto; display: none; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: var(--shadow); }
  .site-nav.open { display: grid; gap: 6px; }
  .site-nav a { padding-inline: 12px; }
  .nav-toggle { display: block; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 48px; }
  .about { padding-block: 60px 64px; }
  .format-section, .team, .register-section { padding-block: 64px; }
  .quote-band { padding-block: 40px; }
  .price-section { padding-block: 64px 68px; }
  .hero-visual { min-height: 620px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-copy { position: static; max-width: 720px; }
  .format-shell, .register-grid { grid-template-columns: 1fr; }
  .format-photo { min-height: 640px; max-width: 680px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-heading, .price-heading { grid-template-columns: 1fr; gap: 20px; }
  .price-grid { grid-template-columns: 1fr; }
  .price-current { transform: none; }
}

@media (max-width: 620px) {
  .section-shell { width: min(100% - 28px, 1320px); }
  #about, #format, #team, #price, #register, #top { scroll-margin-top: 68px; }
  .site-header { min-height: 68px; padding-inline: 14px; }
  .brand span:last-child { font-size: 14px; }
  .site-nav { top: 68px; }
  .hero { padding-block: 36px 48px; gap: 36px; }
  .hero > *, .format-shell > *, .register-grid > * { min-width: 0; }
  /* 11.3vw замість 13vw: на 390 px слово «Психологічний» не влазило і розривалось переносом. */
  h1 { font-size: clamp(38px, 11.3vw, 60px); }
  h1 { font-size: min(clamp(38px, 11.3vw, 60px), 12cqi); }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .text-link { justify-content: center; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-facts div { min-width: 0; padding-left: 10px; }
  .hero-facts dd { font-size: 14px; }
  .hero-visual { min-height: 440px; }
  .photo-window { inset: 20px 8px 0 26px; }
  .orbit-one { width: 92px; height: 92px; right: -12px; }
  .orbit-two { width: 62px; height: 62px; bottom: 24px; }
  .photo-note { right: 8px; bottom: 0; font-size: 17px; }
  .about { padding-block: 52px 56px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit { min-height: 174px; transform: none; }
  .benefit h3 { margin-top: 38px; }
  .format-section { padding-block: 56px; }
  .format-photo { min-height: 470px; }
  .format-photo::before { inset: -14px 18px 18px -10px; }
  .photo-stamp { right: -2px; bottom: 24px; font-size: 18px; }
  .day-flow li { grid-template-columns: 1fr; gap: 6px; }
  .quote-band { padding-block: 36px; }
  .quote-inner { grid-template-columns: auto 1fr; }
  .quote-symbol { font-size: 70px; }
  .quote-dot { display: none; }
  .team { padding-block: 56px; }
  .team-grid { grid-template-columns: 1fr; }
  .trainer-card img { aspect-ratio: 1.35; }
  .price-section, .register-section { padding-block: 56px; }
  .register-card { justify-items: stretch; }
  /* `overflow-wrap: anywhere` стояло тут через довгу адресу пошти; пошти в блоці більше немає,
     а правило рвало б слова посеред - та сама вада, що й у заголовку. */
  .contacts a { width: 100%; grid-template-columns: 76px 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Сторінка 404 */
.notfound { min-height: calc(100vh - 76px - 108px); display: flex; flex-direction: column; justify-content: center; padding-block: 72px; }
.notfound h1 { margin-bottom: 20px; }
.notfound p { max-width: 560px; margin: 0 0 32px; color: var(--muted); font-size: 18px; }
.notfound .button { align-self: flex-start; }
