FreeMIT License

Spotlight Bento — Interactive Bento Grid Feature Section

An interactive bento grid feature section: a timeline of features linked to image tiles, so the feature you point at takes the spotlight on both sides. Autoplay, light and dark themes, accessible, and works without JavaScript. Single HTML file, vanilla JS.

by UpFork, built by Ramin ValadanComponentUpdated 8 Oct 2026

Watch0
Preview of Spotlight Bento — Interactive Bento Grid Feature Section

Code

1 file · 5 assets

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Spotlight Bento Feature Showcase: Interactive Feature Section with Linked Image Grid & CTA (Tailwind, Animated, Responsive)</title>
    <meta
      name="description"
      content="A premium landing-page feature section with an animated timeline feature list linked to a bento image grid — spotlight hover, Ken Burns parallax, glass pills, dark/light mode, autoplay and full accessibility. Tailwind CSS + vanilla JS, drop-in for SaaS and product pages."
    />
    <meta name="color-scheme" content="light dark" />
    <link
      rel="icon"
      href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%230a0a0a'/%3E%3Crect x='6' y='6' width='9' height='20' rx='3' fill='%2334d399'/%3E%3Crect x='17' y='6' width='9' height='9' rx='3' fill='%23818cf8'/%3E%3Crect x='17' y='17' width='9' height='9' rx='3' fill='%23fbbf24'/%3E%3C/svg%3E"
    />
    <script>
      // Before the first paint: let the script take over the reveal and spotlight, and apply the demo's saved theme.
      document.documentElement.classList.add("sfs-js");
      try {
        const theme = localStorage.getItem("sfs-demo-theme");
        if (theme === "light" || theme === "dark") document.documentElement.dataset.theme = theme;
      } catch {}
    </script>
    <style>
      @font-face {
        font-family: "Geist";
        src: url("fonts/geist-latin.woff2") format("woff2");
        font-weight: 100 900;
        font-display: swap;
      }
    </style>
    <!-- Tailwind utilities for the section layout and the demo page (generated by npm run build). -->
    <style data-tailwind>
      /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-900:oklch(21% .006 285.885);--color-white:#fff;--spacing:.25rem;--container-7xl:80rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fixed{position:fixed}.top-4{top:calc(var(--spacing) * 4)}.right-4{right:calc(var(--spacing) * 4)}.z-50{z-index:50}.mx-auto{margin-inline:auto}.flex{display:flex}.grid{display:grid}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.max-w-7xl{max-width:var(--container-7xl)}.cursor-pointer{cursor:pointer}.place-items-center{place-items:center}.gap-1{gap:var(--spacing)}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-zinc-900\/10{border-color:#18181b1a}@supports (color:color-mix(in lab, red, red)){.border-zinc-900\/10{border-color:color-mix(in oklab, var(--color-zinc-900) 10%, transparent)}}.bg-\[\#fafafa\]{background-color:#fafafa}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.bg-white\/70{background-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.p-1{padding:var(--spacing)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-24{padding-block:calc(var(--spacing) * 24)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-900{color:var(--color-zinc-900)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:text-zinc-900:hover{color:var(--color-zinc-900)}}.aria-pressed\:bg-zinc-900\/5[aria-pressed=true]{background-color:#18181b0d}@supports (color:color-mix(in lab, red, red)){.aria-pressed\:bg-zinc-900\/5[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-zinc-900) 5%, transparent)}}.aria-pressed\:text-zinc-900[aria-pressed=true]{color:var(--color-zinc-900)}@media (min-width:64rem){.lg\:py-28{padding-block:calc(var(--spacing) * 28)}.lg\:py-32{padding-block:calc(var(--spacing) * 32)}}@media (prefers-color-scheme:dark){.dark\:border-white\/10:where(:root:not([data-theme=light]) *){border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:border-white\/10:where(:root:not([data-theme=light]) *){border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}.dark\:border-white\/10:where([data-theme=dark] *){border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:border-white\/10:where([data-theme=dark] *){border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}@media (prefers-color-scheme:dark){.dark\:bg-\[\#0a0a0a\]:where(:root:not([data-theme=light]) *){background-color:#0a0a0a}}.dark\:bg-\[\#0a0a0a\]:where([data-theme=dark] *){background-color:#0a0a0a}@media (prefers-color-scheme:dark){.dark\:bg-zinc-900\/70:where(:root:not([data-theme=light]) *){background-color:#18181bb3}@supports (color:color-mix(in lab, red, red)){.dark\:bg-zinc-900\/70:where(:root:not([data-theme=light]) *){background-color:color-mix(in oklab, var(--color-zinc-900) 70%, transparent)}}}.dark\:bg-zinc-900\/70:where([data-theme=dark] *){background-color:#18181bb3}@supports (color:color-mix(in lab, red, red)){.dark\:bg-zinc-900\/70:where([data-theme=dark] *){background-color:color-mix(in oklab, var(--color-zinc-900) 70%, transparent)}}@media (prefers-color-scheme:dark){.dark\:text-zinc-100:where(:root:not([data-theme=light]) *){color:var(--color-zinc-100)}}.dark\:text-zinc-100:where([data-theme=dark] *){color:var(--color-zinc-100)}@media (prefers-color-scheme:dark){.dark\:text-zinc-400:where(:root:not([data-theme=light]) *){color:var(--color-zinc-400)}}.dark\:text-zinc-400:where([data-theme=dark] *){color:var(--color-zinc-400)}@media (prefers-color-scheme:dark){@media (hover:hover){.dark\:hover\:text-white:where(:root:not([data-theme=light]) *):hover{color:var(--color-white)}}}@media (hover:hover){.dark\:hover\:text-white:where([data-theme=dark] *):hover{color:var(--color-white)}}@media (prefers-color-scheme:dark){.dark\:aria-pressed\:bg-white\/10:where(:root:not([data-theme=light]) *)[aria-pressed=true]{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:aria-pressed\:bg-white\/10:where(:root:not([data-theme=light]) *)[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}.dark\:aria-pressed\:bg-white\/10:where([data-theme=dark] *)[aria-pressed=true]{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:aria-pressed\:bg-white\/10:where([data-theme=dark] *)[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}@media (prefers-color-scheme:dark){.dark\:aria-pressed\:text-white:where(:root:not([data-theme=light]) *)[aria-pressed=true]{color:var(--color-white)}}.dark\:aria-pressed\:text-white:where([data-theme=dark] *)[aria-pressed=true]{color:var(--color-white)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}

    </style>
    <!-- Spotlight Bento Feature Showcase: the component's own styles. -->
    <style>
      /* ============================================================================
   Spotlight Bento Feature Showcase
   A feature list (a timeline of markers) linked to a bento grid of image tiles.
   Every color, radius, blur and timing is a custom property on .sfs. Colors use
   light-dark(): the visitor's scheme, or data-theme on the section or an ancestor.
   ========================================================================== */

/* The active feature's accent, registered so it can fade from one color to the next. */
@property --sfs-active-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #34d399;
}

.sfs {
  --sfs-bg: light-dark(#fafafa, #0a0a0a);
  --sfs-text: light-dark(#0b0b0f, #f5f5f7);
  --sfs-text-2: light-dark(#52525b, #a1a1aa);
  --sfs-text-3: light-dark(#6b6b74, #8f8f99);
  --sfs-line: light-dark(rgb(9 9 11 / 0.12), rgb(255 255 255 / 0.12));
  --sfs-dot: light-dark(rgb(9 9 11 / 0.07), rgb(255 255 255 / 0.06));
  --sfs-gradient-end: light-dark(#18181b, #ffffff);
  --sfs-cta-bg: light-dark(#0b0b0f, #f5f5f7);
  --sfs-cta-text: light-dark(#ffffff, #0b0b0f);
  --sfs-tile-bg: #111113;
  --sfs-veil-color: #0a0a0a; /* tiles dim toward black in both themes, so captions stay readable */
  --sfs-veil-dim: 0.42;
  --sfs-card-radius: 24px;
  --sfs-pill-blur: 12px;
  --sfs-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sfs-interval: 5000ms;

  color-scheme: light dark;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sfs-bg);
  color: var(--sfs-text);
  transition: --sfs-active-accent 0.6s ease;
}
:where([data-theme="dark"]) .sfs:not([data-theme="light"]),
.sfs[data-theme="dark"] {
  color-scheme: dark;
}
:where([data-theme="light"]) .sfs:not([data-theme="dark"]),
.sfs[data-theme="light"] {
  color-scheme: light;
}

/* A faint glow in the active accent behind the headline, over a fading dot grid. */
.sfs-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 22% 18%, color-mix(in oklab, var(--sfs-active-accent) 16%, transparent), transparent 70%),
    radial-gradient(circle, var(--sfs-dot) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(70rem 50rem at 30% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(70rem 50rem at 30% 30%, #000 30%, transparent 80%);
}

/* ---- Left column ---------------------------------------------------------- */

.sfs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sfs-text-2);
}
.sfs-eyebrow-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sfs-active-accent);
}
.sfs-eyebrow-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: sfs-pulse 2.4s ease-out infinite;
}
@keyframes sfs-pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

.sfs-headline {
  margin: 20px 0 0;
  font-size: clamp(2.75rem, 5.6vw, 4.5rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sfs-gradient {
  background: linear-gradient(100deg, var(--sfs-active-accent), var(--sfs-gradient-end) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sfs-hue 20s linear infinite;
}
@keyframes sfs-hue {
  50% {
    filter: hue-rotate(40deg);
  }
}
/* Word-by-word clip reveal (the script wraps the words). */
.sfs-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.sfs-word > span {
  display: inline-block;
  transition: transform 0.8s var(--sfs-ease);
  transition-delay: calc(120ms + var(--w, 0) * 40ms);
}
.sfs-js .sfs:not([data-revealed]) .sfs-word > span {
  transform: translateY(105%);
}

/* The feature stepper: markers joined by a connector that draws as the active feature moves on. */
.sfs-steps {
  --gap: 26px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.sfs-step {
  position: relative;
  display: block;
  padding-left: 44px;
  border-radius: 14px;
  outline: none;
  cursor: pointer;
}
.sfs-step:focus-visible .sfs-step-title {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.sfs-marker {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--sfs-line);
  background: var(--sfs-bg);
  transition:
    border-color 0.4s ease,
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}
.sfs-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.4s var(--sfs-ease);
}
.sfs-step[data-visited] .sfs-marker {
  border-color: color-mix(in oklab, var(--accent) 70%, transparent);
}
.sfs-step[data-active] .sfs-marker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow:
    0 0 0 5px color-mix(in oklab, var(--accent) 18%, transparent),
    0 0 22px color-mix(in oklab, var(--accent) 70%, transparent);
}
.sfs-step[data-active] .sfs-marker::after {
  transform: scale(1);
}
/* The connector below each marker, down to the next one: a track and a fill that draws. */
.sfs-step:not(:last-child)::after,
.sfs-connector {
  content: "";
  position: absolute;
  left: 9px;
  top: 28px;
  bottom: calc(-1 * var(--gap) - 2px);
  width: 2px;
  border-radius: 2px;
  background: var(--sfs-line);
}
.sfs-connector {
  z-index: 1;
  background: linear-gradient(var(--accent), var(--accent-next, var(--accent)));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--sfs-ease);
}
.sfs-step[data-visited] .sfs-connector {
  transform: scaleY(1);
}
.sfs-step:last-child .sfs-connector {
  display: none;
}
.sfs-step-title {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sfs-text);
}
.sfs-step-desc {
  display: block;
  margin-top: 4px;
  max-width: 34rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sfs-text-2);
  text-wrap: pretty;
}
.sfs-js .sfs .sfs-step:not([data-active]) .sfs-step-title,
.sfs-js .sfs .sfs-step:not([data-active]) .sfs-step-desc {
  opacity: 0.62;
}
.sfs-step-title,
.sfs-step-desc {
  transition: opacity 0.4s ease;
}
/* Autoplay progress inside the active item; its animationend moves to the next feature. */
.sfs-step-progress {
  position: relative;
  display: block;
  width: min(220px, 100%);
  height: 2px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--sfs-line);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sfs-step-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.sfs[data-autoplay="on"] .sfs-step[data-active] .sfs-step-progress {
  opacity: 1;
}
.sfs[data-autoplay="on"] .sfs-step[data-active] .sfs-step-progress::after {
  animation: sfs-progress var(--sfs-interval) linear forwards;
}
.sfs[data-paused] .sfs-step-progress::after {
  animation-play-state: paused;
}
@keyframes sfs-progress {
  to {
    transform: scaleX(1);
  }
}

.sfs-subhead {
  margin: 44px 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.sfs-body {
  margin: 8px 0 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sfs-text-2);
  text-wrap: pretty;
}

/* ---- Call to action ------------------------------------------------------- */

.sfs-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
}
.sfs-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sfs-cta-bg);
  color: var(--sfs-cta-text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
  box-shadow: 0 0 0 0 transparent;
  transition:
    box-shadow 0.35s ease,
    scale 0.2s ease;
}
.sfs-cta:hover {
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--sfs-active-accent) 55%, transparent),
    0 12px 40px -10px color-mix(in oklab, var(--sfs-active-accent) 70%, transparent);
}
.sfs-cta:active {
  scale: 0.97;
}
.sfs-cta:focus-visible {
  outline: 2px solid var(--sfs-active-accent);
  outline-offset: 3px;
}
/* A band of light that crosses the pill once on hover. */
.sfs-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, color-mix(in oklab, var(--sfs-cta-text) 18%, transparent) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.sfs-cta:hover::before {
  animation: sfs-shimmer 0.9s var(--sfs-ease);
}
@keyframes sfs-shimmer {
  to {
    transform: translateX(120%);
  }
}
.sfs-cta-arrow {
  transition: transform 0.3s var(--sfs-ease);
}
.sfs-cta:hover .sfs-cta-arrow {
  transform: translateX(3px);
}
/* The original's trailing "•", now a live status dot. */
.sfs-live {
  position: relative;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--sfs-active-accent);
}
.sfs-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: sfs-pulse 2s ease-out infinite;
}
.sfs-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--sfs-text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.sfs-secondary:hover {
  color: var(--sfs-text);
}
.sfs-secondary span {
  transition: transform 0.25s var(--sfs-ease);
}
.sfs-secondary:hover span {
  transform: translateX(3px);
}
.sfs-secondary:focus-visible {
  outline: 2px solid var(--sfs-active-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- The tiles ------------------------------------------------------------ */

.sfs-grid {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sfs-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--sfs-card-radius);
  background: var(--sfs-tile-bg);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    0 1px 2px rgb(0 0 0 / 0.2),
    0 24px 50px -28px rgb(0 0 0 / 0.55);
  transform: scale(var(--sfs-scale, 1));
  transition:
    transform 0.4s var(--sfs-ease),
    box-shadow 0.4s ease;
}
.sfs-media {
  position: absolute;
  inset: -8px; /* room for the parallax */
  translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 6px);
  transition: translate 0.5s var(--sfs-ease);
}
.sfs-media img,
.sfs-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(var(--sfs-sat, 1));
  /* Ken Burns as a transition, so it also eases back out when the tile loses the spotlight. */
  transform: scale(var(--sfs-zoom, 1));
  transition:
    transform 1.2s var(--sfs-ease),
    filter 0.4s ease;
}
/* Two stacked scrims, short and strong plus long and soft, so captions read on any photo. */
.sfs-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.38) 22%, transparent 46%),
    linear-gradient(to top, rgb(0 0 0 / 0.32), transparent 80%);
  pointer-events: none;
}
/* Dims the tiles outside the spotlight (a veil, not opacity, so the glass pills keep blurring). */
.sfs-veil {
  position: absolute;
  inset: 0;
  background: var(--sfs-veil-color);
  opacity: var(--sfs-veil, 0);
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.sfs-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 30%), rgb(255 255 255 / 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.sfs-tile:hover .sfs-sheen {
  opacity: 1;
}
/* 1px gradient border, brightened by the feature's accent in the spotlight. */
.sfs-tile::before,
.sfs-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  -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);
  pointer-events: none;
}
.sfs-tile::before {
  background: linear-gradient(145deg, rgb(255 255 255 / 0.28), rgb(255 255 255 / 0.04) 45%, rgb(255 255 255 / 0.1));
}
.sfs-tile::after {
  background: linear-gradient(145deg, color-mix(in oklab, var(--accent) 90%, white), color-mix(in oklab, var(--accent) 25%, transparent) 50%, color-mix(in oklab, var(--accent) 70%, transparent));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sfs-tile-top {
  position: absolute;
  inset: 16px 16px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.sfs-glass {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(var(--sfs-pill-blur)) saturate(150%);
  backdrop-filter: blur(var(--sfs-pill-blur)) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.18);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.sfs-icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.sfs-icon svg {
  width: 16px;
  height: 16px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sfs-glass {
    background: rgb(17 17 19 / 0.78);
  }
}

.sfs-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  pointer-events: none;
  transform: translateY(calc(var(--desc-h, 2.6rem) + 8px));
  transition: transform 0.45s var(--sfs-ease);
}
.sfs-caption-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.sfs-open {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--sfs-ease);
}
.sfs-tile:hover .sfs-open,
.sfs-tile:focus-within .sfs-open {
  opacity: 1;
  transform: none;
}
.sfs-caption-desc {
  margin: 6px 0 0;
  max-width: 30rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgb(255 255 255 / 0.72);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
/* The whole tile is the link (or button); its focus ring sits inside the tile. */
.sfs-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}
.sfs-hit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}
.sfs-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* In the spotlight / out of it (set by the script; without it every tile looks active). */
.sfs-js .sfs[data-ready] .sfs-tile {
  --sfs-scale: 0.98;
  --sfs-veil: var(--sfs-veil-dim);
  --sfs-sat: 0.6;
}
.sfs-js .sfs[data-ready] .sfs-tile[data-active] {
  --sfs-scale: 1.02;
  --sfs-veil: 0;
  --sfs-sat: 1;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.18),
    0 1px 2px rgb(0 0 0 / 0.2),
    0 30px 70px -26px color-mix(in oklab, var(--accent) 55%, transparent);
}
.sfs-tile[data-active]::after {
  opacity: 1;
}
.sfs-tile[data-active] .sfs-caption {
  transform: translateY(-4px);
}
.sfs-tile[data-active] .sfs-caption-desc {
  opacity: 1;
}
.sfs[data-kenburns="on"] .sfs-tile[data-active] .sfs-media img,
.sfs[data-kenburns="on"] .sfs-tile[data-active] .sfs-media video {
  --sfs-zoom: 1.08;
  transition:
    transform 8s cubic-bezier(0.25, 0.1, 0.25, 1),
    filter 0.4s ease;
}

/* ---- Layouts -------------------------------------------------------------- */

.sfs-layout {
  display: grid;
  gap: 56px;
}
@media (min-width: 1024px) {
  .sfs-layout {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: 64px;
    align-items: center;
  }
}

/* Phones: the tiles become a horizontal snap strip. */
@media (max-width: 767px) {
  .sfs-grid {
    display: flex;
    gap: 12px;
    margin-inline: -24px;
    padding: 6px 24px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .sfs-grid::-webkit-scrollbar {
    display: none;
  }
  .sfs-tile {
    flex: 0 0 85%;
    aspect-ratio: 4 / 5;
    scroll-snap-align: center;
  }
}
/* Tablets: a 2 × 2 grid. */
@media (min-width: 768px) {
  .sfs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .sfs-tile {
    aspect-ratio: 1 / 1;
  }
}
/* Desktops: the bento (one tall tile, one wide), or the plain grid with layout: "grid". */
@media (min-width: 1024px) {
  .sfs-grid[data-layout="bento"] {
    grid-template-rows: 1fr 1fr 1.3fr;
    aspect-ratio: 10 / 11;
  }
  .sfs-grid[data-layout="bento"] .sfs-tile {
    aspect-ratio: auto;
  }
  .sfs-grid[data-layout="bento"] .sfs-tile:nth-child(1) {
    grid-row: span 2;
  }
  .sfs-grid[data-layout="bento"] .sfs-tile:nth-child(4) {
    grid-column: 1 / -1;
  }
}

/* ---- Reveal on scroll ----------------------------------------------------- */

.sfs-js .sfs:not([data-revealed]) [data-sfs-reveal],
.sfs-js .sfs:not([data-revealed]) .sfs-step {
  opacity: 0;
  transform: translateY(14px);
}
.sfs-js .sfs:not([data-revealed]) .sfs-tile {
  opacity: 0;
  --sfs-scale: 0.96;
}
[data-sfs-reveal],
.sfs-js .sfs .sfs-step {
  transition:
    opacity 0.7s ease,
    transform 0.7s var(--sfs-ease);
}
.sfs[data-revealing] [data-sfs-reveal] {
  transition-delay: calc(var(--k, 0) * 90ms);
}
.sfs[data-revealing] .sfs-step {
  transition-delay: calc(500ms + var(--k, 0) * 80ms);
}
.sfs[data-revealing] .sfs-tile {
  transition:
    opacity 0.7s ease calc(650ms + var(--k, 0) * 90ms),
    transform 0.7s var(--sfs-ease) calc(650ms + var(--k, 0) * 90ms),
    box-shadow 0.4s ease;
}

/* ---- Without JavaScript --------------------------------------------------- */

:where(html:not(.sfs-js)) .sfs-caption {
  transform: none;
}
:where(html:not(.sfs-js)) .sfs-caption-desc {
  opacity: 1;
}
:where(html:not(.sfs-js)) .sfs-step-progress,
:where(html:not(.sfs-js)) .sfs-connector {
  display: none;
}

/* ---- Reduced motion: no autoplay, Ken Burns, parallax, magnet or shimmer -- */

@media (prefers-reduced-motion: reduce) {
  .sfs-eyebrow-dot::after,
  .sfs-live::after,
  .sfs-gradient,
  .sfs-cta:hover::before {
    animation: none;
  }
  .sfs-media {
    translate: none;
  }
  .sfs-cta {
    translate: none;
  }
  .sfs-tile,
  .sfs-step,
  [data-sfs-reveal],
  .sfs-word > span {
    transform: none !important;
  }
  .sfs-connector,
  .sfs-caption {
    transition: none;
  }
}
    </style>
  </head>
  <body class="bg-[#fafafa] font-sans text-zinc-900 antialiased dark:bg-[#0a0a0a] dark:text-zinc-100">
    <!-- Demo only: light / system / dark. The component itself follows prefers-color-scheme or data-theme. -->
    <div
      class="fixed top-4 right-4 z-50 flex gap-1 rounded-full border border-zinc-900/10 bg-white/70 p-1 backdrop-blur-md dark:border-white/10 dark:bg-zinc-900/70"
      role="group"
      aria-label="Theme"
    >
      <button type="button" data-value="light" aria-label="Light theme" class="demo-theme-btn grid size-8 cursor-pointer place-items-center rounded-full text-zinc-500 transition-colors hover:text-zinc-900 aria-pressed:bg-zinc-900/5 aria-pressed:text-zinc-900 dark:text-zinc-400 dark:hover:text-white dark:aria-pressed:bg-white/10 dark:aria-pressed:text-white">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="4" /><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" /></svg>
      </button>
      <button type="button" data-value="system" aria-label="System theme" class="demo-theme-btn grid size-8 cursor-pointer place-items-center rounded-full text-zinc-500 transition-colors hover:text-zinc-900 aria-pressed:bg-zinc-900/5 aria-pressed:text-zinc-900 dark:text-zinc-400 dark:hover:text-white dark:aria-pressed:bg-white/10 dark:aria-pressed:text-white">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="12" rx="2" /><path d="M8 20h8M12 16v4" /></svg>
      </button>
      <button type="button" data-value="dark" aria-label="Dark theme" class="demo-theme-btn grid size-8 cursor-pointer place-items-center rounded-full text-zinc-500 transition-colors hover:text-zinc-900 aria-pressed:bg-zinc-900/5 aria-pressed:text-zinc-900 dark:text-zinc-400 dark:hover:text-white dark:aria-pressed:bg-white/10 dark:aria-pressed:text-white">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z" /></svg>
      </button>
    </div>

    <!-- ================= Spotlight Bento Feature Showcase ================= -->
    <section class="sfs py-24 lg:py-32" data-sfs aria-labelledby="sfs-heading-1">
      <div class="sfs-backdrop" aria-hidden="true"></div>
      <div class="mx-auto max-w-7xl px-6">
        <div class="sfs-layout">
          <div>
            <p class="sfs-eyebrow" data-sfs-reveal style="--k: 0"><span class="sfs-eyebrow-dot" aria-hidden="true"></span>The editor</p>
            <h2 id="sfs-heading-1" class="sfs-headline" data-sfs-words>Edit at the speed <span class="sfs-gradient">of thought.</span></h2>

            <ol class="sfs-steps" data-sfs-list aria-label="Features">
<li class="sfs-step" data-sfs-step="snapping-timeline" style="--accent:#34d399;--accent-next:#818cf8;--k:0">
  <span class="sfs-marker" aria-hidden="true"></span><span class="sfs-connector" aria-hidden="true"></span>
  <span class="sfs-step-title">Snapping timeline</span>
  <span class="sfs-step-desc">Clips snap into place and close their own gaps, so the edit stays tidy while you move fast.</span>
  <span class="sfs-step-progress" aria-hidden="true"></span>
</li>
<li class="sfs-step" data-sfs-step="ripple-trim" style="--accent:#818cf8;--accent-next:#c084fc;--k:1">
  <span class="sfs-marker" aria-hidden="true"></span><span class="sfs-connector" aria-hidden="true"></span>
  <span class="sfs-step-title">Ripple trim</span>
  <span class="sfs-step-desc">Trim one clip and everything after it moves with it, keeping sound and picture in sync.</span>
  <span class="sfs-step-progress" aria-hidden="true"></span>
</li>
<li class="sfs-step" data-sfs-step="realtime-scopes" style="--accent:#c084fc;--accent-next:#fbbf24;--k:2">
  <span class="sfs-marker" aria-hidden="true"></span><span class="sfs-connector" aria-hidden="true"></span>
  <span class="sfs-step-title">Realtime scopes</span>
  <span class="sfs-step-desc">Waveform, vectorscope and histogram update with every adjustment, so you grade by eye and by numbers.</span>
  <span class="sfs-step-progress" aria-hidden="true"></span>
</li>
<li class="sfs-step" data-sfs-step="transcript-editing" style="--accent:#fbbf24;--accent-next:#fbbf24;--k:3">
  <span class="sfs-marker" aria-hidden="true"></span><span class="sfs-connector" aria-hidden="true"></span>
  <span class="sfs-step-title">Transcript editing</span>
  <span class="sfs-step-desc">Delete a sentence from the transcript and the cut follows. Edit an interview the way you edit a document.</span>
  <span class="sfs-step-progress" aria-hidden="true"></span>
</li>
            </ol>

            <h3 class="sfs-subhead" data-sfs-reveal style="--k: 6">Every tool where your hands already are.</h3>
            <p class="sfs-body" data-sfs-reveal style="--k: 7">
              Four features do most of the work: a timeline that keeps itself tidy, trims that never leave gaps,
              scopes that read your grade as you make it, and a transcript you can edit like a document.
            </p>
            <div class="sfs-cta-row" data-sfs-reveal style="--k: 8">
              <a class="sfs-cta" href="#start">
                Start editing free
                <svg class="sfs-cta-arrow" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg>
                <span class="sfs-live" aria-hidden="true"></span>
              </a>
              <a class="sfs-secondary" href="#how-it-works">See how it works <span aria-hidden="true">→</span></a>
            </div>
            <p class="sr-only" data-sfs-live aria-live="polite"></p>
          </div>

          <ul class="sfs-grid" data-sfs-grid data-layout="bento">
<li class="sfs-tile" data-sfs-tile="snapping-timeline" style="--accent:#34d399;--k:0">
  <div class="sfs-media"><img src="images/snapping-timeline.jpg" alt="An editor in headphones working at a desk lit by two monitors in a dark room" decoding="async" fetchpriority="high"></div>
  <span class="sfs-scrim" aria-hidden="true"></span><span class="sfs-sheen" aria-hidden="true"></span><span class="sfs-veil" aria-hidden="true"></span>
  <div class="sfs-tile-top" aria-hidden="true"><span class="sfs-glass sfs-icon"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><path d="M2 4.5h5M9 4.5h5M2 8h8M12 8h2M2 11.5h3M7 11.5h7"/></svg></span><span class="sfs-glass">Editing</span></div>
  <div class="sfs-caption"><p class="sfs-caption-title">Snapping timeline<svg class="sfs-open" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 11l6-6M6 5h5v5"/></svg></p><p class="sfs-caption-desc">Clips snap into place and gaps close themselves as you edit.</p></div>
  <a class="sfs-hit" href="#snapping-timeline"><span class="sfs-sr">Open Snapping timeline</span></a>
</li>
<li class="sfs-tile" data-sfs-tile="ripple-trim" style="--accent:#818cf8;--k:1">
  <div class="sfs-media"><img src="images/ripple-trim.jpg" alt="Close-up of a video editing timeline with blue and purple clips" decoding="async" loading="lazy"></div>
  <span class="sfs-scrim" aria-hidden="true"></span><span class="sfs-sheen" aria-hidden="true"></span><span class="sfs-veil" aria-hidden="true"></span>
  <div class="sfs-tile-top" aria-hidden="true"><span class="sfs-glass sfs-icon"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 3v10M10 3v10M3 6l-1.5 2L3 10M13 6l1.5 2L13 10"/></svg></span><span class="sfs-glass">Trimming</span></div>
  <div class="sfs-caption"><p class="sfs-caption-title">Ripple trim<svg class="sfs-open" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 11l6-6M6 5h5v5"/></svg></p><p class="sfs-caption-desc">Trim one clip and everything after it moves with it, in sync.</p></div>
  <a class="sfs-hit" href="#ripple-trim"><span class="sfs-sr">Open Ripple trim</span></a>
</li>
<li class="sfs-tile" data-sfs-tile="realtime-scopes" style="--accent:#c084fc;--k:2">
  <div class="sfs-media"><img src="images/realtime-scopes.jpg" alt="Color grading wheels glowing on a dark editing screen" decoding="async" loading="lazy"></div>
  <span class="sfs-scrim" aria-hidden="true"></span><span class="sfs-sheen" aria-hidden="true"></span><span class="sfs-veil" aria-hidden="true"></span>
  <div class="sfs-tile-top" aria-hidden="true"><span class="sfs-glass sfs-icon"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="8" r="6"/><path d="M2.5 9.5c1.5-3 2.5 2 4-1s2.5 2 4-1 2 1 3 0"/></svg></span><span class="sfs-glass">Color</span></div>
  <div class="sfs-caption"><p class="sfs-caption-title">Realtime scopes<svg class="sfs-open" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 11l6-6M6 5h5v5"/></svg></p><p class="sfs-caption-desc">Waveform, vectorscope and histogram update with every grade.</p></div>
  <a class="sfs-hit" href="#realtime-scopes"><span class="sfs-sr">Open Realtime scopes</span></a>
</li>
<li class="sfs-tile" data-sfs-tile="transcript-editing" style="--accent:#fbbf24;--k:3">
  <div class="sfs-media"><img src="images/transcript-editing.jpg" alt="A glowing orange and magenta sound wave on a black background" decoding="async" loading="lazy"></div>
  <span class="sfs-scrim" aria-hidden="true"></span><span class="sfs-sheen" aria-hidden="true"></span><span class="sfs-veil" aria-hidden="true"></span>
  <div class="sfs-tile-top" aria-hidden="true"><span class="sfs-glass sfs-icon"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><path d="M2.5 4h11M2.5 7h7M2.5 10h9M2.5 13h4M12 9.5v4"/></svg></span><span class="sfs-glass">AI</span></div>
  <div class="sfs-caption"><p class="sfs-caption-title">Transcript editing<svg class="sfs-open" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 11l6-6M6 5h5v5"/></svg></p><p class="sfs-caption-desc">Delete a sentence in the transcript and the cut follows.</p></div>
  <a class="sfs-hit" href="#transcript-editing"><span class="sfs-sr">Open Transcript editing</span></a>
</li>
          </ul>
        </div>
      </div>
      <script type="application/json" data-sfs-data>
{
  "name": "Editor features",
  "features": [
    {
      "id": "snapping-timeline",
      "title": "Snapping timeline",
      "description": "Clips snap into place and close their own gaps, so the edit stays tidy while you move fast.",
      "short": "Clips snap into place and gaps close themselves as you edit.",
      "accent": "#34d399",
      "category": "Editing",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\">\u003cpath d=\"M2 4.5h5M9 4.5h5M2 8h8M12 8h2M2 11.5h3M7 11.5h7\"/>\u003c/svg>",
      "image": "images/snapping-timeline.jpg",
      "alt": "An editor in headphones working at a desk lit by two monitors in a dark room",
      "href": "#snapping-timeline"
    },
    {
      "id": "ripple-trim",
      "title": "Ripple trim",
      "description": "Trim one clip and everything after it moves with it, keeping sound and picture in sync.",
      "short": "Trim one clip and everything after it moves with it, in sync.",
      "accent": "#818cf8",
      "category": "Trimming",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003cpath d=\"M6 3v10M10 3v10M3 6l-1.5 2L3 10M13 6l1.5 2L13 10\"/>\u003c/svg>",
      "image": "images/ripple-trim.jpg",
      "alt": "Close-up of a video editing timeline with blue and purple clips",
      "href": "#ripple-trim"
    },
    {
      "id": "realtime-scopes",
      "title": "Realtime scopes",
      "description": "Waveform, vectorscope and histogram update with every adjustment, so you grade by eye and by numbers.",
      "short": "Waveform, vectorscope and histogram update with every grade.",
      "accent": "#c084fc",
      "category": "Color",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003ccircle cx=\"8\" cy=\"8\" r=\"6\"/>\u003cpath d=\"M2.5 9.5c1.5-3 2.5 2 4-1s2.5 2 4-1 2 1 3 0\"/>\u003c/svg>",
      "image": "images/realtime-scopes.jpg",
      "alt": "Color grading wheels glowing on a dark editing screen",
      "href": "#realtime-scopes"
    },
    {
      "id": "transcript-editing",
      "title": "Transcript editing",
      "description": "Delete a sentence from the transcript and the cut follows. Edit an interview the way you edit a document.",
      "short": "Delete a sentence in the transcript and the cut follows.",
      "accent": "#fbbf24",
      "category": "AI",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\">\u003cpath d=\"M2.5 4h11M2.5 7h7M2.5 10h9M2.5 13h4M12 9.5v4\"/>\u003c/svg>",
      "image": "images/transcript-editing.jpg",
      "alt": "A glowing orange and magenta sound wave on a black background",
      "href": "#transcript-editing"
    }
  ]
}
      </script>
    </section>
    <script type="application/ld+json">
{"@context":"https://schema.org","@type":"ItemList","name":"Editor features","itemListElement":[{"@type":"ListItem","position":1,"name":"Snapping timeline","description":"Clips snap into place and close their own gaps, so the edit stays tidy while you move fast.","image":"images/snapping-timeline.jpg"},{"@type":"ListItem","position":2,"name":"Ripple trim","description":"Trim one clip and everything after it moves with it, keeping sound and picture in sync.","image":"images/ripple-trim.jpg"},{"@type":"ListItem","position":3,"name":"Realtime scopes","description":"Waveform, vectorscope and histogram update with every adjustment, so you grade by eye and by numbers.","image":"images/realtime-scopes.jpg"},{"@type":"ListItem","position":4,"name":"Transcript editing","description":"Delete a sentence from the transcript and the cut follows. Edit an interview the way you edit a document.","image":"images/transcript-editing.jpg"}]}
    </script>

    <!-- ================ A second instance on the same page ================ -->
    <!-- Rendered at runtime from its JSON: the plain 2 × 2 grid, always light, no autoplay. -->
    <section
      class="sfs py-24 lg:py-28"
      data-sfs
      data-theme="light"
      data-sfs-config='{"layout": "grid", "autoplay": false, "schema": false}'
      aria-labelledby="sfs-heading-2"
    >
      <div class="sfs-backdrop" aria-hidden="true"></div>
      <div class="mx-auto max-w-7xl px-6">
        <div class="sfs-layout">
          <div>
            <p class="sfs-eyebrow" data-sfs-reveal style="--k: 0"><span class="sfs-eyebrow-dot" aria-hidden="true"></span>Second instance</p>
            <h2 id="sfs-heading-2" class="sfs-headline" data-sfs-words>Same section, <span class="sfs-gradient">its own settings.</span></h2>
            <ol class="sfs-steps" data-sfs-list aria-label="Features"></ol>
            <p class="sfs-body" data-sfs-reveal style="--k: 6">
              Forced light with data-theme, the plain 2 × 2 grid, no autoplay, and everything rendered from JSON at
              runtime.
            </p>
            <p class="sr-only" data-sfs-live aria-live="polite"></p>
          </div>
          <ul class="sfs-grid" data-sfs-grid></ul>
        </div>
      </div>
      <script type="application/json" data-sfs-data>
{
  "name": "Editor features",
  "features": [
    {
      "id": "snapping-timeline",
      "title": "Snapping timeline",
      "description": "Clips snap into place and close their own gaps, so the edit stays tidy while you move fast.",
      "short": "Clips snap into place and gaps close themselves as you edit.",
      "accent": "#34d399",
      "category": "Editing",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\">\u003cpath d=\"M2 4.5h5M9 4.5h5M2 8h8M12 8h2M2 11.5h3M7 11.5h7\"/>\u003c/svg>",
      "image": "images/snapping-timeline.jpg",
      "alt": "An editor in headphones working at a desk lit by two monitors in a dark room",
      "href": "#snapping-timeline"
    },
    {
      "id": "ripple-trim",
      "title": "Ripple trim",
      "description": "Trim one clip and everything after it moves with it, keeping sound and picture in sync.",
      "short": "Trim one clip and everything after it moves with it, in sync.",
      "accent": "#818cf8",
      "category": "Trimming",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003cpath d=\"M6 3v10M10 3v10M3 6l-1.5 2L3 10M13 6l1.5 2L13 10\"/>\u003c/svg>",
      "image": "images/ripple-trim.jpg",
      "alt": "Close-up of a video editing timeline with blue and purple clips",
      "href": "#ripple-trim"
    },
    {
      "id": "realtime-scopes",
      "title": "Realtime scopes",
      "description": "Waveform, vectorscope and histogram update with every adjustment, so you grade by eye and by numbers.",
      "short": "Waveform, vectorscope and histogram update with every grade.",
      "accent": "#c084fc",
      "category": "Color",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003ccircle cx=\"8\" cy=\"8\" r=\"6\"/>\u003cpath d=\"M2.5 9.5c1.5-3 2.5 2 4-1s2.5 2 4-1 2 1 3 0\"/>\u003c/svg>",
      "image": "images/realtime-scopes.jpg",
      "alt": "Color grading wheels glowing on a dark editing screen",
      "href": "#realtime-scopes"
    },
    {
      "id": "transcript-editing",
      "title": "Transcript editing",
      "description": "Delete a sentence from the transcript and the cut follows. Edit an interview the way you edit a document.",
      "short": "Delete a sentence in the transcript and the cut follows.",
      "accent": "#fbbf24",
      "category": "AI",
      "icon": "\u003csvg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\">\u003cpath d=\"M2.5 4h11M2.5 7h7M2.5 10h9M2.5 13h4M12 9.5v4\"/>\u003c/svg>",
      "image": "images/transcript-editing.jpg",
      "alt": "A glowing orange and magenta sound wave on a black background",
      "href": "#transcript-editing"
    }
  ]
}
      </script>
    </section>

    <footer class="px-6 py-10 text-center text-sm text-zinc-500 dark:text-zinc-400">
      Spotlight Bento Feature Showcase · demo. Photos from Unsplash (see PHOTOS.md); product and feature names are placeholders.
    </footer>

    <!-- Spotlight Bento Feature Showcase: the component's script. -->
    <script>
/*!
 * Spotlight Bento Feature Showcase: a feature list linked to a bento grid of image tiles.
 * Vanilla JS, no dependencies. Every [data-sfs] section mounts itself; call
 * SpotlightFeatureShowcase.mount(element, options) for sections added later.
 */
(() => {
  const DEFAULTS = { autoplay: true, interval: 5000, layout: "bento", parallax: true, kenBurns: true, theme: "auto", schema: true };
  const LERP = 0.12;
  const CHEVRON =
    '<svg class="sfs-open" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 11l6-6M6 5h5v5"/></svg>';

  const media = (query) => window.matchMedia(query);
  const reducedMotion = media("(prefers-reduced-motion: reduce)");
  const finePointer = media("(hover: hover) and (pointer: fine)");
  const phone = media("(max-width: 767px)");
  const parse = (text) => {
    try {
      return text ? JSON.parse(text) : null;
    } catch {
      return null;
    }
  };
  const escape = (value) =>
    String(value ?? "").replace(/[&<>"]/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[c]);
  let mounted = 0;

  /** One feature in the list. The build pre-renders these (plain markup; the script adds the tab roles). */
  function stepHTML(feature, index, features) {
    const next = features[index + 1];
    return `<li class="sfs-step" data-sfs-step="${escape(feature.id)}" style="--accent:${escape(feature.accent)};--accent-next:${escape(next ? next.accent : feature.accent)};--k:${index}">
  <span class="sfs-marker" aria-hidden="true"></span><span class="sfs-connector" aria-hidden="true"></span>
  <span class="sfs-step-title">${escape(feature.title)}</span>
  <span class="sfs-step-desc">${escape(feature.description)}</span>
  <span class="sfs-step-progress" aria-hidden="true"></span>
</li>`;
  }

  /** One feature's tile: image (or video), glass pills, caption, and a link or button over the whole tile. */
  function tileHTML(feature, index) {
    const first = index === 0;
    const mediaHTML = feature.video
      ? `<video src="${escape(feature.video)}" poster="${escape(feature.poster || feature.image || "")}" muted loop playsinline preload="none" aria-label="${escape(feature.alt || feature.title)}"></video>`
      : `<img src="${escape(feature.image)}" alt="${escape(feature.alt || "")}" decoding="async" ${first ? 'fetchpriority="high"' : 'loading="lazy"'}>`;
    const label = `${feature.href ? "Open" : "Show"} ${escape(feature.title)}`;
    const hit = feature.href
      ? `<a class="sfs-hit" href="${escape(feature.href)}"><span class="sfs-sr">${label}</span></a>`
      : `<button class="sfs-hit" type="button"><span class="sfs-sr">${label}</span></button>`;
    return `<li class="sfs-tile" data-sfs-tile="${escape(feature.id)}" style="--accent:${escape(feature.accent)};--k:${index}">
  <div class="sfs-media">${mediaHTML}</div>
  <span class="sfs-scrim" aria-hidden="true"></span><span class="sfs-sheen" aria-hidden="true"></span><span class="sfs-veil" aria-hidden="true"></span>
  <div class="sfs-tile-top" aria-hidden="true"><span class="sfs-glass sfs-icon">${feature.icon || ""}</span>${feature.category ? `<span class="sfs-glass">${escape(feature.category)}</span>` : ""}</div>
  <div class="sfs-caption"><p class="sfs-caption-title">${escape(feature.title)}${CHEVRON}</p><p class="sfs-caption-desc">${escape(feature.short || feature.description)}</p></div>
  ${hit}
</li>`;
  }

  /** schema.org JSON-LD: the features as an ItemList. */
  function schema(data) {
    const json = JSON.stringify({
      "@context": "https://schema.org",
      "@type": "ItemList",
      name: data.name || "Features",
      itemListElement: (data.features || []).map((f, i) => ({
        "@type": "ListItem",
        position: i + 1,
        name: f.title,
        description: f.description,
        image: f.image,
      })),
    });
    return json.replace(/</g, "\\" + "u003c");
  }

  function mount(root, options = {}) {
    if (root.sfs) return root.sfs;
    const data = parse(root.querySelector("[data-sfs-data]")?.textContent) || {};
    const config = { ...DEFAULTS, ...data.config, ...parse(root.dataset.sfsConfig), ...options };
    const list = root.querySelector("[data-sfs-list]");
    const grid = root.querySelector("[data-sfs-grid]");
    const live = root.querySelector("[data-sfs-live]");
    if (!list || !grid) return null;
    const uid = `sfs${++mounted}`;

    // A section with only JSON: render the list, the tiles and the JSON-LD here.
    if (!list.querySelector("[data-sfs-step]") && data.features) {
      list.innerHTML = data.features.map((f, i, all) => stepHTML(f, i, all)).join("");
      grid.innerHTML = data.features.map(tileHTML).join("");
      if (config.schema) {
        const ld = document.createElement("script");
        ld.type = "application/ld+json";
        ld.textContent = schema(data);
        root.append(ld);
      }
    }

    const steps = [...list.querySelectorAll("[data-sfs-step]")];
    const tiles = [...grid.querySelectorAll("[data-sfs-tile]")];
    const total = Math.min(steps.length, tiles.length);
    const pausers = new Set(["offscreen", "reveal"]); // anything in here holds autoplay
    let active = -1;
    let programmaticScroll = 0;

    if (config.theme !== "auto") root.dataset.theme = config.theme;
    root.style.setProperty("--sfs-interval", `${config.interval}ms`);
    grid.dataset.layout = config.layout;
    root.dataset.kenburns = config.kenBurns && !reducedMotion.matches ? "on" : "off";

    // Tabs: the list controls the tiles. Roles and ids are added here, so the markup works without JS.
    list.setAttribute("role", "tablist");
    list.setAttribute("aria-orientation", "vertical");
    steps.forEach((step, i) => {
      const tile = tiles[i];
      step.id = `${uid}-tab-${i}`;
      tile.id = `${uid}-panel-${i}`;
      step.setAttribute("role", "tab");
      step.setAttribute("aria-controls", tile.id);
      tile.setAttribute("role", "tabpanel");
      tile.setAttribute("aria-labelledby", step.id);
    });

    // The headline's words reveal one by one (the gradient phrase moves as one word).
    const headline = root.querySelector("[data-sfs-words]");
    if (headline && !reducedMotion.matches) {
      let w = 0;
      const wrap = () => {
        const outer = document.createElement("span");
        outer.className = "sfs-word";
        const inner = document.createElement("span");
        inner.style.setProperty("--w", w++);
        outer.append(inner);
        return [outer, inner];
      };
      [...headline.childNodes].forEach((node) => {
        if (node.nodeType === 3) {
          const parts = node.textContent.split(/(\s+)/);
          const frag = document.createDocumentFragment();
          parts.forEach((part) => {
            if (!part) return;
            if (/^\s+$/.test(part)) return frag.append(part);
            const [outer, inner] = wrap();
            inner.textContent = part;
            frag.append(outer);
          });
          node.replaceWith(frag);
        } else {
          const [outer, inner] = wrap();
          node.replaceWith(outer);
          inner.append(node);
        }
      });
    }

    const accentOf = (i) => steps[i].style.getPropertyValue("--accent").trim();

    function scrollStripTo(i) {
      programmaticScroll = Date.now();
      const tile = tiles[i];
      grid.scrollTo({ left: tile.offsetLeft - (grid.clientWidth - tile.clientWidth) / 2, behavior: reducedMotion.matches ? "auto" : "smooth" });
    }

    function playVideos() {
      tiles.forEach((tile, i) => {
        const video = tile.querySelector("video");
        if (!video) return;
        if (i === active && !pausers.has("offscreen")) video.play().catch(() => {});
        else video.pause();
      });
    }

    /** Puts feature `index` in the spotlight. `source`: autoplay, hover, focus, click, key, scroll, api. */
    function setActive(index, source) {
      index = ((index % total) + total) % total;
      if (index === active) return;
      active = index;
      steps.forEach((step, i) => {
        step.toggleAttribute("data-active", i === active);
        step.toggleAttribute("data-visited", i < active);
        step.setAttribute("aria-selected", String(i === active));
        step.tabIndex = i === active ? 0 : -1;
      });
      tiles.forEach((tile, i) => tile.toggleAttribute("data-active", i === active));
      root.style.setProperty("--sfs-active-accent", accentOf(active));
      if (phone.matches && source !== "scroll" && source !== "init") scrollStripTo(active);
      playVideos();
      if (live && source !== "init") {
        const step = steps[active];
        live.textContent = `${step.querySelector(".sfs-step-title")?.textContent}: ${step.querySelector(".sfs-step-desc")?.textContent}`;
      }
      if (source !== "init") {
        root.dispatchEvent(new CustomEvent("sfs:change", { detail: { index: active, id: steps[active].dataset.sfsStep } }));
      }
    }
    const next = () => setActive(active + 1, "api");
    const prev = () => setActive(active - 1, "api");
    const goTo = (target) =>
      setActive(typeof target === "number" ? target : steps.findIndex((s) => s.dataset.sfsStep === target), "api");

    function sync() {
      const enabled = config.autoplay && !reducedMotion.matches && total > 1;
      const running = enabled && pausers.size === 0;
      root.dataset.autoplay = enabled ? "on" : "off";
      root.toggleAttribute("data-paused", !running);
      live?.setAttribute("aria-live", running ? "off" : "polite");
      playVideos();
    }
    const hold = (reason, on) => {
      on ? pausers.add(reason) : pausers.delete(reason);
      sync();
    };

    // ---- The list: hover, focus, tap and arrow keys --------------------------
    steps.forEach((step, i) => {
      step.addEventListener("pointerenter", (event) => {
        if (event.pointerType === "mouse") setActive(i, "hover");
      });
      step.addEventListener("click", () => setActive(i, "click"));
      step.addEventListener("focus", () => setActive(i, "focus"));
    });
    list.addEventListener("keydown", (event) => {
      const moves = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1, Home: -active, End: total - 1 - active };
      if (!(event.key in moves)) return;
      event.preventDefault();
      steps[(((active + moves[event.key]) % total) + total) % total].focus();
    });

    // ---- The tiles: hover, the tile button, parallax and sheen ----------------
    tiles.forEach((tile, i) => {
      tile.addEventListener("pointerenter", (event) => {
        if (event.pointerType === "mouse") setActive(i, "hover");
      });
      tile.querySelector("button.sfs-hit")?.addEventListener("click", () => setActive(i, "click"));
    });
    const parallax = { x: 0, y: 0, tx: 0, ty: 0, frame: 0, tile: null };
    function stepParallax() {
      parallax.x += (parallax.tx - parallax.x) * LERP;
      parallax.y += (parallax.ty - parallax.y) * LERP;
      const tile = tiles[active];
      tile.style.setProperty("--px", parallax.x.toFixed(3));
      tile.style.setProperty("--py", parallax.y.toFixed(3));
      parallax.frame =
        Math.abs(parallax.tx - parallax.x) + Math.abs(parallax.ty - parallax.y) > 0.002 ? requestAnimationFrame(stepParallax) : 0;
    }
    grid.addEventListener("pointermove", (event) => {
      if (event.pointerType !== "mouse") return;
      const tile = event.target.closest("[data-sfs-tile]");
      if (!tile) return;
      const box = tile.getBoundingClientRect();
      const x = (event.clientX - box.left) / box.width;
      const y = (event.clientY - box.top) / box.height;
      tile.style.setProperty("--mx", `${(x * 100).toFixed(1)}%`);
      tile.style.setProperty("--my", `${(y * 100).toFixed(1)}%`);
      if (!config.parallax || reducedMotion.matches || !finePointer.matches || tile !== tiles[active]) return;
      parallax.tx = (x - 0.5) * -2;
      parallax.ty = (y - 0.5) * -2;
      parallax.frame ||= requestAnimationFrame(stepParallax);
    });
    grid.addEventListener("pointerleave", () => {
      parallax.tx = parallax.ty = 0;
      parallax.frame ||= requestAnimationFrame(stepParallax);
    });

    // Each caption sits lowered by its description's height until the tile is in the spotlight.
    new ResizeObserver(() => {
      tiles.forEach((tile) => {
        const desc = tile.querySelector(".sfs-caption-desc");
        if (desc) tile.style.setProperty("--desc-h", `${desc.offsetHeight}px`);
      });
    }).observe(grid);

    // Phones: the snapped tile becomes the active feature (and tapping a feature scrolls to its tile).
    const snap = new IntersectionObserver(
      (entries) => {
        if (!phone.matches || Date.now() - programmaticScroll < 700) return;
        const seen = entries.filter((e) => e.isIntersecting).sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
        if (seen) setActive(tiles.indexOf(seen.target), "scroll");
      },
      { root: grid, threshold: 0.6 },
    );
    tiles.forEach((tile) => snap.observe(tile));

    // ---- The call to action's magnetic pull (mouse only) ----------------------
    const cta = root.querySelector(".sfs-cta");
    if (cta) {
      const magnet = { x: 0, y: 0, tx: 0, ty: 0, frame: 0 };
      const stepMagnet = () => {
        magnet.x += (magnet.tx - magnet.x) * 0.18;
        magnet.y += (magnet.ty - magnet.y) * 0.18;
        cta.style.setProperty("--mag-x", `${magnet.x.toFixed(2)}px`);
        cta.style.setProperty("--mag-y", `${magnet.y.toFixed(2)}px`);
        magnet.frame = Math.abs(magnet.tx - magnet.x) + Math.abs(magnet.ty - magnet.y) > 0.05 ? requestAnimationFrame(stepMagnet) : 0;
      };
      cta.addEventListener("pointermove", (event) => {
        if (event.pointerType !== "mouse" || reducedMotion.matches) return;
        const box = cta.getBoundingClientRect();
        magnet.tx = Math.max(-1, Math.min(1, (event.clientX - box.left - magnet.x) / box.width * 2 - 1)) * 6;
        magnet.ty = Math.max(-1, Math.min(1, (event.clientY - box.top - magnet.y) / box.height * 2 - 1)) * 6;
        magnet.frame ||= requestAnimationFrame(stepMagnet);
      });
      cta.addEventListener("pointerleave", () => {
        magnet.tx = magnet.ty = 0;
        magnet.frame ||= requestAnimationFrame(stepMagnet);
      });
    }

    // ---- Autoplay holds: hover, focus, a hidden tab, off screen -------------
    [list, grid].forEach((el) => {
      el.addEventListener("pointerenter", (event) => event.pointerType === "mouse" && hold("hover", true));
      el.addEventListener("pointerleave", () => hold("hover", false));
    });
    root.addEventListener("focusin", () => hold("focus", true));
    root.addEventListener("focusout", (event) => !root.contains(event.relatedTarget) && hold("focus", false));
    document.addEventListener("visibilitychange", () => hold("hidden", document.hidden));
    list.addEventListener("animationend", (event) => {
      if (event.target.closest(".sfs-step-progress") && event.target.closest("[data-active]")) setActive(active + 1, "autoplay");
    });
    reducedMotion.addEventListener("change", sync);

    // ---- Reveal on scroll, then autoplay -------------------------------------
    new IntersectionObserver(
      ([entry]) => {
        hold("offscreen", !entry.isIntersecting);
        if (entry.isIntersecting && !root.hasAttribute("data-revealed")) {
          root.setAttribute("data-revealing", "");
          root.setAttribute("data-revealed", "");
          setTimeout(() => {
            root.removeAttribute("data-revealing");
            hold("reveal", false);
          }, 1500);
        }
      },
      { threshold: 0.25 },
    ).observe(root);

    setActive(0, "init");
    root.dataset.ready = "";
    sync();
    const api = { next, prev, goTo, pause: () => hold("user", true), play: () => hold("user", false) };
    Object.assign(root, api, { sfs: api });
    return api;
  }

  window.SpotlightFeatureShowcase = { mount, stepHTML, tileHTML, schema };
  document.querySelectorAll("[data-sfs]").forEach((root) => mount(root));
})();
    </script>

    <!-- Demo only: the theme switch. -->
    <script>
      (() => {
        const buttons = document.querySelectorAll(".demo-theme-btn");
        const current = () => document.documentElement.dataset.theme || "system";
        const render = () => buttons.forEach((b) => b.setAttribute("aria-pressed", String(b.dataset.value === current())));
        buttons.forEach((button) =>
          button.addEventListener("click", () => {
            const value = button.dataset.value;
            if (value === "system") delete document.documentElement.dataset.theme;
            else document.documentElement.dataset.theme = value;
            try {
              value === "system" ? localStorage.removeItem("sfs-demo-theme") : localStorage.setItem("sfs-demo-theme", value);
            } catch {}
            render();
          }),
        );
        render();
      })();
    </script>
  </body>
</html>
1 file5 assets

About

A landing-page feature section where the two columns talk to each other: a feature list drawn as a timeline on the left, a bento grid of image tiles on the right. Point at a feature or a tile, or let autoplay run, and that feature takes the spotlight on both sides. Light and dark themes, accessible, works without JavaScript, and it's a single HTML file with no framework and no build step.

What you get

  • A timeline that leads. Each feature has a ring marker: the active one fills with its accent color and glows, the connector line draws down to it, and a thin line shows the autoplay progress.
  • A spotlight on the grid. The active tile comes forward in full color with an accent-tinted border and glow, its caption rises with a one-line description, and the other tiles step back. The headline gradient, the backdrop glow and the button fade to the active feature's color.
  • Tiles with life. A slow Ken Burns zoom and pointer parallax on the active tile, a sheen that follows the cursor, glass pills for the icon and category, and captions that read on any image. A tile can be a link or a button, and can hold a muted looping video.
  • Motion on arrival. The eyebrow, the headline word by word, the list, then the tiles. The call to action has a shimmer, a magnetic pull and a nudging arrow.
  • Every screen size. A bento grid on desktop (or a plain 2 × 2 grid), 2 × 2 on tablets, and a swipeable snap strip on phones where the snapped tile is the active feature.
  • Accessible and indexable. A real tablist with arrow-key navigation, a polite live region, visible focus, JSON-LD for the features, and reduced motion that keeps only fades.

Easy to make your own

The features live in one JSON block: title, description, accent color, category, icon, image or video, and link. There are options for autoplay, interval, layout, parallax and theme; next(), prev(), goTo(), pause() and play() plus an sfs:change event; and every color, radius and blur is a --sfs-* CSS variable.

Light and fast

Only transform and opacity animate, the first image loads with high priority and the rest lazily, and nothing shifts while it loads. The script is 3.6 KB gzipped. Works in the latest Chrome, Edge, Firefox and Safari (17.5 or newer).

What's in the download

index.html (open it and it runs), the sources in src/ with a build script, the Geist font (SIL OFL 1.1) and four demo photos from Unsplash, free for commercial use. Swap in screenshots of your own product.

Reviews and bugs

0 reviews · 0 bugs

Ship it0With fixes0Skip0· 0 reviews

0 bugs0 open0 fixed

Members who have it review it and report its bugs. Sign in

No reviews or bugs yet.

Use it on your site

Plain HTML, CSS and JS

  1. 01

    Open it

    Download it and open index.html in a browser: everything it uses is in the folder, at the paths it refers to.

  2. 02

    Copy the section into your page

    Its markup from index.html, with the styles and scripts it needs (the page’s own <style> and <script> blocks). In a framework, its markup goes in a template and its script runs once the section is on the page.

  3. 03

    Bring its pictures and a font

    The page refers to them by paths from itself (fonts/geist-latin.woff2, …): copy the folders along, so the paths still lead there.

Before you buy

Everything you need to know

How this component gets from the preview into your project, and what buyers ask most.

How to use it

From the preview to your project

  1. 01

    Try it in the preview

    Switch between light and dark, and resize it to phone and tablet widths, before you decide.

  2. 02

    Get it

    Free products are yours with a free account. Paid ones settle in USDT on TRON, sent straight to the wallet on your order.

  3. 03

    Install it

    Components go into your project with one shadcn command, dependencies included. Everything else downloads with a checksum.

  4. 04

    Make it yours

    It's your code now: rename it, restyle it and wire in your real data.

  5. 05

    Or hand it to your AI

    Copy the prompt and let your coding assistant place it in your project, following your conventions.

Building with an AI assistant?

Copy a ready-made prompt with the code, its dependencies and a demo, and your assistant can put it in place for you.

Copy AI prompt

Selling your own work?

Get approved once, then publish components, templates and mobile components, paid in USDT straight to your own wallet.