/* Шрифты лежат на сайте, чтобы не обращаться к Google */
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 500; font-display: swap; src: url(fonts/cormorant-garamond-italic-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 500; font-display: swap; src: url(fonts/cormorant-garamond-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/cormorant-garamond-normal-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/cormorant-garamond-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/manrope-normal-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/manrope-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --cream: #F7F2EA;
  --sand: #EDE4D6;
  --paper: #FFFDF9;
  --ink: #2F2C29;
  --muted: #6E6862;
  --blue: #6F86A6;
  --blue-dark: #556C8C;
  --blue-soft: #A9B8CC;
  --line: rgba(47, 44, 41, .14);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;

  --radius: 22px;
  --header-h: 68px;
}

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

html { background: var(--cream); scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Лёгкая бумажная фактура. Слой не fixed: иначе Safari на iPhone берёт цвет
   полосы над шапкой с этого прозрачного слоя, а не с самой шапки */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.27 0 0 0 0 0.24 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-family: var(--serif); font-size: 1.15em; font-style: italic; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.header.is-scrolled { border-color: var(--line); }

.header__inner {
  max-width: 1160px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__logo { font-family: var(--serif); font-size: 24px; font-style: italic; text-decoration: none; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav__cta { color: var(--paper); background: var(--blue); padding: 9px 20px; border-radius: 999px; }
.nav .nav__cta:hover { color: var(--paper); background: var(--blue-dark); }
.nav__contacts { display: none; }

.burger { display: none; width: 36px; height: 28px; background: none; border: 0; padding: 4px; cursor: pointer; }
.burger span { display: block; height: 1px; background: var(--ink); margin: 6px 0; transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Типографика и декор */

.eyebrow, .label {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
  color: var(--blue-dark);
}
.eyebrow { margin-bottom: 18px; }

.initial {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--blue);
  font-size: 1.35em;
  line-height: 0;
  margin-right: -.04em;
}

.title {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1.05;
  text-align: center;
  margin-bottom: 36px;
}
.title--left { text-align: left; }
.title--light { color: var(--paper); }
.title--light .initial { color: var(--sand); }

.marker { background: linear-gradient(transparent 58%, #EADCC6 58%, #EADCC6 92%, transparent 92%); padding: 0 3px; }

/* Слово, обведённое «от руки» */
.circled { position: relative; display: inline-block; margin: 4px 12px; font-family: var(--serif); font-style: italic; font-size: 1.2em; color: var(--ink); padding: 0 6px; }
.circled svg { position: absolute; left: -8px; right: -8px; top: -5px; width: calc(100% + 16px); height: calc(100% + 12px); overflow: visible; }
.circled path { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s .6s ease forwards; vector-effect: non-scaling-stroke; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.spark { position: absolute; width: 22px; height: 22px; fill: var(--blue); pointer-events: none; }

.section { position: relative; padding: 96px 0; }
.section--blue { background: var(--blue); color: var(--paper); }
.section--sand { background: var(--sand); }

.section__intro { max-width: 620px; margin: -12px auto 48px; text-align: center; font-size: 17px; color: rgba(255, 253, 249, .85); }
.section__intro--dark { color: var(--muted); }

/* Цифры одной высоты: у Cormorant по умолчанию «старинные», с выносными элементами */
.hero__fact-num, .price__value, .price__time, .timeline__year, .step__num { font-variant-numeric: lining-nums; }

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1.2 var(--sans);
  text-decoration: none;
  text-align: center;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:focus-visible, .link-arrow:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 4px; }
/* Главная кнопка: песочная капсула, подпись курсивом антиквы */
.btn--primary {
  min-height: 62px;
  padding: 0 40px 3px;
  background: #E3D3BC;
  color: var(--ink);
  font: italic 500 24px/1 var(--serif);
  letter-spacing: .005em;
}
.btn--primary:hover { background: var(--ink); color: var(--paper); }
.btn--ghost { border-color: var(--blue); color: var(--blue-dark); }
.btn--ghost:hover { background: rgba(111, 134, 166, .1); }

.btn--pill { width: 100%; min-height: 64px; background: var(--blue); color: var(--paper); font-size: 17px; }
.btn--pill:hover { background: var(--blue-dark); }
.btn--pill-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--pill-outline:hover { background: var(--ink); color: var(--paper); }
.btn__icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.link-arrow { font-size: 16px; color: var(--blue-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; transition: color .2s; }
.link-arrow:hover { color: var(--ink); }

/* Арки */

.arch { border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4 / 5.2; }
.arch img { width: 100%; height: 100%; object-fit: cover; }


/* Первый экран */

.hero { position: relative; padding: 72px 0 0; }

/* Флажки над первым экраном */
.bunting { position: absolute; top: 0; left: 0; width: 100%; height: 80px; pointer-events: none; }
.bunting__string { fill: none; stroke: #B9A890; stroke-width: 1.2; }
.bunting__knots { fill: #B9A890; }

.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }

.hero__role, .hero__name { display: block; }
.hero__role { margin-bottom: 20px; font-size: 15px; letter-spacing: .01em; color: var(--muted); }

.hero__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(64px, 9vw, 124px);
  line-height: .95;
  letter-spacing: -.01em;
  margin-bottom: 36px;
}
.hero__line { display: block; }
.hero__name .initial { font-size: 1.32em; }

.hero__quote { font-size: 18px; max-width: 480px; color: var(--muted); margin-bottom: 40px; line-height: 1.75; }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.hero__media { position: relative; justify-self: end; width: 100%; max-width: 430px; margin: 24px 0; }
.hero__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; border-radius: var(--radius); }


.hero__facts {
  list-style: none;
  margin: 72px 0 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.hero__facts li { display: flex; align-items: center; gap: 16px; padding: 0 28px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.hero__facts li + li { border-left: 1px solid var(--line); }
.hero__facts li:first-child { padding-left: 0; }
.hero__fact-num { flex: none; font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--ink); }

/* Обо мне */

/* Фото слева, заголовок и текст справа по центру высоты фото */
.about {
  display: grid;
  grid-template-columns: 5fr 6fr;
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: "photo ." "photo title" "photo text" "photo .";
  column-gap: 96px;
}
.about > .title { grid-area: title; }
.about__text { grid-area: text; }

.about__photo { grid-area: photo; margin: 0; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 220px var(--radius) var(--radius) var(--radius); }

.lead { font-family: var(--serif); font-size: 30px; line-height: 1.25; color: var(--ink); margin-bottom: 28px; }

/* Подход: короткий список вместо абзаца, по пункту в строке */
.about__sub { margin: 36px 0 12px; font: 500 14px/1.4 var(--sans); color: var(--muted); }
.principles { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.principles li { display: flex; align-items: flex-start; gap: 14px; font: 400 24px/1.25 var(--serif); color: var(--ink); }
.principles li::before { content: ""; flex: none; width: 14px; height: 0; margin-top: .66em; border-top: 1px solid var(--blue); }


/* С чем помогаю */

/* С чем помогаю: оглавление слева, описание выбранного пункта справа */
#help { padding-top: 24px; }
.help { display: grid; grid-template-columns: 5fr 6fr; gap: 96px; align-items: stretch; }

.topics { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.topic { border-bottom: 1px solid var(--line); }
.topic__name {
  display: block;
  width: 100%;
  padding: 14px 0 12px;
  border: 0;
  background: none;
  font: 400 clamp(32px, 3.4vw, 44px)/1.1 var(--serif);
  text-align: left;
  color: #ADA49A;
  cursor: pointer;
  transition: color .25s;
}
.topic__cap { font-style: italic; font-size: 1.15em; transition: color .25s; }
.topic.is-active .topic__name, .topic__name:hover { color: var(--ink); }
.topic.is-active .topic__cap { color: var(--blue); }
.topic__name:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.topic__desc { display: none; }

.help__panel { display: flex; flex-direction: column; padding: 36px 40px 36px; background: var(--blue); color: var(--paper); border-radius: var(--radius); }
.topic__art { display: none; }
.help__art { width: 120px; height: 120px; margin: 0 0 28px; fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s; }
.help__art .art-fill { fill: var(--sand); stroke: var(--paper); }
.help__art .art-dot { fill: var(--paper); stroke: none; }
.help__art.is-swapping { opacity: 0; }
.help__now { min-height: 3.6em; margin: 0; font: 400 clamp(26px, 2.6vw, 34px)/1.2 var(--serif); transition: opacity .2s; }
.help__now.is-swapping { opacity: 0; }
.help__dx { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255, 253, 249, .3); }
.help__dx .label { color: var(--sand); margin-bottom: 8px; }
.help__dx p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 253, 249, .85); }
.help__link { align-self: flex-start; margin-top: 24px; color: var(--paper); font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.help__link:hover { color: var(--sand); }
.help__link:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

/* Методы */

/* Методы: заголовок и пояснение в одну строку, ниже справочник в две колонки */
.methods__head { display: grid; grid-template-columns: 5fr 6fr; gap: 96px; align-items: end; margin-bottom: 40px; }
.methods__head .title { margin-bottom: 0; }
.methods__head p { max-width: 460px; margin: 0 0 8px; font-size: 17px; color: rgba(255, 253, 249, .85); }
.methods { list-style: none; padding: 0; margin: 0; display: flex; gap: 12px; height: 280px; }
.method { position: relative; flex: 1; min-width: 0; overflow: hidden; border: 1px solid rgba(255, 253, 249, .35); border-radius: var(--radius); transition: flex .5s ease, background .3s, border-color .3s; }
.method.is-open { flex: 3.4; background: var(--paper); border-color: var(--paper); color: var(--ink); }
.method__tab { position: absolute; inset: 0; padding: 0; border: 0; background: none; color: var(--paper); cursor: pointer; }
.method__tab span { position: absolute; left: 22px; bottom: 24px; writing-mode: vertical-rl; transform: rotate(180deg); font: 400 26px/1 var(--serif); white-space: nowrap; }
.method__tab:hover { background: rgba(255, 253, 249, .08); }
.method__tab:focus-visible { outline: 2px solid var(--paper); outline-offset: -6px; border-radius: var(--radius); }
.method.is-open .method__tab { visibility: hidden; }
.method__body { position: absolute; top: 0; bottom: 0; left: 0; width: calc((min(100vw, 1160px) - 76px) * 3.4 / 6.4); padding: 30px 34px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.method.is-open .method__body { opacity: 1; visibility: visible; transition: opacity .3s .25s; }
.method h3 { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin: 0 0 12px; }
.method p { max-width: 400px; margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* С чего начать */

.start { position: relative; text-align: center; }
.spark--4 { top: 0; right: 14%; width: 28px; height: 28px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 48px;
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.steps::before { content: ""; position: absolute; top: 28px; left: 16.6%; right: 16.6%; border-top: 1px dashed var(--blue-soft); }
.step { position: relative; }
.step__num {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--blue);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--blue-dark);
}
.step p { margin: 0 auto; max-width: 260px; font-size: 17px; }

/* Кабинет */

/* Кабинет: три фото на верёвке с прищепками */
.gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-top: 8px;
}
.gallery__string { position: absolute; top: 0; left: -2%; width: 104%; height: 60px; overflow: visible; }
.gallery__string path { fill: none; stroke: #9C8B75; stroke-width: 1; vector-effect: non-scaling-stroke; }
.snap { position: relative; margin: 0; padding: 8px 8px 0; background: var(--paper); box-shadow: 0 16px 30px -22px rgba(47, 44, 41, .5); transform-origin: 50% 0; }
.snap::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 9px;
  height: 26px;
  margin-left: -4.5px;
  border-radius: 2px;
  background: #C9B08A;
  box-shadow: inset -2px 0 rgba(47, 44, 41, .12);
}
.snap img { width: 100%; height: clamp(240px, calc(100vh - 400px), 440px); object-fit: cover; }
.snap figcaption { padding: 10px 4px 12px; font-family: var(--serif); font-style: italic; font-size: 18px; text-align: center; color: var(--muted); }
.snap:nth-of-type(1) { margin-top: 18px; transform: rotate(-1.5deg); }
.snap:nth-of-type(2) { margin-top: 32px; transform: rotate(.6deg); }
.snap:nth-of-type(3) { margin-top: 18px; transform: rotate(1.6deg); }

/* Образование */

/* Образование: заголовок слева, единый список справа */
.edu { display: grid; grid-template-columns: 5fr 6fr; gap: 96px; align-items: start; }
.edu .title { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline > li { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline__year { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.2; color: var(--blue); }
.timeline ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline strong { display: block; margin-bottom: 2px; font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.15; color: var(--ink); }
.timeline ul li { font-size: 16px; line-height: 1.45; color: var(--muted); }

.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.cert { padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.cert:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(47, 44, 41, .4); }
.cert:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 4px; }
.cert img { width: 100%; aspect-ratio: 7 / 5; object-fit: contain; background: #fff; border-radius: 6px; }

/* Стоимость */

.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.price { container-type: inline-size; background: var(--paper); color: var(--ink); border-radius: var(--radius); }
/* Внутренняя сетка: описание растягивается, цена и кнопка всегда внизу карточки */
.price__inner {
  height: 100%;
  padding: 36px 40px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto;
  column-gap: 24px;
  align-items: end;
}
.price__time { grid-column: 1 / -1; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--blue); }
.price h3 { grid-column: 1 / -1; font-family: var(--serif); font-size: 32px; line-height: 1.1; margin: 6px 0 12px; }
.price p { grid-column: 1 / -1; align-self: start; font-size: 14.5px; color: var(--muted); max-width: 380px; margin: 0 0 32px; }
.price__value { font-family: var(--serif); font-size: 52px; line-height: 1; white-space: nowrap; }
.price .btn { min-height: 56px; padding: 0 32px 3px; font-size: 22px; }
@container (max-width: 440px) {
  .price__inner { grid-template-columns: 1fr; row-gap: 20px; padding: 30px 28px 28px; }
  .price p { margin-bottom: 0; }
  .price__value { font-size: 46px; }
  .price .btn { width: 100%; }
}

/* Контакты */

/* Контакты: слева как написать, справа куда приехать */
.contacts { max-width: 1000px; display: grid; grid-template-columns: 6fr 5fr; gap: 72px; align-items: start; }
.contacts__head { display: flex; align-items: center; gap: 32px; margin-bottom: 28px; }
.contacts__head .title { margin: 0; }
.contacts__photo { position: relative; flex: none; width: 112px; }
.contacts__photo img { width: 112px; height: 112px; object-fit: cover; object-position: center 30%; border-radius: 50%; }
.contacts__photo::after { content: ""; position: absolute; inset: -8px; border: 1px solid var(--blue); border-radius: 50%; }
.spark--6 { top: -6px; right: -16px; }
.contacts__intro { max-width: 460px; margin: 0 0 32px; font-size: 17px; color: var(--muted); }
.contacts__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contacts__buttons .btn--pill-outline { grid-column: 1 / -1; }

.visit { padding: 8px 36px; background: var(--sand); border-radius: var(--radius); }
.visit__block { padding: 28px 0; }
.visit__block + .visit__block { border-top: 1px solid var(--line); }
.visit .label { margin-bottom: 10px; }
.visit__address { font: 400 30px/1.2 var(--serif); font-style: normal; color: var(--ink); }
.visit__metro { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 20px; padding: 0; font-size: 15px; color: var(--muted); }
.visit__metro li { display: flex; align-items: center; gap: 8px; }
/* Обе станции на красной ветке */
.visit__metro li::before { content: "М"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #C8463D; color: var(--paper); font: 600 10px/1 var(--sans); }
.visit__block p { margin: 0; font-size: 16px; color: var(--muted); }

.contacts__closing { grid-column: 1 / -1; margin: 8px 0 0; text-align: center; font-size: 17px; color: var(--muted); }
.contacts__closing em { color: var(--blue-dark); white-space: nowrap; }

/* Подвал */

.footer { background: var(--blue-dark); color: rgba(255, 253, 249, .78); font-size: 13px; padding: 28px 0; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Просмотр документов */

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(30, 28, 26, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; width: auto; border-radius: 8px; }
.lightbox__close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* Появление */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .spark { animation: none; }
  .circled path { animation: none; stroke-dashoffset: 0; }
}

/* Адаптив */

@media (max-width: 960px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    align-items: stretch;
    padding: 8px 20px max(28px, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--cream);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s, transform .25s; }
  .nav a { padding: 13px 0 11px; border-bottom: 1px solid var(--line); font: 400 30px/1.15 var(--serif); color: var(--ink); }
  .nav > a:not(.nav__cta)::first-letter { font-style: italic; color: var(--blue); }
  .nav .nav__cta { margin-top: auto; padding: 18px 0; border: 0; text-align: center; font: italic 500 24px/1 var(--serif); color: var(--ink); background: #E3D3BC; }
  .nav .nav__cta:hover { color: var(--paper); background: var(--ink); }
  .header:has(.nav.is-open) { border-color: var(--line); }
  .nav__contacts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: auto; padding: 24px 0 16px; }
  .nav .nav__contacts a { padding: 0; border: 0; font: 400 15px/1.4 var(--sans); color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
  .nav .nav__contacts a::first-letter { font-style: normal; color: inherit; }
  .nav .nav__contacts + .nav__cta { margin-top: 0; }
  .burger { display: block; }
  /* Safari на iPhone красит полосу над шапкой в её цвет, только если шапка fixed и со сплошным фоном */
  body { padding-top: var(--header-h); }
  .header { position: fixed; left: 0; right: 0; background: var(--cream); backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* Первый экран: имя и фото-арка в одну строку, под ними текст и кнопка */
  /* Флажки свисают на 64px, фото с обводкой начинается ниже них */
  .hero { padding-top: 92px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 38%;
    grid-template-areas: "title photo" "quote quote" "actions actions";
    column-gap: 20px;
    row-gap: 0;
    align-items: end;
  }
  .hero__text { display: contents; }
  .hero__title { grid-area: title; }
  .hero__role { margin-bottom: 14px; font-size: 14px; line-height: 1.45; }
  .hero__name { margin-bottom: 0; font-size: clamp(48px, 14.5vw, 104px); }
  .hero__media { grid-area: photo; max-width: none; margin: 0; justify-self: stretch; }
  .hero__photo { aspect-ratio: 3 / 4; object-position: center 25%; border-radius: 50% 50% 18px 18px / 37.5% 37.5% 18px 18px; }
  .hero__media::after, .about__photo::after { content: ""; position: absolute; inset: -7px; border: 1px solid var(--blue-soft); border-radius: 50% 50% 24px 24px / 37.5% 37.5% 24px 24px; pointer-events: none; }
  .hero__quote { grid-area: quote; max-width: 560px; margin: 32px 0 28px; font-size: 17px; line-height: 1.65; }
  .hero__actions { grid-area: actions; }
  .hero__facts { margin-top: 56px; }
  .hero__facts li { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 20px; }
  .hero__facts li:first-child { padding-left: 0; }

  .about { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "title" "photo" "text"; }
  .about > .title { margin-bottom: 28px; }
  .about__photo { position: relative; justify-self: center; width: 80%; max-width: 420px; margin-bottom: 44px; }
  .about__photo img { border-radius: 50% 50% 18px 18px / 40% 40% 18px 18px; }
  .about__photo::after { border-radius: 50% 50% 24px 24px / 40% 40% 24px 24px; }
  .about__text { max-width: 620px; }

  .help { grid-template-columns: 1fr; gap: 32px; }
  .topic__name { color: var(--ink); cursor: default; padding-bottom: 6px; }
  .topic__cap { color: var(--blue); }
  .topic__desc { display: block; margin: 0 0 16px; font-size: 15px; color: var(--muted); }
  .help__panel { padding: 28px; }
  .help__art, .help__now { display: none; }
  .help__dx { margin-top: 0; padding-top: 0; border-top: 0; }

  .methods__head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }
  .edu { grid-template-columns: 1fr; gap: 28px; }
  .edu .title { position: static; }

  .contacts { grid-template-columns: minmax(0, 1fr); max-width: 600px; gap: 40px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .section { padding: 72px 0; }
  .title { margin-bottom: 28px; }
  .section__intro { margin-top: -6px; margin-bottom: 32px; font-size: 16px; }
  .header__logo { font-size: 22px; }

  /* На телефоне гирлянда мельче, чтобы не спорить с фото */
  .bunting { height: 50px; }
  .hero { padding-top: 66px; }
  .hero__grid { column-gap: 16px; }
  .hero__role { font-size: 13px; }
  .hero__quote { margin: 26px 0 24px; font-size: 16px; }
  .hero__actions .btn { width: 100%; }
  .btn--primary { padding: 0 24px 3px; font-size: 22px; }

  .hero__facts { grid-template-columns: 1fr; margin-top: 44px; padding: 4px 0; }
  .hero__facts li, .hero__facts li:first-child { flex-direction: row; align-items: center; gap: 16px; padding: 14px 0; }
  .hero__facts li + li { border-left: 0; border-top: 1px solid var(--line); }
  .hero__fact-num { width: 104px; font-size: 30px; }

  .lead { font-size: 25px; }
  .principles li { font-size: 21px; }

  .topic__name { font-size: 30px; }

  /* Методы на телефоне — простой список с разделителями */
  .methods { flex-direction: column; height: auto; gap: 0; border-top: 1px solid rgba(255, 253, 249, .35); }
  .method, .method.is-open { flex: none; overflow: visible; background: none; border: 0; border-bottom: 1px solid rgba(255, 253, 249, .35); border-radius: 0; color: var(--paper); }
  .method__tab { display: none; }
  .method__body { position: static; width: auto; padding: 20px 0 22px; opacity: 1; visibility: visible; }
  .method h3 { font-size: 27px; margin-bottom: 6px; }
  .method p { color: rgba(255, 253, 249, .85); }

  .steps { grid-template-columns: 1fr; gap: 0; text-align: left; max-width: 420px; }
  .steps::before { top: 38px; bottom: 38px; left: 28px; right: auto; border-top: 0; border-left: 1px dashed var(--blue-soft); }
  .step { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
  .step__num { flex: none; margin: 0; }
  .step p { margin: 0; max-width: none; font-size: 16px; }
  .start .btn { width: 100%; }
  .spark--4 { right: 6%; top: -20px; }

  /* Кабинет и сертификаты листаются пальцем */
  .gallery, .certs {
    display: flex;
    gap: 16px;
    margin: 0 -20px;
    padding: 22px 20px 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar, .certs::-webkit-scrollbar { display: none; }
  .gallery__string { display: none; }
  .snap { flex: 0 0 74%; scroll-snap-align: center; }
  .snap:nth-of-type(n) { margin-top: 0; }
  .snap img { height: auto; aspect-ratio: 4 / 5; }
  .snap figcaption { font-size: 16px; }
  .certs { margin-top: 24px; padding-top: 8px; }
  .cert { flex: 0 0 78%; scroll-snap-align: center; }

  .timeline > li { grid-template-columns: 64px 1fr; gap: 12px; }
  .timeline__year { font-size: 20px; }
  .timeline strong { font-size: 21px; }

  .prices { grid-template-columns: 1fr; gap: 16px; }
  .price h3 { font-size: 28px; margin-bottom: 8px; }

  .contacts__head { gap: 24px; margin-bottom: 22px; }
  .contacts__photo, .contacts__photo img { width: 84px; height: 84px; }
  .contacts__photo::after { inset: -6px; }
  .contacts__intro { font-size: 16px; margin-bottom: 24px; }
  .btn--pill { min-height: 58px; padding: 0 16px; font-size: 16px; }
  .visit { padding: 4px 24px; }
  .visit__block { padding: 22px 0; }
  .visit__address { font-size: 26px; }
  .contacts__closing { margin-top: 0; font-size: 16px; }

  .footer__inner { flex-direction: column; }
}

/* Первый экран целиком помещается в окно вместе со строкой фактов */
@media (min-width: 961px) {
  .hero { padding-top: 104px; }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 96px; align-items: stretch; }
  .hero__quote { max-width: none; margin-right: -56px; }
  .hero { --facts-gap: min(72px, 5vh); }
  /* Фото занимает правую колонку и стоит на верхней линии строки фактов */
  .hero__media { justify-self: stretch; max-width: none; margin: 0 0 calc(-1 * var(--facts-gap)); }
  .hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-position: center 22%; border-radius: var(--radius) var(--radius) 0 0; }
  .hero__name { font-size: clamp(64px, min(9vw, 14vh), 124px); margin-bottom: min(36px, 3.5vh); }
  .hero__quote { margin-bottom: min(40px, 4vh); }
  .hero__facts { margin-top: var(--facts-gap); padding: min(28px, 2.6vh) 0; }
}
@media (min-width: 961px) and (max-height: 700px) {
  .hero { padding-top: 88px; --facts-gap: 20px; }
  .hero__name { font-size: clamp(56px, 11vh, 124px); }
  .hero__quote { font-size: 16px; line-height: 1.6; margin-bottom: 18px; }
  .hero__actions .btn { min-height: 54px; font-size: 22px; }
  .hero__facts { padding: 12px 0; }
  .hero__facts li { font-size: 13px; }
  .hero__fact-num { font-size: 30px; }
}
