/* Features page: layout and product illustrations only. Primitives come from the kit (components/ui.css). Prefix: ft-. */

.ft [id] { scroll-margin-top: 6.5rem; }

.ft-top { padding-bottom: 0; }

.ft-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* ---------- Chapter shortcuts ---------- */
.ft-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 4rem;
}

.ft-toc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--ui-radius-row);
  background: var(--ui-fill-soft);
  border: 1px solid var(--ui-line);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.ft-toc-item:hover {
  background: var(--ui-fill);
  border-color: var(--ui-line-strong);
}

.ft-toc-item:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 2px;
}

.ft-toc-num {
  font-family: var(--ui-display);
  font-size: 1.375rem;
  font-weight: 800;
}

.ft-toc-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ft-toc-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ft-toc-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.ft-toc-arrow {
  display: inline-flex;
  color: var(--ui-text-muted);
}

/* ---------- Chapters: copy next to an illustration ---------- */
.ft-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 4.5rem;
  align-items: center;
}

.ft-chapter-flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.ft-chapter-flip .ft-chapter-copy { order: 2; }

.ft-chapter-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ft-chapter-copy .ui-h2 { margin: 0; }

.ft-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ft-points,
.ft-specs,
.ft-usecases {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ft-points {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.ft-points li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ui-text-soft);
}

.ft-point-tile { --ui-tile: 28px; }

.ft-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ft-specs li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: 16px;
  background: var(--ui-fill-soft);
  border: 1px solid var(--ui-line);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ft-spec-tile,
.ft-keep-tile { color: var(--ui-accent-text); }

.ft-edit-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.ft-ratios {
  display: flex;
  align-items: flex-end;
  gap: 1.125rem;
}

.ft-ratio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.ft-ratio i {
  width: var(--w);
  height: var(--h);
  box-sizing: border-box;
  border: 2px solid var(--ui-line-strong);
  border-radius: 5px;
}

.ft-ratio.is-active { color: var(--ui-text-soft); }
.ft-ratio.is-active i { border-color: var(--fuchsia); }

/* ---------- Illustrations (aria-hidden mocks of the real tools) ---------- */
.ft-mock {
  --ui-card-pad: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.ft-mock i,
.ft-mock b,
.ft-mock em { font-style: normal; }

/* Trimmer */
.ft-clip-url {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 48px;
  padding: 0 0.5rem 0 1rem;
  border-radius: var(--ui-radius-field);
  background: var(--ui-surface-field);
  border: 1px solid var(--ui-line);
  color: var(--ui-text-muted);
}

.ft-clip-url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.ft-clip-player {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 12% 100%, rgba(129, 140, 248, 0.2), transparent 70%),
    radial-gradient(50% 60% at 92% 0%, rgba(217, 70, 239, 0.16), transparent 70%),
    var(--surface-hover);
}

.ft-clip-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ui-fill-3);
  color: var(--text-primary);
}

.ft-clip-time,
.ft-editor-ratio,
.ft-editor-caption,
.ft-thumb-size {
  position: absolute;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.ft-clip-time {
  left: 14px;
  bottom: 14px;
  padding: 5px 10px;
  font-size: 0.75rem;
}

.ft-strip {
  position: relative;
  padding: 6px 0;
}

.ft-strip-frames {
  display: flex;
  gap: 3px;
  height: 52px;
}

.ft-strip-frames i {
  flex: 1;
  border-radius: 6px;
  background: var(--ui-fill-2);
}

.ft-strip-frames i:nth-child(even) { background: var(--ui-fill-3); }

.ft-strip-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28%;
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  border: 2px solid var(--fuchsia);
  border-radius: 10px;
  background: rgba(217, 70, 239, 0.16);
}

.ft-strip-range b {
  width: 8px;
  height: 30px;
  margin: 0 -5px;
  border-radius: 4px;
  background: var(--pink-light);
}

.ft-strip-head {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 41%;
  width: 2px;
  border-radius: 2px;
  background: var(--text-primary);
}

.ft-clip-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.ft-clip-times b {
  font-weight: 600;
  color: var(--text-primary);
}

.ft-clip-times .ft-accent { color: var(--ui-accent-text); }

.ft-clip-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ft-clip-download { flex: 1; }

/* Editor */
.ft-editor {
  --ui-card-pad: 1rem;
  gap: 0.75rem;
}

.ft-editor-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 40px;
  padding: 0 0.25rem;
}

.ft-editor-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ft-editor-saved {
  flex: 1;
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

.ft-editor-main {
  display: flex;
  gap: 0.75rem;
  height: 320px;
}

.ft-editor-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 52px;
  flex-shrink: 0;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--ui-fill-soft);
}

.ft-editor-rail i {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 10px;
  color: var(--ui-text-muted);
}

.ft-editor-rail i.is-active {
  background: rgba(217, 70, 239, 0.18);
  color: var(--ui-accent-text);
}

.ft-editor-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--ui-surface-field);
}

.ft-editor-frame {
  position: relative;
  width: 164px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(70% 50% at 30% 40%, rgba(129, 140, 248, 0.24), transparent 70%), var(--surface-hover);
  box-shadow: 0 0 0 1px var(--ui-line);
}

.ft-editor-ratio {
  left: 10px;
  top: 10px;
  padding: 3px 8px;
  border-radius: var(--ui-radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
}

.ft-editor-sticker {
  position: absolute;
  left: 16px;
  top: 52%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--orchid);
  color: #fff;
  font-family: var(--ui-display);
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 2px var(--pink-light);
}

.ft-editor-caption {
  left: 12px;
  right: 12px;
  bottom: 18px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
}

.ft-editor-panel {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 156px;
  flex-shrink: 0;
  padding: 14px;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--ui-fill-soft);
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

.ft-editor-panel-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ft-editor-swatches {
  display: flex;
  gap: 6px;
}

.ft-editor-swatches i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.ft-editor-swatches i:nth-child(1) {
  background: #fff;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--fuchsia);
}

.ft-editor-swatches i:nth-child(2) { background: var(--pink-light); }
.ft-editor-swatches i:nth-child(3) { background: var(--warning); }
.ft-editor-swatches i:nth-child(4) { background: var(--success); }

.ft-editor-slider {
  height: 4px;
  border-radius: 4px;
  background: var(--fuchsia);
}

.ft-editor-row {
  display: flex;
  justify-content: space-between;
}

.ft-editor-row b {
  font-weight: 600;
  color: var(--text-primary);
}

.ft-editor-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--ui-fill-soft);
}

.ft-editor-ruler {
  display: flex;
  justify-content: space-between;
  padding-left: 36px;
  font-size: 0.6875rem;
  color: var(--ui-text-muted);
}

.ft-editor-tracks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ft-track {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 26px;
  color: var(--ui-text-muted);
}

.ft-track > svg {
  width: 24px;
  flex-shrink: 0;
}

.ft-track-lane {
  position: relative;
  flex: 1;
  height: 100%;
}

.ft-track-lane i {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  border-radius: 6px;
}

.ft-seg-text {
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  background: rgba(232, 121, 249, 0.28);
  border: 1px solid var(--fuchsia);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ft-seg-video {
  background: rgba(129, 140, 248, 0.28);
  border: 1px solid var(--indigo);
}

.ft-seg-audio {
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.6);
}

.ft-track-head {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: calc(36px + 38%);
  width: 2px;
  border-radius: 2px;
  background: var(--text-primary);
}

/* ---------- Keep: history, thumbnails, devices, languages ---------- */
.ft-keep-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}

.ft-keep-head .ui-lead { max-width: 420px; }

.ft-keep {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
}

.ft-keep-history {
  --ui-card-pad: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ft-keep-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ft-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ft-history-tools {
  display: flex;
  gap: 0.5rem;
}

.ft-history-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 44px;
  padding: 0 0.875rem;
  border-radius: var(--ui-radius-field);
  background: var(--ui-surface-field);
  border: 1px solid var(--ui-line);
  font-size: 0.875rem;
  color: var(--ui-text-muted);
}

.ft-history-list {
  border-radius: 16px;
  border: 1px solid var(--ui-line-soft);
  overflow: hidden;
}

.ft-history-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--ui-line-soft);
}

.ft-history-row:last-child { border-bottom: none; }

.ft-history-thumb {
  width: 64px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--ui-fill-3);
}

.ft-history-thumb-alt { background: var(--ui-fill-2); }

.ft-history-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

.ft-skel {
  display: block;
  width: 60%;
  height: 10px;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-fill-3);
}

.ft-skel-short { width: 42%; }

.ft-history-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ui-fill-2);
  color: var(--ui-text-soft);
}

.ft-keep-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ft-keep-thumb {
  --ui-card-pad: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
}

.ft-keep-thumb:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 2px;
}

.ft-thumb-preview {
  position: relative;
  display: block;
  height: 150px;
  margin-bottom: 0.25rem;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(60% 80% at 85% 0%, rgba(217, 70, 239, 0.18), transparent 70%), var(--surface-hover);
}

.ft-thumb-size {
  left: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.ft-thumb-dl {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-inverse-bg);
  color: var(--ui-inverse-text);
  font-size: 0.8125rem;
  font-weight: 700;
}

.ft-keep-pair {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ft-keep-small {
  --ui-card-pad: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.ft-keep-small-title,
.ft-usecase-title {
  margin: 0.25rem 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ---------- Pro ---------- */
.ft-pro {
  --ui-card-pad: 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 4rem;
  align-items: center;
}

.ft-pro-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.ft-pro-title { font-size: clamp(1.75rem, 2.8vw, 2.5rem); }

.ft-pro-price {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin: 0;
  color: var(--text-secondary);
}

.ft-pro-price strong {
  font-family: var(--ui-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* ---------- Use cases ---------- */
.ft-usecases {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.ft-usecase {
  --ui-card-pad: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ft-usecase-title { font-size: 1rem; }

/* ---------- Closing link bar ---------- */
.ft-end { padding-bottom: 7.5rem; }

.ft-end-card {
  --ui-card-pad: 4.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.ft-end-card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -200px;
  width: 800px;
  height: 400px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 70, 239, 0.16), transparent);
  pointer-events: none;
}

.ft-end-title {
  position: relative;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.ft-end-bar {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-top: 2.25rem;
}

/* ---------- Tablet: one column ---------- */
@media (max-width: 1100px) {
  .ft-chapter,
  .ft-chapter-flip,
  .ft-keep,
  .ft-pro {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .ft-chapter-flip .ft-chapter-copy { order: 0; }
  .ft-usecases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Phone ---------- */
@media (max-width: 768px) {
  .ft-hero-actions {
    flex-direction: column;
    margin-top: 1.75rem;
  }

  .ft-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 2rem;
  }

  .ft-toc-item {
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 16px;
  }

  .ft-toc-num { font-size: 1.0625rem; }
  .ft-toc-sub,
  .ft-toc-arrow { display: none; }

  .ft-chapter,
  .ft-chapter-flip,
  .ft-keep,
  .ft-pro { gap: 2rem; }

  .ft-points li {
    align-items: flex-start;
    font-size: 0.9375rem;
  }

  .ft-point-tile { --ui-tile: 24px; }

  .ft-specs li {
    gap: 0.625rem;
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .ft-mock { --ui-card-pad: 0.75rem; }
  .ft-strip-frames { height: 40px; }
  .ft-strip-frames i:nth-child(n + 9) { display: none; }
  .ft-strip-range b { height: 24px; }
  .ft-clip-times { font-size: 0.6875rem; }
  .ft-clip-options { flex-wrap: wrap; }
  .ft-clip-download { flex-basis: 100%; }

  .ft-editor-rail,
  .ft-editor-panel,
  .ft-editor-saved,
  .ft-editor-ruler { display: none; }

  .ft-editor-bar { justify-content: space-between; }
  .ft-editor-main { height: 260px; }
  .ft-editor-frame { width: 132px; }
  .ft-track > svg { display: none; }
  .ft-track-head { left: 42%; }

  .ft-keep-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .ft-keep-history,
  .ft-keep-thumb { --ui-card-pad: 1.25rem; }
  .ft-history-row:nth-child(3) { display: none; }
  .ft-thumb-preview { height: 120px; }

  .ft-keep-pair { grid-template-columns: minmax(0, 1fr); }

  .ft-pro { --ui-card-pad: 1.75rem 1.375rem; }
  .ft-pro-price strong { font-size: 2.5rem; }

  .ft-usecases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }

  .ft-usecase {
    --ui-card-pad: 0.875rem;
    gap: 0.625rem;
  }

  .ft-usecase-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
  }

  .ft-usecase-text { display: none; }

  .ft-end { padding-bottom: 4.5rem; }
  .ft-end-card { --ui-card-pad: 2.5rem 1.25rem; }
  .ft-end-bar { margin-top: 1.5rem; }
}
