/* Файл: намуди хос ва interaction-ҳои саҳифаҳои асосии муаррифӣ. */

/* Ибораи калидии hero-ро бо тобиши ороми брендӣ нишон медиҳад. */
.hero-key-phrase {
  color: var(--blue);
  background: linear-gradient(100deg, var(--blue), var(--teal), var(--blue));
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pages-key-phrase 7s ease-in-out infinite;
}

@keyframes pages-key-phrase {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Ба ҳар нишонаи имконият ҳаракати хурди мувофиқ медиҳад. */
@media (hover: hover) and (pointer: fine) {
  .hero + .section .card-link:nth-child(1):hover .icon { animation: pages-pin-bounce .55s ease; }
  .hero + .section .card-link:nth-child(2):hover .icon { animation: pages-grid-pulse .55s ease; }
  .hero + .section .card-link:nth-child(3):hover .icon { animation: pages-lock-click .42s ease; }
  .hero + .section .card-link:nth-child(4):hover .icon { animation: pages-clock-tick .55s ease; }
  .hero + .section .card-link:nth-child(5):hover .icon { animation: pages-chat-nod .5s ease; }
  .hero + .section .card-link:nth-child(6):hover .icon { animation: pages-lock-click .42s ease; }
}

/* Дар мавзӯи торик дурахши screenshot-ҳоро кам мекунад. */
:root[data-theme="dark"] .screen img {
  filter: brightness(.86) contrast(1.06);
}

/* Маълумоти ёрирасони hero-ро бо тартиб нишон медиҳад. */
.js-motion .hero-meta span { animation: pages-meta-in .4s ease both; }
.js-motion .hero-meta span:nth-child(2) { animation-delay: .1s; }
.js-motion .hero-meta span:nth-child(3) { animation-delay: .2s; }
@keyframes pages-meta-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Ҷадвалҳоро дар телефон хонданбоб ва сатрҳоро марҳилавӣ мекунад. */
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.table-scroll .meta-table { min-width: 420px; }
.js-motion .home-rules-card .meta-table.is-staged tr { opacity: 0; transform: translateY(8px); }
.js-motion .home-rules-card .meta-table.is-visible tr {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease, transform .35s ease;
}
.js-motion .home-rules-card .meta-table.is-visible tr:nth-child(2) { transition-delay: .08s; }
.js-motion .home-rules-card .meta-table.is-visible tr:nth-child(3) { transition-delay: .16s; }
.js-motion .home-rules-card .meta-table.is-visible tr:nth-child(4) { transition-delay: .24s; }

/* Кортҳои баррасиҳоро ҳамчун иқтибос бо footer-и ягона нишон медиҳад. */
.review-grid { align-items: stretch; }
.review-card { display: flex; min-height: 190px; flex-direction: column; box-shadow: var(--shadow); }
.review-card blockquote { position: relative; padding-top: 20px; }
.review-card blockquote::before {
  content: "“";
  position: absolute;
  top: -14px;
  color: var(--blue);
  font: 700 2.5rem/1 Georgia, serif;
}
.review-card figcaption { margin-top: auto !important; padding-top: 22px; border-top: 1px solid var(--line); }

/* Ба даъвати ниҳоӣ ҳаракати ороми бренд медиҳад. */
.home-cta {
  background: linear-gradient(115deg, var(--cta-bg), #163d73, #0d655f, var(--cta-bg));
  background-size: 300% 300%;
  animation: pages-cta-drift 18s ease-in-out infinite;
}
@keyframes pages-cta-drift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Хати timeline-ро мувофиқи пешрафти хондан пур мекунад. */
.how-timeline { position: relative; --timeline-progress: 0; }
.how-timeline::before,
.how-timeline::after {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 48px;
  left: 19px;
  width: 2px;
  background: var(--line);
}
.how-timeline::after {
  background: var(--teal);
  transform: scaleY(var(--timeline-progress));
  transform-origin: top;
}
.how-timeline .step { position: relative; z-index: 1; }
.js-motion .how-timeline .step.is-staged::before { opacity: .5; transform: scale(.72); }
.js-motion .how-timeline .step.is-visible::before {
  opacity: 1;
  transform: scale(1);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1.25);
}

/* Фосилаи марҳилаҳо ва тугмаҳоро дар 360 px нигоҳ медорад. */
@media (max-width: 400px) {
  .how-timeline .step { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 24px 0; }
  .how-timeline::before,
  .how-timeline::after { left: 19px; }
  .how-timeline + .btn-row .btn,
  .how-timeline ~ .btn-row .btn { width: 100%; }
  .page-hero br { display: none; }
}

/* Ритми амудии ягонаи саҳифаҳои муаррифиро танзим мекунад. */
@media (max-width: 640px) {
  .hero,
  .page-hero { padding-block: 44px; }
  .hero ~ .section,
  .page-hero ~ .section,
  .feature-chip-bar ~ .section { padding-block: 56px; }
  .hero ~ .section-sm { padding-block: 44px; }
  .section-head { margin-bottom: 32px; }
  .split { gap: 36px; }
}

/* Пайванди саҳифаи навбатиро ҳамчун идомаи равшан нишон медиҳад. */
.next-page { border-top: 1px solid var(--line); background: var(--soft); }
.next-page a {
  display: flex;
  min-height: 96px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px var(--gutter);
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--ink);
}
.next-page a::after { content: "→"; color: var(--blue); font-size: 1.5rem; transition: transform .2s ease; }
.next-page span { color: var(--muted); font-size: .875rem; }
.next-page a:hover::after { transform: translateX(4px); }

/* Идомаи уфуқии ҷадвали васеъро дар телефони танг ишора мекунад. */
@media (max-width: 640px) {
  .table-scroll-hint { border-radius: 8px; box-shadow: inset -16px 0 14px -16px var(--muted); }
}

/* Ба тасвири QR ва кортҳои амал чуқурии сабук медиҳад. */
.qr-card img,
.cta img { transition: transform .3s ease; }
@media (hover: hover) and (pointer: fine) {
  .qr-card:hover img,
  .cta:hover img { transform: scale(1.025); }
}

/* Пайвандҳои имкониятҳоро барои touch қулай ва target-ҳоро рост мекунад. */
.feature-chips .tag { min-height: 44px; padding-inline: 16px; }
.feature-chips ~ * { scroll-margin-top: 120px; }
#apps, #location, #chat, #protection, #setup { scroll-margin-top: 120px !important; }

/* Паймоиши имкониятҳоро часпонда, ҳолати scroll spy-ро нишон медиҳад. */
.feature-chip-bar {
  position: sticky;
  top: 64px;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}
.feature-chips { flex-wrap: nowrap; gap: 8px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.feature-chips::-webkit-scrollbar { display: none; }
.feature-chips .tag[aria-current="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }

/* Ба бахшҳои ивазшавандаи имкониятҳо ритми ягона медиҳад. */
.feature-chip-bar ~ .section[id] .split { gap: clamp(40px, 7vw, 84px); }
.feature-chip-bar ~ .section[id] .split > div:first-child { max-width: 620px; }
.feature-chip-bar ~ .section[id] .screen {
  min-height: 280px;
  padding: clamp(20px, 4vw, 42px);
  border-radius: calc(var(--radius-lg) + 6px);
}
.feature-chip-bar ~ .section[id] .card h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -.022em; }
@media (max-width: 960px) {
  .feature-chip-bar ~ .section[id] .split.reverse > :first-child { order: 0; }
  .feature-chip-bar ~ .section[id] .screen { min-height: 220px; }
}

/* Аломатҳои checklist-ро бо таъхири кӯтоҳ пайдарпай нишон медиҳад. */
.js-motion .feature-list.is-staged li::before { opacity: 0; transform: scale(.55); }
.js-motion .feature-list.is-visible li::before {
  opacity: 1;
  transform: scale(1);
  transition: opacity .28s ease, transform .35s cubic-bezier(.2, .8, .2, 1.2);
}
.js-motion .feature-list.is-visible li:nth-child(2n)::before { transition-delay: .06s; }
.js-motion .feature-list.is-visible li:nth-child(3n)::before { transition-delay: .12s; }

/* Қулф ва сипари амниятро бо ҳаракати ором нишон медиҳад. */
.security-grid .card:nth-child(-n+2) .icon { animation: pages-security-icon 3.8s ease-in-out infinite; }
.security-grid .card:nth-child(2) .icon { animation-delay: -1.9s; }
@keyframes pages-security-icon {
  0%, 75%, 100% { transform: translateY(0) scale(1); }
  82% { transform: translateY(-3px) scale(1.04); }
  90% { transform: translateY(0) scale(1); }
}

/* Кортҳои амниятро ҳангоми пайдоиш пайдарпай равшан мекунад. */
.js-motion .security-grid.is-staged .card { background: var(--surface); }
.js-motion .security-grid.is-visible .card { animation: pages-card-highlight .8s ease both; }
.js-motion .security-grid.is-visible .card:nth-child(2) { animation-delay: .08s; }
.js-motion .security-grid.is-visible .card:nth-child(3) { animation-delay: .16s; }
.js-motion .security-grid.is-visible .card:nth-child(4) { animation-delay: .24s; }
.js-motion .security-grid.is-visible .card:nth-child(5) { animation-delay: .32s; }
.js-motion .security-grid.is-visible .card:nth-child(6) { animation-delay: .4s; }
@keyframes pages-card-highlight {
  0%, 100% { border-color: var(--line); box-shadow: none; }
  45% { border-color: var(--teal); box-shadow: 0 10px 28px var(--teal-soft); }
}

/* Ба кортҳои амният hover-и ором медиҳад, бе вонамуд кардани пайванд. */
.security-grid .card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.security-overview ~ .section { content-visibility: auto; contain-intrinsic-size: auto 560px; }
@media (hover: hover) and (pointer: fine) {
  .security-grid .card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
}

@keyframes pages-pin-bounce { 50% { transform: translateY(-5px); } }
@keyframes pages-grid-pulse { 50% { transform: scale(1.08); } }
@keyframes pages-lock-click { 45% { transform: translateY(2px) scale(.96); } }
@keyframes pages-clock-tick { 50% { transform: rotate(9deg); } }
@keyframes pages-chat-nod { 40% { transform: rotate(-5deg); } 70% { transform: rotate(3deg); } }

/* Нури аз паси pointer равандаро бе бастани interaction мекашад. */
@media (hover: hover) and (pointer: fine) {
  .hero + .section .card-link.has-spotlight { position: relative; overflow: hidden; }
  .hero + .section .card-link.has-spotlight::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(220px circle at var(--spot-x, 50%) var(--spot-y, 50%), var(--blue-soft), transparent 72%);
    transition: opacity .2s ease;
  }
  .hero + .section .card-link.has-spotlight:hover::after { opacity: .72; }
  .hero + .section .card-link.has-spotlight > * { position: relative; z-index: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-key-phrase {
    animation: none;
    background-position: 50% 50%;
  }
  .hero + .section .card-link .icon { animation: none !important; transform: none !important; }
  .js-motion .home-rules-card .meta-table.is-staged tr { opacity: 1; transform: none; transition: none; }
  .home-cta { animation: none; background-position: 50% 50%; }
  .how-timeline { --timeline-progress: 1 !important; }
  .js-motion .how-timeline .step.is-staged::before { opacity: 1; transform: none; transition: none; }
  .js-motion .feature-list.is-staged li::before { opacity: 1; transform: none; transition: none; }
  .security-grid .card:nth-child(-n+2) .icon { animation: none; transform: none; }
  .js-motion .security-grid.is-visible .card { animation: none; }
  .security-grid .card { transform: none !important; transition: none; }
  .qr-card img,
  .cta img { transform: none !important; transition: none; }
  .js-motion .hero-meta span { opacity: 1; transform: none; animation: none; }
}

/* Тасвири хурди браузер дар бахши «Филтри сайтҳо» (саҳифаи Имкониятҳо). */
.web-mock { max-width: 420px; justify-self: center; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.web-mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.web-mock-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.web-mock-bar b { margin-left: 10px; flex: 1; min-width: 0; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-mock-body { display: grid; justify-items: center; gap: 8px; padding: 34px 20px 28px; text-align: center; }
.web-mock-shield { width: 64px; height: 64px; border-radius: 20px; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312b5a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / 34px no-repeat; }
.web-mock-body strong { font-size: 18px; color: var(--ink); }
.web-mock-body small { color: var(--muted); font-size: 14px; }
.web-mock-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 16px 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.web-mock-q { color: var(--ink-2); }
.web-mock-safe { padding: 3px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 12px; }
