/* ============================================================
   Олеся — лендинг. Эстетика: тёплая «вечерняя» редакционность.
   Кремовая бумага, терракотовый акцент, серифные заголовки.
   ============================================================ */

:root {
  --paper: #faf5ee;
  --paper-deep: #f3ebdf;
  --ink: #2b211b;
  --ink-soft: #5c4f45;
  --accent: #b4502b;        /* терракота — CTA и акценты */
  --accent-deep: #96401f;
  --sage: #76866a;          /* шалфей — вторичный */
  --bubble-user: #e9dfd0;
  --bubble-olesya: #fffdf9;
  --radius: 20px;
  --font-display: "Cormorant", "Georgia", serif;
  --font-body: "Golos Text", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Зерно поверх всего — тёплая «бумажная» фактура */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 720px; }

em { font-style: italic; }

/* ============ Кнопки ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border-radius: 999px;
  padding: 16px 32px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(180, 80, 43, 0.55);
}

.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px -10px rgba(150, 64, 31, 0.6);
}

.btn--primary:active { transform: translateY(0) scale(0.99); }

.btn--large { font-size: 19px; padding: 19px 40px; }

.btn__icon { flex-shrink: 0; }

/* ============ Hero ============ */

.hero {
  position: relative;
  padding: clamp(56px, 10vh, 120px) 0 clamp(48px, 8vh, 96px);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 480px at 78% 18%, rgba(228, 168, 102, 0.28), transparent 65%),
    radial-gradient(520px 420px at 8% 82%, rgba(118, 134, 106, 0.16), transparent 60%),
    radial-gradient(420px 380px at 92% 88%, rgba(180, 80, 43, 0.10), transparent 60%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.hero__title em { color: var(--accent); }

.hero__lead {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 36px;
}

.hero__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.hero__note {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ----- Мокап чата ----- */

.hero__chat { perspective: 1000px; }

.chat {
  background: linear-gradient(168deg, #f6efe4, #efe4d2);
  border: 1px solid rgba(43, 33, 27, 0.08);
  border-radius: 28px;
  padding: 26px 22px 22px;
  box-shadow:
    0 30px 60px -25px rgba(43, 33, 27, 0.35),
    0 4px 14px rgba(43, 33, 27, 0.06);
  transform: rotate(1.6deg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat__time {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  opacity: 0.7;
  margin-bottom: 4px;
}

.chat__bubble {
  max-width: 88%;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 18px;
  opacity: 0;
  animation: bubble-in 0.55s cubic-bezier(0.25, 0.9, 0.35, 1.2) forwards;
  animation-delay: calc(0.9s + var(--cd) * 0.85s);
}

.chat__bubble--user {
  align-self: flex-end;
  background: var(--bubble-user);
  border-bottom-right-radius: 6px;
}

.chat__bubble--olesya {
  align-self: flex-start;
  background: var(--bubble-olesya);
  border: 1px solid rgba(43, 33, 27, 0.06);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(43, 33, 27, 0.05);
}

.chat__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 3px;
}

.chat__typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: var(--bubble-olesya);
  border: 1px solid rgba(43, 33, 27, 0.06);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  opacity: 0;
  animation: bubble-in 0.5s ease forwards;
  animation-delay: calc(0.9s + var(--cd) * 0.85s);
}

.chat__typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: typing 1.2s ease-in-out infinite;
}
.chat__typing span:nth-child(2) { animation-delay: 0.18s; }
.chat__typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ============ Секции ============ */

.section { padding: clamp(64px, 10vh, 110px) 0; }

.section--tinted {
  background: var(--paper-deep);
  border-top: 1px solid rgba(43, 33, 27, 0.05);
  border-bottom: 1px solid rgba(43, 33, 27, 0.05);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  margin-bottom: clamp(32px, 5vh, 56px);
}

.section__cta {
  margin-top: clamp(36px, 5vh, 52px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* ----- Карточки сценариев ----- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: #fffdf8;
  border: 1px solid rgba(43, 33, 27, 0.07);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -18px rgba(43, 33, 27, 0.25);
}

.card__marker {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card p { font-size: 15px; color: var(--ink-soft); }

/* ----- Шаги ----- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  counter-reset: step;
}

.step { position: relative; padding-top: 8px; }

.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 18px;
}

.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-soft); }

/* ----- Приватность ----- */

.about__text p {
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.about__text p:last-child { margin-bottom: 0; }

.privacy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.privacy__text .section__title { margin-bottom: 18px; }

.privacy__lead { color: var(--ink-soft); }

.privacy__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.privacy__list li {
  position: relative;
  padding-left: 34px;
}

.privacy__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--sage);
  opacity: 0.85;
}

.privacy__list strong {
  display: block;
  font-size: 17px;
  margin-bottom: 3px;
}

.privacy__list span { color: var(--ink-soft); font-size: 15px; }

/* ----- Тарифы ----- */

.pricing__sub {
  color: var(--ink-soft);
  margin-top: -28px;
  margin-bottom: 44px;
  max-width: 56ch;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.plan {
  position: relative;
  background: #fffdf8;
  border: 1px solid rgba(43, 33, 27, 0.08);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(43, 33, 27, 0.22); }

.plan--featured {
  background: linear-gradient(170deg, #fff9ef, #fdf2e2);
  border: 1.5px solid var(--accent);
  box-shadow: 0 22px 44px -20px rgba(180, 80, 43, 0.35);
}

.plan__badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan__name {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.plan__price {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}

.plan__per { font-size: 14px; color: var(--sage); font-weight: 500; margin-bottom: 14px; }

.plan__desc { font-size: 15px; color: var(--ink-soft); }

.plans__note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ----- FAQ ----- */

.faq {
  border-bottom: 1px solid rgba(43, 33, 27, 0.12);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq[open] summary::after { transform: rotate(45deg); }

.faq summary:hover { color: var(--accent); }

.faq p {
  padding: 0 0 24px;
  color: var(--ink-soft);
  max-width: 60ch;
}

.faq a { color: var(--accent); }

/* ----- Финальный CTA ----- */

.section--final {
  text-align: center;
  background:
    radial-gradient(560px 360px at 50% 10%, rgba(228, 168, 102, 0.22), transparent 70%);
}

.final__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.12;
  margin-bottom: 36px;
}

.final__title em { color: var(--accent); }

.section--final .section__cta { align-items: center; }

/* ----- Футер ----- */

.footer {
  background: var(--ink);
  color: rgba(250, 245, 238, 0.75);
  padding: 48px 0 40px;
  font-size: 14px;
}

.footer__disclaimer {
  max-width: 72ch;
  margin-bottom: 28px;
  line-height: 1.7;
}

.footer__disclaimer a { color: #e8b483; }

.footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer__links a {
  color: rgba(250, 245, 238, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 245, 238, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer__links a:hover { color: #fff; border-color: #fff; }

.footer__copy { opacity: 0.5; }

/* ============ Анимации появления ============ */

/* При загрузке (hero) */
.reveal-load {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s cubic-bezier(0.25, 0.9, 0.35, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.12s);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* При скролле (через IntersectionObserver в app.js).
   Скрываем только при работающем JS (<html class="js">) — без JS
   контент виден сразу. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.9, 0.35, 1);
  transition-delay: calc(var(--d, 0) * 0.1s);
}

.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* JS есть, а IntersectionObserver нет — показываем всё сразу */
.js.no-observer .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-load, .chat__bubble, .chat__typing {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ============ Адаптив ============ */

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__chat { max-width: 440px; }
  .chat { transform: rotate(0.8deg); }
  .privacy { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta { flex-direction: column; align-items: stretch; text-align: center; }
  .section__cta { align-items: stretch; text-align: center; }
  .plan { text-align: center; }
}
