/* Анастасія Аркуша — сайт психолога
   Палітра: крейда / чорнило / какао / пудрова троянда
   Шрифти: Playfair Display (заголовки), Onest (текст) */

:root {
  --chalk: #f6f4f2;
  --bone: #ece6e1;
  --ink: #231f1e;
  --cocoa: #3b2420;
  --rose: #c99a97;
  --rose-soft: #ead7d4;
  --stone: #6c6461;
  --line: #d9d1cc;
  --white: #fffdfc;

  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Onest", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;

  /* Гусяча лапка: плитка 8×8, використовується як маска */
  --houndstooth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h4v4H0zM6 0h2L4 4V2zM8 2v2H6zM0 4h2L0 6zM4 4v2L2 8H0z'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--cocoa);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Візерунок ---------- */

.houndstooth {
  background-color: var(--ink);
  -webkit-mask-image: var(--houndstooth);
          mask-image: var(--houndstooth);
  -webkit-mask-size: var(--ht-size, 26px) var(--ht-size, 26px);
          mask-size: var(--ht-size, 26px) var(--ht-size, 26px);
  -webkit-mask-repeat: repeat;
          mask-repeat: repeat;
}

.ht-band {
  --ht-size: 12px;
  height: 36px;
  width: 100%;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--chalk);
  font: 500 15px/1 var(--sans);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--cocoa); border-color: var(--cocoa); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--chalk); border-color: var(--ink); }

.link {
  color: var(--cocoa);
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.link:hover { text-decoration-color: var(--cocoa); }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 242, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
          backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}
.brand__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
}
.brand__role {
  font-size: 12.5px;
  color: var(--stone);
  letter-spacing: .02em;
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  background: linear-gradient(var(--rose), var(--rose)) 0 100% / 0 1px no-repeat;
  transition: background-size .25s;
}
.nav a:hover,
.nav a[aria-current="page"] { background-size: 100% 1px; }

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.lang a,
.lang span {
  padding: 6px 10px;
  text-decoration: none;
  line-height: 1;
}
.lang span[aria-current] {
  background: var(--ink);
  color: var(--chalk);
}
.lang a:hover { background: var(--bone); }

.header-cta { min-height: 42px; padding: 0 18px; font-size: 14px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.menu-toggle::before { top: 16px; }
.menu-toggle span { top: 21.5px; }
.menu-toggle::after { top: 27px; }
.menu-open .menu-toggle::before { transform: translateY(5.5px) rotate(45deg); }
.menu-open .menu-toggle span { opacity: 0; }
.menu-open .menu-toggle::after { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- Перший екран ---------- */

.hero {
  position: relative;
  padding: 0 0 clamp(56px, 8vw, 110px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  min-height: min(calc(100vh - 76px), 820px);
}

.hero__visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
}

.hero__pattern {
  --ht-size: 36px;
  position: absolute;
  top: 0; bottom: 0;
  right: 22%;
  left: calc(-1 * max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter)));
}

.hero__photo {
  position: relative;
  width: 86%;
  margin-left: auto;
  aspect-ratio: 2 / 3;
  background: var(--bone);
  box-shadow: 0 0 0 10px var(--chalk);
}

.hero__photo img { transform: scale(1.5); transform-origin: 60% 25%; }

.hero__text { padding: 48px 0; }

.hero__kicker {
  font-size: 15px;
  color: var(--stone);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(54px, 8.2vw, 116px);
  line-height: .95;
  letter-spacing: -0.025em;
}
.hero h1 .surname {
  display: block;
  font-style: italic;
  padding-left: .55em;
}

.hero__lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.45;
  max-width: 30ch;
  margin: 40px 0 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__facts {
  margin-top: 40px;
  font-size: 14.5px;
  color: var(--stone);
  max-width: 46ch;
}

.signature {
  width: 110px;
  height: auto;
  color: var(--cocoa);
  margin-top: 8px;
}

/* ---------- Фото ---------- */

.photo { overflow: hidden; }
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(.88);
}
/* ---------- Секції ---------- */

.section { padding: clamp(72px, 10vw, 136px) 0; }
.section--bone { background: var(--bone); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  margin-bottom: clamp(40px, 6vw, 72px);
  align-items: end;
}
.section-head h2 { font-size: clamp(38px, 5vw, 64px); }
.section-head p { color: var(--stone); max-width: 52ch; margin: 0; }

/* Про мене */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.about__side { position: sticky; top: 110px; }

.about__side h2 {
  font-size: clamp(42px, 5.6vw, 72px);
  font-style: italic;
  margin-bottom: 36px;
}

.about__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 380px;
  background: var(--bone);
}
.about__photo img { object-position: 50% 100%; }

.about__body { max-width: 62ch; }
.about__body > p:first-child {
  font-family: var(--serif);
  font-size: clamp(21px, 2.1vw, 26px);
  line-height: 1.5;
}
.about__body h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-style: italic;
  margin: 56px 0 20px;
}

.values {
  margin: 48px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
}
.values p { color: var(--stone); }
.values ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.values li {
  padding: 7px 16px;
  border: 1px solid var(--rose);
  border-radius: 999px;
  font-size: 15px;
}


/* Формат роботи */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink);
}
.facts div {
  padding: 28px 28px 32px 0;
  border-right: 1px solid var(--line);
}
.facts div + div { padding-left: 28px; }
.facts div:last-child { border-right: 0; }
.facts dt {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
  margin-bottom: 12px;
}
.facts dd { margin: 0; color: var(--stone); font-size: 15.5px; }

.topics {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(64px, 8vw, 104px);
}
.topics h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.topics__note { color: var(--stone); max-width: 40ch; }
.topics ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.topics li {
  break-inside: avoid;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.topics li::before {
  content: "";
  position: absolute;
  left: 0; top: 24px;
  width: 9px; height: 9px;
  background: var(--rose);
  transform: rotate(45deg);
}

.terms {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: 20px;
  margin-top: clamp(64px, 8vw, 104px);
  scroll-margin-top: 96px;
}
.terms h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.terms dl { margin: 0; border-top: 1px solid var(--ink); }
.terms dl > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.terms dt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--cocoa);
}
.terms dd { margin: 0; font-size: 15.5px; color: var(--ink); }
.terms__note {
  grid-column: 2;
  margin: 0;
  font-size: 14.5px;
  color: var(--stone);
}

/* Освіта */

.diplomas { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

.diploma {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.diploma__year {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--cocoa);
}
.diploma h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
  margin-bottom: 8px;
}
.diploma p { margin: 0; color: var(--stone); font-size: 15.5px; }

/* Карусель документів */

.carousel { margin-top: clamp(48px, 6vw, 72px); }

.carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}
.carousel__btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s, color .2s, opacity .2s;
}
.carousel__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.carousel__btn:hover:not(:disabled) { background: var(--ink); color: var(--chalk); }
.carousel__btn:disabled { opacity: .3; cursor: default; }

.carousel__track {
  --inset: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: flex;
  gap: clamp(20px, 2.5vw, 32px);
  list-style: none;
  margin: 0;
  padding: 6px var(--gutter) 24px var(--inset);
  scroll-padding-left: var(--inset);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track li { flex: none; scroll-snap-align: start; }

.cert-slide {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: zoom-in;
}
.cert-slide img {
  height: clamp(200px, 22vw, 270px);
  width: auto;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px -18px rgba(35, 31, 30, .5);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .2s;
}
.cert-slide:hover img { transform: translateY(-4px); border-color: var(--rose); }
.cert-slide__cap {
  width: 0;
  min-width: 100%;
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--stone);
}
.cert-slide__cap em {
  display: block;
  margin-bottom: 2px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--cocoa);
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 900px);
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(35, 31, 30, .86); }
.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; background: var(--white); }
.lightbox__close {
  display: block;
  margin: 0 0 10px auto;
  border: 1px solid var(--chalk);
  background: transparent;
  color: var(--chalk);
  font: 500 14px/1 var(--sans);
  padding: 10px 16px;
  cursor: pointer;
}

/* Форма */

.booking {
  position: relative;
  overflow: hidden;
}
.booking__pattern {
  --ht-size: 22px;
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 18%;
  opacity: .9;
}

.booking__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
}
.booking h2 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 24px; }
.booking__intro p { color: var(--stone); max-width: 42ch; }
.booking__direct { margin-top: 32px; font-size: 15.5px; }
.booking__direct a { display: inline-block; margin-top: 4px; }
.booking__sos { margin-top: 28px; font-size: 14.5px; }

.form {
  position: relative;
  background: var(--white);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 30px 60px -40px rgba(59, 36, 32, .45);
  margin-right: 8%;
}

.field { margin-bottom: 22px; }
.field > label,
.field legend {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.field .optional { color: var(--stone); font-weight: 400; }

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chalk);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  transition: border-color .2s, background-color .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #9a918d; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--white);
}
.field [aria-invalid="true"] { border-color: #a2453b; }
.field__error { display: none; margin-top: 6px; font-size: 13.5px; color: #a2453b; }
.field.has-error .field__error { display: block; }

fieldset.field { border: 0; padding: 0; margin-inline: 0; min-width: 0; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--chalk); }
.choice input:focus-visible + span { outline: 2px solid var(--cocoa); outline-offset: 2px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--stone);
  margin: 6px 0 26px;
}
.consent.has-error { color: #a2453b; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.form .btn { width: 100%; }
.form .btn[disabled] { opacity: .6; cursor: progress; }

.form__status {
  margin: 18px 0 0;
  font-size: 15px;
  min-height: 1.5em;
}
.form__status.is-ok { color: #3f6b4a; }
.form__status.is-error { color: #a2453b; }

.hp { position: absolute; left: -9999px; }

/* Статті — список */

.articles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.articles li { border-bottom: 1px solid var(--line); }
.articles a {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr) 90px;
  gap: 32px;
  align-items: baseline;
  padding: 34px 0;
  text-decoration: none;
}
.articles h3 {
  font-size: clamp(25px, 2.8vw, 36px);
  line-height: 1.2;
  transition: color .2s;
}
.articles a:hover h3 { color: var(--cocoa); font-style: italic; }
.articles p { margin: 0; color: var(--stone); font-size: 15.5px; }
.articles .time { font-size: 14px; color: var(--stone); text-align: right; }

/* ---------- Сторінка статті ---------- */

.article-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.article-hero .back {
  display: inline-block;
  font-size: 14.5px;
  margin-bottom: 40px;
}
.article-hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.04;
  max-width: 16ch;
}
.article-hero .meta {
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--stone);
}

.article-band { --ht-size: 18px; height: 54px; }

.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  font-size: 18px;
  line-height: 1.75;
}
.article-body .lead {
  font-family: var(--serif);
  font-size: clamp(22px, 2.3vw, 27px);
  line-height: 1.5;
  margin-bottom: 1.4em;
}
.article-body h2 {
  font-size: clamp(28px, 3vw, 36px);
  margin: 2em 0 .7em;
}
.article-body ul,
.article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .45em; }
.article-body li::marker { color: var(--cocoa); }
.article-body blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--rose);
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.45;
}

.article-cta {
  margin-top: 64px;
  padding: 36px;
  background: var(--bone);
  position: relative;
  overflow: hidden;
}
.article-cta::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 56px;
  background-color: var(--ink);
  -webkit-mask: var(--houndstooth) 0 0 / 14px 14px repeat;
          mask: var(--houndstooth) 0 0 / 14px 14px repeat;
}
.article-cta h2 { margin: 0 0 12px; font-size: 30px; padding-right: 64px; }
.article-cta p { color: var(--stone); padding-right: 64px; }

.more {
  border-top: 1px solid var(--line);
  padding: 56px 0 96px;
}
.more h2 { font-size: 28px; margin-bottom: 24px; }

/* ---------- Підвал ---------- */

.site-footer {
  background: var(--ink);
  color: var(--chalk);
}
.site-footer .ht-band { background-color: var(--chalk); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding: 64px 0 40px;
}
.site-footer .footer__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.site-footer p { color: #b9b0ac; font-size: 15px; margin: 0; }
.site-footer h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--rose);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.footer__bottom {
  border-top: 1px solid #3d3735;
  padding: 22px 0 28px;
  font-size: 13.5px;
  color: #8f8683;
}

/* ---------- Рух ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__pattern { animation: weave 1.1s cubic-bezier(.7, 0, .2, 1) both; }
  .hero__photo { animation: rise 1s .45s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__text > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__text > :nth-child(1) { animation-delay: .55s; }
  .hero__text > :nth-child(2) { animation-delay: .65s; }
  .hero__text > :nth-child(3) { animation-delay: .8s; }
  .hero__text > :nth-child(4) { animation-delay: .9s; }
  .hero__text > :nth-child(5) { animation-delay: 1s; }
}

@keyframes weave {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .header-cta { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(3) { padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .site-header .wrap { gap: 12px; height: 68px; }
  .menu-toggle { display: block; order: 3; }
  .nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--chalk);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .menu-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s, transform .2s;
  }
  .nav a {
    font-family: var(--serif);
    font-size: 26px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    background: none;
  }

  .hero__grid,
  .section-head,
  .about,
  .topics,
  .terms,
  .booking__grid { grid-template-columns: minmax(0, 1fr); }

  .hero__grid { min-height: 0; gap: 0; }
  .hero__visual { padding: 36px 0 0; }
  .hero__pattern {
    --ht-size: 24px;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    bottom: 38%;
  }
  .hero__photo { width: 64%; max-width: 380px; margin: 0 auto; }
  .hero__text { padding: 40px 0 0; }

  .about__side { position: static; }

  .about__photo { max-width: 320px; }

  .topics ul { columns: 1; }
  .terms__note { grid-column: auto; }



  .booking__pattern { width: 100%; height: 64px; top: auto; }
  .form { margin-right: 0; margin-bottom: 40px; }

  .articles a { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .articles .time { text-align: left; }

  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .brand__name { font-size: 21px; }
  .brand__role { display: none; }
  .hero h1 .surname { padding-left: .3em; }
  .hero__actions .btn { width: 100%; }

  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div,
  .facts div + div { padding: 22px 0; border-right: 0; }
  .facts div + div { border-top: 1px solid var(--line); }

  .diploma { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 22px 0; }
  .terms dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .carousel__controls { display: none; }
  .cert-slide img { height: 210px; }

  .article-body { font-size: 17px; }
  .article-cta { padding: 28px 24px; }
  .article-cta::after { width: 28px; }
  .article-cta h2, .article-cta p { padding-right: 28px; }
}

/* ---------- Іконки ----------
   Лінійні, 1.5 px, у тій самій манері, що стрілки каруселі.
   Спрайт <symbol> — на початку body головних сторінок. */

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--cocoa);
}

/* Іконка в пудровому колі — там, де вона позначає тему чи факт */
.ico--badge {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--rose-soft);
}

/* Перший екран: факти рядком з іконками */
.ifacts {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 12px 28px;
  max-width: none;
  color: var(--ink);
}
.ifacts li { display: flex; align-items: center; gap: 10px; }

/* Про мене: освіта списком */
.creds {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.creds li { display: flex; align-items: center; gap: 16px; }
.creds b { display: block; font-weight: 500; }
.creds span { font-size: 15.5px; color: var(--stone); line-height: 1.4; }
.creds span b { color: var(--ink); font-size: 16.5px; }

/* Як я працюю: великі факти */
.with-icons .facts .ico--badge { display: block; margin-bottom: 18px; }

/* Теми: іконка замість ромбика */
.with-icons .topics li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.with-icons .topics li::before { display: none; }
.with-icons .topics .ico--badge { width: 36px; height: 36px; padding: 8px; }

/* Умови */
.with-icons .terms dl > div { grid-template-columns: 200px minmax(0, 1fr); }
.with-icons .terms dt { display: flex; align-items: center; gap: 10px; }
.with-icons .terms dt .ico { width: 18px; height: 18px; }
.with-icons .terms dd strong { font-weight: 500; }

/* Контакти */
.contact { display: inline-flex !important; align-items: center; gap: 8px; }
.contact .ico { width: 18px; height: 18px; }

/* Статті: час читання */
.with-icons .articles .time { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.with-icons .articles .time .ico { width: 15px; height: 15px; color: var(--stone); }

@media (max-width: 900px) {
  .with-icons .terms dl > div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ifacts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Плаваюча кнопка запису ---------- */

.float-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  box-shadow: 0 14px 30px -12px rgba(35, 31, 30, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility 0s .25s, background-color .2s, border-color .2s;
}
.float-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s, transform .25s, background-color .2s, border-color .2s;
}
.float-cta .ico { color: currentColor; width: 18px; height: 18px; }
.menu-open .float-cta { opacity: 0; visibility: hidden; }

@media (max-width: 600px) {
  .float-cta {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
