/* Мобильная главная. Общие стили кабинета и страниц загрузки не затрагиваем. */
.mobile-reading-progress,
.mobile-explore,
.share-scroll-hint,
.share-caption,
.share-story-progress { display: none; }

@media (max-width: 720px) {
  .home .wrap { width: min(520px, 100% - 36px); }
  .home .top .wrap { height: 62px; gap: 12px; }
  .home .brand { font-size: 16px; gap: 8px; }
  .home .top .button { height: 36px; padding-inline: 15px; font-size: 12px; border-radius: 99px; }
  .home .top.scrolled { background: rgba(7, 8, 11, .94); }
  .mobile-reading-progress { display: block; position: fixed; inset: 61px 0 auto; height: 1px; z-index: 51; pointer-events: none; }
  .mobile-reading-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
  .home section[id] { scroll-margin-top: 82px; }
  .home .hero { padding: 36px 0 0; }
  .home .hero::before { top: 110px; height: 680px; background: radial-gradient(ellipse at 65% 40%, rgba(110, 168, 254, .17), transparent 65%); }
  .home .eyebrow { max-width: 100%; font: 400 11px/1.5 var(--sans); letter-spacing: .01em; margin-bottom: 18px; }
  .home .eyebrow::before { width: 5px; height: 5px; flex: none; box-shadow: 0 0 0 4px rgba(74, 222, 128, .08); }
  .home h1 { max-width: 13ch; font-size: clamp(36px, 10.5vw, 52px); line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
  .home .hero .lede { margin-top: 18px; max-width: 30ch; font-size: 16px; line-height: 1.6; color: #a7aebd; }
  .home .hero .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 26px; }
  .home .hero .actions .button { min-width: 0; padding: 0 10px; height: 48px; font-size: 13px; border-radius: 12px; }
  .home .hero .actions .primary { box-shadow: 0 4px 22px rgba(220, 231, 255, .08); }
  .home .requirements { margin-top: 12px; font-size: 10.5px; color: #828b9c; }
  .home .stage-block { position: relative; margin-top: 32px; }
  .home .phone-stage { margin: 0; perspective: 1000px; }
  .home .phone-call { aspect-ratio: 16 / 9; border-radius: 18px; border-color: var(--line-strong); }
  .home .phone-call img { object-position: 50% 35%; transform: scale(1.03) translateY(calc(var(--hero-shift, 0px) * -.35)); }
  .home .phone-call::after { height: 42%; background: linear-gradient(transparent, rgba(7, 8, 11, .7)); }
  .home .phone-call .sharing { top: 10px; bottom: auto; left: 10px; font: 400 9px/1.4 var(--sans); }
  .home .phone-stage .app-card { margin: -26px 10px 0; border-radius: 15px; border-color: rgba(110, 168, 254, .3); background: linear-gradient(155deg, #171d29, #0d1017 70%); box-shadow: 0 18px 40px -16px #000, 0 1px 0 rgba(255, 255, 255, .08) inset; }
  .home .phone-stage .app-q { color: #a2aabc; padding: 12px 16px 0; font-size: 11px; }
  .home .phone-stage .app-body { padding: 12px 16px 16px; }
  .home .phone-stage .app-points { gap: 8px; }
  .home .phone-stage .app-points li { font-size: 12.5px; line-height: 1.5; }
  .home .phone-note { color: #99a8c0; font: 400 11px/1.5 var(--sans); margin-top: 16px; }
  .home .works-with { margin: 26px auto 0; max-width: 31ch; font: 400 11px/1.9 var(--sans); color: #818b9e; }
  .home .works-with span { display: block; color: #b5bece; margin-bottom: 4px; }
  .mobile-explore { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; text-decoration: none; }
  .mobile-explore svg { width: 20px; height: 20px; color: var(--accent); }

  /* Ритм разделов и нумерованная последовательность вместо длинного полотна. */
  .home .section { padding-top: 78px; }
  .home .kicker { font: 500 10px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 14px; }
  .home h2 { max-width: 18ch; font-size: clamp(30px, 8.4vw, 40px); line-height: 1.13; letter-spacing: -.035em; text-wrap: balance; }
  .home .section-lede { font-size: 15px; line-height: 1.6; }
  .home .steps { position: relative; grid-template-columns: 1fr; gap: 18px; margin-top: 30px; padding-left: 26px; border: 0; counter-reset: step; }
  .home .steps::before,
  .home .steps::after { content: ''; position: absolute; left: 6px; top: 20px; bottom: 24px; width: 1px; background: var(--line-strong); transform-origin: top; }
  .home .steps::after { background: var(--accent); transform: scaleY(var(--steps-progress, 1)); }
  .home .step,
  .home .step + .step { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(150deg, #11151c, #0b0d12); counter-increment: step; }
  .home .step::before { content: counter(step, decimal-leading-zero); position: absolute; left: -31px; top: 20px; width: 22px; padding-block: 4px; text-align: center; background: var(--bg); color: var(--accent); font: 400 10px/1.4 var(--mono); }
  .home .step .visual { height: 64px; border: 0; padding: 0; background: transparent; border-radius: 0; }
  .home .step h3 { margin: 16px 0 7px; font-size: 17px; }
  .home .step p { font-size: 13px; line-height: 1.65; }
  .home .step .apps { font-size: 10px; }
  .home .decisions { font-size: 11px; gap: 12px; }
  .home .decision b { font-size: 9px; padding: 4px 6px; }
  .home .mini-hint { max-width: 230px; }

  /* Одна и та же задача: неподвижный редактор, отдельный слой подсказки. */
  .home .split-block { margin-top: 26px; }
  .home .phone-split { display: block; margin-top: 0; }
  .share-sticky { position: relative; }
  .share-scroll-hint { display: none; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; color: #99a8c0; font-size: 11px; line-height: 20px; }
  .share-scroll-hint svg { width: 16px; height: 16px; }
  .home .tabs2 { padding: 4px; border-radius: 13px; background: #0e121a; }
  .home .tabs2 button { min-height: 40px; padding: 8px 6px; font-size: 12px; border-radius: 9px; }
  .home .tabs2 button.on { background: #222c3e; color: #dce9ff; box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
  .home .phone-screen { height: clamp(400px, 55svh, 470px); margin-top: 12px; isolation: isolate; }
  .home .phone-ide { position: absolute; inset: 0; border-radius: 18px; border-color: var(--line-strong); background: radial-gradient(ellipse at 80% 0%, rgba(110, 168, 254, .06), transparent 65%), #0c0f15; }
  .home .phone-ide .share-bar { height: 38px; padding-inline: 14px; font-size: 10px; }
  .home .phone-ide .share-bar b { color: #8cdda5; background: rgba(74, 222, 128, .08); font: 400 9px/1.5 var(--sans); }
  .phone-task { padding: 20px 16px 18px; border-bottom: 1px solid var(--line); }
  .phone-task h4 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.03em; }
  .phone-task .level { float: right; margin-top: 1px; padding: 4px 8px; font: 400 10px/1.5 var(--sans); }
  .phone-task p { max-width: 27ch; margin: 0 0 12px; color: #9da7ba; font-size: 12px; line-height: 1.55; }
  .phone-task code { color: #c7d5ed; font: 400 10.5px/1.5 var(--mono); }
  .home .phone-ide pre { padding: 18px 12px; font-size: 10.5px; line-height: 2; }
  .phone-editor-foot { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--line); color: #68778e; font: 400 10px/1.5 var(--mono); }
  .home .phone-mine,
  .home .phone-split[data-view='theirs'] .phone-mine { position: absolute; z-index: 2; inset: clamp(76px, 12svh, 108px) 10px auto; height: auto; padding: 0; margin: 0; overflow: visible; }
  .home .phone-mine { opacity: 1; transform: none; }
  .home .phone-split[data-view='theirs'] .phone-mine { opacity: 0; transform: translateY(20px) scale(.97); pointer-events: none; }
  .home .phone-mine .app-card { border-radius: 14px; border-color: #46628c; background: linear-gradient(135deg, #1b2434, #101722 65%); box-shadow: 0 14px 36px -8px #000, 0 0 32px rgba(110, 168, 254, .08); }
  .home .phone-mine .app-bar { padding: 7px 10px; font-size: 10px; }
  .home .phone-mine .app-seg span { padding: 4px 7px; }
  .home .phone-mine .app-q { padding: 10px 12px 0; font-size: 10px; color: #a4b9dc; }
  .home .phone-mine .app-body { padding: 8px 12px 12px; }
  .home .phone-mine .app-lede { font-size: 12px; line-height: 1.5; }
  .home .phone-mine .app-code { padding: 10px; font-size: 10.5px; line-height: 1.65; margin-top: 10px; background: #0b111b; border-color: rgba(156, 185, 233, .12); }
  .home .phone-mine .app-note { margin-top: 10px; font-size: 11px; line-height: 1.55; color: #a6b2c6; }
  .share-caption { display: grid; margin-top: 16px; min-height: 42px; align-items: start; }
  .share-caption p { grid-area: 1 / 1; margin: 0; padding-left: 15px; position: relative; max-width: 34ch; font-size: 12px; line-height: 1.6; color: #a5b1c5; transition: opacity .2s; }
  .share-caption p::before { content: ''; position: absolute; top: 7px; left: 0; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
  [data-view='mine'] [data-caption='theirs'],
  [data-view='theirs'] [data-caption='mine'] { opacity: 0; visibility: hidden; }
  .share-story-progress { display: none; gap: 5px; margin-top: 10px; }
  .share-story-progress i { position: relative; flex: 1; height: 2px; background: #202a3b; overflow: hidden; border-radius: 2px; }
  .share-story-progress i::after { content: ''; display: block; height: 100%; background: var(--accent); transform: scaleX(var(--segment-progress, 0)); transform-origin: left; }
  .home .mobile-platform-note { margin: 22px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: #909bad; font-size: 11px; line-height: 1.7; background: #0c0f15; }

  /* Карточки возможностей — отдельные маленькие демонстрации. */
  .home .features { grid-template-columns: 1fr; gap: 12px; margin-top: 30px; border: 0; counter-reset: feature; }
  .home .feature,
  .home .feature:nth-child(odd),
  .home .feature:nth-child(even) { position: relative; grid-template-columns: 1fr; gap: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(ellipse at 100% 0%, rgba(110, 168, 254, .055), transparent 70%), #0e1118; counter-increment: feature; transition: opacity .65s, transform .65s cubic-bezier(.2,.8,.2,1), border-color .5s, box-shadow .5s; }
  .home .feature::before { content: counter(feature, decimal-leading-zero); position: absolute; right: 22px; top: 26px; color: #52617a; font: 400 10px/1.5 var(--mono); }
  .home .feature.is-in-view { border-color: rgba(110, 168, 254, .3); box-shadow: 0 10px 40px -30px rgba(110, 168, 254, .3); }
  .home .feature h3 { padding-right: 20px; font-size: 19px; margin-bottom: 8px; }
  .home .feature p { font-size: 13px; line-height: 1.65; max-width: 36ch; }
  .home .feature .demo-link { margin-top: 10px; min-height: 44px; font-size: 12px; color: #aacafa; }
  .home .feature .keys,
  .home .feature .segmented,
  .home .feature .file-chip,
  .home .feature .rec-demo { justify-self: start; }
  .home .feature .keys kbd { min-width: 42px; min-height: 42px; border-radius: 9px; box-shadow: 0 3px 0 #06080d; }
  .home .feature .prompter-demo { max-width: 100%; margin: 0; text-align: left; }
  .home .feature .prompter-demo b { font-size: 14px; color: #d4e3fa; }
  .home .feature .tag { color: #9eaec7; font-size: 9px; vertical-align: 2px; margin-left: 2px; }
  .home .cases { grid-template-columns: 1fr 1fr; gap: 10px; border: 0; margin-top: 30px; counter-reset: usecase; }
  .home .case,
  .home .case:nth-child(even) { padding: 20px 16px; border: 1px solid var(--line); border-radius: 16px; background: #0c0f15; counter-increment: usecase; }
  .home .case::before { content: '0' counter(usecase); display: block; color: var(--accent); font: 400 10px/1 var(--mono); margin-bottom: 25px; }
  .home .case h3 { font-size: 15px; line-height: 1.35; margin-bottom: 12px; }
  .home .case p { font-size: 11.5px; line-height: 1.65; }
  .home .faq { border: 0; display: grid; gap: 8px; margin-top: 28px; }
  .home .faq details { border: 1px solid var(--line); border-radius: 13px; background: #0c0f15; transition: border-color .2s; }
  .home .faq details[open] { border-color: rgba(110, 168, 254, .28); }
  .home .faq summary { gap: 18px; padding: 18px; font-size: 14px; line-height: 1.5; min-height: 58px; }
  .home .faq summary::after { width: 8px; height: 8px; margin-right: 2px; }
  .home .faq details p { margin: 0; padding: 0 18px 18px; font-size: 13px; line-height: 1.65; }

  .home .price-toolbar { align-items: stretch; margin-top: 26px; gap: 18px; }
  .home .price-switch { width: 100%; }
  .home .price-switch button { min-height: 42px; padding: 8px; font-size: 12px; }
  .home .price-trial { padding: 14px; border-radius: 12px; border: 1px solid rgba(110, 168, 254, .18); background: rgba(110, 168, 254, .05); font-size: 12px; }
  .home .plans { grid-template-columns: 1fr; gap: 12px; }
  .home .plan { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; padding: 22px; border-radius: 18px; text-align: left; background: #0e1118; }
  .home .plan.best { background: radial-gradient(ellipse at 90% 0%, rgba(110, 168, 254, .12), transparent 75%), #0e1118; border-color: rgba(110, 168, 254, .4); }
  .home .plan-heading { grid-column: 1 / -1; justify-content: start; min-height: 0; }
  .home .plan .plan-term { font-size: 19px; }
  .home .plan-purpose { grid-column: 1 / -1; margin: 6px 0 20px; font-size: 12px; }
  .home .plan-price { grid-column: 1 / -1; font-size: 36px; }
  .home .plan-note { grid-column: 1 / -1; justify-content: start; margin: 8px 0 16px; font-size: 11px; min-height: 0; }
  .home .plan-volume { grid-column: 1; border: 0; padding: 0; align-self: center; margin: 0; font-size: 12px; }
  .home .plan .button { grid-column: 2; width: auto; min-width: 94px; height: 44px; padding: 0 14px; font-size: 12px; }
  .home .price-terms { margin-top: 20px; }
  .home .price-terms p { padding: 0 12px; font-size: 11px; line-height: 1.6; }
  .home .price-terms strong { font-size: 12px; line-height: 1.5; }
  .home .price-foot { font-size: 11px; }
  .home .final { margin-top: 78px; padding: 66px 0 54px; background: radial-gradient(ellipse at 50% 0%, rgba(110, 168, 254, .16), transparent 70%); }
  .home .final h2 { max-width: 18ch; font-size: 34px; }
  .home .final .button { width: 100%; max-width: 320px; height: 48px; }
  .home footer { padding: 28px 0; }
  .home footer .wrap { display: block; font-size: 12px; }
  .home footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 20px; }
  .home footer a { display: flex; align-items: center; min-height: 44px; font-size: 12px; }
  .home .language-footer { padding: 0; }

  /* Без JS содержимое открыто; анимации включаются только после инициализации. */
  .home:not(.mobile-motion) .rise { opacity: 1; transform: none; }
  .home.mobile-motion .hero h1,
  .home.mobile-motion .hero .lede,
  .home.mobile-motion .hero .actions { animation: mobile-enter .8s cubic-bezier(.2,.8,.2,1) both; }
  .home.mobile-motion .hero .lede { animation-delay: .08s; }
  .home.mobile-motion .hero .actions { animation-delay: .16s; }
  .home.mobile-motion .phone-stage .app-card { transform: translateY(var(--hero-shift, 0px)); }
  .home.mobile-motion .phone-stage { animation: mobile-enter 1s .24s cubic-bezier(.2,.8,.2,1) both; }
  .home.mobile-motion .feature:not(.is-in-view) *,
  .home.mobile-motion .step:not(.is-in-view) * { animation-play-state: paused; }
  .home.mobile-motion .mini-hint i:not(:first-child) { animation-iteration-count: 1; }
  .home.mobile-motion .is-scroll-story .share-story-progress,
  .home.mobile-motion .is-scroll-story .share-scroll-hint { display: flex; }
  .home.mobile-motion .phone-split.is-scroll-story { height: calc(var(--story-sticky-height) + 110svh); }
  .home.mobile-motion .is-scroll-story .share-sticky { position: sticky; top: 78px; }
  .home.mobile-motion .is-scroll-story .phone-mine { opacity: var(--assistant-opacity, 0); transform: translateY(calc((1 - var(--assistant-opacity, 0)) * 24px)) scale(calc(.97 + var(--assistant-opacity, 0) * .03)); transition: none; }
  @keyframes mobile-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
}

@media (max-width: 360px) {
  .home .wrap { width: calc(100% - 28px); }
  .home .hero .actions .button { font-size: 12px; }
  .home .step, .home .step + .step { padding: 16px; }
  .home .feature, .home .feature:nth-child(odd), .home .feature:nth-child(even) { padding: 20px; }
  .home .phone-mine, .home .phone-split[data-view='theirs'] .phone-mine { inset-inline: 6px; }
  .home .phone-mine .app-code { font-size: 9.5px; padding: 8px; }
  .home .phone-ide pre { font-size: 9.5px; }
  .home .case, .home .case:nth-child(even) { padding: 18px 12px; }
  .home .case h3 { font-size: 14px; }
  .home .case p { font-size: 11px; }
  .home .plan { padding: 20px; }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .home .phone-call img, .home .phone-stage .app-card { transform: none; }
  .home .share-scroll-hint, .home .share-story-progress { display: none; }
  .home .phone-split { height: auto; }
  .home .share-sticky { position: relative; top: auto; }
  .home .rise { opacity: 1; transform: none; }
}
