/* Дарья Девятайкина, клинический психолог.
   Журнальная вёрстка, рукописные пометки, чёрно-белые портреты. Сначала телефон. */

:root {
  /* Палитра Pantone */
  --clay: #C99685;        /* Muted Clay */
  --neptune: #8BB9A0;     /* Neptune Green */
  --spice: #804738;       /* Arabian Spice */
  --mahogany: #5A383E;    /* Red Mahogany */
  --olive: #65604E;       /* Burnt Olive */
  --sky: #6994C7;         /* All Aboard */
  --foxglove: #B28591;    /* Foxglove */

  /* Нейтральные */
  --bg: #F7F0E7;
  --paper: #FCF8F2;
  --ink: #3A2A2C;
  --line: #D9C9BC;
  --white: #FFFFFF;

  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Marck Script", cursive;
  --sans: "Manrope", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
}
body.has-bar { padding-bottom: 84px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; color: var(--mahogany); }
h1 { font-size: 2.75rem; letter-spacing: -0.01em; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.55rem; line-height: 1.15; margin-bottom: 6px; }

a { color: var(--spice); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 56px 0; position: relative; }

/* Маленькие подписи в скобках */
.label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--olive); margin-bottom: 16px; }

/* Рукописный акцент */
.script { display: block; font-family: var(--script); font-weight: 400; font-size: 1.12em; line-height: 1; color: var(--spice); transform: rotate(-2deg); transform-origin: left; margin-top: 4px; }

/* Рукописная обводка слова */
.mark { position: relative; display: inline-block; white-space: nowrap; }
.mark svg { position: absolute; left: -6%; top: -14%; width: 112%; height: 128%; overflow: visible; pointer-events: none; }
.mark.under svg { top: 86%; left: 0; width: 100%; height: 16px; }
.mark path { fill: none; stroke: var(--spice); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.scribble { position: absolute; pointer-events: none; }
.scribble path { fill: none; stroke: var(--clay); stroke-width: 1.4; stroke-linecap: round; }

.arrow { display: block; width: 52px; height: 52px; margin: 14px 0 -4px 6px; }
.arrow path { fill: none; stroke: var(--spice); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Портреты */
.bw { filter: grayscale(1) contrast(1.05) brightness(1.08); }

/* Кнопки */
.btn { display: block; width: 100%; padding: 17px 22px; border-radius: 999px; border: 1px solid var(--mahogany); font: inherit; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--mahogany); color: var(--white); }
.btn-ghost { background: transparent; color: var(--mahogany); }
.btn-small { padding: 9px 18px; font-size: 0.92rem; }
.actions { display: grid; gap: 12px; margin-top: 26px; }
.btn-note { margin-top: 10px; text-align: center; color: var(--olive); font-size: 0.92rem; }

/* Шапка */
header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { max-width: 1120px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.05; color: var(--mahogany); text-decoration: none; }
.logo span { display: block; font-family: var(--sans); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--olive); margin-top: 3px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { content: ""; display: block; width: 26px; height: 1.5px; background: var(--mahogany); position: relative; }
.nav-burger span::before { position: absolute; top: -7px; }
.nav-burger span::after { position: absolute; top: 7px; }
nav { display: none; width: 100%; }
.nav-toggle:checked ~ nav { display: block; }
nav ul { padding: 8px 0 14px; }
nav li a:not(.btn) { display: block; padding: 11px 0; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
nav li .btn { margin-top: 14px; color: var(--white); }

/* Обложка */
.cover { padding: 18px 0 52px; }
.cover-top { display: flex; justify-content: space-between; gap: 12px; }
.portrait-wrap { position: relative; margin-bottom: 92px; }
.portrait { width: 100%; height: auto; aspect-ratio: 4 / 4.7; object-fit: cover; object-position: 50% 12%; }
.big-name { position: absolute; left: 0; right: 0; bottom: -74px; text-align: left; }
.big-name .first { display: block; font-family: var(--script); font-size: 4.1rem; line-height: 1; color: var(--spice); transform: rotate(-3deg); margin-left: 10px; }
.big-name .last { display: block; font-family: var(--serif); font-size: 3.15rem; font-weight: 500; line-height: 1; color: var(--mahogany); letter-spacing: -0.01em; margin-top: -4px; text-shadow: 0 0 22px var(--bg); }
.cover h1 + p { margin-top: 22px; font-size: 1.08rem; }
.cover .note { margin-top: 10px; color: var(--olive); }

/* Простые первые экраны внутренних страниц и документов */
.hero { padding: 34px 0 20px; }
.hero h1 { font-size: 2.3rem; }
.hero h1 + p { margin-top: 14px; }
.hero-note { margin-top: 10px; color: var(--olive); font-size: 0.95rem; }

/* Нумерованные строки */
.rows { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 46px 1fr; padding: 20px 0; border-top: 1px solid var(--line); }
.num { font-size: 0.82rem; font-weight: 500; color: var(--spice); padding-top: 5px; }
.row p { font-size: 1rem; }

/* Раскрывающиеся блоки */
details { border-top: 1px solid var(--line); }
.accordion { border-bottom: 1px solid var(--line); }
summary { display: grid; grid-template-columns: 46px 1fr 24px; align-items: baseline; padding: 17px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.15; color: var(--mahogany); }
summary::-webkit-details-marker { display: none; }
summary .num { font-family: var(--sans); font-size: 0.82rem; padding: 0; }
summary::after { content: "+"; font-family: var(--sans); font-size: 1.3rem; font-weight: 400; color: var(--spice); text-align: right; }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 20px 46px; font-size: 1rem; }
.plain summary { grid-template-columns: 1fr 24px; }
.plain details p { padding-left: 0; }

/* Цитата на фото */
.photo-quote { padding: 0; background: var(--ink); color: var(--white); overflow: hidden; }
.photo-quote img { width: 100%; height: 460px; object-fit: cover; object-position: 50% 16%; opacity: 0.82; }
.photo-quote blockquote { position: absolute; left: 20px; right: 20px; bottom: 26px; font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.photo-quote cite { display: block; margin-top: 10px; font-family: var(--script); font-style: normal; font-size: 1.5rem; }
.photo-quote .shade { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(30, 20, 22, 0.86)); }

/* Тёмный скруглённый блок */
.panel { background: var(--mahogany); color: var(--white); border-radius: 34px; padding: 34px 24px; }
.panel h2, .panel h3 { color: var(--white); }
.panel .script { color: var(--clay); }
.panel .label { color: var(--clay); }
.panel .btn-primary { background: var(--bg); border-color: var(--bg); color: var(--mahogany); }
.panel .btn-ghost { border-color: var(--bg); color: var(--white); }
.panel .btn-note { color: var(--bg); }
.check { margin-top: 16px; }
.check li { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.24); }

/* Повёрнутые карточки */
.tilt { display: grid; gap: 14px; margin-top: 8px; }
.tilt > div { padding: 22px 20px 24px; background: var(--paper); border: 1px solid var(--line); }
.tilt > div:nth-child(1) { transform: rotate(-1.4deg); }
.tilt > div:nth-child(2) { transform: rotate(1.2deg); background: #CFDDEE; border-color: #CFDDEE; }
.tilt > div:nth-child(3) { transform: rotate(-0.8deg); background: #CBE0D4; border-color: #CBE0D4; }
.tilt .num { display: block; padding: 0 0 12px; }

/* Обо мне: фото с уголками */
.about-grid { display: grid; gap: 30px; }
.ticks { position: relative; padding: 13px; max-width: 280px; }
.ticks img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
.ticks::before, .ticks::after { content: ""; position: absolute; width: 20px; height: 20px; border: 1.5px solid var(--neptune); }
.ticks::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.ticks::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }

/* Цены */
.price-row { padding: 22px 0; border-top: 1px solid var(--line); }
.price { display: block; margin-top: 8px; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; color: var(--mahogany); }
.panel .price { color: var(--white); }
.price-row.panel { border: 0; padding: 28px 24px; margin-bottom: 8px; }

/* Контакты */
.contact { display: block; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.contact b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--mahogany); line-height: 1.15; }
.contact small { display: block; color: var(--olive); font-size: 0.92rem; }

.lead { font-size: 1.05rem; margin: 14px 0 24px; }
.muted { color: var(--olive); }

/* Закреплённая кнопка на телефоне */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }

/* Подвал */
footer { padding: 32px 0; color: var(--olive); font-size: 0.9rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 10px; }

/* Мягкое появление */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .tilt .reveal.in:nth-child(1) { transform: rotate(-1.4deg); }
.js .tilt .reveal.in:nth-child(2) { transform: rotate(1.2deg); }
.js .tilt .reveal.in:nth-child(3) { transform: rotate(-0.8deg); }
.js .mark path { stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.5s ease 0.3s; }
.js .mark.in path { stroke-dashoffset: 0; }

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

@media (min-width: 720px) {
  h1 { font-size: 3.7rem; }
  h2 { font-size: 3.3rem; }
  section { padding: 88px 0; }
  .hero h1 { font-size: 3.2rem; }
  .actions { grid-template-columns: max-content max-content; }
  .btn { width: auto; display: inline-block; padding: 16px 30px; }
  .btn-note { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tilt { grid-template-columns: repeat(3, 1fr); gap: 0; align-items: start; }
  .tilt > div { padding: 28px 24px 34px; }
  .tilt > div:nth-child(2) { margin: 34px -6px 0; position: relative; }
  .about-grid { grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
  .panel { padding: 56px; }
  .photo-quote img { height: 640px; object-position: 50% 22%; }
  .photo-quote blockquote { left: auto; right: 8%; bottom: 56px; width: 460px; font-size: 1.8rem; }
  .price-row { display: grid; grid-template-columns: 1fr 180px; gap: 30px; align-items: baseline; }
  .price { margin-top: 0; text-align: right; }
}

@media (min-width: 960px) {
  .nav { flex-wrap: nowrap; }
  .nav-burger { display: none; }
  nav { display: block; width: auto; }
  nav ul { display: flex; align-items: center; gap: 26px; padding: 0; }
  nav li a:not(.btn) { padding: 0; border: 0; font-size: 0.95rem; }
  nav li .btn { margin-top: 0; }
  .cta-bar { display: none; }
  body.has-bar { padding-bottom: 0; }
  .cover { padding: 40px 0 88px; }
  .cover-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 64px; align-items: end; }
  .cover h1 { font-size: 4rem; }
  .portrait-wrap { order: 2; margin-bottom: 0; }
  .portrait { aspect-ratio: 4 / 5; }
  .big-name { left: -210px; bottom: 34px; }
  .big-name .first { font-size: 6rem; }
  .big-name .last { font-size: 5.6rem; text-shadow: none; mix-blend-mode: normal; }
  .two { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 64px; align-items: start; }
  .two > .sticky { position: sticky; top: 100px; }
}

/* Имя на портрете */
.portrait-wrap { margin-bottom: 60px; }
.big-name { bottom: -46px; }
.big-name .first { color: var(--bg); }
@media (min-width: 960px) {
  .portrait-wrap { margin-bottom: 0; }
  .big-name { left: 0; bottom: 18px; padding-left: 28px; }
  .big-name .first { font-size: 5.4rem; }
  .big-name .last { font-size: 3.9rem; color: var(--bg); text-shadow: none; }
}

/* Заголовки: один шрифт на заголовок. Разделы написаны от руки */
h2, .hero.page h1 { font-family: var(--script); font-weight: 400; font-size: 2.6rem; line-height: 1.1; color: var(--spice); }
.panel h2 { color: var(--bg); }
.hero.page h1 { margin-bottom: 4px; }
@media (min-width: 720px) {
  h2, .hero.page h1 { font-size: 3.4rem; }
}
h2, .hero.page h1 { word-spacing: -0.14em; }
.photo-quote .mark path { stroke: var(--clay); }

/* Подбор кадров */
.pos-rest { object-position: 50% 62%; }
.pos-top { object-position: 50% 0; }
.portrait-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(transparent, rgba(30, 20, 22, 0.55)); pointer-events: none; }
.big-name { z-index: 2; }
.photo-quote img.tight { object-position: 50% 8%; }
.ticks.spaced { margin-top: 26px; }
.ticks.chair img { aspect-ratio: 1 / 1.05; object-position: 50% 12%; }
.ticks.chair img { aspect-ratio: 1 / 1; object-position: 50% 8%; }

/* Имя целиком на фото, рукописным */
.portrait-wrap, .cover .portrait-wrap { margin-bottom: 24px; }
.big-name { left: 18px; right: 18px; bottom: 14px; padding: 0; font-family: var(--script); font-size: 2.9rem; line-height: 1.02; color: var(--bg); transform: rotate(-2deg); transform-origin: left bottom; }
@media (min-width: 960px) {
  .portrait-wrap, .cover .portrait-wrap { margin-bottom: 0; }
  .big-name { left: 28px; bottom: 22px; font-size: 4.2rem; }
}

/* Заголовки строк услуг выглядят как подзаголовки */
h2.row-title { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.15; color: var(--mahogany); word-spacing: normal; margin-bottom: 6px; }
.panel h2.row-title { color: var(--white); }

/* Узкие экраны */
h2, .hero.page h1 { font-size: clamp(1.9rem, 9.6vw, 2.6rem); overflow-wrap: anywhere; }
.big-name { font-size: clamp(2.2rem, 12.4vw, 2.9rem); }
.final h2, .panel h2 { overflow-wrap: anywhere; }
@media (min-width: 720px) {
  h2, .hero.page h1 { font-size: 3.4rem; }
}
@media (min-width: 960px) {
  .big-name { font-size: 4.2rem; }
}

html { overflow-x: clip; }
.hero h1 { font-size: clamp(1.6rem, 7.6vw, 2.3rem); overflow-wrap: anywhere; }
.hero.page h1 { font-size: clamp(1.9rem, 9.6vw, 2.6rem); }
@media (min-width: 720px) {
  .hero h1 { font-size: 3.2rem; }
  .hero.page h1 { font-size: 3.4rem; }
}

/* Цветные фото */
.bw { filter: none; }
.photo-quote img { opacity: 0.92; }

/* Анимация: медленнее и при каждом появлении блока на экране */
.js .reveal { opacity: 0; transform: translateY(30px); transition: none; }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .tilt .reveal:nth-child(1) { transform: translateY(30px) rotate(-1.4deg); }
.js .tilt .reveal:nth-child(2) { transform: translateY(30px) rotate(1.2deg); }
.js .tilt .reveal:nth-child(3) { transform: translateY(30px) rotate(-0.8deg); }
.js .tilt .reveal.in:nth-child(1) { transform: rotate(-1.4deg); transition-delay: 0s; }
.js .tilt .reveal.in:nth-child(2) { transform: rotate(1.2deg); transition-delay: 0.2s; }
.js .tilt .reveal.in:nth-child(3) { transform: rotate(-0.8deg); transition-delay: 0.4s; }

/* Рукописные обводки и пометки прорисовываются от руки */
.js .mark path, .js .scribble path, .js .arrow path { stroke-dasharray: var(--len, 900); stroke-dashoffset: var(--len, 900); transition: none; }
.js .mark.in path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s ease-in-out 0.4s; }
.js .scribble.in path { stroke-dashoffset: 0; transition: stroke-dashoffset 3.2s ease-in-out 0.3s; }

/* Стрелка рисуется, потом мягко покачивается в сторону кнопки */
.js .arrow.in path { stroke-dashoffset: 0; transition: stroke-dashoffset 2s ease-in-out 0.3s; }
.js .arrow.in { animation: arrow-sway 2.6s ease-in-out 2.4s infinite; }
@keyframes arrow-sway {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, 7px); }
}

/* Большие фото с цитатой медленно приближаются к обычному размеру */
.js .photo-quote img { transform: scale(1.08); transition: none; }
.js .photo-quote.in img { transform: none; transition: transform 3.2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .tilt .reveal { opacity: 1; transform: none; transition: none; }
  .js .mark path, .js .scribble path, .js .arrow path { stroke-dashoffset: 0; transition: none; }
  .js .arrow.in { animation: none; }
  .js .photo-quote img { transform: none; transition: none; }
}

/* Заголовки пишутся от руки, слово за словом */
.js .reveal.hand, .js .reveal.hand.in { opacity: 1; transform: none; transition: none; }
.w { display: inline-block; padding: 0.08em 0.1em 0.14em 0.04em; margin: -0.08em -0.1em -0.14em -0.04em; }
.js .hand .w { clip-path: inset(-20% 100% -20% -8%); transition: none; }
.js .hand.in .w { clip-path: inset(-20% -8% -20% -8%); transition: clip-path var(--t, 0.8s) ease-in-out var(--d, 0s); }
@media (prefers-reduced-motion: reduce) {
  .js .hand .w { clip-path: none; transition: none; }
}

/* Заголовок пишется непрерывно, без пауз между словами */
.js .hand.in .w { transition: clip-path var(--t, 0.8s) linear var(--d, 0s); }
