/* Signal Engine — homepage hero carousel (5 frames)
   Requires DM Sans + JetBrains Mono (already loaded by the homepage). */
se-hero-carousel,
.se-hc {
  --se-hc-bg: #1c2025;
  --se-hc-ink: #f1f2f4;
  --se-hc-ink-2: rgba(241, 242, 244, .74);
  --se-hc-ink-3: rgba(241, 242, 244, .48);
  --se-hc-ink-4: rgba(241, 242, 244, .30);
  --se-hc-ember: #ff7a4d;
  --se-hc-ease: cubic-bezier(.4, 0, .2, 1);
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  background: var(--se-hc-bg);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .2);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--se-hc-ink);
  container: se-hc / inline-size;
  outline: none;
}
.se-hc:focus-visible { box-shadow: 0 0 0 3px rgba(255, 122, 77, .18), 0 30px 80px -30px rgba(0, 0, 0, .7); }
.se-hc *, .se-hc *::before, .se-hc *::after { box-sizing: border-box; }

/* Top bar */
.se-hc__bar {
  height: 34px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font: 400 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .14em; text-transform: uppercase;
}
.se-hc__labels { display: grid; min-width: 0; }
.se-hc__label { grid-area: 1 / 1; color: var(--se-hc-ember); white-space: nowrap; opacity: 0; transition: opacity 500ms ease; }
.se-hc__label.is-active { opacity: 1; }
.se-hc__count { color: var(--se-hc-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Media: one composed image per frame. Aspect matches the exported masters. */
.se-hc__media { position: relative; overflow: hidden; aspect-ratio: 544 / 388; background: var(--se-hc-bg); }
.se-hc__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 700ms var(--se-hc-ease); }
.se-hc__slide.is-active { opacity: 1; }
.se-hc__slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0;
  transform-origin: 50% 35%; transform: scale(1);
  transition: transform 0s linear 800ms;
}
.se-hc__slide[data-bleed="true"] img { transform-origin: 30% 20%; }
.se-hc.is-playing .se-hc__slide.is-active img { transform: scale(1.035); transition: transform 7800ms linear; }
.se-hc__img--mobile { display: none; }
@container se-hc (max-width: 439px) {
  .se-hc__media { aspect-ratio: 346 / 386; }
  .se-hc__img--desktop { display: none; }
  .se-hc__img--mobile { display: block; }
}

/* Super panel — overlays the foot of the media */
.se-hc__panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 14px 18px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.se-hc__panel::before,
.se-hc__panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; transition: opacity 700ms var(--se-hc-ease); }
.se-hc__panel::before { top: 0; background: var(--se-hc-bg); border-top: 1px solid rgba(255, 255, 255, .10); opacity: 1; }
.se-hc__panel::after { top: -56px; background: linear-gradient(rgba(28,32,37,0) 0%, rgba(28,32,37,.88) 30%, rgba(28,32,37,.97) 55%, #1c2025 100%); opacity: 0; }
.se-hc.is-bleed .se-hc__panel::before { opacity: 0; }
.se-hc.is-bleed .se-hc__panel::after { opacity: 1; }

.se-hc__supers { display: grid; }
.se-hc__super { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity 600ms var(--se-hc-ease); }
.se-hc__super.is-active { opacity: 1; }
.se-hc__super h3 {
  margin: 0; font-size: clamp(20px, 4.9cqi, 27px); font-weight: 500; line-height: 1.05;
  letter-spacing: -.025em; color: var(--se-hc-ink); text-wrap: balance;
}
.se-hc__super p {
  margin: 0; font-size: clamp(13px, 2.6cqi, 14px); line-height: 1.45;
  color: var(--se-hc-ink-2); max-width: 52ch; text-wrap: pretty;
}

/* Controls (created by JS) */
.se-hc__controls { display: flex; align-items: center; gap: 10px; }
.se-hc__controls[hidden] { display: none; }
.se-hc__segs { flex: 1; display: flex; gap: 4px; min-width: 0; }
.se-hc__seg { flex: 1; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; }
.se-hc__seg:hover { opacity: .85; }
.se-hc__track { position: relative; display: block; width: 100%; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.se-hc__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--se-hc-ink-4); }
.se-hc__seg.is-past .se-hc__fill { width: 100%; }
.se-hc__seg[aria-current="true"] .se-hc__fill { background: var(--se-hc-ember); width: var(--p, 100%); }
.se-hc__arrows { display: flex; gap: 6px; flex: none; }
.se-hc__arrow {
  width: 30px; height: 30px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16);
  background: transparent; color: var(--se-hc-ink-2); cursor: pointer;
  font: 400 13px/1 'JetBrains Mono', ui-monospace, monospace;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s var(--se-hc-ease), border-color .2s var(--se-hc-ease);
}
.se-hc__arrow:hover { color: var(--se-hc-ember); border-color: rgba(255, 122, 77, .5); }
.se-hc__seg:focus-visible, .se-hc__arrow:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 122, 77, .18); border-radius: 99px; }
@media (pointer: coarse) {
  .se-hc__seg { height: 44px; }
  .se-hc__arrow { width: 44px; height: 44px; }
}

.se-hc__context {
  margin: -4px 0 0; font: 400 9.5px/1.4 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--se-hc-ink-3);
}
.se-hc__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .se-hc__slide, .se-hc__super, .se-hc__label, .se-hc__panel::before, .se-hc__panel::after { transition: none; }
  .se-hc .se-hc__slide img { transform: none !important; transition: none !important; }
}
