/* /download — приложения Sensever (resources/views/download.blade.php, скрипт public/chat/download-page.js). База — landing.css главной:
   .lnd-hero, .wrap, .btn, .eyebrow, .lead. Здесь только своё: сцена первого экрана с параллаксом,
   карточки платформ, шаги установки веб-приложения (разметка install-app/guides.js), «зачем приложение». */

.dl-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dl-ico--fill { fill: currentColor; stroke: none; }
.dl-ico--sm { width: 18px; height: 18px; }

/* ── первый экран ───────────────────────────────────────────────────────────── */
.dl-hero { min-height: min(calc(100dvh - 76px), 880px); }
.dl-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.dl-hero h1 { max-width: none; font-size: clamp(38px, 4.2vw, 58px); }
.dl-copy { position: relative; animation: dl-rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }

/* Пятна света — свои два поверх слоёв главной; двигаются при прокрутке (data-depth). */
.dl-hero__lights { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.dl-hero__lights span { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(60px); opacity: .5; will-change: transform; }
.dl-hero__lights span:first-child { left: -14vmax; bottom: -26vmax; background: radial-gradient(circle, color-mix(in srgb, #6b8cff 38%, transparent), transparent 70%); }
.dl-hero__lights span:last-child { right: -10vmax; top: -18vmax; background: radial-gradient(circle, color-mix(in srgb, #2fd2a5 26%, transparent), transparent 70%); }

/* Главная кнопка: варианты под каждую систему лежат в одной ячейке — смена не двигает страницу. */
.dl-primary { display: grid; margin-top: 34px; }
.dl-primary__variant { grid-area: 1 / 1; }
.dl-primary__variant[hidden] { display: block; visibility: hidden; pointer-events: none; }
.dl-primary .cta-row { margin-top: 14px; }
.dl-os { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 9px; border-radius: 999px;
  font-size: var(--fs-13, 13px); color: var(--text-on-inverse-2);
  background: color-mix(in srgb, var(--text-on-inverse-1) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-on-inverse-1) 14%, transparent); }
.dl-os .dl-ico { width: 16px; height: 16px; color: var(--text-on-inverse-1); }
.dl-os b { color: var(--text-on-inverse-1); font-weight: var(--fw-bold); }
.dl-primary__btn { box-shadow: 0 18px 40px -18px rgb(0 0 0 / 70%); }
.dl-primary__btn:hover { transform: translateY(-1px); }
.dl-primary__req { margin-top: 14px !important; font-size: var(--fs-14); color: var(--text-on-inverse-2); }

/* Сцена: окно, телефон, уведомление и значки систем; у каждого слоя своя глубина. */
.dl-stage { position: relative; min-height: 470px; perspective: 1600px; }
.dl-stage > * { will-change: transform; }
.dl-stage__window { position: absolute; top: 6%; right: -2%; width: 90%; border-radius: 14px; overflow: hidden; background: var(--bg-1);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-on-inverse-1) 14%, transparent), 0 40px 90px -20px rgb(0 0 0 / 70%), 0 18px 36px -18px rgb(0 0 0 / 60%);
  animation: dl-window-in 1.1s .25s cubic-bezier(.2, .7, .2, 1) backwards; }
.dl-stage__bar { background: var(--bg-2); }
.dl-stage__window sv-chat-demo { display: block; width: 100%; height: 400px; overflow: hidden; }
.dl-stage__phone { position: absolute; left: -4%; bottom: -12%; width: 176px; padding: 8px; border-radius: 38px;
  background: linear-gradient(145deg, #2a2a2e, #0c0c0e);
  box-shadow: inset 0 0 0 2px #3a3a3f, 0 40px 80px -24px rgb(0 0 0 / 75%), 0 0 0 1px rgb(255 255 255 / 6%);
  animation: dl-phone-in 1.2s .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.dl-stage__phone sv-call-demo { display: block; width: 100%; height: 340px; overflow: hidden; border-radius: 30px; background: var(--bg-1); }
.dl-stage__island { position: absolute; z-index: 2; top: 15px; left: 50%; width: 30%; height: 18px; margin-left: -15%; border-radius: 12px; background: #000; }

/* Системное уведомление — такое, каким его покажет приложение. */
.dl-toast { position: absolute; top: -2%; right: -3%; z-index: 3; display: flex; gap: 11px; align-items: flex-start; width: 290px; padding: 12px 14px;
  border-radius: 16px; color: #17191a; background: rgb(246 247 248 / 88%); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 6%), 0 22px 50px -16px rgb(0 0 0 / 55%);
  animation: dl-toast-in .8s 1.4s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.dl-toast img { border-radius: 9px; }
.dl-toast div { display: grid; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.35; }
.dl-toast__app { font-size: 11px; color: #6b7280; }
.dl-toast b { font-weight: 700; }
.dl-toast__text { color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dl-chip { position: absolute; z-index: 4; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: var(--text-on-inverse-1);
  background: color-mix(in srgb, var(--text-on-inverse-1) 10%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-on-inverse-1) 18%, transparent), 0 18px 40px -16px rgb(0 0 0 / 70%);
  animation: dl-rise 1s 1s cubic-bezier(.2, .7, .2, 1) backwards; }
.dl-chip .dl-ico { width: 24px; height: 24px; }
.dl-chip--win { left: -2%; top: 8%; }
.dl-chip--mac { right: -4%; bottom: 4%; animation-delay: 1.15s; }
.dl-chip--and { left: 38%; bottom: -14%; animation-delay: 1.3s; }

@keyframes dl-rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes dl-window-in { from { opacity: 0; transform: translateY(48px) rotateX(12deg) scale(.95); } }
@keyframes dl-phone-in { from { opacity: 0; transform: translateY(70px) rotate(-6deg); } }
@keyframes dl-toast-in { from { opacity: 0; transform: translateY(-18px) scale(.94); } }

/* ── платформы ──────────────────────────────────────────────────────────────── */
.dl-sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.dl-sec-head h2 { margin-top: 10px; }
.dl-sec-head .lead { margin-top: 14px; }
.dl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dl-card { grid-column: span 2; position: relative; display: grid; gap: 14px; padding: 22px; border-radius: 20px; background: var(--bg-1);
  box-shadow: 0 0 0 1px var(--border-1); transition: box-shadow .2s, transform .2s; }
.dl-card--native { grid-column: span 3; }
.dl-card:hover { box-shadow: 0 0 0 1px var(--border-2), 0 18px 40px -26px var(--shadow-color, rgb(0 0 0 / 30%)); }
.dl-card.is-current { box-shadow: 0 0 0 2px var(--text-1), 0 22px 50px -30px var(--shadow-color, rgb(0 0 0 / 35%)); }
.dl-card__badge { position: absolute; top: -11px; left: 20px; display: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: var(--fw-bold);
  color: var(--bg-1); background: var(--text-1); }
.dl-card.is-current .dl-card__badge { display: inline-block; }
.dl-card__head { display: flex; align-items: center; gap: 14px; }
.dl-card__head > div { min-width: 0; flex: 1; }
.dl-card__head h3 { font-size: var(--fs-18); }
.dl-card__head p { margin-top: 2px !important; font-size: var(--fs-14); color: var(--text-3); }
.dl-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--text-1); background: var(--bg-3); flex: none; }
.dl-card__icon .dl-ico { width: 24px; height: 24px; }
.dl-card__text { font-size: var(--fs-14); color: var(--text-2); }
.dl-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-card__actions:empty { display: none; }
.dl-pill { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: var(--fw-bold); color: var(--text-2); background: var(--bg-3); white-space: nowrap; }
.dl-note { font-size: var(--fs-12); color: var(--text-3); }

/* Шаги установки веб-приложения: разметка окна установки сайта, без самого окна. */
.dl-guide-box { border-top: 1px solid var(--border-1); padding-top: 12px; }
.dl-guide-box summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-14);
  font-weight: var(--fw-bold); color: var(--text-1); }
.dl-guide-box summary::-webkit-details-marker { display: none; }
.dl-guide-box summary::after { content: ""; width: 8px; height: 8px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.dl-guide-box[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.install-app.dl-guide { position: static; z-index: auto; width: auto; max-height: none; margin-top: 12px; overflow: visible; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; animation: none; }
.install-app.dl-guide .install-app__hint, .install-app.dl-guide .install-app__note { margin: 0 0 10px; font-size: var(--fs-13, 13px); color: var(--text-3); }

/* ── зачем приложение ───────────────────────────────────────────────────────── */
.dl-why { background: var(--bg-2); }
.dl-why__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.dl-why__item { display: grid; gap: 10px; align-content: start; }
.dl-why__item p { color: var(--text-2); font-size: var(--fs-16); }
.dl-why__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--text-1); background: var(--bg-1); box-shadow: 0 0 0 1px var(--border-1); }
.dl-why__icon .dl-ico { width: 22px; height: 22px; }

/* ── вопрос — ответ ─────────────────────────────────────────────────────────── */
.dl-faq__list { display: grid; gap: 10px; max-width: 860px; }
.dl-faq__item { border-radius: 16px; background: var(--bg-1); box-shadow: 0 0 0 1px var(--border-1); }
.dl-faq__item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; font-size: var(--fs-16); font-weight: var(--fw-bold); color: var(--text-1); }
.dl-faq__item summary::-webkit-details-marker { display: none; }
.dl-faq__item summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.dl-faq__item[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.dl-faq__answer { display: grid; gap: 12px; padding: 0 20px 18px; color: var(--text-2); font-size: var(--fs-15, 15px); }
.dl-faq__code { margin: 0; padding: 12px 14px; overflow-x: auto; border-radius: 10px; background: var(--bg-3); color: var(--text-1);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; user-select: all; }

/* ── ширина ─────────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .dl-card, .dl-card--native { grid-column: span 3; }
  .dl-card[data-platform="web"] { grid-column: span 6; }
}
@media (max-width: 900px) {
  .dl-hero__in { grid-template-columns: minmax(0, 1fr); }
  .dl-hero h1 { max-width: 18ch; }
  .dl-stage { min-height: 400px; margin: 10px auto 0; width: min(100%, 560px); }
  .dl-stage__window sv-chat-demo { height: 330px; }
  .dl-stage__phone { width: 170px; }
  .dl-stage__phone sv-call-demo { height: 320px; }
  .dl-why__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-card, .dl-card--native, .dl-card[data-platform="web"] { grid-column: auto; }
  .dl-card.is-current { order: -1; margin-top: 8px; }
  .dl-primary .cta-row .btn { flex: 1 1 100%; }
  .dl-stage { min-height: 330px; }
  .dl-stage__window { width: 92%; }
  .dl-stage__window sv-chat-demo { height: 270px; }
  .dl-stage__phone { width: 132px; padding: 6px; border-radius: 28px; }
  .dl-stage__phone sv-call-demo { height: 250px; border-radius: 22px; }
  .dl-stage__island { top: 11px; height: 13px; }
  .dl-toast { width: 230px; right: 0; padding: 10px 12px; }
  .dl-chip { width: 44px; height: 44px; border-radius: 13px; }
  .dl-chip--win { left: -1%; top: 58%; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-copy, .dl-stage__window, .dl-stage__phone, .dl-toast, .dl-chip { animation: none; }
  .dl-stage > *, .dl-hero__lights span { transform: none !important; }
    .dl-primary__btn:hover { transform: none; }
}
