/* Demo & tutorials page (/demo/). Uses the site's design tokens from main.css. */
.demo-hero-in { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-5); }
.demo-hero-in > div:first-child { flex: 1 1 32rem; min-width: 0; }
.demo-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem); }

/* interface-language picker (same markup as the home page) */
.demo-hero .bsh-lang { position: relative; }
.demo-hero .bsh-lang-btn { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-ink-2); color: var(--c-text); font: 500 .95rem var(--f-body); cursor: pointer; }
.demo-hero .bsh-lang-btn:hover, .demo-hero .bsh-lang-btn[aria-expanded="true"] { border-color: var(--c-muted); }
.demo-hero .bsh-ico, .demo-hero .bsh-chev { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-hero .bsh-lang-btn[aria-expanded="true"] .bsh-chev { transform: rotate(180deg); }
.demo-hero .bsh-lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 190px; margin: 0; padding: 6px; list-style: none; border-radius: var(--r); background: var(--c-ink-2); border: 1px solid var(--c-line); box-shadow: var(--shadow); }
.demo-hero .bsh-lang-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--c-text); font: inherit; text-align: left; cursor: pointer; }
.demo-hero .bsh-lang-menu button:hover { background: var(--c-ink-3); }
.demo-hero .bsh-lang-menu button[aria-pressed="true"] { color: var(--c-gold-2); font-weight: 600; }

/* tutorial-language filter */
.demo-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-6); }
.demo-filter-label { margin-right: var(--s-2); color: var(--c-muted); font-size: var(--fs-sm); font-weight: 600; }
.demo-chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--c-line); border-radius: 999px; background: transparent; color: var(--c-text); font: 600 .92rem var(--f-body); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.demo-chip:hover { border-color: var(--c-muted); }
.demo-chip[aria-pressed="true"] { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-gold-ink); }

/* tutorial cards */
.demo-group + .demo-group { margin-top: var(--s-7); }
.demo-group-title { margin-bottom: var(--s-5); font-size: var(--fs-h3); }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin: 0; padding: 0; list-style: none; }
.demo-card[hidden] { display: none; }
.demo-card article { display: flex; flex-direction: column; height: 100%; border-radius: var(--r-lg); background: var(--c-ink-2); border: 1px solid var(--c-line); overflow: hidden; box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .7); }
.demo-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.demo-video iframe, .demo-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-facade { display: block; overflow: hidden; }
.demo-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; opacity: .92; }
.demo-facade:hover img { transform: scale(1.02); opacity: 1; }
.demo-facade:focus-visible { box-shadow: inset 0 0 0 4px var(--c-gold); border-radius: 0; }
.demo-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); transition: transform .2s; }
.demo-play svg { display: block; width: 100%; height: 100%; }
.demo-play path:first-child { fill: rgba(18, 26, 48, .86); transition: fill .2s; }
.demo-facade:hover .demo-play path:first-child, .demo-facade:focus-visible .demo-play path:first-child { fill: #d92b2b; }
.demo-body { flex: 1; padding: var(--s-5) var(--s-5) var(--s-3); }
.demo-badge { display: inline-block; margin-bottom: var(--s-3); padding: .25em .75em; border-radius: 999px; background: rgba(91, 140, 255, .16); color: #cdd9ff; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.demo-body h3 { margin-bottom: var(--s-2); font-size: 1.25rem; }
.demo-body p { margin: 0; color: var(--c-muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-5); }
.demo-actions .btn { min-height: 44px; }
.demo-actions .icon { width: 1em; height: 1em; }

/* call to action */
.demo-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-5); }

@media (max-width: 860px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .demo-body, .demo-actions { padding-inline: var(--s-4); }
  .demo-actions .btn, .demo-cta-actions .btn { flex: 1 1 100%; }
  .demo-hero .bsh-lang, .demo-hero .bsh-lang-btn { width: 100%; justify-content: center; }
  .demo-hero .bsh-lang-menu { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-facade img, .demo-play, .demo-chip { transition: none; }
}
