/* VideoShelf — сайт. Палитра и типографика повторяют приложение. */

:root {
  --bg: #F8F3EC;
  --bg-2: #F1EAE0;
  --card: #FFFDFA;
  --label: #1F1A16;
  --label-2: rgba(31, 26, 22, 0.66);
  --label-3: rgba(31, 26, 22, 0.42);
  --line: rgba(120, 96, 74, 0.18);
  --fill: rgba(120, 96, 74, 0.10);
  --accent: #C35A33;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(195, 90, 51, 0.12);
  --olive: #5E6D31;
  --olive-soft: rgba(94, 109, 49, 0.14);
  --shadow: 0 30px 60px -30px rgba(60, 35, 20, 0.35);
  --radius: 22px;
  --maxw: 1160px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100E;
    --bg-2: #181512;
    --card: #1E1B18;
    --label: #F6EFE7;
    --label-2: rgba(246, 239, 231, 0.68);
    --label-3: rgba(246, 239, 231, 0.42);
    --line: rgba(200, 176, 150, 0.16);
    --fill: rgba(200, 176, 150, 0.10);
    --accent: #E8794B;
    --accent-ink: #1A0F09;
    --accent-soft: rgba(232, 121, 75, 0.14);
    --olive: #A9B86C;
    --olive-soft: rgba(169, 184, 108, 0.14);
    --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 12px; z-index: 100; text-decoration: none;
}
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none;
}
.brand svg { width: 32px; height: 32px; flex: none; }

.nav { display: none; gap: 26px; margin-left: 24px; }
.nav a { text-decoration: none; color: var(--label-2); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--label); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; background: var(--fill);
  text-decoration: none; font-weight: 700; font-size: 14px;
}
.lang svg { width: 16px; height: 16px; }

@media (min-width: 860px) { .nav { display: flex; } }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border-radius: 16px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 0; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 22px; height: 22px; }
.btn-primary { background: var(--label); color: var(--bg); box-shadow: var(--shadow); }
.btn-ghost { background: var(--fill); color: var(--label); }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: .7; line-height: 1; }
.btn .two { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 40px 0 80px; overflow: clip; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 72px 0 120px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite; }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(42px, 8vw, 84px); font-weight: 800; margin: 20px 0 22px; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--label-2); max-width: 34ch; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; color: var(--label-3); font-size: 14px; }

/* Мягкие пятна на фоне */
.blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none;
  will-change: transform;
}
.blob.a { width: 420px; height: 420px; background: var(--accent); top: -120px; right: -80px; opacity: .22; animation: drift 18s ease-in-out infinite; }
.blob.b { width: 360px; height: 360px; background: var(--olive); bottom: -140px; left: -120px; opacity: .2; animation: drift 22s ease-in-out infinite reverse; }
.blob.c { width: 220px; height: 220px; background: #E9C58F; top: 40%; left: 45%; opacity: .16; animation: drift 26s ease-in-out infinite; }

/* ---------- iPhone ---------- */

.phone-stage { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.phone {
  position: relative; width: min(320px, 78vw); aspect-ratio: 660 / 1434;
  border-radius: 54px; padding: 11px;
  background: linear-gradient(145deg, #3a332d, #121010 55%, #2a2420);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255,255,255,.08);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.phone:hover { transform: rotateY(0) rotateX(0); }
.phone::before { /* кнопки сбоку */
  content: ""; position: absolute; right: -3px; top: 26%; width: 3px; height: 12%;
  border-radius: 0 3px 3px 0; background: #2a2420;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(232,121,75,.35), transparent 60%),
    linear-gradient(180deg, #2a221d, #12100E);
}
.screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease, transform 6s ease;
  transform: scale(1.03);
}
.screen img.on { opacity: 1; transform: scale(1); }
.island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 30%; height: 3.2%; border-radius: 999px; background: #000; z-index: 3;
}
/* Заглушка, пока нет скриншотов */
.screen .fallback {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: rgba(246,239,231,.75); font-weight: 700; padding: 30px;
}
.screen .fallback svg { width: 64px; height: 64px; margin: 0 auto 12px; color: #E8794B; }
.screen.has-shot .fallback { display: none; }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 18px; background: var(--card);
  box-shadow: var(--shadow); font-weight: 700; font-size: 14px; white-space: nowrap;
  border: 1px solid var(--line);
}
.float-card .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.float-card .ic svg { width: 18px; height: 18px; }
.float-card small { display: block; font-weight: 600; color: var(--label-3); font-size: 12px; }
.float-card.one { left: -4%; top: 18%; animation: bob 6s ease-in-out infinite; }
.float-card.two { right: -6%; bottom: 20%; animation: bob 7s ease-in-out infinite -2s; }
.float-card.two .ic { background: var(--olive-soft); color: var(--olive); }
@media (max-width: 520px) { .float-card { display: none; } }

/* ---------- Лента «что умеет» ---------- */

.marquee {
  border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee .track { display: flex; gap: 40px; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--label-2); white-space: nowrap; }
.marquee svg { width: 20px; height: 20px; color: var(--accent); }

/* ---------- Секции ---------- */

section { padding: 88px 0; position: relative; }
@media (min-width: 960px) { section { padding: 120px 0; } }
.section-head { max-width: 680px; margin-bottom: 48px; }
.kicker { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .12em; }
h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; margin: 12px 0 16px; }
.section-head p { color: var(--label-2); font-size: 19px; margin: 0; }

.feature {
  display: grid; gap: 32px; align-items: center;
  padding: 36px; border-radius: 32px; background: var(--card); border: 1px solid var(--line);
  margin-bottom: 24px; overflow: hidden; position: relative;
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; padding: 56px; gap: 56px; }
  .feature.flip .feature-media { order: -1; }
}
.feature h3 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin: 14px 0 14px; }
.feature p { color: var(--label-2); margin: 0 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ticks svg { width: 20px; height: 20px; flex: none; color: var(--olive); margin-top: 3px; }
.badge-ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.badge-ic svg { width: 26px; height: 26px; }

.feature-media { position: relative; display: grid; place-items: center; min-height: 300px; }
.feature-media .phone { width: min(250px, 66vw); transform: none; border-radius: 44px; padding: 9px; }
.feature-media .screen { border-radius: 36px; }

/* Таймер режима готовки */
.timer-card {
  position: absolute; left: 0; bottom: 8%; padding: 18px 20px; border-radius: 22px;
  background: #12100E; color: #F6EFE7; box-shadow: var(--shadow); min-width: 200px;
}
.timer-card .t { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.timer-card small { color: rgba(246,239,231,.6); font-weight: 600; }
.timer-ring { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; }
.timer-ring circle { fill: none; stroke-width: 4; }
.timer-ring .bg { stroke: rgba(246,239,231,.15); }
.timer-ring .fg { stroke: #E8794B; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }

/* Волна «готовить на слух» */
.wave-card {
  position: absolute; right: 0; bottom: 10%; display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.wave { display: flex; align-items: center; gap: 4px; height: 36px; }
.wave i { width: 4px; border-radius: 4px; background: var(--accent); height: 30%; animation: wave 1.2s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: -.2s; }
.wave i:nth-child(3n) { animation-delay: -.45s; }
.wave i:nth-child(5n) { animation-delay: -.7s; }
.play-dot { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.play-dot svg { width: 16px; height: 16px; }

/* Сетка небольших возможностей */
.grid {
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  padding: 28px; border-radius: 26px; background: var(--card); border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile h3 { font-size: 21px; margin: 18px 0 8px; letter-spacing: -0.02em; }
.tile p { margin: 0; color: var(--label-2); font-size: 16px; }
.tile .badge-ic { width: 46px; height: 46px; border-radius: 14px; }
.tile.olive .badge-ic { background: var(--olive-soft); color: var(--olive); }

/* Список покупок — анимированные галочки */
.list-demo { width: 100%; max-width: 340px; padding: 10px; border-radius: 24px; background: var(--bg-2); }
.list-demo li { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; font-weight: 600; }
.list-demo li + li { border-top: 1px solid var(--line); }
.list-demo .box { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--label-3); display: grid; place-items: center; flex: none; transition: all .4s ease; }
.list-demo .box svg { width: 14px; height: 14px; color: var(--accent-ink); opacity: 0; transition: opacity .3s; }
.list-demo li.done .box { background: var(--accent); border-color: var(--accent); }
.list-demo li.done .box svg { opacity: 1; }
.list-demo li.done span { color: var(--label-3); text-decoration: line-through; }
.list-demo em { margin-left: auto; font-style: normal; color: var(--label-3); font-weight: 600; }
.list-demo ul { margin: 0; padding: 0; }

/* Шаги */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  padding: 30px; border-radius: 26px; background: var(--card); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 64px; font-weight: 800; letter-spacing: -0.05em; color: var(--accent-soft);
  -webkit-text-stroke: 1.5px var(--accent); line-height: 1;
}
.step h3 { font-size: 22px; margin: 18px 0 8px; }
.step p { color: var(--label-2); margin: 0; }

/* Приватность */
.privacy-band {
  border-radius: 36px; padding: 48px 32px; text-align: center;
  background:
    radial-gradient(100% 80% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--card);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
@media (min-width: 900px) { .privacy-band { padding: 80px 64px; } }
.privacy-band h2 { max-width: 18ch; margin-inline: auto; }
.privacy-band > p { color: var(--label-2); max-width: 54ch; margin: 0 auto 40px; font-size: 19px; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.pill svg { width: 18px; height: 18px; color: var(--olive); }
.shield { width: 84px; height: 84px; margin: 0 auto 20px; color: var(--accent); }

/* FAQ */
.faq { max-width: 820px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 700; font-size: 19px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; flex: none; transition: transform .3s ease; }
.faq summary .chev svg { width: 14px; height: 14px; }
.faq details[open] summary .chev { transform: rotate(45deg); background: var(--accent-soft); color: var(--accent); }
.faq .answer { color: var(--label-2); padding: 0 44px 22px 0; }
.faq .answer p { margin: 0 0 10px; }

/* Финальный призыв */
.final { text-align: center; }
.final h2 { max-width: 16ch; margin: 0 auto 18px; }
.final p { color: var(--label-2); margin: 0 auto 32px; max-width: 46ch; font-size: 19px; }
.final .cta { justify-content: center; }

/* Подвал */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--label-2); font-size: 15px; }
footer .wrap { display: grid; gap: 28px; }
@media (min-width: 800px) { footer .wrap { grid-template-columns: 1.2fr 2fr; align-items: start; } }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
@media (min-width: 800px) { .foot-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--label); }
.foot-links h4 { margin: 0 0 6px; color: var(--label); font-size: 14px; }
.foot-col { display: grid; gap: 8px; align-content: start; }
.copy { color: var(--label-3); font-size: 13px; margin-top: 10px; }

/* ---------- Документы ---------- */

.doc-hero { padding-top: 56px; padding-bottom: 24px; }
.doc-hero h1 { font-size: clamp(36px, 6vw, 60px); margin: 14px 0 12px; }
.doc-meta { color: var(--label-3); font-weight: 600; font-size: 15px; }
.doc { display: grid; gap: 40px; padding-bottom: 96px; }
@media (min-width: 1000px) { .doc { grid-template-columns: 260px 1fr; gap: 64px; } }
.toc {
  align-self: start; padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  font-size: 15px;
}
@media (min-width: 1000px) { .toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; } }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--label-3); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toc a { text-decoration: none; color: var(--label-2); }
.toc a:hover, .toc a.active { color: var(--accent); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 48px 0 14px; scroll-margin-top: 90px; letter-spacing: -0.02em; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--label-2); }
.prose strong { color: var(--label); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .note {
  padding: 18px 20px; border-radius: 18px; background: var(--accent-soft); color: var(--label);
  border: 1px solid var(--line); margin: 20px 0;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--label-2); min-width: 140px; }
.prose th { color: var(--label); font-weight: 700; }
.ph { background: var(--olive-soft); color: var(--olive); padding: 1px 6px; border-radius: 6px; font-weight: 700; white-space: nowrap; }

.support-grid { display: grid; gap: 16px; margin: 8px 0 32px; }
@media (min-width: 760px) { .support-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Анимации ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

.rise { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0s); }

.gradient-text {
  background: linear-gradient(90deg, var(--accent), #E9A660, var(--olive), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
  animation: shift 9s ease-in-out infinite;
}

@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes wave { 0%, 100% { height: 22%; } 50% { height: 100%; } }
@keyframes shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .phone { transform: none; }
}
