/* Section 6, Features: "Every moment, ready for anywhere." Animated by features.js.
   A grid of six cards, each a small live picture with a title and one plain line.
   The CSS shows every picture in its finished state; features.js resets and plays
   them, so less motion (or no script) still gets a complete picture. */

.features { width: min(1100px, calc(100% - 32px)); margin: 0 auto 120px; }
.feat-head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); } /* the space above is How it works' bottom margin */
.features .headline.section .l2 { color: var(--violet); } /* on a light background */

.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feat {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feat:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27, 21, 48, 0.08); }
@media (prefers-reduced-motion: reduce) { .feat:hover { transform: none; } }
.feat-sizes { grid-column: span 2; }
.feat-speed { grid-column: 1 / -1; flex-direction: row; align-items: center; }

.feat-vis { position: relative; height: 230px; border-radius: 16px; overflow: hidden; }
.feat-vis.dark { background: #15111F; color: #E8E3F7; }
.feat-vis.light { background: var(--lilac); }
.feat-text { padding: 18px 10px 10px; }
.feat-text h3 { margin: 0 0 6px; font: 700 24px/1.15 var(--display); }
.feat-text p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Sizes: the crop frame on the video, and the result beside it ---------- */
.feat-sizes .feat-vis { display: flex; align-items: center; justify-content: center; gap: 4%; }
.fs-src { position: relative; width: 50%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.fs-src canvas, .fs-result { display: block; }
.fs-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.fs-frame { position: absolute; left: 34.2%; top: 0; width: 31.6%; height: 100%; border: 2px solid #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.55); border-radius: 3px; }
.fs-arrow { width: 24px; height: 24px; flex: none; color: #A88BFF; }
.fs-out { position: relative; width: 30%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.fs-result { width: 56.25%; height: 100%; border-radius: 8px; box-shadow: 0 0 0 1px rgba(168, 139, 255, 0.5), 0 12px 30px rgba(91, 43, 224, 0.35); }
.fs-tag { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; padding: 2px 8px; border-radius: 6px; background: rgba(20, 20, 24, 0.85); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ---------- Screenshots: the player, a flash, "Copied", a chat bubble ---------- */
.fx-player { position: absolute; left: 16px; right: 16px; top: 16px; height: 46%; border-radius: 10px; overflow: hidden; }
.fx-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.fx-btn, .fx-copied { position: absolute; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.fx-btn { right: 8px; bottom: 8px; background: var(--violet); color: #fff; }
.fx-copied { right: 8px; top: 8px; background: rgba(20, 20, 24, 0.88); color: #fff; }
.fx-chat { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: flex-end; }
.fx-bubble { padding: 4px 4px 3px; border-radius: 12px 12px 4px 12px; background: #3B2A80; transform-origin: 100% 100%; }
.fx-still { display: block; width: 116px; height: 65px; border-radius: 8px; }
.fx-bubble small { display: block; padding: 2px 4px 0; text-align: right; font-size: 9px; color: #C9C3DE; }

/* ---------- Library: a small My Clips ---------- */
.fl-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 10px; font-size: 13px; font-weight: 600; }
.fl-head img { width: 16px; height: 16px; }
.fl-filters { display: flex; gap: 4px; margin-left: auto; }
.fl-filters b { padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 600; transition: background 0.25s, color 0.25s; }
.fl-filters b.on { background: var(--violet); color: #fff; }
.fl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px; }
.fl-tile { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #2A2150; transition: opacity 0.3s, transform 0.3s; }
.fl-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fl-tile span { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 9px; font-weight: 600; }
.fl-tile.dim { opacity: 0.2; transform: scale(0.96); }

/* ---------- Sites: the Clip button hopping between sites ---------- */
.fw-cloud { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 12px 10px; padding: 24px 20px; }
.fw-cloud span { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 500; transition: border-color 0.25s, box-shadow 0.25s; }
.fw-cloud span.on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91, 43, 224, 0.15); }
.fw-cloud .more { background: transparent; border-style: dashed; border-color: #C9BEEF; color: var(--muted); }
.fw-pill { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 999px; background: rgba(20, 20, 24, 0.9); color: #fff; font-size: 11px; font-weight: 600; pointer-events: none; }
.fw-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8B6CFF; }

/* ---------- Shortcuts: keys pressed as the video plays ---------- */
.fk-bar { position: absolute; left: 24px; right: 24px; top: 70px; height: 8px; border-radius: 4px; background: #D9D0F7; }
.fk-range { position: absolute; top: 0; bottom: 0; left: 25%; width: 35%; background: rgba(91, 43, 224, 0.35); }
.fk-h { position: absolute; top: -6px; width: 10px; height: 20px; margin-left: -5px; border-radius: 4px; background: #fff; border: 2px solid var(--violet); }
.fk-h1 { left: 25%; }
.fk-h2 { left: 60%; }
.fk-head { position: absolute; top: -5px; left: 72%; width: 2px; height: 18px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.fk-keys { position: absolute; left: 0; right: 0; bottom: 56px; display: flex; justify-content: center; gap: 16px; }
.fk-combo { position: relative; display: flex; gap: 4px; }
.fk-combo kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 7px; background: #fff; border: 1px solid #D4CCEF; box-shadow: 0 2px 0 #D4CCEF; color: var(--ink); font: 600 13px var(--body); transition: transform 0.12s, box-shadow 0.12s, background 0.12s, color 0.12s; }
.fk-combo.press kbd { transform: translateY(2px); box-shadow: 0 0 0 #D4CCEF; background: var(--violet); border-color: var(--violet); color: #fff; }
.fk-combo small { position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.fk-saved { position: absolute; right: 16px; top: 16px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.fk-saved::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #4ADE80; vertical-align: 1px; }

/* ---------- Speed: watched at 2x, saved at 1x ---------- */
.feat-speed .feat-vis { flex: 0 0 54%; height: 170px; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 0 26px; }
.feat-speed .feat-text { padding: 10px 28px; }
.fp-row { display: flex; align-items: center; gap: 14px; }
.fp-label { flex: 0 0 128px; color: #C9C3DE; font-size: 13px; }
.fp-label b { color: #fff; }
.fp-track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.fp-fast, .fp-normal { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 3px; }
.fp-fast { background: #A88BFF; }
.fp-normal { background: #fff; }
.fp-back { position: absolute; right: 16px; bottom: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(168, 139, 255, 0.2); color: #E8E3F7; font-size: 11px; font-weight: 600; }

/* ---------- tablets: two columns ---------- */
@media (max-width: 900px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-sizes, .feat-speed { grid-column: 1 / -1; }
}
/* ---------- phones: one column ---------- */
@media (max-width: 600px) {
  .feat-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .feat-speed { flex-direction: column; align-items: stretch; }
  .feat-speed .feat-vis { flex: none; padding: 0 18px; }
  .feat-speed .feat-text { padding: 18px 10px 10px; }
  .fp-label { flex-basis: 112px; }
  /* sizes: bigger pieces, less empty space around them */
  .feat-sizes .feat-vis { height: 180px; gap: 3%; padding: 0 14px; }
  .fs-src { width: 55%; }
  .fs-out { width: 32%; }
  .fs-arrow { width: 18px; height: 18px; }
  .feat-text h3 { font-size: 22px; }
}
