/* ==========================================================================
   Душа питомца / v3 «белый лист + зелёные линии»
   Минимализм: белый фон, зелёная линейная графика, рисующиеся линии,
   бегущие импульсы, строгая типографика Manrope без серифов и рукописных.
   Подключается последним слоем поверх site.css.
   ========================================================================== */

/* ---------- 1. Палитра: белый + зелёный ---------- */
:root{
  --bg:#ffffff;
  --ink:#17332a;
  --green:#176a42;
  --green-soft:rgba(23,106,66,.32);
  --green-faint:rgba(23,106,66,.14);
  --thread:#b23a2e;
  --deep:#153f2b;
  --muted:#647369;
  --line:#dfe6dc;
  --light:#ffffff;
  --lime:transparent;
  --ease:cubic-bezier(.2,.8,.25,1);
}
body{background:var(--bg)}
.theme-applied, .header{background:var(--bg)}

/* ---------- 2. Типографика: строго, без серифов ---------- */
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url('/assets/fonts/golos-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url('/assets/fonts/golos-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215,U+FEFF,U+FFFD}
body,h1,h2,h3,p,button,input,summary{font-family:'Golos Text',Manrope,Arial,sans-serif}
h1,h2,h3{font-weight:600}
h1{letter-spacing:-.05em}
.wave-word{font-family:Manrope,Arial,sans-serif!important;font-style:normal;font-weight:650;color:var(--green);position:relative;display:inline-block}
.wave-underline{position:absolute;left:1%;bottom:-.045em;width:100%;height:.11em;overflow:visible}
.wave-underline path{fill:none;stroke:var(--green);stroke-width:2.75;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 1.5s var(--ease) 1s forwards}
.wave-word-sm .wave-underline path{stroke-width:2.25}
.serif-word,.handwritten{font-family:Manrope,Arial,sans-serif!important;font-style:normal!important}
.motto-line{display:flex;align-items:center;gap:14px;margin-top:32px;font-size:11px;font-weight:700;letter-spacing:.16em;color:var(--green);text-transform:uppercase}
.motto-line::before{content:"";width:34px;height:1px;background:var(--green);flex:0 0 34px}

/* ---------- 3. Анимации: линии рисуются, импульсы бегут ---------- */
@keyframes v3-draw{to{stroke-dashoffset:0}}
@keyframes v3-flow{to{stroke-dashoffset:-1}}
@keyframes v3-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes v3-travel{0%{offset-distance:0%;opacity:0}10%{opacity:1}90%{opacity:1}100%{offset-distance:100%;opacity:0}}
@keyframes v3-blink{0%,100%{opacity:.15}50%{opacity:.9}}

.draw path{stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 2.2s var(--ease) .35s forwards}
.draw path:nth-child(2){animation-delay:.65s}
.draw path:nth-child(3){animation-delay:.95s}
.draw path:nth-child(4){animation-delay:1.25s}
.draw path:nth-child(5){animation-delay:1.5s}
.draw path:nth-child(6){animation-delay:1.75s}
.draw path:nth-child(7){animation-delay:2s}
.draw path:nth-child(8){animation-delay:2.2s}
.draw-slow{stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 2.8s var(--ease) 2.1s forwards}
.draw-first{stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 1.8s var(--ease) 1.4s forwards}
.flowline{stroke-dasharray:.03 .045;animation:v3-flow 22s linear infinite}
.dot{fill:var(--green);stroke:none;animation:v3-blink 5s ease-in-out infinite}
.dot.p2{animation-delay:1.6s}
.dot.p3{animation-delay:3.2s}

/* уважаем «Пауза анимации» и prefers-reduced-motion: искусство сразу видно */
.motion-paused .draw path,.motion-paused .draw-slow,.motion-paused .draw-first,.motion-paused .wave-underline path{animation:none;stroke-dashoffset:0}
.motion-paused .flowline,.motion-paused .dot,.motion-paused .pulse-dot,.motion-paused .dog-stage,.motion-paused .hero-dog-svg,.motion-paused .dog-smile-img,.motion-paused .channel-card{animation:none!important}
@media (prefers-reduced-motion:reduce){
  .draw path,.draw-slow,.draw-first,.wave-underline path{animation:none;stroke-dashoffset:0}
  .flowline,.dot,.pulse-dot{animation:none}
}

/* ---------- 4. Hero: волны-фон + линейная собака ---------- */
/* hero-waves убраны из разметки (минимализм) — стили оставлены как no-op */
.hero-waves{display:none}
/* круги-орнаменты в тёмной секции и футере убраны */
.price-lines,.final-lines{display:none}
/* веер дуг в карточке темы и «фотополотно» с наклоном — тоже лишние */
.topic-line{display:none}

.hero-art{position:relative;height:600px;min-width:0;margin-right:-50px;isolation:isolate}
.dog-stage{position:absolute;inset:6% 0 4% 0}
.hero-dog-svg{width:100%;height:100%;overflow:visible}
.hero-dog-svg .draw path{stroke:var(--ink);stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
/* лёгкое «дыхание» головы: едва заметный поворот+подъём */
@keyframes v3-sway{0%,100%{transform:rotate(0deg) translateY(0)}50%{transform:rotate(-1.1deg) translateY(-4px)}}
.dog-sway{transform-origin:52% 40%;animation:v3-sway 7.5s ease-in-out infinite;will-change:transform}
/* улыбка: дорисовывается следом, тонкая линия у угла рта */
.dog-smile{stroke:var(--ink);stroke-width:2;stroke-linecap:round;fill:none;stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 1.1s var(--ease) 2.6s forwards}
.motion-paused .dog-sway{animation:none}
.motion-paused .dog-smile{animation:none;stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){.dog-sway{animation:none}.dog-smile{animation:none;stroke-dashoffset:0}}
.hero-ground{stroke:var(--green-soft);stroke-width:2;stroke-linecap:round}
.pulse-dot{fill:var(--green);opacity:0;offset-path:path('M96 432 C 210 424, 330 440, 450 432 C 500 428, 540 436, 570 432');offset-rotate:0deg;animation:v3-travel 8s linear 3.4s infinite}
.eye-dot{fill:var(--green);opacity:0;animation:v3-eye .5s ease-out 2.3s forwards}
.nose-dot{fill:var(--ink);opacity:0;animation:v3-eye .4s ease-out 2.1s forwards}
@keyframes v3-eye{to{opacity:1}}
.motion-paused .eye-dot,.motion-paused .nose-dot{animation:none;opacity:1}
@media (prefers-reduced-motion:reduce){.eye-dot,.nose-dot{animation:none;opacity:1}}
@supports not (offset-path:path('M0 0')){.pulse-dot{display:none}}
.art-caption{position:absolute;right:8px;bottom:-6px;display:flex;flex-direction:column;gap:4px;font-size:8px;letter-spacing:.13em;color:var(--muted);text-align:right}
.art-caption span:last-child{font-size:6.5px;letter-spacing:.18em}

/* ---------- 5. Секции: белые, разделены линией ---------- */
.connection{background:transparent;border-bottom:0}
.connection-grid{grid-template-columns:1fr;gap:0}
.connection-copy{max-width:940px;margin-inline:auto;text-align:center}
.connection-copy p{max-width:640px;margin-left:auto;margin-right:auto}
.connection-copy .motto-line{justify-content:center}
/* сцена «рука — лапка — нить — дерево» */
.link-svg{width:100%;height:auto;display:block;overflow:visible}
.link-svg .draw path,.link-svg .draw-h path,.link-svg .draw-p path{stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.link-svg .draw-t path{stroke:var(--green);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 1.6s var(--ease) calc(.4s + var(--i,0)*.28s) forwards}
/* рука и лапка чуть живут в противофазе */
@keyframes v3-sway-h{0%,100%{transform:rotate(0deg) translateY(0)}50%{transform:rotate(-.8deg) translateY(-3px)}}
@keyframes v3-sway-p{0%,100%{transform:rotate(0deg) translateY(0)}50%{transform:rotate(.8deg) translateY(2px)}}
.hand-sway{transform-origin:62% 18%;animation:v3-sway-h 7.5s ease-in-out .6s infinite;will-change:transform}
.paw-sway{transform-origin:40% 82%;animation:v3-sway-p 7.5s ease-in-out .6s infinite;will-change:transform}
/* нить: красная; длинные прогоны медленно текут сверху вниз */
.thread-g path{stroke:var(--thread);stroke-width:1.8;stroke-linecap:round;fill:none}
.thread-run{stroke-dasharray:.42 .10;animation:v3-flow 26s linear infinite}
@keyframes v3-flow{to{stroke-dashoffset:-2.08}}
/* дерево: строгий контур, рисуется последним, зелёный акцент */
.tree-g path{stroke:var(--green);stroke-width:1.6;stroke-linecap:round;fill:none;stroke-dasharray:1;stroke-dashoffset:1;animation:v3-draw 1.8s var(--ease) 2.2s forwards}
.motion-paused .tree-g path{animation:none;stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){.tree-g path{animation:none;stroke-dashoffset:0}}
.motion-paused .hand-sway,.motion-paused .paw-sway{animation:none}
.motion-paused .thread-run{animation:none;stroke-dasharray:none}
@media (prefers-reduced-motion:reduce){.hand-sway,.paw-sway{animation:none}.thread-run{animation:none;stroke-dasharray:none}}

.specialists{background:transparent}
.faq{border-top:1px solid var(--line)}
.final-cta{background:var(--bg);border-top:1px solid var(--line)}
.final-lines span{border-color:var(--green-faint)}

/* ---------- 5.1 Акцентные фоновые полосы тем ---------- */
:root{--band-a:#f0f6eb;--band-b:#e3eeda;--band-c:#e9f1e1}
.band{position:relative;background:var(--band-a);isolation:isolate}
.band::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,var(--green) 0%,rgba(23,106,66,.18) 55%,rgba(23,106,66,0) 100%);pointer-events:none}
.band-b{background:var(--band-b)}
.band-b::before{background:linear-gradient(90deg,rgba(23,106,66,.75) 0%,rgba(23,106,66,.15) 55%,rgba(23,106,66,0) 100%)}
.band-c{background:var(--band-c)}
.band-c::before{background:linear-gradient(90deg,rgba(23,106,66,.9) 0%,rgba(23,106,66,.2) 55%,rgba(23,106,66,0) 100%)}
@media(max-width:850px){.band::before{height:2px}}

/* ---------- 6. Темы (табы) и панель ---------- */
.topic-panel{background:var(--bg);border:1px solid var(--line);border-radius:6px}
.topic-line{opacity:.28}
.topic-tab{border-radius:0}
.topic-tab.is-active{background:var(--bg);border-left:2px solid var(--green);border-bottom-color:var(--green)}
.topic-tab.is-active .topic-index{color:var(--green)}

/* ---------- 7. Community: карточка-канал с волнами ---------- */
.community-art{min-height:480px}
.channel-card{border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 44px rgba(21,63,43,.06);animation:card-float 10s ease-in-out infinite}
.waves-art{height:225px;background:var(--bg);border:1px solid var(--line);border-radius:6px;margin-top:20px;overflow:hidden;padding:0}
.waves-art svg{width:100%;height:100%}
.waves-art .draw path{stroke:var(--green);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.waves-art .draw.d2 path{stroke:var(--green-soft);animation-delay:1.1s}
.waves-art .flowline{stroke:var(--green);stroke-width:1.8;stroke-linecap:round}
.channel-card>p{font-size:19px}

/* ---------- 8. Цена/финал: тонкие кольца вместо лайма ---------- */
.price-lines i{border-color:rgba(190,214,166,.32)}
.final-cta h2{color:var(--deep)}

/* ---------- 9. Кнопки: строже, радиус меньше ---------- */
.button{border-radius:3px;font-weight:650}
.header-cta{border-color:var(--line);border-radius:3px}
.button-green{background:var(--green)}
@media(hover:hover){
  .button-green:hover{background:#0c5633}
  .topic-tab.is-active:hover{background:var(--bg)}
}

/* ---------- 10. Мобильные правки ---------- */
@media(max-width:850px){
  .hero-grid{min-height:0}
  .hero-art{height:430px;margin-right:0}
  .dog-stage{inset:4% 4% 2% 4%}
  .art-caption{right:14px;bottom:0}
  .hero-waves{height:200px}
  .community-art{min-height:420px}
}
@media(max-width:600px){
  .hero-art{height:340px}
  .dog-stage{inset:2% 0 0 0}
  .waves-art{height:170px}
  .motto-line{margin-top:24px}
}

/* ---------- 11. Живая графика: дыхание пса и нить ---------- */
.dog-stage{animation:dogBreathe 8s ease-in-out infinite;transform-origin:58% 86%}
@keyframes dogBreathe{
  0%,100%{transform:scale(1) translateY(0) rotate(0deg)}
  42%{transform:scale(1.026) translateY(-8px) rotate(-1deg)}
  72%{transform:scale(1.008) translateY(-2px) rotate(-.2deg)}
}
.hero-dog-svg{filter:drop-shadow(2px 6px 0 #c7dbb51a);transform-origin:58% 86%;animation:dogHead 11s cubic-bezier(.45,0,.3,1) infinite;will-change:transform}
/* подъём головы синхронен с улыбкой: пёс «вскидывает морду» и улыбается */
@keyframes dogHead{
  0%,14%{transform:translateY(0) rotate(0deg)}
  30%,62%{transform:translateY(-11px) rotate(-2.8deg)}
  82%,100%{transform:translateY(0) rotate(0deg)}
}
.dog-smile-img{opacity:0;animation:dogSmileFade 11s cubic-bezier(.45,0,.3,1) infinite}
@keyframes dogSmileFade{
  0%,14%{opacity:0}
  30%,62%{opacity:1}
  82%,100%{opacity:0}
}
/* лента: маска проявляет саму нить из референса, поэтому геометрия точная */
.ls-rev{stroke-dashoffset:0}
.community-art.offscreen-animation .ls-rev{stroke-dashoffset:1}
.community-art:not(.offscreen-animation) .ls-rev{
  animation:lsReveal 3.6s cubic-bezier(.38,.04,.22,1) both;
  animation-delay:var(--d,0s);
}
@keyframes lsReveal{
  0%{stroke-dashoffset:1}
  100%{stroke-dashoffset:0}
}
@media(prefers-reduced-motion:reduce){
  .dog-stage,.hero-dog-svg,.dog-smile-img{animation:none!important}
  .ls-rev,.community-art:not(.offscreen-animation) .ls-rev{animation:none!important;stroke-dashoffset:0!important}
}

/* ---------- 12. Мобильная раскладка: ничего не обрезается ---------- */
@media(max-width:600px){
  .hero-art{height:auto;margin:0;padding:4px 0 8px}
  .dog-stage{position:relative;inset:auto;aspect-ratio:1040/1060;height:auto}
  .hero-dog-svg{width:100%;height:auto}
  .topic-tabs{display:flex;flex-direction:column;overflow:visible;gap:0;padding:0;margin-bottom:16px}
  .topic-tab,.topic-tab:first-child{
    width:100%;white-space:normal;border:0;border-bottom:1px solid var(--line);
    border-radius:0;font-size:13px;min-height:58px;padding:15px 6px;flex-shrink:1;
    line-height:1.35;transition:padding .2s,background .2s,color .2s;
  }
  .topic-tab:first-child{border-top:1px solid var(--line)}
  .topic-tab.is-active{background:#edf2e6;color:var(--green);padding-left:14px}
  .topic-tab .icon{display:block;opacity:0}
  .topic-tab.is-active .icon{opacity:1}
  .community-art{transform:none;margin:0;min-height:0;padding:6px 0 34px}
  .channel-card{width:100%;max-width:340px;transform:none;animation:none}
  .community-art-caption{bottom:9px}
}

/* сцена: держим рисунок в его собственном масштабе, иначе штрих грубеет */
.card-scene{display:flex;justify-content:center}
.card-scene .link-svg{width:100%;max-width:210px;height:auto}
