@font-face {
  font-family: Manrope;
  src: url("assets/fonts/Manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --white: #fff;
  --ink: #171717;
  --red: #c52332;
  --gray: #f4f4f4;
  --secondary: #555;
  --line: #d2d2d2;
  --edge: clamp(20px, 4.2vw, 64px);
  --gap: clamp(20px, 2.5vw, 36px);
  --rhythm: clamp(52px, 6.5vw, 96px);
  --section-break: clamp(26px, 3.5vw, 52px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--white); font: 400 1.125rem/1.6 Manrope, Arial, sans-serif; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; }
h2 { font-size: clamp(2.25rem, 4.35vw, 4.25rem); letter-spacing: -.035em; text-wrap: balance; }
h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
section[id] { scroll-margin-top: 24px; }
.wrap { width: min(1320px, calc(100% - var(--edge) * 2)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: 8px; left: var(--edge); padding: 10px 16px; background: var(--white); }
.skip:not(:focus) { clip-path: inset(50%); }

.header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 24px; align-items: center; min-height: 100px; border-bottom: 1px solid var(--ink); }
.header nav, .footer nav { display: flex; flex-wrap: wrap; gap: 0 clamp(20px, 3vw, 52px); }
.header nav { justify-self: end; margin-right: clamp(0px, 7vw, 132px); }
.header a, .footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.header a:hover, .footer a:hover { text-decoration: underline; }
.header .mark { justify-self: start; gap: 12px; }
.header .mark:hover { text-decoration: none; }
.mark-name { font-size: 1.0625rem; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.mark-name small { display: block; margin-top: 2px; color: var(--secondary); font-size: .8125rem; font-weight: 400; letter-spacing: 0; }
.header nav, .header-contact { font-size: 1rem; }
.header-contact { justify-self: end; color: var(--red); font-weight: 600; }
.menu-toggle { display: none; }
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1100px) {
  .mark-name small { display: none; }
}

@media (max-width: 900px) {
  .header.has-menu { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; min-height: 72px; }
  .header.has-menu nav { display: none; grid-column: 1 / -1; grid-row: 2; flex-direction: column; justify-self: stretch; margin: 0; padding-bottom: 12px; }
  .header.has-menu.is-open nav { display: flex; }
  .header.has-menu nav a { min-height: 48px; border-top: 1px solid var(--line); font-size: 1.0625rem; }
  .header.has-menu .menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; color: inherit; background: none; border: 0; cursor: pointer; }
  .menu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -7px; }
  .menu-icon::after { top: 7px; }
  .is-open .menu-icon { background: transparent; }
  .is-open .menu-icon::before { transform: translateY(7px) rotate(45deg); }
  .is-open .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }
  .header.has-menu .header-contact { padding-inline: 8px; }
}

@media (max-width: 360px) {
  .header.has-menu .header-contact { display: none; }
}

.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding-block: clamp(32px, 3.6vw, 52px) 36px; }
.hero-copy { grid-column: span 7; align-self: center; }
.specialty { position: relative; margin-bottom: clamp(18px, 2vw, 28px); padding-left: 28px; font-size: clamp(.875rem, 1.25vw, 1.1rem); line-height: 1.45; letter-spacing: .07em; text-transform: uppercase; }
.specialty::before { content: ""; position: absolute; left: 0; top: .42em; width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
h1 { font-size: clamp(3rem, 8.7vw, 7.5rem); letter-spacing: -.05em; line-height: .96; margin-left: -.045em; }
h1 span { color: var(--red); }
.hero-description { max-width: 35rem; margin-block: 24px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 13px 20px; color: var(--white); background: var(--red); font-size: 1rem; font-weight: 600; text-decoration: none; }
.action:focus-visible { outline-color: var(--red); }
.dark .action:focus-visible { outline-color: var(--white); }
.action:hover { background: #a71c29; }
.hero .action { width: min(100%, 24rem); }
.format { margin-top: 12px; color: var(--secondary); font-size: .9375rem; }
.portrait { display: block; grid-column: span 5; min-width: 0; width: 100%; position: relative; background: var(--gray); aspect-ratio: .9; align-self: stretch; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.facts { border-top: 1px solid var(--ink); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding-block: 18px 30px; }
.facts div { display: flex; flex-direction: column-reverse; justify-content: start; }
.facts dd { font-size: clamp(2.25rem, 5.3vw, 4.5rem); font-weight: 300; letter-spacing: -.04em; line-height: 1.13; }
.facts dt { margin-top: 7px; font-size: 1rem; color: var(--secondary); }

.section { padding-block: var(--rhythm); }
.about > .wrap { border-top: 1px solid var(--line); padding-top: var(--rhythm); }
.about { padding-top: 0; margin-top: clamp(16px, 2.2vw, 32px); padding-bottom: var(--section-break); }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.split > :first-child { grid-column: span 6; }
.split > :nth-child(2) { grid-column: 8 / -1; }
.rubric { color: var(--red); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.copy { align-self: end; }
.copy p + p { margin-top: 1em; }
.copy .textlink, .copy .action { margin-top: 18px; }
.lead { margin-bottom: clamp(34px, 5vw, 66px); }
.textlink { display: inline-flex; align-items: center; min-height: 44px; color: var(--red); font-weight: 600; }
#services { padding-top: 0; }
#services > .wrap { border-top: 1px solid var(--line); padding-top: var(--section-break); }
details { border-top: 1px solid var(--line); }
details:first-child, .accordion-group + details { border-top-color: var(--ink); }
.accordion-group { margin: clamp(28px, 3.5vw, 48px) 0 12px; color: var(--secondary); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.accordion-group:first-child { margin-top: 0; }
details:last-child { border-bottom: 1px solid var(--ink); }
summary { cursor: pointer; display: grid; grid-template-columns: minmax(40px, 1fr) 10fr 36px; gap: 12px; align-items: center; padding-block: 19px; font-size: clamp(1.125rem, 2.1vw, 1.875rem); font-weight: 500; line-height: 1.25; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover, details[open] summary { color: var(--red); }
.number { font-size: .875rem; color: var(--red); font-weight: 600; font-variant-numeric: tabular-nums; }
.toggle { justify-self: center; position: relative; width: 18px; height: 18px; }
.toggle::before, .toggle::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: currentColor; }
.toggle::after { transform: rotate(90deg); }
details[open] .toggle::after { display: none; }
.answer { padding: 0 48px 20px calc((100% - 60px) / 11 + 12px); max-width: 55rem; }
.answer .textlink { margin-top: 8px; }
.muted { background: var(--gray); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.steps li { border-top: 1px solid var(--ink); padding-top: 14px; }
.step-no { display: block; font-size: clamp(3.25rem, 5vw, 5rem); color: var(--red); font-weight: 300; line-height: 1.2; letter-spacing: -.04em; }
.steps h3 { margin-block: 16px 12px; }
.steps p, .education p { color: var(--secondary); }
.approach-end { align-items: start; margin-top: 44px; border-top: 1px solid var(--line); padding-top: 24px; }
.approach-end a { justify-self: start; }
.education li { display: grid; grid-template-columns: 2fr 4fr 6fr; gap: var(--gap); align-items: baseline; border-top: 1px solid var(--line); padding-block: 20px; }
.education li:first-child { border-color: var(--ink); }
.education li:last-child { border-bottom: 1px solid var(--ink); }
.year { font-size: clamp(1.3rem, 2.35vw, 2.2rem); font-weight: 400; letter-spacing: -.03em; }
.education-note { max-width: 44rem; margin-top: 24px; }

.prices li { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 2fr) minmax(0, 3fr); gap: var(--gap); align-items: baseline; border-top: 1px solid var(--line); padding-block: 20px; }
.prices li:first-child { border-color: var(--ink); }
.prices li:last-child { border-bottom: 1px solid var(--ink); }
.prices h3 { margin-bottom: 6px; }
.prices p, .price-duration { color: var(--secondary); }
.price-value { justify-self: end; font-size: clamp(1.3rem, 2.35vw, 2.2rem); letter-spacing: -.03em; white-space: nowrap; }
.prices-end, .reviews-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 28px; }
.prices-end p { color: var(--secondary); }
.reviews-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.review { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; margin: 0; padding-top: 18px; border-top: 1px solid var(--ink); }
.review blockquote { margin: 0; font-size: 1.125rem; line-height: 1.55; }
.review blockquote::before { content: "«"; display: block; margin-bottom: 6px; color: var(--red); font-size: 3.5rem; font-weight: 300; line-height: .6; }
.review figcaption { color: var(--secondary); font-size: .9375rem; }
/* Temporary content waiting for real data: impossible to miss on review. */
mark.todo { padding: 0 .2em; color: var(--ink); background: #f3e3a6; }
#education { padding-bottom: var(--section-break); }
#media { padding-top: 0; }
#media > .wrap { padding-top: var(--section-break); border-top: 1px solid var(--line); }
.mastheads { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 20px; border-block: 1px solid var(--ink); padding-block: 22px; }
.mastheads li { display: grid; place-items: center; min-width: 0; height: 38px; }
.mastheads img { display: block; width: auto; height: auto; max-width: 100%; max-height: 28px; filter: grayscale(1) brightness(.55); opacity: .8; }
/* Even out optical weight: heavy wordmarks shrink, pale ones darken. */
.mastheads img[src$="/izvestia.svg"] { max-height: 22px; filter: grayscale(1) brightness(.9); }
.mastheads img[src$="/doctorpiter.svg"] { max-height: 32px; filter: grayscale(1) brightness(.2); }
.mastheads img[src$="/psychologies.svg"] { filter: grayscale(1) brightness(.4); }
.mastheads img[src$="/forbes.png"] { max-width: min(100%, 104px); filter: grayscale(1); opacity: .85; }
.mastheads img[src$="/gazeta.svg"] { max-width: min(100%, 155px); }
.articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.articles li { border-bottom: 1px solid var(--line); padding: 22px 0; }
.articles h3 { font-weight: 500; }
.publication { display: block; margin-bottom: 7px; font-size: .875rem; color: var(--secondary); }
.article-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.article-link:hover { text-decoration: underline; }
.dark { color: var(--white); background: var(--ink); }
.dark .rubric { color: #ff7883; }
.contact-main h2 { font-size: clamp(2.8rem, 6.8vw, 6.25rem); }
.contact-main .copy { align-self: start; }
.telegram-contact.action { color: var(--white); background: transparent; border: 1px solid #a2a2a2; }
.telegram-contact.action:hover { background: #303030; }
.contact-form-preview { margin-top: 30px; padding-top: 22px; border-top: 1px solid #656565; }
.contact-form-preview h3 { margin-bottom: 16px; }
.contact-fields { display: grid; gap: 13px; }
.contact-fields label { display: grid; gap: 5px; font-size: .9375rem; font-weight: 600; }
.contact-fields input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #898989; border-radius: 0; background: #242424; color: var(--white); font: 400 1rem/1.4 Manrope, Arial, sans-serif; }
.contact-fields input::placeholder { color: #bdbdbd; opacity: 1; }
.contact-form-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; }
.contact-form-bottom .action { border: 0; font-family: inherit; }
.contact-form-bottom p { color: #ccc; font-size: .875rem; }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 54px; padding-top: 24px; border-top: 1px solid #656565; }
.contact-list h3 { color: #ccc; font-size: .9375rem; letter-spacing: 0; margin-bottom: 8px; }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.footer { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px 24px; padding-block: 24px; font-size: .9375rem; }
.footer > div a { font-weight: 600; }
.footer p { color: var(--secondary); }
.footer-legal { flex-basis: 100%; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8125rem; }

@media (max-width: 950px) {
  .reviews-list { grid-template-columns: minmax(0, 1fr); }
  .split > :nth-child(2) { grid-column: 7 / -1; }
  .header { min-height: 78px; }
  .header nav { gap: 0 18px; }
}

@media (max-width: 680px) {
  :root { --rhythm: 58px; }
  .prices li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .prices li > div { grid-column: 1 / -1; }
  .reviews-list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .header { grid-template-columns: 1fr auto; padding-top: 5px; }
  .header nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; column-gap: 8px; }
  .header nav a { font-size: clamp(.8125rem, 3.6vw, .9375rem); }
  .hero { display: flex; flex-direction: column; gap: 24px; padding-block: 30px 24px; }
  h1 { font-size: clamp(3.125rem, 15.6vw, 5.75rem); }
  .hero-description { margin-block: 17px; }
  .portrait { aspect-ratio: .98; }
  .portrait img { object-position: center 31%; }
  .facts { gap: 9px; padding-block: 15px 14px; }
  .facts dd { font-size: clamp(1.75rem, 8vw, 3.5rem); }
  .facts dt { font-size: .875rem; line-height: 1.4; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr); }
  .split > :first-child, .split > :nth-child(2) { grid-column: 1; }
  .rubric { margin-bottom: 9px; }
  summary { grid-template-columns: 24px minmax(0, 1fr) 22px; gap: 9px; padding-block: 16px; }
  .answer { padding: 0 0 16px 33px; }
  .steps, .articles, .contact-list { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 23px; }
  .steps h3 { margin-block: 7px; }
  .approach-end { margin-top: 26px; gap: 10px; }
  .education li { grid-template-columns: 86px minmax(0, 1fr); column-gap: 13px; row-gap: 4px; }
  .education li p { grid-column: 2; }
  .year { font-size: 1.0625rem; white-space: nowrap; }
  .education li h3 { font-size: 1.23rem; }
  .mastheads { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding-block: 14px; }
  .mastheads li { height: 34px; }
  .mastheads img { max-height: 26px; }
  .contact-list { gap: 20px; margin-top: 29px; }
  .footer nav { gap: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

@media (max-width: 360px) {
  h2 { font-size: 2rem; }
}

/* The cortical contour appears once, on the first screen. Further sections
   stay clean so the motif keeps its weight instead of becoming wallpaper. */
.opening { position: relative; isolation: isolate; }
.opening::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: url("assets/cortical-pattern.webp") center / contain no-repeat;
  inset: 34px 32% auto auto;
  width: min(48%, 550px);
  aspect-ratio: 1.55;
  opacity: .9;
  transform: rotate(-13deg);
  mask-image: linear-gradient(to right, transparent 7%, #000 42%);
}

@media (max-width: 680px) {
  .opening::before {
    top: 43px;
    right: 0;
    width: 80%;
    opacity: .75;
    transform: none;
    mask-image: linear-gradient(to right, transparent 10%, #000 64%);
  }
}

.contact-form-preview .contact-agreements { display: grid; margin-top: 12px; }
.contact-form-preview .consent-preview { display: flex; align-items: start; margin: 0; padding-block: 10px; }
.contact-form-preview .consent-preview input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--red); }
.contact-form-preview .consent-preview a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.contact-form-preview .action:disabled { opacity: .62; cursor: not-allowed; }
.contact-form-preview [role="status"]:empty { display: none; }
.contact-form-preview [role="status"] { margin-top: 10px; }

.not-found { padding-block: clamp(60px, 11vw, 160px); }
.not-found h1 { max-width: 15ch; margin: 0; font-size: clamp(2.8rem, 7vw, 6.8rem); line-height: 1; }
.not-found p:not(.rubric) { max-width: 36rem; margin-block: 24px; }
.not-found-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; }
