@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/montserrat-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --olive: #475531;
  --olive-700: #3a4628;
  --ink: #262a1a;
  --muted: #6f7360;
  --sage: #aec3a0;
  --paper: #fbfbf7;
  --line: rgba(38, 42, 26, .1);
  --error: #a3361f;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--ink);
  background: #2f3622;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.page { flex: 1; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.page::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: #4d5a3b url(img/bg-desktop.webp) center 65% / cover no-repeat;
}
.page::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(26, 30, 16, .62) 0%, rgba(26, 30, 16, .30) 38%, rgba(26, 30, 16, .12) 70%, rgba(26, 30, 16, .35) 100%);
}

.top { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.logo { display: block; height: 56px; width: auto; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand__note span { display: block; }
.brand__note { padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 500; line-height: 1.4; }
.phone { display: flex; align-items: center; gap: 10px; color: #fff; }
.phone svg { width: 20px; height: 20px; stroke: var(--sage); flex: none; }
.phone b { font-weight: 600; font-size: 19px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .15s var(--ease); }
.phone:focus-visible { outline: 3px solid var(--sage); outline-offset: 4px; border-radius: 4px; }

.ticker { background: var(--olive); color: #f3f5ee; overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: run 46s linear infinite; }
.ticker ul { display: flex; list-style: none; padding: 0; }
.ticker li { display: flex; align-items: center; white-space: nowrap; padding: 10px 0; font-size: 15px; font-weight: 500; }
.ticker li::after { content: ""; width: 6px; height: 6px; margin: 0 28px; background: var(--sage); transform: rotate(45deg); }
@keyframes run { to { transform: translateX(-50%); } }

.stage { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: clamp(24px, 3.5vw, 40px) 16px 24px; }
.intro {
  text-align: center; color: #fff;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 18px 36px 20px; border-radius: 20px;
  background: rgba(26, 30, 16, .48);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
}

.intro h1 { font-size: clamp(24px, min(3.2vw, 4.8vh), 38px); line-height: 1.15; font-weight: 600; text-wrap: balance; }
.intro p { margin: 10px auto 0; font-size: clamp(15px, 2.2vh, 17px); color: rgba(255, 255, 255, .92); max-width: 58ch; text-wrap: balance; }

.chat {
  flex: 1 1 0; min-height: 380px; max-height: 760px;
  width: 100%; max-width: 720px; margin: clamp(20px, 2.5vw, 28px) auto 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(251, 251, 247, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 24px 60px -24px rgba(10, 14, 4, .6);
}
.chat__head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex: none; }
.chat__head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--sage); }
.chat__head b { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.chat__head span { font-size: 13px; color: var(--muted); }

.feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; text-wrap: pretty; overflow-wrap: anywhere; animation: appear .22s var(--ease); }
.msg--in { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg--out { background: var(--olive); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; margin-block: 8px; }
.msg__text { display: block; white-space: pre-line; }
.msg__time { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.msg--out .msg__time { color: rgba(255, 255, 255, .72); }
.msg--photos { width: min(440px, 82%); }
.carousel { margin-top: 8px; }
.carousel__frame { position: relative; border-radius: 10px; overflow: hidden; background: var(--sage); }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.carousel__photo { flex: 0 0 100%; display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; scroll-snap-align: start; user-select: none; }
.carousel__arrow {
  position: absolute; top: 50%; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); cursor: pointer; transform: translateY(-50%);
  transition: opacity .15s var(--ease);
}
.carousel__arrow::before { content: ""; display: block; width: 8px; height: 8px; margin: 0 auto; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.carousel__arrow--prev { left: 8px; }
.carousel__arrow--prev::before { transform: translateX(2px) rotate(-135deg); }
.carousel__arrow--next { right: 8px; }
.carousel__arrow--next::before { transform: translateX(-2px) rotate(45deg); }
.carousel__arrow:disabled { opacity: 0; pointer-events: none; }
.carousel__arrow:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.carousel__dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(71, 85, 49, .25); cursor: pointer; transition: background-color .15s var(--ease); }
.carousel__dot.is-active { background: var(--olive); }
.msg__link {
  display: flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; background: var(--olive); color: #fff; font-weight: 500;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.msg__link:active { transform: scale(.98); }
.msg__link:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }

.typing { display: flex; gap: 4px; padding: 15px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite var(--ease); }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.panel { flex: none; border-top: 1px solid var(--line); padding: 12px 20px 18px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices__btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.choices__btn {
  min-height: 48px; padding: 10px 14px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid rgba(71, 85, 49, .35); background: #fff; color: var(--olive-700); font-size: 15px; font-weight: 500;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.choices__btn:active { transform: scale(.98); }
.choices__btn:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }

.composer__row { display: flex; gap: 8px; }

.composer__input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; font-size: 16px;
  border: 1px solid rgba(71, 85, 49, .35); border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .15s var(--ease);
}
.composer__input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(174, 195, 160, .55); }
.composer__input.is-invalid { border-color: var(--error); }
.composer__send {
  flex: none; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--olive); color: #fff; font-size: 15px; font-weight: 600;
  transition: background-color .15s var(--ease), opacity .15s var(--ease), transform .1s var(--ease);
}
.composer__send:active:not(:disabled) { transform: scale(.98); }
.composer__send:disabled { opacity: .45; cursor: default; }
.composer__send:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.composer__error { min-height: 0; font-size: 13px; line-height: 1.4; color: var(--error); }
.composer__error:not(:empty) { margin-top: 6px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--olive); }
.consent a { color: var(--olive); text-decoration: underline; text-underline-offset: 2px; }

.cookie {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 20px;
  border-top: 1px solid var(--line); background: #f1f4ec; font-size: 13px; line-height: 1.4; color: var(--muted);
}
.cookie__text { flex: 1; }
.cookie a { color: var(--olive); text-decoration: underline; text-underline-offset: 2px; }
.cookie__btn {
  flex: none; min-height: 34px; padding: 6px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(71, 85, 49, .45); background: #fff; color: var(--olive-700); font-size: 13px; font-weight: 600;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.cookie__btn:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.noscript { margin: auto; padding: 24px; text-align: center; }
.noscript a { color: var(--olive); font-weight: 600; }

@media (hover: hover) {
  .carousel__track { cursor: grab; }
  .phone:hover b { color: var(--sage); }
  .ticker:hover .ticker__track { animation-play-state: paused; }
  .msg__link:hover { background: var(--olive-700); }
  .choices__btn:hover { background: var(--olive); color: #fff; }
  .composer__send:hover:not(:disabled) { background: var(--olive-700); }
  .cookie__btn:hover { background: var(--olive); color: #fff; }
}

@media (max-width: 720px) {
  .page::before { background-image: url(img/bg-mobile.webp); background-position: center 30%; }
  .page::after { background: linear-gradient(180deg, rgba(26, 30, 16, .7) 0%, rgba(26, 30, 16, .35) 30%, rgba(26, 30, 16, .15) 70%, rgba(26, 30, 16, .35) 100%); }
  .top .wrap { height: 60px; }
  .logo { height: 42px; }
  .top .wrap { flex-wrap: wrap; height: auto; padding-block: 8px 6px; row-gap: 4px; }
  .brand { display: contents; }
  .phone { order: 1; }
  .brand__note { order: 2; flex-basis: 100%; display: flex; gap: 10px; padding: 0; border: 0; font-size: 11px; line-height: 1.3; color: rgba(255, 255, 255, .82); }
  .brand__note span + span { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .3); }
  .msg--photos { width: 88%; }
  .phone b { font-size: 16px; }
  .phone svg { width: 18px; height: 18px; }
  .ticker li { font-size: 14px; padding: 8px 0; }
  .stage { padding: 16px 8px 8px; }
  .intro { padding: 12px 18px; border-radius: 16px; }
  .intro h1 { font-size: 26px; }
  .intro p { display: none; }
  .chat { margin-top: 14px; border-radius: 16px; min-height: 330px; }
  .chat__head { padding: 10px 14px; }
  .chat__head img { width: 40px; height: 40px; }
  .feed { padding: 14px 12px 8px; }
  .msg { max-width: 88%; }
  .panel { padding: 10px 12px 12px; }
  .cookie { padding: 6px 12px; gap: 8px; font-size: 12px; line-height: 1.35; }
  .cookie__btn { min-height: 32px; padding: 4px 12px; font-size: 12px; }
  .choices__btn { font-size: 14px; min-height: 44px; padding: 8px 10px; text-align: center; }
}

@media (min-width: 721px) and (max-height: 820px) {
  .top .wrap { height: 64px; }
  .logo { height: 48px; }
}

@media (max-height: 820px) {
  .stage { padding-top: 16px; }
  .intro { padding: 12px 28px; }
  .intro p { margin-top: 6px; }
  .chat { margin-top: 14px; }
}

@media (min-width: 721px) and (max-height: 640px) {
  .intro p { display: none; }
}

@media (max-width: 720px) and (max-height: 700px) {
  .logo { height: 36px; }
  .top .wrap { padding-block: 6px 4px; row-gap: 2px; }
  .brand__note { font-size: 10px; }
  .ticker li { padding: 6px 0; }
  .stage { padding-top: 10px; }
  .intro { padding: 8px 14px; }
  .intro h1 { font-size: 21px; }
  .chat { margin-top: 10px; }
  .chat__head { padding: 8px 12px; }
  .chat__head img { width: 34px; height: 34px; }
}

@media (hover: none) {
  .carousel__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .msg { animation: none; }
  .typing i { animation: none; opacity: .6; }
}
