/* ==========================================================================
   RemoteVibe · «Возможности» (/features)
   Loaded after how.css: reuses its hero, orbs, phone and section primitives.
   Everything new is scoped under .ft. Effects are progressive — without JS
   the explorer shows the first screen and every list stays readable.
   ========================================================================== */

.ft {
  --ft-a: #12b8a6;
  --ft-b: #0ea5e9;
  --ft-c: #8b5cf6;
}

html[data-theme="dark"] .ft {
  --ft-a: #3ee6cf;
  --ft-b: #38bdf8;
  --ft-c: #a78bfa;
}

.ft ul { margin: 0; padding: 0; list-style: none; }

.ft-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  color: var(--lg-on-accent);
  background: linear-gradient(135deg, var(--ft-a), var(--ft-b));
}

.ft-tick .hw-ic { stroke-width: 3; }

/* ---------- Hero ---------- */
.ft-hero { padding-bottom: 8px; }

/* ---------- Marquee ---------- */
.ft-marquee {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.ft-mq-row { overflow: hidden; }

.ft-mq-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: ft-marquee 46s linear infinite;
}

.ft-mq-rev .ft-mq-track {
  animation-direction: reverse;
  animation-duration: 54s;
}

.ft-marquee:hover .ft-mq-track { animation-play-state: paused; }

@keyframes ft-marquee {
  to { transform: translateX(calc(-50% - 6px)); }
}

.ft-mq-chip {
  flex: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.ft-mq-chip:nth-child(3n + 1) { color: var(--lg-accent-ink); }

/* ---------- Numbers ---------- */
.ft-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 72px;
}

.ft-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
  border-radius: 28px;
}

.ft-num {
  font-size: clamp(2.6rem, 4.6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--ft-a), var(--ft-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ft-stat span { color: var(--lg-muted); font-size: 15px; line-height: 1.35; }

/* ---------- Platforms: cards with a rotating aura ---------- */
@property --ft-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.ft-os {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.ft-os-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 230px;
  padding: 30px;
  border-radius: 32px;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  transition: transform 500ms var(--hw-ease);
}

.ft-os-card:hover { transform: translateY(-6px); }

.ft-os-ring {
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--ft-angle), transparent 0 62%, var(--ft-a) 74%, var(--ft-b) 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ft-spin 6s linear infinite;
  opacity: 0.85;
}

.ft-os-card:nth-child(2) .ft-os-ring { animation-delay: -1.5s; }
.ft-os-card:nth-child(3) .ft-os-ring { animation-delay: -3s; }
.ft-os-card:nth-child(4) .ft-os-ring { animation-delay: -4.5s; }

@keyframes ft-spin { to { --ft-angle: 360deg; } }

.ft-os-ic {
  width: 64px;
  height: 64px;
  margin-bottom: auto;
  padding: 14px;
  border-radius: 20px;
  color: var(--lg-accent-ink);
  background: color-mix(in srgb, var(--lg-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lg-accent) 24%, transparent);
}

.ft-os-card b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.ft-os-card small { color: var(--lg-muted); font-size: 15px; font-weight: 600; }

/* ---------- Explorer ---------- */
.ft-ex {
  --ft-cycle: 6500ms;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "tabs stage" "caps stage";
  gap: 18px 48px;
  margin-top: 56px;
  padding: 36px;
  border-radius: 44px;
}

.ft-ex-tabs { grid-area: tabs; display: flex; flex-direction: column; gap: 8px; }

.ft-ex-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 300ms ease;
}

.ft-ex-tab:hover { background: var(--lg-soft); }
.ft-ex-tab:focus-visible { outline: 2px solid var(--lg-accent); outline-offset: 2px; }

.ft-ex-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--lg-accent) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lg-accent) 26%, transparent);
}

.ft-ex-tab .hw-t-ic { flex: none; width: 46px; height: 46px; padding: 11px; border-radius: 14px; }
.ft-ex-tab-t { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.ft-ex-tab-t b { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }

.ft-ex-tab-body {
  max-height: 0;
  overflow: hidden;
  color: var(--lg-muted);
  font-size: 15.5px;
  line-height: 1.5;
  opacity: 0;
  transition: max-height 500ms var(--hw-ease), opacity 450ms ease;
}

.ft-ex-tab[aria-selected="true"] .ft-ex-tab-body { max-height: 140px; opacity: 1; }

.ft-ex-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ft-a), var(--ft-b));
  transform: scaleX(0);
  transform-origin: left;
}

.ft-ex.is-auto .ft-ex-tab[aria-selected="true"] .ft-ex-progress {
  animation: ft-progress var(--ft-cycle) linear forwards;
}

@keyframes ft-progress { to { transform: scaleX(1); } }

.ft-ex-caps { grid-area: caps; }
.ft-ex-cap { display: none; }
.ft-ex-cap ul { display: grid; gap: 12px; padding: 8px 18px 0; }
.ft-ex-cap li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }

.ft-ex[data-show="chat"] [data-show-cap="chat"],
.ft-ex[data-show="dashboard"] [data-show-cap="dashboard"],
.ft-ex[data-show="review"] [data-show-cap="review"],
.ft-ex[data-show="files"] [data-show-cap="files"],
.ft-ex[data-show="terminal"] [data-show-cap="terminal"],
.ft-ex[data-show="secure"] [data-show-cap="secure"] {
  display: block;
  animation: ft-in 600ms var(--hw-ease) both;
}

@keyframes ft-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.ft-ex-stage {
  grid-area: stage;
  position: relative;
  display: grid;
  place-items: center;
}

.ft-ex-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ft-a), var(--ft-b), var(--ft-c), var(--ft-a));
  filter: blur(70px);
  opacity: 0.38;
  animation: ft-rotate 14s linear infinite;
}

@keyframes ft-rotate { to { transform: rotate(360deg); } }

/* Phone: a device frame around real screenshots of the RemoteVibe app
   (apps/mobile/demo/capture.mjs). The screenshot follows the site theme. */
.ft-phone {
  position: relative;
  width: 304px;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(160deg, #2b3540, #0b1117);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.22);
  animation: hw-bob 7s ease-in-out infinite;
}

html[data-theme="light"] .ft-phone { box-shadow: 0 40px 80px rgba(18, 60, 84, 0.28), inset 0 0 0 1.5px rgba(255, 255, 255, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.3); }

.ft-screen {
  position: relative;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 44px;
  background: #0b1a26;
  isolation: isolate;
}

html[data-theme="light"] .ft-screen { background: #cfe6ee; }

.ft-scr {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(26px) scale(0.96);
  filter: blur(8px);
  transition: opacity 550ms var(--hw-ease), transform 700ms var(--hw-ease), filter 550ms ease, visibility 0s 700ms;
}

.ft-ex[data-show="chat"] [data-scr="chat"],
.ft-ex[data-show="dashboard"] [data-scr="dashboard"],
.ft-ex[data-show="review"] [data-scr="review"],
.ft-ex[data-show="files"] [data-scr="files"],
.ft-ex[data-show="terminal"] [data-scr="terminal"],
.ft-ex[data-show="secure"] [data-scr="secure"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition-delay: 0s;
}

.ft-shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
html[data-theme="dark"] .ft-shot-light,
html:not([data-theme="dark"]) .ft-shot-dark { display: none; }

/* The active screen drifts a touch, like a hand holding the phone. */
.ft-ex [data-scr].is-on .ft-shot { animation: ft-drift 9s ease-in-out infinite alternate; }

@keyframes ft-drift {
  from { transform: scale(1); }
  to { transform: scale(1.035) translateY(-1.2%); }
}

/* A glare sweeps across the glass on every switch. */
.ft-glare {
  position: absolute;
  inset: -20% -60%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-60%);
}

.ft-ex.is-switch .ft-glare { animation: ft-glare 1.1s var(--hw-ease) both; }

@keyframes ft-glare { to { transform: translateX(60%); } }

/* ---------- Everything, grouped: spotlight cards ---------- */
.ft-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.ft-jump a {
  padding: 10px 16px;
  border-radius: 999px;
  color: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  background: var(--lg-soft);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
  transition: background 250ms ease, color 250ms ease;
}

.ft-jump a:hover { color: var(--lg-accent-ink); background: color-mix(in srgb, var(--lg-accent) 12%, transparent); }

.ft-groups {
  columns: 2 460px;
  column-gap: 20px;
  margin-top: 40px;
}

.ft-group {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  margin-bottom: 20px;
  padding: 32px;
  overflow: hidden;
  border-radius: 34px;
  break-inside: avoid;
  scroll-margin-top: 110px;
}

.ft-group::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--lg-accent) 16%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 400ms ease;
}

.ft-group:hover::before { opacity: 1; }
.ft-group > * { position: relative; z-index: 1; }

.ft-group header { display: flex; gap: 16px; align-items: flex-start; }
.ft-group header .hw-t-ic { flex: none; }
.ft-group h3 { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.025em; }
.ft-group header p { margin-top: 4px; color: var(--lg-muted); font-size: 16px; }

.ft-group ul { display: grid; gap: 12px; }
.ft-group li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.45; }
.ft-group li .ft-tick { margin-top: 1px; }

.ft-soon {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lg-warn);
  background: color-mix(in srgb, var(--lg-warn) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lg-warn) 30%, transparent);
}

.ft-group.is-soon .ft-tick { background: color-mix(in srgb, var(--lg-warn) 70%, var(--ft-a)); }

.ft-soon-note { margin-top: 6px !important; color: var(--lg-faint); font-size: 14px; }

/* ---------- Use cases: snap carousel ---------- */
.ft-cases-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.ft-cases-nav { display: flex; gap: 10px; }
.ft-cases-nav .hw-ic { width: 20px; height: 20px; }

.ft-cases {
  --ft-pad: max(24px, calc((100vw - 1180px) / 2));
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 360px);
  gap: 20px;
  margin: 48px 0 0;
  padding: 10px var(--ft-pad) 30px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--ft-pad);
  scrollbar-width: none;
}

.ft-cases::-webkit-scrollbar { display: none; }

.ft-case {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  padding: 30px;
  overflow: hidden;
  border-radius: 34px;
  scroll-snap-align: start;
  transition: transform 500ms var(--hw-ease);
}

.ft-case:hover { transform: translateY(-6px); }

.ft-case-top { display: flex; align-items: center; gap: 12px; }

.ft-when {
  margin-top: 6px;
  color: var(--lg-accent-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ft-case h3 { margin-top: -6px; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
.ft-case p { color: var(--lg-muted); font-size: 16px; line-height: 1.55; }

.ft-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.ft-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-accent-ink);
  background: color-mix(in srgb, var(--lg-accent) 11%, transparent);
}

.ft-case-n {
  margin-left: auto;
  font-size: 64px;
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--lg-accent) 34%, transparent);
}

/* ---------- Scroll-driven polish ---------- */
@supports (animation-timeline: view()) {
  .ft-ex {
    animation: hw-zoom linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ft-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-os { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .ft-ex {
    grid-template-columns: 1fr;
    grid-template-areas: "tabs" "stage" "caps";
    padding: 20px;
    border-radius: 34px;
  }

  .ft-ex-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .ft-ex-tabs::-webkit-scrollbar { display: none; }
  .ft-ex-tab { flex: none; width: auto; align-items: center; padding: 10px 14px; }
  .ft-ex-tab .hw-t-ic { width: 36px; height: 36px; padding: 8px; border-radius: 12px; }
  .ft-ex-tab-t b { font-size: 15px; white-space: nowrap; }
  .ft-ex-tab-body { display: none; }
  .ft-ex-progress { left: 14px; right: 14px; }
  .ft-ex-cap ul { padding: 4px 4px 0; }
  .ft-cases-nav { display: none; }
}

@media (max-width: 720px) {
  .ft-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
  .ft-stat { padding: 20px; border-radius: 24px; }
  .ft-stat:last-child { grid-column: span 2; }
  .ft-os { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ft-os-card { min-height: 180px; padding: 20px; border-radius: 26px; }
  .ft-os-ic { width: 50px; height: 50px; padding: 11px; border-radius: 16px; }
  .ft-os-card b { font-size: 21px; }
  .ft-os-card small { font-size: 13px; }
  .ft-phone { width: 284px; }
  .ft-group { padding: 24px; border-radius: 28px; }
  .ft-group h3 { font-size: 22px; }
  .ft-group li { font-size: 15px; }
  .ft-cases { grid-auto-columns: 82vw; padding-inline: 16px; scroll-padding-inline: 16px; }
  .ft-mq-chip { padding: 10px 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-scr { transition: none; filter: none; transform: none; }
  .ft-glare { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .ft-cases { cursor: grab; }
  .ft-cases.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
}
