/* Сброс, типографика, кнопки, утилиты — общее для обоих разделов */

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
/* якорь не должен уезжать под липкую шапку */
section[id],footer[id]{scroll-margin-top:var(--header-h,80px)}
body{
    font-family:"Georgia","Times New Roman",serif;
    color:var(--ink);
    background:var(--bg);
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
  }
.wrap{max-width:1140px;margin:0 auto;padding:0 24px}
.vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip-path:inset(50%);white-space:nowrap;border:0}
body{opacity:0;animation:pageIn .6s ease forwards}
@keyframes pageIn{from{opacity:0}to{opacity:1}}
#swap{transition:opacity .32s ease}
#swap.leaving{opacity:0}

/* Переход между разделами: спокойная заливка в цвет раздела, КУДА идём
   (цвет берёт из data-section на самой шторке). Движение одно — тонкая линия
   под названием раздела медленно растёт, пока грузится новый раздел */
.xfade{position:fixed;inset:0;z-index:99999;pointer-events:none;
    display:grid;place-items:center;background:var(--gold);opacity:0}
.xfade.in{animation:xfadeIn .5s ease forwards}
.xfade.out{animation:xfadeOut .55s ease forwards}
@keyframes xfadeIn{from{opacity:0}to{opacity:1}}
@keyframes xfadeOut{from{opacity:1}to{opacity:0}}
.xfade-inner{display:grid;justify-items:center;gap:20px}
.xfade-name{font-family:"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:600;
    letter-spacing:.3em;text-transform:uppercase;color:rgba(255,255,255,.92)}
.xfade-line{width:120px;height:1px;background:rgba(255,255,255,.35);position:relative;overflow:hidden}
.xfade-line::after{content:"";position:absolute;inset:0;background:rgba(255,255,255,.95);
    transform:scaleX(0);transform-origin:left center;animation:xfadeLine 1.4s ease-out forwards}
@keyframes xfadeLine{from{transform:scaleX(0)}to{transform:scaleX(1)}}

@media(prefers-reduced-motion:reduce){
  body,#swap{animation:none;transition:none;opacity:1}
  .xfade,.xfade-line::after{animation:none}
}

.eyebrow{
    font-family:"Helvetica Neue",Arial,sans-serif;
    font-size:12px;letter-spacing:.28em;text-transform:uppercase;
    color:var(--gold-deep);font-weight:600;
  }
.btn{
    display:inline-block;font-family:"Helvetica Neue",Arial,sans-serif;
    font-size:14px;letter-spacing:.06em;font-weight:600;
    padding:16px 34px;border-radius:2px;transition:.25s;cursor:pointer;
  }
.btn-gold{background:var(--gold);color:#fff;border:1px solid var(--gold)}
.btn-gold:hover{background:var(--gold-deep);border-color:var(--gold-deep)}
.btn-ghost{background:transparent;color:var(--ink);border:1px solid var(--ink)}
.btn-ghost:hover{background:var(--ink);color:#fff}
.btn-light{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.6)}
.btn-light:hover{background:#fff;color:var(--green)}
.btn.book{position:relative;animation:bookPulseGold 2.4s ease-out infinite}
.btn.book:hover{animation-play-state:paused}
.btn-light.book{animation-name:bookPulseLight}
@keyframes bookPulseLight{
    0%{box-shadow:0 0 0 0 rgba(255,255,255,.6)}
    70%{box-shadow:0 0 0 16px rgba(255,255,255,0)}
    100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}
  }

@media(prefers-reduced-motion:reduce){
  .btn.book{animation:none}
}


@media(max-width:560px){
  .btn-gold{padding:11px 18px;font-size:13px}
  .btn{padding:14px 26px}
}

/* форма — как у обычных кнопок сайта: прямоугольник, скругление 2px, текст в строку */
html body a.yButton{
    width:auto!important;height:auto!important;
    left:auto!important;top:auto!important;   /* отступы от края задаёт сам виджет: 30px */
  }
html body a.yButton .yButtonBackground{
    width:100%!important;height:100%!important;
    top:0!important;left:0!important;
    border-radius:2px!important;
  }
html body a.yButton .yButtonText{
    position:relative!important;z-index:1!important;   /* поверх подложки */
    top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    width:auto!important;height:auto!important;
    padding:17px 30px!important;white-space:nowrap!important;border-radius:2px!important;
    font-family:"Helvetica Neue",Arial,sans-serif!important;
    font-size:14px!important;line-height:1!important;font-weight:600!important;
    letter-spacing:.06em!important;
  }
/* пока виден первый экран, плавающую кнопку не показываем — она там уже есть */
html body a.yButton{transition:opacity .3s ease,visibility .3s ease!important}
html body.cta-hidden a.yButton{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
/* вместо расходящегося кольца — мягкое пульсирующее свечение */
html body a.yButton .yButtonWave{display:none!important}
html body a.yButton .yButtonBackground{
    animation:yGlow 2.8s ease-in-out infinite!important;
  }
@keyframes yGlow{
    0%,100%{box-shadow:0 4px 14px rgba(0,0,0,.16), 0 0 0 0 color-mix(in srgb, var(--gold) 45%, transparent)}
    50%    {box-shadow:0 4px 14px rgba(0,0,0,.16), 0 0 0 14px color-mix(in srgb, var(--gold) 0%, transparent)}
  }
html body a.yButton:hover .yButtonBackground{animation-play-state:paused!important}

@media(prefers-reduced-motion:reduce){
  html body a.yButton .yButtonBackground{animation:none!important}
}

/* пульс у кнопки записи — цвет берётся из темы раздела */
@keyframes bookPulseGold{
  0%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),.55)}
  70%{box-shadow:0 0 0 16px rgba(var(--accent-rgb),0)}
  100%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),0)}
}

/* Плашка про cookies и Яндекс Метрику (js/cookie-note.js): светлая карточка внизу слева, при первом заходе.
   Справа внизу на разделах — плавающая кнопка записи YClients (30px от края, ~260px в ширину), поэтому на
   широком экране плашка не шире 420px, а на узком растягивается во всю ширину и встаёт над кнопкой
   (.cookie-note-yw — на страницах с виджетом). Под окном кадра /certificate (z-index 1000) */
.cookie-note{position:fixed;left:24px;bottom:24px;z-index:900;max-width:420px;
    display:flex;align-items:center;gap:16px;padding:12px 12px 12px 18px;
    background:var(--bg-2);border:1px solid var(--line);border-radius:4px;
    box-shadow:0 6px 24px rgba(60,45,30,.12);
    font-family:"Helvetica Neue",Arial,sans-serif;font-size:13px;line-height:1.45;color:var(--ink-soft);
    animation:cookieIn .4s ease .6s both}
.cookie-note a{color:var(--gold-deep);text-decoration:underline;text-underline-offset:3px}
.cookie-note button{flex:none;min-height:44px;padding:0 18px;border:1px solid var(--gold);border-radius:2px;
    background:var(--gold);color:#fff;cursor:pointer;
    font:600 13px/1 "Helvetica Neue",Arial,sans-serif;letter-spacing:.04em;transition:.2s}
.cookie-note button:hover{background:var(--gold-deep);border-color:var(--gold-deep)}
.cookie-note a:focus-visible,.cookie-note button:focus-visible{outline:2px solid var(--gold-deep);outline-offset:2px}
@keyframes cookieIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(max-width:760px){
  .cookie-note{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:none}
  .cookie-note-yw{bottom:calc(92px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){
  .cookie-note,.cookie-note button{animation:none;transition:none}
}
