/* ═══ Живица — «сайт, который дышит» ═══ */
:root {
  --cream: #F6F1E7;
  --cream-2: #EFE7D8;
  --ink: #23342B;
  --ink-soft: #4A5D51;
  --sage: #7C9A72;
  --moss: #33523F;
  --terra: #C67B5A;
  --gold: #C8A24B;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, blockquote { font-family: var(--serif); font-weight: 500; }
button { font-family: var(--sans); cursor: pointer; }

/* ─── Hero ─── */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(198,123,90,.28), transparent 60%),
    radial-gradient(ellipse 70% 50% at 20% -10%, rgba(124,154,114,.25), transparent 65%),
    linear-gradient(180deg, #EDE9DC 0%, var(--cream) 55%, #F2E9D8 100%);
}
.topnav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px clamp(20px, 5vw, 64px);
}
.brand {
  font-family: var(--serif);
  font-size: 26px; letter-spacing: .06em;
  color: var(--moss);
}
.topnav-links { display: flex; gap: 28px; }
.topnav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 14px; letter-spacing: .04em;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.topnav-links a:hover { color: var(--moss); border-color: var(--sage); }

.hero-center {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 20px 24px 40px;
}

/* дыхательный круг */
.breath {
  position: relative;
  width: 150px; height: 150px;
  margin-bottom: 36px;
  display: grid; place-items: center;
}
.breath-ring, .breath-core {
  position: absolute; border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.breath-ring { border: 1px solid rgba(124,154,114,.55); }
.r1 { width: 100%; height: 100%; animation: breathe 9s ease-in-out infinite; }
.r2 { width: 74%; height: 74%; animation: breathe 9s ease-in-out infinite .35s; border-color: rgba(124,154,114,.4); }
.r3 { width: 50%; height: 50%; animation: breathe 9s ease-in-out infinite .7s; border-color: rgba(198,123,90,.4); }
.breath-core {
  width: 26%; height: 26%;
  background: radial-gradient(circle at 40% 35%, #D9C9A3, var(--gold));
  opacity: .85;
  animation: breathe 9s ease-in-out infinite 1s;
}
.breath-word {
  position: relative; z-index: 1;
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--ink-soft);
  letter-spacing: .12em;
  transition: opacity .8s;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%,-50%) scale(1); }
  44%      { transform: translate(-50%,-50%) scale(1.22); }
  56%      { transform: translate(-50%,-50%) scale(1.22); }
}

.hero-greeting {
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.12;
  color: var(--ink);
}
.hero h1 em { color: var(--moss); }
.hero-sub {
  margin-top: 22px;
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--ink-soft);
}

.cta {
  margin-top: 34px;
  display: inline-block;
  background: var(--moss); color: var(--cream);
  border: 1px solid var(--moss);
  padding: 15px 34px;
  border-radius: 40px;
  font-size: 15px; letter-spacing: .03em;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s, background .3s;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(51,82,63,.25);
  background: #2A4433;
}
.cta.ghost {
  background: transparent; color: var(--moss);
  border-color: rgba(51,82,63,.4);
}
.cta.ghost:hover { background: rgba(124,154,114,.12); box-shadow: none; }

.hero-hint {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding-bottom: 26px;
  color: var(--ink-soft);
  font-size: 12px; letter-spacing: .18em;
}
.hint-line {
  width: 1px; height: 44px;
  background: linear-gradient(var(--sage), transparent);
  animation: drip 2.4s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Тропа ─── */
.trail { position: relative; padding: 60px 0 20px; }
.trail-path {
  position: absolute;
  left: clamp(8px, 6vw, 90px); top: 0;
  width: 60px; height: 100%;
  color: var(--sage);
  opacity: .6;
}
.stop {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) 24px;
  padding-left: clamp(90px, 16vw, 200px);
}
.stop-num {
  position: absolute;
  left: clamp(24px, 8vw, 110px);
  top: clamp(40px, 8vh, 84px);
  font-family: var(--serif);
  font-size: 15px; font-style: italic;
  color: var(--terra);
  background: var(--cream);
  padding: 6px 2px;
}
.stop-icon {
  width: 72px; height: 72px;
  color: var(--sage);
  margin-bottom: 18px;
}
.stop-icon svg { width: 100%; height: 100%; }
.stop h2 {
  font-size: clamp(30px, 4vw, 42px);
  color: var(--moss);
  margin-bottom: 14px;
}
.stop-lead { font-size: 17px; color: var(--ink); max-width: 52ch; }
.stop-list {
  margin: 20px 0 24px;
  list-style: none;
}
.stop-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 15px;
}
.stop-list li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 14px; height: 1px;
  background: var(--terra);
}
.stop-ask {
  background: none; border: none;
  color: var(--terra);
  font-size: 14px; letter-spacing: .05em;
  border-bottom: 1px dashed rgba(198,123,90,.5);
  padding: 2px 0;
  transition: color .3s;
}
.stop-ask:hover { color: #A55A38; }

/* ─── О мастере ─── */
.master {
  background: linear-gradient(180deg, var(--cream), var(--cream-2) 30%, var(--cream-2) 70%, var(--cream));
  padding: clamp(70px, 12vh, 130px) 24px;
}
.master-inner {
  max-width: 900px; margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.photo-blob {
  width: 100%; aspect-ratio: 1;
  background: rgba(124,154,114,.18);
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  display: grid; place-items: center;
  color: var(--sage);
  overflow: hidden;
  animation: blob 14s ease-in-out infinite;
}
.photo-blob svg { width: 65%; }
.photo-blob img { width: 100%; height: 100%; object-fit: cover; }
@keyframes blob {
  0%, 100% { border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%; }
  50%      { border-radius: 45% 55% 44% 56% / 55% 45% 58% 42%; }
}
.master-kicker {
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 12px;
}
.master-text h2 { font-size: clamp(30px, 4vw, 40px); color: var(--moss); margin-bottom: 18px; }
.master-text p { margin-bottom: 14px; color: var(--ink-soft); font-size: 15.5px; }
.master-text blockquote {
  margin-top: 26px;
  font-size: clamp(19px, 2.4vw, 24px);
  font-style: italic;
  color: var(--ink);
  line-height: 1.45;
  padding-left: 22px;
  border-left: 2px solid var(--gold);
}

/* ─── Один день ─── */
.day {
  max-width: 760px; margin: 0 auto;
  padding: clamp(70px, 11vh, 120px) 24px;
  text-align: center;
}
.day h2 { font-size: clamp(28px, 3.6vw, 38px); color: var(--moss); margin-bottom: 44px; }
.day-line {
  display: grid; gap: 0;
  text-align: left;
  max-width: 480px;
  margin: 0 auto;
}
.day-item {
  position: relative;
  display: flex; gap: 22px; align-items: baseline;
  padding: 0 0 30px 30px;
  border-left: 1px dashed rgba(124,154,114,.6);
}
.day-item:last-child { border-color: transparent; padding-bottom: 0; }
.day-item::before {
  content: "";
  position: absolute; left: -4.5px; top: .45em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--terra);
}
.day-time {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; color: var(--moss);
  min-width: 54px;
}
.day-item p { color: var(--ink-soft); font-size: 15px; }

/* ─── Запись ─── */
.visit {
  text-align: center;
  padding: clamp(60px, 10vh, 110px) 24px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 100%, rgba(124,154,114,.16), transparent 65%);
}
.visit h2 { font-size: clamp(30px, 4vw, 44px); color: var(--moss); }
.visit-sub { max-width: 46ch; margin: 16px auto 8px; color: var(--ink-soft); }
.visit-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin-top: 26px;
}
.visit-actions .cta { margin-top: 0; }

/* ─── Footer ─── */
.footer {
  padding: 40px 24px 110px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.disclaimer {
  max-width: 68ch; margin: 14px auto 0;
  font-size: 11.5px; opacity: .75; line-height: 1.6;
}

/* ─── Появление при скролле ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.on { opacity: 1; transform: none; }

/* ─── Чат ─── */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--moss); color: var(--cream);
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(35,52,43,.35);
  transition: transform .3s, background .3s;
}
.chat-fab svg { width: 32px; height: 32px; }
.chat-fab:hover { transform: scale(1.07); background: #2A4433; }
.chat-fab.hidden { transform: scale(0); }

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100svh - 44px));
  background: #FDFBF6;
  border: 1px solid rgba(51,82,63,.15);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(35,52,43,.28);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(16px) scale(.97);
  transition: opacity .3s, transform .3s;
}
.chat-panel.open { opacity: 1; pointer-events: auto; transform: none; }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--moss); color: var(--cream);
}
.chat-head-info { display: flex; flex-direction: column; }
.chat-head-info strong { font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.chat-head-info span { font-size: 11.5px; opacity: .75; }
.chat-close {
  background: none; border: none; color: var(--cream);
  font-size: 26px; line-height: 1; opacity: .8;
}
.chat-close:hover { opacity: 1; }

.chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.msg.bot {
  align-self: flex-start;
  background: var(--cream-2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.msg.user {
  align-self: flex-end;
  background: var(--sage);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.typing { color: var(--ink-soft); font-style: italic; }
.msg.typing::after {
  content: "…";
  animation: dots 1.4s steps(4) infinite;
}
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "…"; } }

.chat-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 14px 10px;
}
.chat-chips button {
  border: 1px solid rgba(124,154,114,.5);
  background: none; color: var(--moss);
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 20px;
  transition: background .25s;
}
.chat-chips button:hover { background: rgba(124,154,114,.14); }

.chat-input {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(51,82,63,.1);
}
.chat-input input {
  flex: 1;
  border: 1px solid rgba(51,82,63,.18);
  border-radius: 22px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.chat-input input:focus { border-color: var(--sage); }
.chat-input button {
  width: 42px; height: 42px;
  border-radius: 50%; border: none;
  background: var(--terra); color: #fff;
  font-size: 18px;
  transition: background .25s;
}
.chat-input button:hover { background: #A55A38; }

/* ─── Мобильный ─── */
@media (max-width: 760px) {
  .topnav-links { display: none; }
  .trail-path { display: none; }
  .stop { padding-left: 24px; }
  .stop-num { position: static; margin-bottom: 6px; }
  .master-inner { grid-template-columns: 1fr; }
  .master-photo { max-width: 220px; margin: 0 auto; }
  .chat-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100svh - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .breath-ring, .breath-core, .photo-blob, .hint-line { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
