:root {
  --ivory: #F7F4EF;
  --paper: #FFFDF9;
  --espresso: #16120F;
  --ink: #221C17;
  --muted: #5E554C;
  --gold: #8A6A3C;
  --champagne: #D8C09A;
  --line: #E4DDD2;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Rubik", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* Шапка */
.top { padding: 28px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.01em; }
.brand img { width: 34px; height: 34px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 22px; }
.top nav a:hover { color: var(--ink); }
.top nav a.login { color: var(--ivory); background: var(--espresso); padding: 9px 18px; border-radius: 999px; font-weight: 400; }
.top nav a.login:hover { background: #2b2420; color: var(--ivory); }

/* Первый экран */
.hero { padding: 40px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--serif);
  text-wrap: balance;
  font-weight: 500;
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
  max-width: 13ch;
}
.hero p.lead { font-size: 21px; color: var(--muted); max-width: 40ch; margin: 0 0 34px; }
.pearl-stage { position: relative; aspect-ratio: 1; }
.pearl-stage::before {
  content: ""; position: absolute; inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 192, 154, 0.45), rgba(247, 244, 239, 0) 68%);
}
.pearl-stage img { position: relative; width: 100%; height: auto; animation: drift 14s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .pearl-stage img { animation: none; } }

.button {
  display: inline-block;
  background: var(--espresso);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 400;
  font-size: 17px;
  padding: 16px 28px;
  border-radius: 999px;
}
.button:hover { background: #2b2420; }
.note { font-size: 15px; color: var(--muted); margin-top: 14px; }

/* Разговоры — главный элемент */
.talks { background: var(--espresso); color: var(--ivory); padding: 96px 0; }
.talks h2, .section h2 {
  text-wrap: balance;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 18ch;
}
.talks .intro { color: #BFB3A3; max-width: 46ch; margin: 0 0 56px; }
.talk { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 34px 0; border-top: 1px solid rgba(216, 192, 154, 0.22); }
.talk h3 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; margin: 0; color: var(--champagne); }
.talk .what { color: #BFB3A3; font-size: 16px; margin: 8px 0 0; }
.lines { display: grid; gap: 10px; align-content: start; }
.line { margin: 0; width: fit-content; max-width: min(560px, 100%); justify-self: start; padding: 12px 16px; border-radius: 18px; font-size: 16px; line-height: 1.45; }
.line.you { justify-self: end; background: var(--ivory); color: var(--ink); border-bottom-right-radius: 6px; }
.line.dana { background: #2A231E; color: var(--ivory); border-bottom-left-radius: 6px; }
.line.them { background: transparent; color: #BFB3A3; border: 1px solid rgba(216, 192, 154, 0.3); border-bottom-left-radius: 6px; }
.line small { display: block; font-size: 12px; color: var(--champagne); margin-bottom: 2px; }
.line.you small { color: var(--gold); }
.line.done { background: transparent; color: var(--champagne); padding-left: 0; font-size: 15px; }

/* Обещание */
.promise { padding: 104px 0; text-align: center; }
.promise p {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.12;
  margin: 0 auto;
  max-width: 20ch;
}
.promise span { display: block; font-family: var(--sans); font-size: 18px; color: var(--muted); margin-top: 22px; }

/* Для бизнеса */
.section { padding: 0 0 104px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; border-top: 1px solid var(--line); padding-top: 64px; }
.split p { color: var(--muted); margin: 0 0 18px; max-width: 46ch; }
.split ul { list-style: none; margin: 0; padding: 0; }
.split li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.split li strong { font-weight: 500; color: var(--ink); }

/* Подвал */
footer { background: var(--paper); border-top: 1px solid var(--line); padding: 44px 0; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
footer nav a { color: var(--muted); margin-right: 20px; }

/* Юридические страницы */
.doc { padding: 24px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 60px); line-height: 1.05; margin: 0 0 8px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; margin: 44px 0 10px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin: 24px 0; }

@media (max-width: 860px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 32px; }
  .pearl-stage { max-width: 320px; margin: 0 auto; order: -1; }
  .talk { grid-template-columns: 1fr; gap: 18px; }
  .top nav a { margin-left: 14px; }
  body { font-size: 17px; }
}

/* Живая жемчужина (pearl.js): картинка остаётся, пока 3D не запустилось */
.pearl-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pearl-stage.live img { visibility: hidden; }

/* Всё, что умеет Dana */
.everything { padding: 104px 0 40px; }
.everything h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; margin: 0 0 14px; max-width: 20ch; text-wrap: balance; }
.everything .intro { color: var(--muted); max-width: 52ch; margin: 0 0 48px; }
.group { margin: 0 0 88px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; margin-bottom: 28px; }
.group-head h3 { font-family: var(--serif); font-weight: 500; font-size: 34px; margin: 0; }
.group-head span { color: var(--gold); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1060px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 16px 14px; border-radius: 16px; }
  .card svg { width: 22px; height: 22px; margin-bottom: 10px; }
  .card h4 { font-size: 15px; }
  .card p { font-size: 13.5px; }
}
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 20px; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -22px rgba(34, 28, 23, 0.35); }
.card svg { width: 26px; height: 26px; stroke: var(--gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.card h4 { font-weight: 500; font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card .soon { display: inline-block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--champagne); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }

/* Скриншоты из приложения — лента телефонов */
.phones { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 4px 18px; margin-top: 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.phones figure { flex: 0 0 236px; margin: 0; scroll-snap-align: start; }
.phones img { width: 236px; height: auto; border-radius: 30px; border: 6px solid var(--espresso); box-shadow: 0 24px 50px -28px rgba(22, 18, 15, 0.55); background: var(--espresso); }
.phones figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.4; }
.phones figcaption b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }

/* Видео */
.demo { background: var(--espresso); color: var(--ivory); padding: 96px 0; }
.demo .wrap { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 64px; align-items: center; }
.demo h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; margin: 0 0 18px; max-width: 16ch; }
.demo p { color: #BFB3A3; max-width: 44ch; margin: 0 0 14px; }
.demo ol { color: #BFB3A3; padding-left: 20px; margin: 18px 0 0; font-size: 16px; }
.demo ol li { margin-bottom: 6px; }
.demo video { width: 100%; aspect-ratio: 9 / 16; border-radius: 30px; border: 6px solid #2A231E; background: #000; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }

@media (max-width: 860px) {
  .demo .wrap { grid-template-columns: 1fr; gap: 36px; }
  .demo video { max-width: 320px; margin: 0 auto; display: block; }
  .group-head { flex-direction: column; gap: 4px; }
  .phones figure { flex-basis: 200px; }
  .phones img { width: 200px; }
}
@media (max-width: 560px) {
  .top nav a:not(.login):not([href="/business.html"]) { display: none; }
}

/* Главное — крупно: фрагмент приложения + пояснение */
.spots { padding: 24px 0 64px; }
.spots > .wrap > h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; margin: 0 0 14px; max-width: 18ch; text-wrap: balance; }
.spots > .wrap > .intro { color: var(--muted); max-width: 52ch; margin: 0 0 40px; }
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.spot:nth-of-type(even) .spot-text { order: 2; }
.spot-text .tag { color: var(--gold); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.spot-text h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.1; margin: 0 0 14px; }
.spot-text p { color: var(--muted); margin: 0 0 12px; max-width: 42ch; }
.spot-text ul { list-style: none; padding: 0; margin: 14px 0 0; }
.spot-text li { padding: 6px 0 6px 26px; position: relative; font-size: 16px; color: var(--ink); }
.spot-text li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.spot-ui { justify-self: center; width: min(100%, 440px); background: linear-gradient(160deg, #EFE7DA, #F8F4EE); border-radius: 28px; padding: 22px; box-shadow: 0 30px 60px -36px rgba(34, 28, 23, 0.45); }
.spot-ui img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 10px 26px -18px rgba(34, 28, 23, 0.5); }

/* Где работает Dana */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 0; }
.platform { background: var(--espresso); color: var(--ivory); border-radius: 22px; padding: 26px 24px; }
.platform svg { width: 28px; height: 28px; stroke: var(--champagne); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.platform h4 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 6px; color: var(--champagne); }
.platform p { margin: 0; color: #BFB3A3; font-size: 15px; line-height: 1.5; }
.platform a { color: var(--champagne); }

@media (max-width: 860px) {
  .spot { grid-template-columns: 1fr; gap: 26px; padding: 36px 0; }
  .spot:nth-of-type(even) .spot-text { order: 0; }
  .platforms { grid-template-columns: 1fr; }
}

/* ── Движение (motion.js). Без JS или при «уменьшить движение» всё видно сразу ── */
.motion .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.motion .rv.rv-side { transform: translateY(26px) scale(.97); }
.motion .rv.in { opacity: 1; transform: none; }
.motion .card.rv.in:hover { transform: translateY(-3px); }

/* Первый экран при загрузке */
.motion .hero h1, .motion .hero .lead, .motion .hero .button, .motion .hero .note { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.motion .hero .lead { animation-delay: .12s; }
.motion .hero .button { animation-delay: .24s; }
.motion .hero .note { animation-delay: .34s; }
.motion .hero .pearl-stage { animation: pearlIn 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pearlIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* Переписка «вживую»: место пузыря занято заранее — страница не прыгает */
.motion .line { transition: opacity .45s ease, transform .45s ease; }
.motion .line.wait { opacity: 0; transform: translateY(10px); }
.line.typing { position: relative; color: transparent !important; width: 74px; height: 44px; padding: 0; overflow: hidden; }
.line.typing small, .line.typing span { color: transparent !important; }
.line.typing::after {
  content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--champagne); box-shadow: 11px 0 0 var(--champagne), 22px 0 0 var(--champagne);
  animation: dots 1s ease-in-out infinite;
}
@keyframes dots { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Цифры под первым экраном */
.stats { padding: 0 0 88px; }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 22px; }
.stat strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 5.4vw, 68px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat strong i { font-style: normal; color: var(--gold); }
.stat p { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
@media (max-width: 860px) { .stats .wrap { grid-template-columns: 1fr; } .stats { padding-bottom: 64px; } }
