@manufosela/hero-scroll-animation

@manufosela/hero-scroll-animation

Hero section with scroll-driven parallax animation and image reveal

Hero Scroll Animation

Hero section with scroll-driven parallax animation. Content fades out as images slide in on scroll.

Basic Usage

Scroll down through the hero to see the parallax effect. The content fades out while a center image rises and side images slide in from the sides.

Mountain landscape River in the forest Bridge over a canyon Dramatic cliff face

Explore the World

Scroll down to discover a beautiful parallax experience with images sliding into view.

Keep scrolling for the next demo...

Basic Usage — Code

<hero-scroll-animation background-text="EXPLORE"> <img slot="background" src="mountains.jpg" /> <img slot="center" src="river.jpg" /> <img slot="left" src="bridge.jpg" /> <img slot="right" src="cliff.jpg" /> <div slot="content"> <h1>Explore the World</h1> <p>Scroll down to discover...</p> </div> </hero-scroll-animation>

Minimal — Center Only

Use only the center slot for a focused, single-image experience. Pair with a custom accent color and a shorter scroll-height for a more compact section.

Person in a landscape Colorful food arrangement

Keep the Focus

Sometimes one powerful image is all you need. No distractions — just the story you want to tell.

Keep scrolling for the next demo...

Minimal — Center Only — Code

<hero-scroll-animation background-text="FOCUS" scroll-height="400" style=" --hero-accent-color: #e63946; --hero-bg-gradient-start: #e63946; --hero-bg-gradient-end: #f4a261; " > <img slot="background" src="bg.jpg" /> <img slot="center" src="center.jpg" /> <div slot="content"> <h1>Keep the Focus</h1> <p>Sometimes one powerful image is all you need.</p> </div> </hero-scroll-animation>

Full Layout with Custom Colors

All four slots (background, center, left, right) combined with a bold blue/cyan theme via CSS custom properties and a taller scroll-height.

Creative desk setup Scenic landscape Water reflection Classic car

Create Without Limits

A full four-image layout with a vivid cyan palette — use the CSS custom properties to match any brand identity.

Keep scrolling for the next demo...

Full Layout with Custom Colors — Code

<hero-scroll-animation background-text="CREATE" scroll-height="700" style=" --hero-accent-color: #06b6d4; --hero-bg-gradient-start: #0284c7; --hero-bg-gradient-end: #67e8f9; " > <img slot="background" src="desk.jpg" /> <img slot="center" src="landscape.jpg" /> <img slot="left" src="water.jpg" /> <img slot="right" src="car.jpg" /> <div slot="content"> <h1>Create Without Limits</h1> <p>A full four-image layout with a vivid cyan palette.</p> </div> </hero-scroll-animation>

Reduced Motion

A compact demo with scroll-height="300". The component automatically respects the user's prefers-reduced-motion OS setting — animations are disabled when the user has opted for reduced motion.

This component honours prefers-reduced-motion: reduce — no extra configuration needed.
Calm misty forest Peaceful nature scene

Calm & Accessible

Animations pause automatically for users who prefer reduced motion, keeping the experience comfortable for everyone.

End of demos

Reduced Motion — Code

<!-- No extra config needed — prefers-reduced-motion is handled automatically --> <hero-scroll-animation background-text="CALM" scroll-height="300"> <img slot="background" src="forest.jpg" /> <img slot="center" src="nature.jpg" /> <div slot="content"> <h1>Calm &amp; Accessible</h1> <p>Animations pause automatically for users who prefer reduced motion.</p> </div> </hero-scroll-animation>

CSS Custom Properties

Customize the hero appearance with CSS custom properties applied directly to the element.

Property Default Description
--hero-accent-color #bfa15f Accent color for decorative elements
--hero-text-color #f0f0f0 Default text color inside the hero
--hero-bg-gradient-start #d4af37 Start color for the background text gradient
--hero-bg-gradient-end #f4e4b0 End color for the background text gradient
<hero-scroll-animation style=" --hero-accent-color: #e63946; --hero-bg-gradient-start: #e63946; --hero-bg-gradient-end: #f4a261; "> ... </hero-scroll-animation>
Demo code (CodePen-ready HTML, CSS, JS)
HTML (html)
<div class="info-section">
    <h1>Hero Scroll Animation</h1>
    <p class="subtitle">Hero section with scroll-driven parallax animation. Content fades out as images slide in on scroll.</p>
    <div class="demo-links">
      <a href="https://manufosela.dev/ui-components/">&larr; Back to components</a>
      <a href="https://github.com/manufosela/ui-components/tree/main/packages/hero-scroll-animation" target="_blank" rel="noopener">GitHub Repo</a>
      <a href="playground.html">Playground</a>
      <a href="https://www.npmjs.com/package/@manufosela/hero-scroll-animation" target="_blank" rel="noopener">npm</a>
    </div>
    <div class="demo-theme-toggle">
      <theme-toggle theme="dark"></theme-toggle>
    </div>
  </div>

  <!-- Demo 1: Basic Usage — Default with 3 images -->
  <div class="info-section">
    <div class="demo-section">
      <h2>Basic Usage</h2>
      <p>Scroll down through the hero to see the parallax effect. The content fades out while a center image rises and side images slide in from the sides.</p>
    </div>
  </div>

  <hero-scroll-animation background-text="EXPLORE">
    <img slot="background" src="https://picsum.photos/id/1018/1200/800" alt="Mountain landscape" />
    <img slot="center" src="https://picsum.photos/id/1015/600/400" alt="River in the forest" />
    <img slot="left" src="https://picsum.photos/id/1019/400/600" alt="Bridge over a canyon" />
    <img slot="right" src="https://picsum.photos/id/1016/400/600" alt="Dramatic cliff face" />
    <div slot="content" class="hero-content">
      <h1>Explore the World</h1>
      <p>Scroll down to discover a beautiful parallax experience with images sliding into view.</p>
    </div>
  </hero-scroll-animation>

  <div class="demo-spacer">
    <p>Keep scrolling for the next demo...</p>
  </div>

  <div class="info-section">
    <div class="demo-section">
      <h2>Basic Usage — Code</h2>
      <div class="code-block">&lt;hero-scroll-animation background-text="EXPLORE"&gt;
  &lt;img slot="background" src="mountains.jpg" /&gt;
  &lt;img slot="center" src="river.jpg" /&gt;
  &lt;img slot="left" src="bridge.jpg" /&gt;
  &lt;img slot="right" src="cliff.jpg" /&gt;
  &lt;div slot="content"&gt;
    &lt;h1&gt;Explore the World&lt;/h1&gt;
    &lt;p&gt;Scroll down to discover...&lt;/p&gt;
  &lt;/div&gt;
&lt;/hero-scroll-animation&gt;</div>
    </div>
  </div>

  <!-- Demo 2: Minimal — Center Only -->
  <div class="info-section">
    <div class="demo-section">
      <h2>Minimal — Center Only</h2>
      <p>Use only the <code>center</code> slot for a focused, single-image experience. Pair with a custom accent color and a shorter <code>scroll-height</code> for a more compact section.</p>
    </div>
  </div>

  <hero-scroll-animation
    background-text="FOCUS"
    scroll-height="400"
    style="--hero-accent-color: #e63946; --hero-bg-gradient-start: #e63946; --hero-bg-gradient-end: #f4a261;"
  >
    <img slot="background" src="https://picsum.photos/id/1040/1200/800" alt="Person in a landscape" />
    <img slot="center" src="https://picsum.photos/id/1043/600/400" alt="Colorful food arrangement" />
    <div slot="content" class="hero-content">
      <h1>Keep the Focus</h1>
      <p>Sometimes one powerful image is all you need. No distractions — just the story you want to tell.</p>
    </div>
  </hero-scroll-animation>

  <div class="demo-spacer">
    <p>Keep scrolling for the next demo...</p>
  </div>

  <div class="info-section">
    <div class="demo-section">
      <h2>Minimal — Center Only — Code</h2>
      <div class="code-block">&lt;hero-scroll-animation
  background-text="FOCUS"
  scroll-height="400"
  style="
    --hero-accent-color: #e63946;
    --hero-bg-gradient-start: #e63946;
    --hero-bg-gradient-end: #f4a261;
  "
&gt;
  &lt;img slot="background" src="bg.jpg" /&gt;
  &lt;img slot="center" src="center.jpg" /&gt;
  &lt;div slot="content"&gt;
    &lt;h1&gt;Keep the Focus&lt;/h1&gt;
    &lt;p&gt;Sometimes one powerful image is all you need.&lt;/p&gt;
  &lt;/div&gt;
&lt;/hero-scroll-animation&gt;</div>
    </div>
  </div>

  <!-- Demo 3: Full Layout with Custom Colors -->
  <div class="info-section">
    <div class="demo-section">
      <h2>Full Layout with Custom Colors</h2>
      <p>All four slots (<code>background</code>, <code>center</code>, <code>left</code>, <code>right</code>) combined with a bold blue/cyan theme via CSS custom properties and a taller <code>scroll-height</code>.</p>
    </div>
  </div>

  <hero-scroll-animation
    background-text="CREATE"
    scroll-height="700"
    style="--hero-accent-color: #06b6d4; --hero-bg-gradient-start: #0284c7; --hero-bg-gradient-end: #67e8f9;"
  >
    <img slot="background" src="https://picsum.photos/id/180/1200/800" alt="Creative desk setup" />
    <img slot="center" src="https://picsum.photos/id/160/600/400" alt="Scenic landscape" />
    <img slot="left" src="https://picsum.photos/id/167/400/600" alt="Water reflection" />
    <img slot="right" src="https://picsum.photos/id/177/400/600" alt="Classic car" />
    <div slot="content" class="hero-content">
      <h1>Create Without Limits</h1>
      <p>A full four-image layout with a vivid cyan palette — use the CSS custom properties to match any brand identity.</p>
    </div>
  </hero-scroll-animation>

  <div class="demo-spacer">
    <p>Keep scrolling for the next demo...</p>
  </div>

  <div class="info-section">
    <div class="demo-section">
      <h2>Full Layout with Custom Colors — Code</h2>
      <div class="code-block">&lt;hero-scroll-animation
  background-text="CREATE"
  scroll-height="700"
  style="
    --hero-accent-color: #06b6d4;
    --hero-bg-gradient-start: #0284c7;
    --hero-bg-gradient-end: #67e8f9;
  "
&gt;
  &lt;img slot="background" src="desk.jpg" /&gt;
  &lt;img slot="center" src="landscape.jpg" /&gt;
  &lt;img slot="left" src="water.jpg" /&gt;
  &lt;img slot="right" src="car.jpg" /&gt;
  &lt;div slot="content"&gt;
    &lt;h1&gt;Create Without Limits&lt;/h1&gt;
    &lt;p&gt;A full four-image layout with a vivid cyan palette.&lt;/p&gt;
  &lt;/div&gt;
&lt;/hero-scroll-animation&gt;</div>
    </div>
  </div>

  <!-- Demo 4: Reduced Motion -->
  <div class="info-section">
    <div class="demo-section">
      <h2>Reduced Motion</h2>
      <p>A compact demo with <code>scroll-height="300"</code>. The component automatically respects the user's <code>prefers-reduced-motion</code> OS setting — animations are disabled when the user has opted for reduced motion.</p>
      <span class="motion-note">This component honours <code>prefers-reduced-motion: reduce</code> — no extra configuration needed.</span>
    </div>
  </div>

  <hero-scroll-animation background-text="CALM" scroll-height="300">
    <img slot="background" src="https://picsum.photos/id/1047/1200/800" alt="Calm misty forest" />
    <img slot="center" src="https://picsum.photos/id/1050/600/400" alt="Peaceful nature scene" />
    <div slot="content" class="hero-content">
      <h1>Calm &amp; Accessible</h1>
      <p>Animations pause automatically for users who prefer reduced motion, keeping the experience comfortable for everyone.</p>
    </div>
  </hero-scroll-animation>

  <div class="demo-spacer">
    <p>End of demos</p>
  </div>

  <div class="info-section">
    <div class="demo-section">
      <h2>Reduced Motion — Code</h2>
      <div class="code-block">&lt;!-- No extra config needed — prefers-reduced-motion is handled automatically --&gt;
&lt;hero-scroll-animation background-text="CALM" scroll-height="300"&gt;
  &lt;img slot="background" src="forest.jpg" /&gt;
  &lt;img slot="center" src="nature.jpg" /&gt;
  &lt;div slot="content"&gt;
    &lt;h1&gt;Calm &amp;amp; Accessible&lt;/h1&gt;
    &lt;p&gt;Animations pause automatically for users who prefer reduced motion.&lt;/p&gt;
  &lt;/div&gt;
&lt;/hero-scroll-animation&gt;</div>
    </div>
  </div>

  <!-- CSS Custom Properties Reference -->
  <div class="info-section">
    <div class="demo-section">
      <h2>CSS Custom Properties</h2>
      <p>Customize the hero appearance with CSS custom properties applied directly to the element.</p>
      <table class="props-table">
        <thead>
          <tr>
            <th>Property</th>
            <th>Default</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><code>--hero-accent-color</code></td>
            <td><code>#bfa15f</code></td>
            <td>Accent color for decorative elements</td>
          </tr>
          <tr>
            <td><code>--hero-text-color</code></td>
            <td><code>#f0f0f0</code></td>
            <td>Default text color inside the hero</td>
          </tr>
          <tr>
            <td><code>--hero-bg-gradient-start</code></td>
            <td><code>#d4af37</code></td>
            <td>Start color for the background text gradient</td>
          </tr>
          <tr>
            <td><code>--hero-bg-gradient-end</code></td>
            <td><code>#f4e4b0</code></td>
            <td>End color for the background text gradient</td>
          </tr>
        </tbody>
      </table>
      <div class="code-block">&lt;hero-scroll-animation style="
  --hero-accent-color: #e63946;
  --hero-bg-gradient-start: #e63946;
  --hero-bg-gradient-end: #f4a261;
"&gt;
  ...
&lt;/hero-scroll-animation&gt;</div>
    </div>
  </div>
CSS (css)
:root {
  --bg: #0c0f14;
  --bg-elevated: #141923;
  --bg-panel: #171d28;
  --border: #262f3f;
  --text: #f4f6fb;
  --text-muted: #a7b0c2;
  --text-dim: #7d879b;
  --accent: #ff8a3d;
  --accent-strong: #ff6a00;
  --accent-soft: rgba(255, 138, 61, 0.16);
  --shadow: 0 20px 50px rgba(5, 8, 14, 0.45);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1160px;
}

:root {
      --demo-bg: #f5f5f7;
      --demo-card-bg: #ffffff;
      --demo-text: #1d1d1f;
      --demo-muted: #86868b;
      --demo-border: #d2d2d7;
      --demo-code-bg: #1d1d1f;
      --demo-code-text: #f5f5f7;
      --demo-table-header-bg: #f9fafb;
      --demo-table-border: #e5e7eb;
      --demo-table-text: #374151;
      --demo-inline-code-bg: #f3f4f6;
    }
    :root.dark {
      --demo-bg: #0f1117;
      --demo-card-bg: #1c2233;
      --demo-text: #f3f6ff;
      --demo-muted: #b8c0d9;
      --demo-border: #2b3247;
      --demo-code-bg: #0b0f1a;
      --demo-code-text: #d6d9e6;
      --demo-table-header-bg: #1c2233;
      --demo-table-border: #2b3247;
      --demo-table-text: #b8c0d9;
      --demo-inline-code-bg: rgba(255, 255, 255, 0.1);
    }
    h1 { color: var(--demo-text); }
    .demo-section {
      background: var(--demo-card-bg);
      padding: 2rem;
      border-radius: 12px;
      margin-bottom: 2rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: background 0.3s ease;
    }
    .info-section {
      max-width: 900px;
      margin: 0 auto;
      padding: 2rem;
    }
    h2 { margin-top: 0; color: var(--demo-text); }
    p { color: var(--demo-muted); line-height: 1.6; }
    a { color: #3b82f6; }
    .code-block {
      background: var(--demo-code-bg);
      color: var(--demo-code-text);
      padding: 1rem;
      border-radius: 8px;
      font-family: monospace;
      font-size: 0.8rem;
      margin-top: 1rem;
      overflow: auto;
      max-height: 300px;
      white-space: pre;
      transition: background 0.3s ease, color 0.3s ease;
    }
    footer {
      text-align: center;
      margin-top: 3rem;
      padding: 2rem;
      border-top: 1px solid var(--demo-border);
      color: var(--demo-muted);
      font-size: 0.9rem;
      transition: border-color 0.3s ease;
    }
    footer a { color: var(--demo-text); text-decoration: none; }
    footer a:hover { text-decoration: underline; }

    /* Hero content styles for the demos */
    .hero-content {
      color: #f0f0f0;
      max-width: 700px;
      padding: 2rem;
    }
    .hero-content h1 {
      font-size: clamp(2rem, 5vw, 4rem);
      margin: 0 0 1rem;
      color: #ffffff;
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    .hero-content p {
      font-size: clamp(1rem, 2vw, 1.25rem);
      color: #e0e0e0;
      margin: 0;
      text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    }

    /* CSS table */
    .props-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }
    .props-table th,
    .props-table td {
      text-align: left;
      padding: 0.75rem 1rem;
      border-bottom: 1px solid var(--demo-table-border);
      transition: border-color 0.3s ease;
    }
    .props-table th {
      background: var(--demo-table-header-bg);
      color: var(--demo-text);
      font-weight: 600;
      transition: background 0.3s ease, color 0.3s ease;
    }
    .props-table td {
      color: var(--demo-table-text);
      transition: color 0.3s ease;
    }
    .props-table code {
      background: var(--demo-inline-code-bg);
      color: var(--demo-text);
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 0.85rem;
      transition: background 0.3s ease, color 0.3s ease;
    }

    /* Spacer between hero demos */
    .demo-spacer {
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--demo-bg);
      transition: background 0.3s ease;
    }
    .demo-spacer p {
      font-size: 1.5rem;
      color: var(--demo-muted);
    }

    /* Reduced motion note */
    .motion-note {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: var(--demo-inline-code-bg);
      color: var(--demo-text);
      border: 1px solid var(--demo-border);
      border-radius: 8px;
      padding: 0.6rem 1rem;
      font-size: 0.85rem;
      margin-top: 0.5rem;
    }
    .motion-note::before {
      content: "ℹ️";
      font-size: 1rem;
    }
  


@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --bg-spot-1: #f8e9d0;
  --bg-spot-2: #e8eef8;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #ffb000;
  --accent-2: #00a7d6;
  --accent-soft: rgba(255, 176, 0, 0.18);
  --surface-1: #f3f4f6;
  --surface-2: #eef2f7;
  --code-bg: #111827;
  --code-text: #f9fafb;
  --panel-bg: rgba(255, 255, 255, 0.85);
  --overlay-bg: rgba(255, 255, 255, 0.98);
}

:root.dark {
  --bg: #0f1117;
  --bg-2: #151a26;
  --bg-spot-1: #1a2136;
  --bg-spot-2: #1d1b34;
  --card: #1c2233;
  --text: #f3f6ff;
  --muted: #b8c0d9;
  --line: #2b3247;
  --accent: #ffb000;
  --accent-2: #00d0ff;
  --accent-soft: rgba(255, 176, 0, 0.25);
  --surface-1: #0b0f1a;
  --surface-2: #263046;
  --code-bg: #0b0f1a;
  --code-text: #d6d9e6;
  --panel-bg: rgba(28, 34, 51, 0.8);
  --overlay-bg: rgba(15, 17, 23, 0.98);
}

* {
  box-sizing: border-box;
}

a {
  color: var(--accent);
}

h1 {
  color: var(--accent);
}

.demo-links {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.demo-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.demo-links a:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.demo-theme-toggle {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

header {
  border-bottom: 1px solid var(--line);
}

.demo-card,
.section,
.demo-section,
.panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  box-shadow: 0 18px 36px rgba(6, 10, 24, 0.45);
}

.demo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-card .code-block {
  margin-top: auto;
}

.demo-grid,
.grid {
  align-items: stretch;
}

.demo-card h2,
.demo-card h3,
.section h2,
.demo-section h2,
.panel-header {
  color: var(--text);
}

.label,
.stat-label,
.category-title,
.subtitle,
.hint,
.note {
  color: var(--muted);
}

.info-item,
.capability,
.preference,
.option-group,
.output,
.current-url,
.event-log,
.result-card,
.log,
.stat {
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--text);
}

.info-item .label,
.capability .name {
  color: var(--muted);
}

.panel-header,
.options,
.topbar,
.top-links {
  background: var(--panel-bg);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.subtitle,
.hint,
.note,
.demo-card p,
.section p,
.demo-section p {
  color: var(--muted);
}

.code-block,
pre,
code {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
}

.value-display,
.output,
.result,
.demo-output {
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--text);
}

button {
  background: linear-gradient(120deg, var(--accent), #ff6a00);
  color: #111;
  border: none;
}

button:hover {
  filter: brightness(1.05);
}

input,
select,
textarea {
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--line);
}

footer {
  color: var(--muted);
}

footer a {
  color: var(--text);
}

arc-slider {
  --arc-slider-text-color: var(--text);
  --arc-slider-value-bg: var(--surface-1);
  --arc-slider-value-border: var(--line);
  --arc-slider-value-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

rich-select {
  --caller-background: var(--card);
  --caller-color: var(--text);
  --caller-border: 1px solid var(--line);
  --caller-hover-background: var(--surface-2);
  --caller-hover-color: var(--text);
  --caller-hover-border-color: var(--line);
  --caller-focus-border-color: var(--accent-2);
  --caller-focus-shadow: 0 0 0 3px rgba(0, 208, 255, 0.25);
  --caller-disabled-background: var(--surface-1);
  --caller-disabled-color: #6b7280;
  --caller-disabled-border-color: var(--line);
  --arrow-color: var(--muted);
  --selectOptions-background: var(--card);
  --selectOptions-border: 1px solid var(--line);
  --selectOptions-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  --input-background: var(--surface-1);
  --input-border: 1px solid var(--line);
  --input-color: var(--text);
  --input-placeholder-color: #6b7280;
  --option-color: var(--text);
  --option-hover-background: var(--surface-2);
  --option-hover-color: var(--text);
  --option-active-background: var(--accent);
  --option-active-color: #111;
  --option-selected-background: var(--accent-soft);
  --option-selected-color: var(--text);
  --option-disabled-background: var(--surface-1);
  --option-disabled-color: #6b7280;
}

multi-select {
  --multi-select-bg: var(--card);
  --multi-select-border-color: var(--line);
  --multi-select-border-hover: var(--line);
  --multi-select-border-focus: var(--accent-2);
  --multi-select-text-color: var(--text);
  --multi-select-placeholder-color: #6b7280;
  --multi-select-arrow-color: var(--muted);
  --multi-select-dropdown-bg: var(--card);
  --multi-select-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  --multi-select-option-hover-bg: var(--surface-2);
  --multi-select-option-selected-bg: var(--accent-soft);
}

tab-nav {
  --tab-bg: var(--card);
  --tab-border: var(--line);
  --tab-text: var(--muted);
  --tab-active-text: var(--text);
  --tab-hover-bg: var(--surface-2);
  --tab-active-border: var(--accent);
  --tab-disabled: #9ca3af;
}

slider-underline {
  --slider-track: var(--surface-2);
  --slider-fill: var(--accent);
  --slider-thumb: var(--accent);
  --slider-label-color: var(--text);
  --slider-tick-color: #9ca3af;
  --slider-tick-value-color: var(--muted);
}

header-nav {
  --header-bg: var(--card);
  --header-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  --header-link-color: var(--text);
  --header-link-hover: var(--accent);
  --header-mobile-hover-bg: var(--surface-2);
}

calendar-inline {
  --calendar-bg: var(--card);
  --calendar-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  --calendar-text: var(--text);
  --calendar-accent: var(--accent);
  --calendar-today: var(--accent-soft);
  --calendar-selected: var(--accent);
  --calendar-hover-bg: var(--surface-2);
  --calendar-muted: var(--muted);
  --calendar-muted-strong: #9ca3af;
  --calendar-other-month: #9ca3af;
  --calendar-disabled: #cbd5e1;
  --calendar-holiday: #ef4444;
  --calendar-holiday-selected: #111;
}

marked-calendar {
  --calendar-bg: var(--card);
  --calendar-border: var(--line);
  --calendar-title: var(--text);
  --calendar-muted: var(--muted);
  --calendar-surface: var(--surface-1);
  --calendar-accent: var(--accent);
  --calendar-accent-hover: #ff7a1a;
  --calendar-border-strong: var(--line);
  --calendar-contrast: #111;
  --calendar-nav-bg: var(--surface-1);
  --calendar-nav-hover: var(--surface-2);
}

radar-chart {
  --radar-bg: var(--card);
  --radar-grid-color: var(--line);
  --radar-axis-color: #94a3b8;
  --radar-label-color: var(--muted);
}

multi-carousel {
  --carousel-bg: var(--card);
  --carousel-arrow-bg: var(--surface-1);
  --carousel-arrow-color: var(--text);
  --carousel-arrow-hover-bg: var(--surface-2);
  --carousel-arrow-hover-color: var(--text);
  --carousel-nav-bg: var(--surface-1);
  --carousel-nav-color: var(--muted);
  --carousel-nav-hover: #9ca3af;
  --carousel-nav-active: var(--accent);
  --carousel-focus-color: var(--accent-2);
}

nav-list {
  --nav-list-bg: var(--card);
  --nav-list-border-color: var(--line);
  --nav-list-selected-border-color: var(--accent);
  --nav-list-selected-bg: var(--surface-2);
  --nav-list-hover-bg: var(--surface-2);
  --nav-list-selected-color: var(--text);
}

theme-toggle {
  --theme-toggle-bg: var(--card);
  --theme-toggle-icon-color: var(--muted);
  --theme-toggle-hover-bg: var(--surface-2);
  --theme-toggle-active-bg: var(--surface-1);
  --theme-toggle-active-color: var(--text);
  --theme-toggle-dark-bg: var(--card);
  --theme-toggle-dark-border: var(--line);
  --theme-toggle-dark-icon-color: var(--muted);
  --theme-toggle-dark-active-bg: var(--surface-1);
  --theme-toggle-dark-active-color: var(--text);
  --theme-toggle-dark-hover-bg: var(--surface-2);
}

qr-code {
  --qr-fg: #0f1117;
  --qr-bg: #f3f6ff;
}

click-clock {
  --clock-color: var(--text);
  --clock-bg: var(--card);
  --clock-muted-color: var(--muted);
}

historical-line {
  --title-color: var(--text);
  --border-color: var(--line);
  --year-bg: var(--surface-1);
}

circle-steps {
  --steps-muted: var(--muted);
  --steps-text: var(--text);
  --steps-pending: var(--surface-2);
}

rich-inputfile {
  --input-border: var(--line);
  --input-border-focus: var(--accent-2);
  --input-bg: var(--card);
  --input-label-color: var(--text);
  --input-hover-bg: var(--surface-2);
  --input-drag-bg: var(--accent-soft);
  --input-disabled-bg: var(--surface-1);
  --input-success-border: #22c55e;
  --input-success-bg: rgba(34, 197, 94, 0.12);
  --input-icon-color: #94a3b8;
  --input-text-color: var(--muted);
  --input-accent-color: var(--accent-2);
  --input-file-bg: var(--surface-1);
  --input-preview-bg: var(--surface-1);
  --input-file-name-color: var(--text);
  --input-file-size-color: var(--muted);
  --input-error-color: #ef4444;
  --input-hint-color: var(--muted);
}

data-card {
  --data-card-bg: var(--card);
  --data-card-border-color: var(--line);
  --data-card-title-color: var(--text);
  --data-card-desc-color: var(--muted);
  --data-card-info-bg: var(--overlay-bg);
  --data-card-info-close-bg: var(--surface-2);
  --data-card-info-close-color: var(--text);
  --data-card-info-close-hover-bg: var(--surface-1);
  --data-card-info-text: var(--text);
  --data-card-loading-color: var(--muted);
  --data-card-info-trigger-hover: var(--accent);
}

app-modal {
  --app-modal-bg: var(--card);
  --app-modal-body-color: var(--text);
  --app-modal-standalone-bg: rgba(255, 176, 0, 0.35);
  --app-modal-standalone-color: #111;
  --app-modal-standalone-hover-bg: rgba(255, 176, 0, 0.6);
}
JS (js)
document.querySelectorAll('.footer-year').forEach(el => el.textContent = new Date().getFullYear());
  

    import "https://esm.sh/@manufosela/hero-scroll-animation";
  

    import '../../theme-toggle/src/theme-toggle.js';

    const root = document.documentElement;

    const toggle = document.querySelector('theme-toggle');
    if (toggle) {
      toggle.theme = root.classList.contains('dark') ? 'dark' : 'light';
      toggle.addEventListener('theme-changed', (event) => {
        const theme = event.detail?.theme;
        if (!theme) return;
        root.classList.toggle('dark', theme === 'dark');
      });
    }