/* ==========================================================================
   Валерия Бородина — психолог, психоаналитик
   Дизайн-система: тёплый редакторский минимализм.
   Литературная серифная гарнитура для заголовков (Literata) +
   спокойный гротеск для текста (Manrope). Светлые секции чередуются
   тёплый cream / холодный mist.
   ========================================================================== */

/* -------------------- Fonts (self-hosted, variable) -------------------- */
@font-face{
  font-family:'Literata';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('../fonts/literata-normal-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2122;
}
@font-face{
  font-family:'Literata';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('../fonts/literata-normal-cyr.woff2') format('woff2');
  unicode-range:U+0400-045F,U+0490-0491,U+2116;
}
@font-face{
  font-family:'Literata';
  font-style:italic;
  font-weight:400 700;
  font-display:swap;
  src:url('../fonts/literata-italic-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2122;
}
@font-face{
  font-family:'Literata';
  font-style:italic;
  font-weight:400 700;
  font-display:swap;
  src:url('../fonts/literata-italic-cyr.woff2') format('woff2');
  unicode-range:U+0400-045F,U+0490-0491,U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:400 800;
  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+2000-206F,U+2122;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
  src:url('../fonts/manrope-normal-cyr.woff2') format('woff2');
  unicode-range:U+0400-045F,U+0490-0491,U+2116;
}

/* -------------------------------- Tokens -------------------------------- */
:root{
  /* светлые секции — тёплый / холодный чередуются */
  --bg-cream:      #f7f4ee;
  --bg-mist:       #edf1f2;
  --surface:       #ffffff;

  --text:          #22262b;
  --text-muted:    #636b70;
  --line:          rgba(34,38,43,.12);
  --line-soft:     rgba(34,38,43,.07);

  --accent:        #5b7a99;
  --accent-deep:   #3f5a75;
  --accent-soft:   #dde6ec;

  --bg-dark:       #1b212b;
  --bg-dark-alt:   #151a22;
  --text-inv:      #f1efe8;
  --text-inv-muted:#a4aeb8;
  --accent-inv:    #9fbdd6;

  --font-display:'Literata', Georgia, 'Times New Roman', serif;
  --font-body:'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container:1180px;
  --gap-xl:clamp(4.5rem, 9vw, 8rem);
  --gap-lg:clamp(3rem, 6vw, 5rem);
  --radius:18px;
  --radius-sm:10px;

  --ease:cubic-bezier(.22,.68,0,1);
}

/* -------------------------------- Reset --------------------------------- */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{margin:0;}
img{max-width:100%;display:block;}
ul{margin:0;padding:0;}
a{color:inherit;text-decoration:none;}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;}
h1,h2,h3,p{margin:0;}

body{
  font-family:var(--font-body);
  color:var(--text);
  background:var(--bg-cream);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

.skip-link{
  position:absolute;left:-9999px;top:0;
  background:var(--bg-dark);color:var(--text-inv);
  padding:.7rem 1.2rem;border-radius:0 0 8px 0;z-index:999;
}
.skip-link:focus{left:0;}

:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}

/* ------------------------------ Layout ----------------------------------- */
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}
@media(min-width:768px){ .container{padding:0 40px;} }

.section{padding:var(--gap-xl) 0;}
.section-cream{background:var(--bg-cream);}
.section-mist{background:var(--bg-mist);}
.section-dark{background:var(--bg-dark);color:var(--text-inv);padding-bottom:0;}

.section-head{max-width:660px;margin-bottom:var(--gap-lg);}
/* no independent max-width here: the intro paragraph must wrap at the same
   right edge as the heading above it (both share .section-head's 660px box).
   Previously this had its own 56ch cap, narrower than the heading's box,
   which made the paragraph's ragged right edge fall short of the heading —
   inconsistent from block to block depending on how each headline wrapped. */
.section-intro{margin-top:1.1rem;color:var(--text-muted);font-size:1.05rem;}
.section-head-with-full-intro{margin-bottom:0;}
.section-intro-full{
  margin-top:1.1rem;
  margin-bottom:var(--gap-lg);
  max-width:none;
  width:100%;
}

/* ------------------------------ Typography -------------------------------- */
h1,h2,h3{font-family:var(--font-display);font-weight:560;letter-spacing:-.01em;color:var(--text);}
.section-dark h1,.section-dark h2,.section-dark h3{color:var(--text-inv);}

h2{font-size:clamp(1.9rem,3.2vw,2.7rem);line-height:1.12;}
.mini-heading{
  font-family:var(--font-body);font-weight:700;font-size:.92rem;
  text-transform:uppercase;letter-spacing:.06em;color:var(--accent-deep);
  margin-bottom:.9rem;
}
.section-dark .mini-heading{color:var(--accent-inv);}

.eyebrow{
  font-family:var(--font-body);font-weight:700;font-size:.8rem;
  text-transform:uppercase;letter-spacing:.16em;color:var(--accent);
  margin:0 0 1rem;
}
.eyebrow-inv{color:var(--accent-inv);}

p+p{margin-top:1.05rem;}
.about-text p,.edu-card p{color:var(--text);}
.muted-note{color:var(--text-muted);font-size:.92rem;}
.section-dark .muted-note{color:var(--text-inv-muted);}

.lead-quote{
  font-family:var(--font-display);font-style:italic;font-size:1.12rem;
  color:var(--accent-deep);border-left:2px solid var(--accent);
  padding-left:1.1rem;margin:1.6rem 0;
}

.check-list{list-style:none;display:grid;gap:.6rem;margin-top:.4rem;}
.check-list li{position:relative;padding-left:1.6rem;color:var(--text);}
.check-list li::before{
  content:'';position:absolute;left:0;top:.42em;width:.9rem;height:.9rem;
  background:var(--accent-soft) url('../icons/mark.svg') center/60% no-repeat;
  border-radius:50%;
}

.dash-list{list-style:none;display:grid;gap:.55rem;}
.dash-list li{position:relative;padding-left:1.1rem;color:var(--text-muted);font-size:.98rem;}
.dash-list li::before{content:'—';position:absolute;left:0;color:var(--accent);}

.link-more{
  display:inline-flex;align-items:center;gap:.4rem;margin-top:1.8rem;
  font-weight:600;color:var(--accent-deep);border-bottom:1px solid var(--line);
  padding-bottom:.2rem;transition:border-color .25s var(--ease),gap .25s var(--ease);
}
.link-more:hover{border-color:var(--accent);gap:.65rem;}

/* -------------------------------- Buttons --------------------------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  padding:.95rem 1.7rem;border-radius:999px;font-weight:600;font-size:.98rem;
  white-space:nowrap;transition:transform .25s var(--ease),background .25s,color .25s,border-color .25s,box-shadow .25s;
}
.btn img{filter:none;}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 10px 24px -10px rgba(59,86,110,.55);}
.btn-primary img{filter:brightness(0) invert(1);}
.btn-primary:hover{background:var(--accent-deep);transform:translateY(-2px);}

.btn-ghost{color:var(--accent-deep);padding:.95rem .4rem;}
.btn-arrow{display:inline-block;transition:transform .25s var(--ease);}
.btn-ghost:hover .btn-arrow{transform:translateY(3px);}

.btn-ghost-inv{color:#fff;text-shadow:0 1px 10px rgba(0,0,0,.4);}
.btn-ghost-inv:hover{color:var(--accent-inv);}

.btn-outline{border:1.5px solid var(--line);color:var(--text);}
.btn-outline:hover{border-color:var(--accent);color:var(--accent-deep);transform:translateY(-2px);}

.btn-small{padding:.6rem 1.15rem;font-size:.88rem;}

.btn-light{background:var(--text-inv);color:var(--bg-dark);}
.btn-light:hover{background:var(--accent-inv);transform:translateY(-2px);}

.btn-outline-inv{border:1.5px solid rgba(241,239,232,.28);color:var(--text-inv);}
.btn-outline-inv:hover{border-color:var(--accent-inv);color:var(--accent-inv);}

/* -------------------------------- Header ---------------------------------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(247,244,238,.86);backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid var(--line-soft);
}
.header-inner{
  display:flex;align-items:center;gap:1.5rem;
  height:76px;
}
.brand{display:flex;flex-direction:column;line-height:1.15;margin-right:auto;}
.brand-name{font-family:var(--font-display);font-weight:600;font-size:1.05rem;color:var(--text);}
.brand-role{font-size:.74rem;color:var(--text-muted);letter-spacing:.02em;}

.nav{display:none;gap:1.9rem;font-size:.95rem;font-weight:600;}
.nav a{position:relative;color:var(--text);padding:.3rem 0;}
.nav a::after{
  content:'';position:absolute;left:0;bottom:-2px;width:0;height:1.5px;
  background:var(--accent);transition:width .25s var(--ease);
}
.nav a:hover::after{width:100%;}

.header-cta{display:none;}

@media(min-width:920px){
  .nav{display:flex;}
  .header-cta{display:inline-flex;}
}

/* -------------------------------- Reveal ---------------------------------- */
[data-reveal]{
  opacity:0;transform:translateY(28px);
  transition:opacity .8s var(--ease),transform .8s var(--ease);
}
[data-reveal].is-visible{opacity:1;transform:translateY(0);}
[data-reveal-delay="1"]{transition-delay:.1s;}
[data-reveal-delay="2"]{transition-delay:.2s;}
[data-reveal-delay="3"]{transition-delay:.3s;}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  [data-reveal]{opacity:1;transform:none;transition:none;}
  *{animation:none !important;}
}

/* --------------------------------- Hero ----------------------------------- */
.hero{
  padding:0 0 clamp(3.5rem,7vw,5.5rem);
  background:
    radial-gradient(60% 55% at 88% 8%, var(--accent-soft) 0%, transparent 70%),
    var(--bg-cream);
}
@media(max-width:639px){
  .hero{padding-bottom:1.4rem;}
}

/* big, dominant photo band — full-bleed, edge to edge (ref: Ирина Мищенко) */
.hero-photo{
  position:relative;margin:0 calc(50% - 50vw);width:100vw;overflow:hidden;
}
.hero-photo > img{
  width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:50% 22%;display:block;
}
.hero-photo-scrim{
  position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(18,22,28,.62) 0%, rgba(18,22,28,0) 28%, rgba(18,22,28,0) 48%, rgba(18,22,28,.55) 100%),
    linear-gradient(to left, rgba(18,22,28,.45) 0%, rgba(18,22,28,0) 55%);
}

.hero-overlay{position:absolute;margin:0;z-index:2;}
.hero-overlay-tl{
  top:.9rem;left:.9rem;max-width:min(90%,26rem);
  display:flex;flex-direction:column;gap:.4rem;
}
/* under the name — narrow so it stays left of the face */
.hero-lead-photo{
  margin:.45rem 0 0;max-width:15rem;
  font-family:var(--font-body);font-size:.66rem;line-height:1.42;
  color:#fff;opacity:.92;text-align:left;
  text-shadow:0 1px 12px rgba(0,0,0,.35);
}
.hero-methods-photo{
  display:flex;flex-direction:column;align-items:flex-end;gap:.2rem;
  font-family:var(--font-body);font-size:.66rem;line-height:1.35;
  color:#fff;opacity:.92;text-align:right;
  text-shadow:0 1px 12px rgba(0,0,0,.35);
}
.hero-methods-photo p{margin:0;}
.hero-eyebrow-photo{
  margin:0;color:#fff;opacity:.9;text-shadow:0 1px 10px rgba(0,0,0,.4);
  white-space:nowrap;
}
.hero-title-photo{
  margin:.15rem 0 0;color:#fff;line-height:.98;
  font-size:clamp(1.6rem,5.4vw,2.3rem);
  text-shadow:0 4px 24px rgba(0,0,0,.5);
}
.hero-overlay-tr{top:.9rem;right:.9rem;max-width:min(52%,16rem);}
.hero-overlay-bl{
  bottom:.9rem;left:.9rem;right:auto;
  max-width:min(48%,16rem);
}
.hero-overlay-br{
  bottom:.9rem;right:.9rem;left:auto;
  max-width:min(96%,34rem);
}
.hero-quote{
  display:flex;flex-direction:column;align-items:flex-end;gap:.85rem;
}
.hero-quote p{
  margin:0;font-family:var(--font-body);font-style:normal;font-weight:400;
  color:#fff;text-align:right;
  font-size:clamp(.62rem,2.2vw,.95rem);line-height:1.32;letter-spacing:.01em;
  text-shadow:0 2px 18px rgba(0,0,0,.45);
  display:flex;flex-direction:column;align-items:flex-end;gap:0;
}
.hero-quote-line{display:block;white-space:nowrap;}
.hero-quote .btn{white-space:nowrap;font-size:.66rem;padding:.55rem .85rem;}

.hero-note{
  margin:0;font-size:.56rem;line-height:1.3;color:#fff;
  text-align:left;text-shadow:0 1px 10px rgba(0,0,0,.45);
}

/* Mobile: only city + name on the banner; lead/methods/quote stack under photo */
@media(max-width:639px){
  .hero-photo{
    display:flex;flex-direction:column;
  }
  .hero-photo > img{order:0;}
  .hero-photo-scrim{
    inset:auto;top:0;left:0;right:0;
    aspect-ratio:4/5;
    background:linear-gradient(to bottom, rgba(18,22,28,.58) 0%, rgba(18,22,28,0) 42%);
  }
  /* unwrap TL so lead can leave the photo stack */
  .hero-overlay-tl{display:contents;}
  .hero-eyebrow-photo{
    position:absolute;z-index:2;
    top:1.1rem;left:1.1rem;
    max-width:calc(100vw - 2.2rem);
  }
  .hero-title-photo{
    position:absolute;z-index:2;
    top:2.85rem;left:1.1rem;
    max-width:min(78%,14rem);
  }
  .hero-lead-photo{
    position:static;
    order:1;
    margin:1.5rem 0 0;
    padding:0 1.35rem;
    max-width:none;
    color:var(--text-muted);
    text-shadow:none;
    font-size:.98rem;
    line-height:1.5;
    opacity:1;
  }
  .hero-overlay-tr,
  .hero-overlay-bl,
  .hero-overlay-br{
    position:static;
    max-width:none;
    padding:0 1.35rem;
    color:var(--text);
    text-shadow:none;
  }
  .hero-overlay-tr{order:2;margin-top:1rem;}
  .hero-overlay-br{order:3;}
  .hero-overlay-bl{order:4;margin-bottom:0;text-align:right;}
  .hero-methods-photo{
    align-items:flex-start;
    color:var(--text-muted);
    text-align:left;
    text-shadow:none;
    font-size:.98rem;
    line-height:1.5;
    opacity:1;
  }
  .hero-note{
    margin-top:1.7rem;
    color:var(--text-muted);
    font-size:.88rem;
    line-height:1.4;
    text-align:right;
    text-shadow:none;
  }
  .hero-quote{
    align-items:stretch;
    margin-top:1.25rem;
    gap:1.25rem;
  }
  .hero-quote p{
    color:var(--text);
    text-align:left;
    text-shadow:none;
    font-size:1.08rem;
    line-height:1.45;
    align-items:stretch;
    display:block;
  }
  .hero-quote-line{
    display:inline;
    white-space:normal;
  }
  .hero-quote .btn{
    align-self:stretch;
    width:100%;
    justify-content:center;
    text-align:center;
    white-space:normal;
    font-size:.95rem;
    padding:.95rem 1.2rem;
  }
}

@media(min-width:640px){
  .hero-photo > img{aspect-ratio:16/10;object-position:50% 26%;}
  .hero-overlay-tl{max-width:min(70%,26rem);top:1.8rem;left:1.8rem;gap:.55rem;}
  .hero-lead-photo{font-size:.9rem;max-width:16rem;}
  .hero-methods-photo{font-size:.9rem;}
  .hero-eyebrow-photo{font-size:.82rem;}
  .hero-overlay-tr{top:1.8rem;right:1.8rem;max-width:min(42%,20rem);}
  .hero-overlay-bl{bottom:1.8rem;left:1.8rem;max-width:min(42%,20rem);}
  .hero-overlay-br{bottom:1.8rem;right:1.8rem;max-width:min(72%,40rem);}
  .hero-quote{gap:1.1rem;}
  .hero-quote p{font-size:clamp(1rem,1.9vw,1.28rem);}
  .hero-quote .btn{font-size:1rem;padding:.95rem 1.7rem;}
  .hero-note{font-size:.78rem;}
}
@media(min-width:860px){
  .hero-photo > img{aspect-ratio:2/1;}
  .hero-overlay-tl{
    max-width:min(55%,28rem);
    left:max(1.8rem,calc((100vw - var(--container)) / 2 + 40px));
  }
  .hero-lead-photo{font-size:1rem;max-width:17rem;}
  .hero-methods-photo{font-size:1rem;}
  .hero-title-photo{font-size:clamp(2.1rem,3.6vw,3rem);}
  .hero-overlay-tr{
    right:max(1.8rem,calc((100vw - var(--container)) / 2 + 40px));
    max-width:min(38%,22rem);
  }
  .hero-overlay-bl{
    bottom:2rem;
    left:max(1.8rem,calc((100vw - var(--container)) / 2 + 40px));
    max-width:min(36%,22rem);
  }
  .hero-overlay-br{
    bottom:2rem;
    right:max(1.8rem,calc((100vw - var(--container)) / 2 + 40px));
    max-width:min(62%,46rem);
  }
  .hero-quote p{font-size:clamp(1.12rem,1.55vw,1.4rem);line-height:1.3;}
}

/* --------------------------------- About ---------------------------------- */
/* Photo fills its column flush (ref: Мищенко) — stretch + cover crop, no radius.
   Desktop: photo column stretches to the full section height (section padding
   moves onto the text column), bleeds to the left viewport edge. Mobile: tall
   portrait crop, same left bleed, square corners. */
/* top flush (photo to edge); bottom keeps the same air as hero → about
   (hero padding-bottom: clamp(3.5rem, 7vw, 5.5rem)) so the next block doesn't merge */
#about.section{
  padding-top:0;padding-bottom:clamp(3.5rem, 7vw, 5.5rem);
  overflow-x:clip;
}
.about-grid{
  display:grid;gap:3rem;grid-template-columns:1fr;
  /* padding-block only — never wipe .container’s L/R inset (same bug as .contacts-grid) */
  padding-block:var(--gap-xl);
  min-width:0;
}
@media(max-width:639px){
  .about-grid{padding-top:1.4rem;padding-bottom:var(--gap-xl);}
}
.about-lead{margin-top:1.4rem;}
.about-photo{
  /* mobile: full viewport bleed — same breakout as .hero-photo / .cabinet-photos */
  margin:0 calc(50% - 50vw);width:100vw;max-width:none;
  overflow:hidden;border-radius:0;min-width:0;
  min-height:min(72vw, 520px);
}
.about-photo img{
  display:block;width:100%;height:100%;min-height:inherit;
  /* pan left (show more of the image's right side) so both elbows stay in frame —
     source has empty wall on the left and the figure close to the right edge */
  object-fit:cover;object-position:78% 18%;border-radius:0;
}
.about-text{min-width:0;}
@media(max-width:859px){
  .about-text{
    padding-right:3.5rem; /* keep body copy clear of sticky contact FABs */
  }
}
@media(min-width:860px){
  /* grid itself no longer carries vertical padding — text column does, so the
     photo can stretch edge-to-edge top/bottom of the section */
  .about-grid{
    grid-template-columns:.9fr 1.1fr;align-items:stretch;
    padding-block:0;
    gap:0 3.5rem;
  }
  .about-text{padding-block:var(--gap-xl);padding-right:0;}
  .about-photo{
    /* desktop: left bleed only — right edge stays at the column boundary */
    width:calc(100% + max(40px, (100vw - var(--container)) / 2 + 40px));
    margin:0;
    margin-left:calc(-1 * max(40px, (100vw - var(--container)) / 2 + 40px));
    position:relative;top:auto;
    min-height:100%;height:100%;align-self:stretch;
  }
  .about-photo img{position:absolute;inset:0;min-height:0;}
}

/* ----------------------------- Photo banner -------------------------------- */
.photo-banner{position:relative;margin:0;background:var(--bg-cream);}
.photo-banner img{
  width:100%;height:auto;aspect-ratio:16/8;object-fit:cover;object-position:50% 35%;
}
.photo-banner-scrim{
  position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to top, rgba(18,22,28,.68) 0%, rgba(18,22,28,.08) 55%, rgba(18,22,28,0) 100%);
}
.photo-banner-quote{
  position:absolute;left:0;right:0;bottom:0;margin:0;padding:1.4rem 1.4rem 1.6rem;
}
.photo-banner-quote p{
  margin:0 auto;max-width:640px;font-family:var(--font-display);font-style:italic;
  color:#fff;font-size:clamp(.82rem,2.6vw,1.15rem);line-height:1.44;text-align:center;
  text-shadow:0 2px 16px rgba(0,0,0,.5);
}
@media(min-width:860px){
  .photo-banner img{aspect-ratio:2.2/1;}
  .photo-banner-quote{padding:2.2rem 2rem 2.6rem;}
}

/* ------------------------------- Education --------------------------------- */
.edu-grid{display:grid;gap:1.4rem;grid-template-columns:1fr;}
@media(min-width:700px){ .edu-grid{grid-template-columns:1fr 1fr;} }

.edu-card{
  background:var(--surface);border-radius:var(--radius);padding:2rem;
  border:1px solid var(--line-soft);
}
/* White plates site-wide: same body tokens as .format-card / about copy */
.edu-card p,
.edu-card .dash-list li{
  color:var(--text);
  font-family:var(--font-body);
  font-size:1rem;
  line-height:1.65;
  font-weight:400;
}
.edu-card p+p{margin-top:.7rem;}
.edu-card-accent{background:var(--accent-deep);color:#fff;}
.edu-card-accent .mini-heading{color:var(--accent-inv);}
.edu-card-accent p{color:#fff;}
.edu-card-accent .muted-note{color:rgba(255,255,255,.65);}
.edu-card-accent a{font-weight:600;border-bottom:1px solid rgba(255,255,255,.4);white-space:nowrap;transition:border-color .25s;}
.edu-card-accent a:hover{border-color:#fff;}

/* section head wide (education): heading spans full container width */
.section-head-wide{max-width:none;}
.section-head-cta{
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;
  gap:1rem 2rem;
}
.section-head-cta h2{margin:0;}
.section-head-cta .btn{flex-shrink:0;}

.diploma-teaser-caption{margin-top:2.2rem;}
@media(min-width:700px){
  .diploma-teaser-caption{white-space:nowrap;}
}

/* CTA under the diploma teaser grid → full gallery */
.diploma-all-cta{
  display:flex;justify-content:center;margin-top:1.6rem;
}
.diploma-all-cta .btn{min-width:min(100%,22rem);text-align:center;}

/* diploma gallery grid: teaser (index) and full page (diplomas.html) share this */
.diploma-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));margin-top:1.2rem;}
.diploma-slot{
  aspect-ratio:3/4;border-radius:0;background:var(--surface);
  border:1px solid var(--line-soft);display:flex;align-items:center;justify-content:center;
}

/* diploma thumbnail: fixed-ratio box, image scaled to fit (documents come in
   mixed portrait/landscape scans) so nothing gets cropped; click opens the
   full, undarkened image in the lightbox (main.js) */
.diploma-thumb{
  position:relative;display:block;width:100%;padding:0;margin:0;cursor:zoom-in;
  aspect-ratio:4/3;border-radius:0;overflow:hidden;
  background:var(--surface);border:1px solid var(--line-soft);
}
.diploma-thumb img{
  width:100%;height:100%;object-fit:contain;object-position:center;
  transition:transform .4s var(--ease),filter .35s var(--ease);
}
.diploma-thumb:hover img{transform:scale(1.04);}

/* featured cards (curated 10, with captions): darkened plate + bright title,
   full document only revealed at full brightness on click (lightbox) */
.diploma-thumb-featured{background:#12161d;border-color:rgba(255,255,255,.08);}
.diploma-thumb-featured img{filter:brightness(.5) saturate(.8);}
.diploma-thumb-featured:hover img{filter:brightness(.68) saturate(1);}
.diploma-card-caption{
  position:absolute;inset:auto 0 0 0;padding:.9rem 1rem 1rem;text-align:left;
  background:linear-gradient(to top, rgba(8,10,14,.92) 15%, rgba(8,10,14,0) 100%);
}
.diploma-card-title{display:block;color:#fff;font-weight:700;font-size:.9rem;line-height:1.3;}
.diploma-card-sub{display:block;color:rgba(255,255,255,.72);font-size:.76rem;margin-top:.3rem;}

.diploma-category{margin-top:2.6rem;}
.diploma-category h3{margin-bottom:0;}
.diploma-category .diploma-grid{margin-top:1.1rem;}

.lightbox{
  position:fixed;inset:0;background:rgba(15,18,24,.92);z-index:200;
  display:flex;align-items:center;justify-content:center;padding:5vh 5vw;
  opacity:0;pointer-events:none;transition:opacity .3s;
}
.lightbox.is-open{opacity:1;pointer-events:auto;}
.lightbox img{max-width:100%;max-height:88vh;border-radius:0;}
.lightbox-close{
  position:absolute;top:22px;right:26px;width:46px;height:46px;border-radius:50%;
  background:rgba(255,255,255,.12);color:#fff;font-size:1.5rem;
}

/* ------------------------------- Directions -------------------------------- */
.cards-grid{display:grid;gap:1.3rem;grid-template-columns:1fr;}
@media(min-width:640px){ .cards-grid{grid-template-columns:1fr 1fr;} }
@media(min-width:1040px){ .cards-grid{grid-template-columns:repeat(4,1fr);} }

.direction-card{
  background:var(--surface);border-radius:var(--radius);padding:1.9rem 1.7rem;
  border:1px solid var(--line-soft);transition:transform .3s var(--ease),box-shadow .3s var(--ease);
}
.direction-card:hover{transform:translateY(-5px);box-shadow:0 24px 40px -26px rgba(30,40,55,.3);}
.direction-mark{
  display:block;font-family:var(--font-display);font-style:italic;font-size:1.6rem;
  color:var(--accent-soft);margin-bottom:.6rem;
}
.direction-card h3{font-size:1.18rem;margin-bottom:.9rem;font-weight:600;}

.directions-note{
  margin-top:2.4rem;font-family:var(--font-display);font-style:italic;
  font-size:1.08rem;color:var(--accent-deep);max-width:62ch;
}

.callout{
  margin-top:2rem;padding:1.6rem 1.9rem;border-radius:var(--radius);
  background:var(--bg-mist);border-left:3px solid var(--accent);
}
.callout p+p{margin-top:.5rem;}

.section-cta{
  margin-top:3rem;padding-top:2.4rem;border-top:1px solid var(--line-soft);
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.2rem;
}
.section-cta p{font-family:var(--font-display);font-size:1.15rem;}

/* --------------------------------- Formats ---------------------------------- */
.formats-grid{display:grid;gap:1.4rem;grid-template-columns:1fr;}
@media(min-width:780px){ .formats-grid{grid-template-columns:1.2fr 1.2fr .9fr;} }

.format-card{
  background:var(--surface);border-radius:var(--radius);padding:2.1rem;
  border:1px solid var(--line-soft);
}
/* White plates: body copy only — do NOT target .price / .muted-note
   (those have their own type scale; .format-card > p was beating .price
   on specificity and locked the cost at 1rem) */
.format-card > p:not(.price):not(.muted-note),
.format-card .dash-list li{
  color:var(--text);
  font-family:var(--font-body);
  font-size:1rem;
  line-height:1.65;
  font-weight:400;
}
/* Black price plate — restore original layout; only copy may change */
.format-card-accent{
  background:var(--bg-dark);color:var(--text-inv);
  display:flex;flex-direction:column;
  justify-content:flex-start; /* heading top-aligned with sibling cards */
  text-align:center;
}
.format-card-accent .mini-heading{
  color:var(--accent-inv);
  text-align:left; /* same edge as «Индивидуальная терапия» / «Сеттинг» */
  align-self:stretch;
}
.format-card-accent .muted-note{
  color:var(--text-inv-muted);
  margin-top:1.4rem; /* air under the price */
}
/* ~2× the previously visible 1rem size (specificity must beat .format-card > p) */
.format-card .price{
  font-family:var(--font-display);
  font-size:clamp(2.2rem,5.5vw,3.2rem);
  font-weight:560;
  line-height:1;
  letter-spacing:-.02em;
  color:var(--text-inv);
  margin:.7rem 0 .4rem;
  white-space:nowrap;
}

.ethics-note{margin-top:2.4rem;color:var(--text-muted);font-size:.94rem;font-style:italic;}
.ethics-note-inv{color:var(--text-inv-muted);}

/* --------------------------------- Cabinet ----------------------------------- */
.cabinet-grid{display:grid;gap:2.6rem;align-items:center;}
.cabinet-text{max-width:520px;}
/* air under the heading — more than section-intro, so lead sits lower */
.cabinet-lead{margin-top:2.4rem;color:var(--text-muted);font-size:1.05rem;}
/* mobile: 1 column, edge-to-edge bleed (same breakout as .hero-photo) */
.cabinet-photos{
  display:grid;grid-template-columns:1fr;gap:0;
  margin:0 calc(50% - 50vw);width:100vw;max-width:none;overflow:hidden;
}
.cabinet-photos figure{margin:0;}
.cabinet-photos img{
  width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;object-position:center 40%;
  border-radius:0;display:block;
}
@media(min-width:900px){
  .cabinet-grid{grid-template-columns:.8fr 1.2fr;align-items:stretch;}
  /* высота сетки 4 фото привязана к высоте текстовой колонки (align-items:stretch
     на .cabinet-grid), а не к своим 4 квадратам — тот же принцип, что и в hero-photo */
  .cabinet-photos{
    margin:0;width:auto;height:100%;overflow:visible;
    grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:1.1rem;
  }
  .cabinet-photos img{height:100%;border-radius:0;}
}

/* --------------------------------- Contacts ----------------------------------- */
/* Block 06: mist — second light bg, separates from cream cabinet above */
.section-contacts{
  background:var(--bg-mist);color:var(--text);padding-bottom:0;
}
.section-dark{padding-top:0;}
/* padding-block only — do NOT use padding shorthand here: .contacts-grid
   shares the element with .container, and shorthand would zero the
   container's horizontal inset (24px / 40px) and flush content to the edges. */
.contacts-grid{
  display:grid;gap:2.6rem;grid-template-columns:1fr;
  padding-block:var(--gap-lg);
  min-width:0;
}
/* Must come AFTER .contacts-grid — earlier mobile padding-top:0 was overridden by padding-block */
@media(max-width:899px){
  #cabinet.section{padding-bottom:.75rem;}
  #contacts.section{padding-top:.75rem;}
  .contacts-grid{padding-top:0;padding-bottom:var(--gap-lg);}
}
.contacts-title{font-size:clamp(2.3rem,4.6vw,3.4rem);margin-bottom:.3rem;}
.contacts-role{color:var(--accent-deep);font-weight:600;margin-bottom:1.6rem;}
.contacts-line{color:var(--text-muted);margin-bottom:2.2rem;}

.contact-buttons{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.6rem;}
.section-contacts .btn-primary img,
.section-contacts .btn-outline img{filter:none;}

.contact-secondary{display:flex;flex-wrap:wrap;gap:.6rem 1.6rem;margin-bottom:1.3rem;}
.contact-link-sm{
  display:inline-flex;align-items:center;gap:.5rem;color:var(--text-muted);
  font-size:.92rem;font-weight:600;border-bottom:1px solid var(--line);
  padding-bottom:.2rem;transition:color .25s,border-color .25s;
}
.contact-link-sm:hover{color:var(--accent-deep);border-color:var(--accent);}

.mail-link{
  display:inline-flex;align-self:flex-start;align-items:center;gap:.55rem;color:var(--text-muted);
  border-bottom:1px solid var(--line);padding-bottom:.25rem;transition:color .25s;
  margin-bottom:1.3rem;
}
.mail-link:hover{color:var(--accent-deep);border-color:var(--accent);}

.instagram-note{color:var(--text-muted);font-size:.92rem;margin-bottom:.3rem;}
.instagram-footnote{color:var(--text-muted);font-size:.78rem;opacity:.85;max-width:42ch;margin-top:0;}

.contacts-text{min-width:0;}
.contacts-photo{margin:0;margin-top:1.6rem;min-width:0;}
.contacts-photo img{
  width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;border-radius:0;
  filter:saturate(.96);display:block;
}

/* Mobile: contacts photo edge-to-edge — same breakout as .cabinet-photos */
@media(max-width:899px){
  .contacts-photo{
    margin:1.2rem calc(50% - 50vw) 0;
    width:100vw;max-width:none;overflow:hidden;
  }
}

/* sticky FABs sit at right:18px — keep contact copy/buttons clear of them */
@media(max-width:919px){
  .contacts-text{padding-right:3.5rem;}
}

@media(min-width:900px){
  .contacts-grid{
    grid-template-columns:1.15fr .85fr;align-items:stretch;
    /* min(100vh, 70vw) — на обычном десктопном экране (шире 4:3) 70vw всегда
       больше 100vh, так что ограничение не сработает и секция как и раньше
       занимает весь экран. Но на мобильных браузерах в режиме "версия для
       компьютера" ширина страницы фиксируется (~980px), а 100vh считается от
       РЕАЛЬНОЙ высоты экрана телефона (в 2–2.5 раза больше ширины) — тогда
       строка грида и фото растягивались на всю эту огромную высоту, и
       object-fit:cover обрезал фото до узкой вертикальной полосы. Кап по
       ширине не даёт строке вытянуться выше разумного и убирает эффект. */
    min-height:min(100vh,70vw);padding-block:0;gap:3rem;
  }
  .contacts-text{
    display:flex;flex-direction:column;justify-content:center;
    /* padding-block only — preserves mobile padding-right for sticky FABs
       through 919px (FABs hide at 920px) */
    padding-block:var(--gap-lg);
  }
  /* лёгкий отступ сверху у фото: сама секция всё равно остаётся 100vh
     (стретч-строка грида), просто картинка не доходит до самого верхнего края */
  .contacts-photo{margin-top:0;padding-top:clamp(2.5rem,6vw,4.5rem);}
  .contacts-photo img{height:100%;aspect-ratio:auto;border-radius:0;}
}

.footer-strip{
  margin-top:var(--gap-lg);
  /* padding-block only — preserve .container L/R inset (shorthand wiped it) */
  padding-block:1.8rem 2.2rem;
  border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1.2rem;
  font-size:.85rem;color:var(--text-muted);
}
.footer-strip > p{min-width:0;max-width:100%;}
.footer-strip a:hover{color:var(--accent-deep);}

.footer-legal{
  display:flex;flex-wrap:wrap;gap:1.1rem 1.6rem;
  min-width:0;
}
.footer-legal a{
  border-bottom:1px solid transparent;padding-bottom:.15rem;
  overflow-wrap:anywhere;max-width:100%;
}
.footer-legal a:hover{border-color:var(--accent);}

/* Mobile: column stack — copyright → legal → Наверх, no side-by-side collision */
@media(max-width:699px){
  .footer-strip{
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:1rem;
  }
  .footer-legal{
    flex-direction:column;
    align-items:flex-start;
    gap:.65rem;
    width:100%;
  }
}

/* Sticky FABs visible <920px — clear right edge + bottom of footer */
@media(max-width:919px){
  .footer-strip{
    padding-right:3.5rem;
    /* 2×52px FABs + column gap + bottom:18px + breathing room */
    padding-bottom:calc(2.2rem + 52px + 52px + .7rem + 18px + 12px);
  }
}

/* -------------------------------- Legal pages --------------------------------- */
.legal-page{max-width:720px;padding:2.5rem 0 1rem;}
.legal-page h1{font-size:clamp(1.8rem,3.6vw,2.6rem);margin:.4rem 0 1.6rem;}
.legal-placeholder{color:var(--text-muted);font-size:1.03rem;}
.legal-placeholder a{color:var(--accent-deep);border-bottom:1px solid var(--line);}

/* --------------------------- Sticky mobile contacts ---------------------------- */
.sticky-contacts{
  position:fixed;right:18px;bottom:18px;z-index:80;
  display:flex;flex-direction:column;gap:.7rem;
  opacity:0;transform:translateY(12px);pointer-events:none;
  transition:opacity .3s,transform .3s;
}
.sticky-contacts.is-visible{opacity:1;transform:translateY(0);pointer-events:auto;}
.sticky-contacts a{
  width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--accent);color:#fff;box-shadow:0 14px 30px -10px rgba(30,40,55,.45);
  transition:transform .25s var(--ease),background .25s;
}
.sticky-contacts a:hover{transform:translateY(-3px) scale(1.05);background:var(--accent-deep);}
.sticky-contacts img{filter:invert(1) brightness(2);}

@media(min-width:920px){ .sticky-contacts{display:none;} }

/* ------------------------------ Cookie consent banner --------------------------- */
.cookie-banner{
  position:fixed;left:50%;bottom:18px;z-index:150;
  transform:translate(-50%,140%);
  width:min(560px,calc(100vw - 32px));
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 18px 50px -18px rgba(21,26,34,.35);
  padding:1.3rem 1.4rem 1.4rem;
  transition:transform .5s var(--ease);
}
.cookie-banner.is-open{transform:translate(-50%,0);}
.cookie-banner-title{
  font-family:var(--font-display);font-size:1.08rem;
  color:var(--text);margin:0 0 .4rem;
}
.cookie-banner-text{
  font-size:.9rem;line-height:1.65;color:var(--text-muted);margin:0 0 1.05rem;
}
.cookie-banner-text a{color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px;}
.cookie-banner-text a:hover{color:var(--accent);}
.cookie-actions{display:flex;gap:.6rem;flex-wrap:wrap;}
.cookie-actions .btn{flex:1;white-space:nowrap;}
@media(max-width:480px){
  .cookie-banner{bottom:12px;padding:1.15rem 1.15rem 1.25rem;}
  .cookie-actions .btn{flex:1 1 100%;}
}
