/* Лендинг для гостей: парящее меню, первый экран, превью продукта, бенто возможностей, вопросы. */

.landing {
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: clip;
  padding-block: 16px 32px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- Меню ---------- */

.lp-nav {
  position: sticky;
  top: max(12px, env(safe-area-inset-top, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 22px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s, background 0.3s;
  animation: lp-drop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.lp-nav.scrolled { background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.lp-nav .logo { font-size: 26px; }
.lp-links { display: flex; gap: 4px; margin: 0 auto; }
.lp-links a { position: relative; padding: 8px 14px; border-radius: 99px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.2s, background 0.2s; }
.lp-links a:hover { color: var(--text); background: var(--surface-3); }
.lp-actions { display: flex; gap: 8px; align-items: center; }

/* Точка логотипа слегка «подпрыгивает» при наведении */
.logo:hover .brand i { animation: lp-dot 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }

/* ---------- Первый экран ---------- */

.lp-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 88px 0 48px;
}
.lp-hero::before {
  content: "";
  position: absolute;
  inset: -40px -20% auto;
  height: 560px;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 50% 30%, var(--accent-glow), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 35%, #000 30%, transparent 80%);
  mask-image: radial-gradient(60% 70% at 50% 35%, #000 30%, transparent 80%);
  animation: lp-grid 14s linear infinite, lp-glow 6s ease-in-out infinite alternate;
}
.lp-hero .eyebrow { align-self: center; }
.lp-hero .eyebrow::before { animation: lp-blink 2s ease-in-out infinite; }
.lp-hero h1 { font-size: 76px; line-height: 0.98; letter-spacing: -0.055em; }
.lp-hero h1 .serif { color: var(--accent); font-size: 1.04em; }
.lp-hero p { max-width: 52ch; color: var(--muted); font-size: 18px; }
.lp-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--faint); font-size: 13px; }
.lp-trust span::before { content: "✓"; color: var(--accent); margin-right: 6px; }

/* Заголовок появляется по словам, остальное — следом */
.lp-word { display: inline-block; animation: lp-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.15s + var(--i) * 0.09s); }
.lp-in { animation: lp-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.1s + var(--i) * 0.08s); }

/* Блик пробегает по главной кнопке */
.lp-shine { position: relative; overflow: hidden; }
.lp-shine::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: lp-shine 3.6s ease-in-out 1.5s infinite;
}

/* ---------- Превью продукта ---------- */

.lp-preview { padding: 8px 0 24px; }
.lp-window {
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--shadow), 0 0 120px var(--accent-glow);
  overflow: hidden;
  transform-origin: 50% 0;
  transform: perspective(1400px) rotateX(14deg) scale(0.94);
  transition: transform 0.25s ease-out;
  will-change: transform;
  /* только прозрачность: transform занят наклоном из скрипта */
  animation: lp-fade 1s ease 0.6s both;
}
.lp-window-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.lp-window-bar i:nth-child(1) { background: #ff5f57; }
.lp-window-bar i:nth-child(2) { background: #febc2e; }
.lp-window-bar i:nth-child(3) { background: #28c840; }
.lp-window-bar span { margin-left: 10px; }
.lp-window-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; padding: 12px; }
.lp-art { display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 50%, var(--accent-glow), transparent 70%), var(--surface-2); }
.lp-art svg { width: 100%; max-width: 460px; height: auto; overflow: visible; animation: lp-float 6s ease-in-out infinite; }
.lp-side { display: flex; flex-direction: column; gap: 12px; }
.lp-ticks .ticks span { transform-origin: bottom; animation: lp-bar 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.lp-ticks .ticks span { animation-delay: calc(1.2s + var(--n, 0) * 0.04s); }
.lp-pulse { position: relative; }
.lp-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--warn); animation: lp-ping 1.8s ease-out infinite; }

/* ---------- Бегущая лента калькуляторов ---------- */

.lp-ticker {
  margin: 40px calc(-1 * var(--gutter-l)) 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.lp-ticker-track { display: flex; gap: 10px; width: max-content; animation: lp-marquee 60s linear infinite; }
.lp-ticker:hover .lp-ticker-track { animation-play-state: paused; }
.lp-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; font-size: 14px; }
.lp-chip b { font-weight: 600; }
.lp-chip em { font-style: normal; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

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

.lp-section { padding-top: 88px; scroll-margin-top: 90px; }
.lp-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 32px; }
.lp-head .eyebrow { align-self: center; }
.lp-head h2 { font-size: 48px; line-height: 1.04; letter-spacing: -0.045em; max-width: 18ch; }
.lp-head h2 .serif { color: var(--accent); }
.lp-head p { max-width: 54ch; }
.lp-q { display: block; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 8px; }
.lp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lp-feature { display: flex; flex-direction: column; gap: 18px; }
.lp-feature h3 { font-size: 20px; margin-bottom: 6px; }
.lp-feature .card-ico { transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.3s, color 0.3s, border-color 0.3s; }
.lp-feature:hover .card-ico { transform: rotate(-8deg) scale(1.12); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lp-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; align-items: center; }
.lp-icons > * { transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lp-feature:hover .lp-icons > * { transform: translateY(-4px); }
.lp-feature:hover .lp-icons > *:nth-child(2n) { transition-delay: 0.04s; }
.lp-feature:hover .lp-icons > *:nth-child(3n) { transition-delay: 0.08s; }
.lp-more { font: 500 13px var(--f-mono); color: var(--muted); padding: 0 6px; }
.store-logo.lp-store { width: 40px; height: 40px; }

/* Карточки: подъём и пятно света под курсором */
.lp-hover {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s;
}
.lp-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.lp-hover:hover { transform: translateY(-4px); border-color: var(--line-2); }
.lp-hover:hover::before { opacity: 1; }
.lp-hover > * { position: relative; }

/* Шаги: линия прогресса прорисовывается слева направо */
.lp-steps { position: relative; }
.lp-steps::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s;
}
.lp-steps.is-in::before { transform: scaleX(1); }
.lp-steps .step { transition: border-color 0.3s, transform 0.3s; }
.lp-steps .step:hover { border-color: var(--accent); transform: translateY(-3px); }

.lp-faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; margin: 0 auto; }
.lp-faq details { padding: 20px 24px; border-radius: var(--r); transition: border-color 0.3s; }
.lp-faq details[open] { border-color: var(--line-2); }
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--accent); font-family: var(--f-mono); font-size: 20px; line-height: 1; transition: transform 0.3s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.lp-faq details[open] .lp-faq-body { grid-template-rows: 1fr; animation: lp-open 0.35s ease; }
.lp-faq-body > p { overflow: hidden; padding-top: 12px; }

.lp-cta { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 64px 24px; }
.lp-cta::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, 0.1);
  animation: lp-float 8s ease-in-out infinite;
  pointer-events: none;
}
.lp-cta > * { position: relative; z-index: 1; }
.lp-cta h2 { font-size: 44px; line-height: 1.05; letter-spacing: -0.045em; max-width: 18ch; }
.lp-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding: 24px 0 8px; border-top: 1px solid var(--line); }

/* Появление при прокрутке */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }
/* Когда карточка появилась (класс settled ставит скрипт), снова работает быстрый подъём при наведении */
.lp-hover.settled { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s; }
.lp-hover.settled:hover { transform: translateY(-4px); }

/* ---------- Экран «Подтвердите почту» ---------- */

.verify { min-height: calc(100vh - 48px); display: grid; place-items: center; }
.verify-card { width: min(480px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 36px 28px; animation: lp-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.verify-card .logo { font-size: 26px; margin-bottom: 6px; }
.verify-card h1 { font-size: 30px; }
.verify-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); animation: lp-float 3s ease-in-out infinite; }
.verify-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.verify-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.verify-card .link { background: none; border: none; cursor: pointer; font-size: 14px; }
.verify-card .field-error:empty { display: none; }

/* ---------- Ключевые кадры ---------- */

@keyframes lp-rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lp-fade { from { opacity: 0; filter: blur(8px); } }
@keyframes lp-drop { from { opacity: 0; transform: translateY(-20px); } }
@keyframes lp-grid { to { background-position: 0 0, 0 40px, 40px 0; } }
@keyframes lp-glow { from { opacity: 0.75; } to { opacity: 1; } }
@keyframes lp-blink { 50% { opacity: 0.3; } }
@keyframes lp-shine { 0% { left: -40%; } 40%, 100% { left: 130%; } }
@keyframes lp-float { 50% { transform: translateY(-10px); } }
@keyframes lp-bar { from { transform: scaleY(0.1); opacity: 0.3; } }
@keyframes lp-ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@keyframes lp-marquee { to { transform: translateX(-50%); } }
@keyframes lp-dot { 40% { transform: translateY(-0.95em); } }
@keyframes lp-open { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  .lp-window { transform: none; }
}

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

@media (max-width: 1000px) {
  .lp-links { display: none; }
  .lp-actions { margin-left: auto; }
  .lp-window-body { grid-template-columns: 1fr; }
  .lp-grid3, .lp-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-hero h1 { font-size: 58px; }
  .lp-head h2 { font-size: 38px; }
}

@media (max-width: 760px) {
  .lp-nav { padding-left: 16px; }
  .lp-nav .logo { font-size: 22px; }
  .lp-actions .pill-btn { display: none; }
  .lp-hero { padding: 56px 0 32px; }
  .lp-hero h1 { font-size: 42px; }
  .lp-hero p { font-size: 16px; }
  .lp-section { padding-top: 64px; }
  .lp-head h2, .lp-cta h2 { font-size: 32px; }
  .lp-grid3, .lp-grid4 { grid-template-columns: 1fr; }
  .lp-cta { padding: 40px 18px; }
  .lp-steps::before { display: none; }
}
