/* ═══════════════════════════════════════════════════════════════
   AliveUI — Motion-first CSS framework
   Base layer: tokens · depth · animations · components
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────── */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

html {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background-color: transparent;
  background-image: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  cursor: pointer;
}

:disabled {
  cursor: default;
}

button,
select {
  text-transform: none;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  /* Motion durations */
  --alive-duration-fast:   120ms;
  --alive-duration-normal: 200ms;
  --alive-duration-slow:   320ms;

  /* Easing curves */
  --alive-ease-standard:   cubic-bezier(0.2, 0, 0, 1);
  --alive-ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
  --alive-ease-exit:       cubic-bezier(0.3, 0, 0.8, 0.15);

  /* Depth shadows */
  --alive-shadow-d1:       none;
  --alive-shadow-d2:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --alive-shadow-d2-hover: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --alive-shadow-d3:       0 8px 40px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.08);

  /* Stagger defaults */
  --alive-stagger-gap: 60ms;
  --alive-index: 0;

  /* Inherited depth context — overridden by .d1/.d2/.d3 */
  --alive-duration: 0ms;
  --alive-ease:     linear;
}

/* ── Depth system ───────────────────────────────────────────────── */

/* d1 — base surface: flat, color-only transitions */
.d1 {
  --alive-depth:    1;
  --alive-duration: var(--alive-duration-normal);
  --alive-ease:     var(--alive-ease-standard);
}

/* d2 — elevated interactive: lifts and scales on hover */
.d2 {
  --alive-depth:    2;
  --alive-duration: var(--alive-duration-normal);
  --alive-ease:     var(--alive-ease-standard);
  box-shadow: var(--alive-shadow-d2);
  transition:
    box-shadow var(--alive-duration-normal) var(--alive-ease-standard),
    transform   var(--alive-duration-normal) var(--alive-ease-standard);
}
.d2:hover {
  box-shadow: var(--alive-shadow-d2-hover);
  transform: translateY(-1px) scale(1.004);
}
.d2:active {
  box-shadow: var(--alive-shadow-d2);
  transform: translateY(0) scale(0.998);
  transition-duration: var(--alive-duration-fast);
}

/* d3 — floating layer: strong shadow, emphasized entrance */
.d3 {
  --alive-depth:    3;
  --alive-duration: var(--alive-duration-slow);
  --alive-ease:     var(--alive-ease-emphasized);
  box-shadow: var(--alive-shadow-d3);
}

/* ── Keyframe animations ─────────────────────────────────────────── */

/* Entrances */
@keyframes alive-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes alive-fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes alive-fade-right {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes alive-fade-left {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes alive-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes alive-scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes alive-scale-up {
  from { opacity: 0; transform: scale(0.92) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Exits */
@keyframes alive-exit-down {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}
@keyframes alive-exit-up {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
@keyframes alive-exit-left {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-12px); }
}
@keyframes alive-exit-right {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(12px); }
}
@keyframes alive-exit-scale {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.94); }
}

/* Loop animations */
@keyframes alive-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}
@keyframes alive-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes alive-ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes alive-bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}
@keyframes alive-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── Entrance classes ────────────────────────────────────────────── */

.alive-enter {
  animation: alive-fade-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}
.alive-enter-down {
  animation: alive-fade-down var(--alive-duration-slow) var(--alive-ease-emphasized) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}
.alive-enter-right {
  animation: alive-fade-right var(--alive-duration-slow) var(--alive-ease-emphasized) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}
.alive-enter-left {
  animation: alive-fade-left var(--alive-duration-slow) var(--alive-ease-emphasized) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}
.alive-enter-fade {
  animation: alive-fade-in var(--alive-duration-normal) var(--alive-ease-standard) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}
.alive-enter-scale {
  animation: alive-scale-in var(--alive-duration-normal) var(--alive-ease-emphasized) both;
  animation-delay: calc(var(--alive-stagger-gap, 60ms) * var(--alive-index, 0));
}

/* ── Exit classes (apply dynamically when removing elements) ─────── */

.alive-exit {
  animation: alive-exit-down var(--alive-duration-normal) var(--alive-ease-exit) both;
}
.alive-exit-up {
  animation: alive-exit-up var(--alive-duration-normal) var(--alive-ease-exit) both;
}
.alive-exit-left {
  animation: alive-exit-left var(--alive-duration-normal) var(--alive-ease-exit) both;
}
.alive-exit-right {
  animation: alive-exit-right var(--alive-duration-normal) var(--alive-ease-exit) both;
}
.alive-exit-scale {
  animation: alive-exit-scale var(--alive-duration-fast) var(--alive-ease-exit) both;
}

/* ── Loop animations ─────────────────────────────────────────────── */

.alive-loop-pulse  { animation: alive-pulse  2s ease-in-out infinite; }
.alive-loop-spin   { animation: alive-spin   1s linear infinite; }
.alive-loop-ping   { animation: alive-ping   1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.alive-loop-bounce { animation: alive-bounce 1s infinite; }

/* ── Scroll-reveal (data-alive-scroll) ───────────────────────────── */

[data-alive-scroll] {
  opacity: 0;
  transform: translateY(8px);
}
[data-alive-scroll].is-visible {
  animation: alive-fade-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}
[data-alive-scroll="fade"] {
  opacity: 0;
  transform: none;
}
[data-alive-scroll="fade"].is-visible {
  animation: alive-fade-in var(--alive-duration-normal) var(--alive-ease-standard) both;
}
[data-alive-scroll="scale"] {
  opacity: 0;
  transform: scale(0.94);
}
[data-alive-scroll="scale"].is-visible {
  animation: alive-scale-in var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}

/* Reduced motion — respect system preference */
@media (prefers-reduced-motion: reduce) {
  .alive-enter,
  .alive-enter-down,
  .alive-enter-right,
  .alive-enter-left,
  .alive-enter-fade,
  .alive-enter-scale,
  .alive-exit,
  .alive-exit-up,
  .alive-exit-left,
  .alive-exit-right,
  .alive-exit-scale,
  .alive-loop-pulse,
  .alive-loop-spin,
  .alive-loop-ping,
  .alive-loop-bounce {
    animation: none;
    opacity: 1;
    transform: none;
  }

  [data-alive-scroll],
  [data-alive-scroll="fade"],
  [data-alive-scroll="scale"] {
    opacity: 1;
    transform: none;
  }
  [data-alive-scroll].is-visible,
  [data-alive-scroll="fade"].is-visible,
  [data-alive-scroll="scale"].is-visible {
    animation: none;
  }

  /* depth system — disable hover lift and active press */
  .d2,
  .d2:hover,
  .d2:active {
    transform: none;
    transition: none;
    box-shadow: var(--alive-shadow-d2);
  }
}

/* ── Motion override utilities ───────────────────────────────────── */

.motion-fast   { --alive-duration: var(--alive-duration-fast)   !important; }
.motion-normal { --alive-duration: var(--alive-duration-normal) !important; }
.motion-slow   { --alive-duration: var(--alive-duration-slow)   !important; }
.motion-none   { --alive-duration: 0ms                          !important; }

.ease-standard   { --alive-ease: var(--alive-ease-standard)   !important; }
.ease-emphasized { --alive-ease: var(--alive-ease-emphasized)  !important; }
.ease-exit       { --alive-ease: var(--alive-ease-exit)        !important; }

/* ══════════════════════════════════════════════════════════════════
   COMPONENT PRIMITIVES
   ══════════════════════════════════════════════════════════════════ */

/* ── Card ────────────────────────────────────────────────────────── */

.alive-card {
  border-radius: 0.75rem;
  padding: 1.5rem;
  background-color: var(--alive-card-bg, #ffffff);
  border: 1px solid var(--alive-card-border, rgba(0,0,0,0.06));
}
.alive-card-flush  { padding: 0; }
.alive-card-sm     { padding: 1rem; border-radius: 0.5rem; }
.alive-card-lg     { padding: 2rem; border-radius: 1rem; }

/* ── Button ──────────────────────────────────────────────────────── */

.alive-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color var(--alive-duration-fast) var(--alive-ease-standard),
    color            var(--alive-duration-fast) var(--alive-ease-standard),
    border-color     var(--alive-duration-fast) var(--alive-ease-standard),
    box-shadow       var(--alive-duration-fast) var(--alive-ease-standard),
    transform        var(--alive-duration-fast) var(--alive-ease-standard),
    opacity          var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-button:active {
  transform: scale(0.97);
  transition-duration: calc(var(--alive-duration-fast) / 2);
}
.alive-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.alive-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button variants */
.alive-button-primary {
  background-color: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}
.alive-button-primary:hover { background-color: #1a1a1a; }

.alive-button-secondary {
  background-color: transparent;
  color: #0a0a0a;
  border-color: #e4e4e4;
}
.alive-button-secondary:hover {
  background-color: #f4f4f4;
  border-color: #d4d4d4;
}

.alive-button-ghost {
  background-color: transparent;
  color: #4b4b4b;
  border-color: transparent;
}
.alive-button-ghost:hover {
  background-color: #f4f4f4;
  color: #0a0a0a;
}

.alive-button-destructive {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}
.alive-button-destructive:hover { background-color: #b91c1c; }

/* Button sizes */
.alive-button-xs  { padding: 0.25rem 0.625rem; font-size: 0.75rem;   border-radius: 0.375rem; }
.alive-button-sm  { padding: 0.375rem 0.875rem; font-size: 0.8125rem; border-radius: 0.375rem; }
.alive-button-lg  { padding: 0.75rem 1.75rem;   font-size: 0.9375rem; border-radius: 0.625rem; }
.alive-button-xl  { padding: 0.875rem 2rem;     font-size: 1rem;      border-radius: 0.75rem;  }
.alive-button-icon {
  padding: 0.625rem;
  aspect-ratio: 1;
}

/* ── Badge ───────────────────────────────────────────────────────── */

.alive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Badge sizes */
.alive-badge-sm { padding: 0.125rem 0.5rem; font-size: 0.6875rem; }
.alive-badge-lg { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* Badge colors */
.alive-badge-gray    { background: rgba(0,0,0,0.06);        color: #525252; border-color: rgba(0,0,0,0.1); }
.alive-badge-green   { background: rgba(74,222,128,0.12);   color: #16a34a; border-color: rgba(74,222,128,0.25); }
.alive-badge-red     { background: rgba(239,68,68,0.1);     color: #dc2626; border-color: rgba(239,68,68,0.2); }
.alive-badge-yellow  { background: rgba(234,179,8,0.1);     color: #ca8a04; border-color: rgba(234,179,8,0.25); }
.alive-badge-blue    { background: rgba(96,165,250,0.1);    color: #2563eb; border-color: rgba(96,165,250,0.22); }
.alive-badge-purple  { background: rgba(167,139,250,0.12);  color: #7c3aed; border-color: rgba(167,139,250,0.25); }
.alive-badge-orange  { background: rgba(251,146,60,0.1);    color: #ea580c; border-color: rgba(251,146,60,0.22); }

/* Badge with status dot */
.alive-badge-dot::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Input ───────────────────────────────────────────────────────── */

.alive-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 0.5rem;
  outline: none;
  transition:
    border-color var(--alive-duration-fast) var(--alive-ease-standard),
    box-shadow   var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-input::placeholder { opacity: 0.4; }
.alive-input:hover { border-color: rgba(0,0,0,0.24); }
.alive-input:focus {
  border-color: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
.alive-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(0,0,0,0.03);
}
.alive-input-error         { border-color: rgba(239,68,68,0.55); }
.alive-input-error:hover   { border-color: rgba(239,68,68,0.7);  }
.alive-input-error:focus   {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.alive-input-sm  { padding: 0.4375rem 0.75rem;   font-size: 0.8125rem; }
.alive-input-lg  { padding: 0.75rem 1rem;         font-size: 0.9375rem; }

/* ── Textarea ────────────────────────────────────────────────────── */

.alive-textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 0.5rem;
  outline: none;
  resize: vertical;
  min-height: 6rem;
  transition:
    border-color var(--alive-duration-fast) var(--alive-ease-standard),
    box-shadow   var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-textarea::placeholder { opacity: 0.4; }
.alive-textarea:hover { border-color: rgba(0,0,0,0.24); }
.alive-textarea:focus {
  border-color: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
.alive-textarea:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(0,0,0,0.03);
}

/* ── Select ──────────────────────────────────────────────────────── */

.alive-select {
  display: block;
  width: 100%;
  padding: 0.625rem 2.25rem 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: inherit;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1.25rem;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 0.5rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition:
    border-color var(--alive-duration-fast) var(--alive-ease-standard),
    box-shadow   var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-select:hover { border-color: rgba(0,0,0,0.24); }
.alive-select:focus {
  border-color: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
.alive-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Checkbox / Radio ────────────────────────────────────────────── */

.alive-checkbox,
.alive-radio {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid rgba(0,0,0,0.25);
  border-radius: 0.25rem;
  background: transparent;
  cursor: pointer;
  appearance: none;
  transition:
    background   var(--alive-duration-fast) var(--alive-ease-standard),
    border-color var(--alive-duration-fast) var(--alive-ease-standard),
    box-shadow   var(--alive-duration-fast) var(--alive-ease-standard);
  flex-shrink: 0;
}
.alive-radio { border-radius: 50%; }

.alive-checkbox:checked,
.alive-radio:checked {
  background-color: #0a0a0a;
  border-color: #0a0a0a;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem;
}
.alive-radio:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}
.alive-checkbox:focus-visible,
.alive-radio:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* ── Switch / Toggle ─────────────────────────────────────────────── */

.alive-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-switch::after {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--alive-duration-normal) var(--alive-ease-emphasized);
}
.alive-switch[aria-checked="true"],
.alive-switch.is-checked {
  background: #22c55e;
}
.alive-switch[aria-checked="true"]::after,
.alive-switch.is-checked::after {
  transform: translateX(1.25rem);
}
.alive-switch[aria-checked="false"][data-pending],
.alive-switch.is-pending {
  opacity: 0.7;
  cursor: wait;
}
/* Sizes */
.alive-switch-sm {
  width: 2.25rem;
  height: 1.25rem;
}
.alive-switch-sm::after { width: 0.875rem; height: 0.875rem; }
.alive-switch-sm[aria-checked="true"]::after,
.alive-switch-sm.is-checked::after { transform: translateX(1rem); }

.alive-switch-lg {
  width: 3.5rem;
  height: 2rem;
}
.alive-switch-lg::after { width: 1.5rem; height: 1.5rem; }
.alive-switch-lg[aria-checked="true"]::after,
.alive-switch-lg.is-checked::after { transform: translateX(1.5rem); }

/* ── Avatar ──────────────────────────────────────────────────────── */

.alive-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.5);
  user-select: none;
}
.alive-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.alive-avatar-xs { width: 1.5rem;  height: 1.5rem;  font-size: 0.625rem; }
.alive-avatar-sm { width: 2rem;    height: 2rem;    font-size: 0.75rem;  }
.alive-avatar-lg { width: 3rem;    height: 3rem;    font-size: 1rem;     }
.alive-avatar-xl { width: 4rem;    height: 4rem;    font-size: 1.25rem;  }
.alive-avatar-2xl { width: 5rem;   height: 5rem;    font-size: 1.5rem;   }

/* Avatar group — overlapping stack */
.alive-avatar-group {
  display: flex;
}
.alive-avatar-group .alive-avatar {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
  margin-left: -0.5rem;
}
.alive-avatar-group .alive-avatar:first-child {
  margin-left: 0;
}

/* ── Skeleton ────────────────────────────────────────────────────── */

.alive-skeleton {
  border-radius: 0.375rem;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.06) 25%,
    rgba(0,0,0,0.1)  50%,
    rgba(0,0,0,0.06) 75%
  );
  background-size: 200% 100%;
  animation: alive-shimmer 1.6s ease-in-out infinite;
}
.alive-skeleton-text   { height: 1em; border-radius: 0.25rem; }
.alive-skeleton-circle { border-radius: 9999px; }
.alive-skeleton-sm { animation-duration: 1.2s; }
.alive-skeleton-lg { animation-duration: 2s; }

/* ── Progress ────────────────────────────────────────────────────── */

.alive-progress {
  display: block;
  width: 100%;
  height: 0.5rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}
.alive-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: #0a0a0a;
  transition: width var(--alive-duration-slow) var(--alive-ease-standard);
}
.alive-progress-xs  { height: 0.125rem; }
.alive-progress-sm  { height: 0.25rem;  }
.alive-progress-lg  { height: 0.75rem;  }
.alive-progress-xl  { height: 1rem;     }
.alive-progress-indeterminate .alive-progress-bar {
  width: 40% !important;
  animation: alive-progress-indeterminate 1.5s ease-in-out infinite;
}
@keyframes alive-progress-indeterminate {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(400%); }
}

/* ── Separator ───────────────────────────────────────────────────── */

.alive-separator {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.08);
  border: none;
  margin: 0;
}
.alive-separator-v {
  display: inline-block;
  width: 1px;
  height: 1em;
  vertical-align: middle;
  background: rgba(0,0,0,0.08);
  margin: 0 0.5rem;
}
.alive-separator-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(0,0,0,0.4);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alive-separator-label::before,
.alive-separator-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.08);
}

/* ── Alert ───────────────────────────────────────────────────────── */

.alive-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.55;
}
.alive-alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alive-alert-info    { background: rgba(96,165,250,0.08);  border-color: rgba(96,165,250,0.2);  color: #1d4ed8; }
.alive-alert-success { background: rgba(74,222,128,0.08);  border-color: rgba(74,222,128,0.22); color: #15803d; }
.alive-alert-warning { background: rgba(251,191,36,0.10);  border-color: rgba(251,191,36,0.25); color: #92400e; }
.alive-alert-error   { background: rgba(239,68,68,0.08);   border-color: rgba(239,68,68,0.2);   color: #dc2626; }

/* ── Tooltip ─────────────────────────────────────────────────────── */

.alive-tooltip-wrap {
  position: relative;
  display: inline-flex;
}
.alive-tooltip {
  position: absolute;
  z-index: 50;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: #fff;
  background: rgba(10,10,10,0.92);
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity   var(--alive-duration-fast) var(--alive-ease-standard),
    transform var(--alive-duration-fast) var(--alive-ease-emphasized);
}
.alive-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(10,10,10,0.92);
}
.alive-tooltip-wrap:hover .alive-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip placements */
.alive-tooltip-bottom {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
}
.alive-tooltip-bottom::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(10,10,10,0.92);
}
.alive-tooltip-wrap:hover .alive-tooltip-bottom {
  transform: translateX(-50%) translateY(0);
}

/* ── Modal ───────────────────────────────────────────────────────── */

.alive-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  animation: alive-fade-in var(--alive-duration-normal) var(--alive-ease-standard) both;
}
.alive-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.alive-modal-content {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.18),
    0 8px 24px rgba(0,0,0,0.10);
  animation: alive-scale-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}
.alive-modal-sm .alive-modal-content { max-width: 24rem; }
.alive-modal-lg .alive-modal-content { max-width: 48rem; }
.alive-modal-xl .alive-modal-content { max-width: 64rem; }
.alive-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.alive-modal-body    { padding: 1.5rem; }
.alive-modal-footer  {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── Drawer / Sheet ──────────────────────────────────────────────── */

.alive-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 24rem;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,0.08);
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  animation: alive-fade-left var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}
.alive-drawer-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
.alive-drawer-body   { flex: 1; overflow-y: auto; padding: 1.5rem; }
.alive-drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(0,0,0,0.06); }

/* ── Navigation bar ──────────────────────────────────────────────── */

.alive-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 3.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 1rem;
}
.alive-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  color: inherit;
}
.alive-nav-items {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.alive-nav-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.alive-nav-link {
  padding: 0.4375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(0,0,0,0.55);
  transition: background var(--alive-duration-fast) var(--alive-ease-standard), color var(--alive-duration-fast) var(--alive-ease-standard);
  cursor: pointer;
}
.alive-nav-link:hover { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.85); }
.alive-nav-link.is-active { background: rgba(0,0,0,0.07); color: rgba(0,0,0,0.9); }

/* ── Tabs ────────────────────────────────────────────────────────── */

.alive-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  gap: 0;
  position: relative;
}
.alive-tab {
  padding: 0.6875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(0,0,0,0.45);
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-tab:hover { color: rgba(0,0,0,0.72); }
.alive-tab.is-active {
  color: rgba(0,0,0,0.9);
  border-bottom-color: rgba(0,0,0,0.9);
}
/* Sliding indicator variant */
.alive-tabs-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: #0a0a0a;
  border-radius: 2px 2px 0 0;
  transition:
    left  var(--alive-duration-normal) var(--alive-ease-emphasized),
    width var(--alive-duration-normal) var(--alive-ease-emphasized);
}

/* Pill tabs variant */
.alive-tabs-pills {
  border-bottom: none;
  gap: 0.25rem;
  background: rgba(0,0,0,0.05);
  padding: 0.25rem;
  border-radius: 0.625rem;
}
.alive-tabs-pills .alive-tab {
  border-radius: 0.375rem;
  border-bottom: none;
  margin-bottom: 0;
}
.alive-tabs-pills .alive-tab.is-active {
  background: #fff;
  color: rgba(0,0,0,0.9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-bottom-color: transparent;
}

/* ── Dropdown / Menu ─────────────────────────────────────────────── */

.alive-dropdown {
  position: absolute;
  z-index: 50;
  min-width: 12rem;
  padding: 0.375rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.1),
    0 2px 8px rgba(0,0,0,0.06);
  animation: alive-scale-up var(--alive-duration-fast) var(--alive-ease-emphasized) both;
  transform-origin: top left;
}
.alive-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(0,0,0,0.75);
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background var(--alive-duration-fast) var(--alive-ease-standard), color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-dropdown-item:hover {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.9);
}
.alive-dropdown-item.is-active {
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.9);
  font-weight: 500;
}
.alive-dropdown-item-destructive { color: #dc2626; }
.alive-dropdown-item-destructive:hover { background: rgba(239,68,68,0.08); color: #dc2626; }
.alive-dropdown-separator {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 0.25rem 0;
  border: none;
}
.alive-dropdown-label {
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
}

/* ── Table ───────────────────────────────────────────────────────── */

.alive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}
.alive-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  white-space: nowrap;
}
.alive-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.75);
  transition: background var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-table tr:hover td { background: rgba(0,0,0,0.02); }
.alive-table tr:last-child td { border-bottom: none; }

/* Table variants */
.alive-table-striped tr:nth-child(even) td { background: rgba(0,0,0,0.018); }
.alive-table-bordered td,
.alive-table-bordered th { border: 1px solid rgba(0,0,0,0.07); }

/* ── Chip ────────────────────────────────────────────────────────── */

.alive-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  background: rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.65);
  border: 1px solid rgba(0,0,0,0.1);
  cursor: default;
  user-select: none;
  transition:
    background     var(--alive-duration-fast) var(--alive-ease-standard),
    border-color   var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-chip:hover { background: rgba(0,0,0,0.09); border-color: rgba(0,0,0,0.16); }
.alive-chip.is-selected {
  background: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.85);
  border-color: rgba(0,0,0,0.2);
}
.alive-chip-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--alive-duration-fast) var(--alive-ease-standard), background var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-chip-dismiss:hover { opacity: 1; background: rgba(0,0,0,0.12); }

/* ── Stack ───────────────────────────────────────────────────────── */

.alive-stack   { display: flex; }
.alive-stack-v { flex-direction: column; }
.alive-stack-h { flex-direction: row; }

/* ── Container ───────────────────────────────────────────────────── */

.alive-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px)  { .alive-container { max-width: 640px;  padding-left: 1.5rem;  padding-right: 1.5rem;  } }
@media (min-width: 768px)  { .alive-container { max-width: 768px;  } }
@media (min-width: 1024px) { .alive-container { max-width: 1024px; padding-left: 2rem;    padding-right: 2rem;    } }
@media (min-width: 1280px) { .alive-container { max-width: 1280px; } }
@media (min-width: 1536px) { .alive-container { max-width: 1536px; } }

/* ── Cluster (responsive flex wrap) ─────────────────────────────── */

.alive-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Focus ring ──────────────────────────────────────────────────── */

.alive-focus-ring:focus-visible {
  outline: 2px solid rgba(0,0,0,0.75);
  outline-offset: 2px;
}

/* ── Overlays & surfaces ─────────────────────────────────────────── */

.alive-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Toast / Snackbar ────────────────────────────────────────────── */

.alive-toast-region {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.alive-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: 0.75rem;
  background: rgba(10,10,10,0.94);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: auto;
  min-width: 16rem;
  max-width: 24rem;
  animation: alive-fade-right var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}
.alive-toast-icon { flex-shrink: 0; }
.alive-toast-body { flex: 1; min-width: 0; }
.alive-toast-title { font-weight: 600; }
.alive-toast-desc  { font-size: 0.8125rem; opacity: 0.7; margin-top: 0.125rem; }
.alive-toast-close {
  flex-shrink: 0;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-toast-close:hover { opacity: 1; }

/* Toast variants */
.alive-toast-success { border-color: rgba(74,222,128,0.3); }
.alive-toast-error   { border-color: rgba(239,68,68,0.3); }
.alive-toast-warning { border-color: rgba(251,191,36,0.3); }

/* ── Command palette ─────────────────────────────────────────────── */

.alive-command {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.alive-command-panel {
  width: 100%;
  max-width: 38rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.22),
    0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  animation: alive-scale-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
}
.alive-command-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.alive-command-input {
  flex: 1;
  font-size: 1rem;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}
.alive-command-list {
  max-height: 24rem;
  overflow-y: auto;
  padding: 0.375rem;
}
.alive-command-group-label {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
}
.alive-command-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: rgba(0,0,0,0.75);
  transition: background var(--alive-duration-fast) var(--alive-ease-standard), color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-command-item:hover,
.alive-command-item.is-active {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.9);
}
.alive-command-shortcut {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.4;
  font-family: ui-monospace, monospace;
}

/* ── Popover ─────────────────────────────────────────────────────── */

.alive-popover {
  position: absolute;
  z-index: 50;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.1),
    0 2px 8px rgba(0,0,0,0.06);
  animation: alive-scale-up var(--alive-duration-fast) var(--alive-ease-emphasized) both;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */

.alive-sidebar {
  display: flex;
  flex-direction: column;
  width: 15rem;
  height: 100%;
  border-right: 1px solid rgba(0,0,0,0.07);
  background: #fafafa;
  overflow-y: auto;
  flex-shrink: 0;
}
.alive-sidebar-section {
  padding: 1rem 0.75rem;
}
.alive-sidebar-section + .alive-sidebar-section {
  border-top: 1px solid rgba(0,0,0,0.06);
}
.alive-sidebar-label {
  padding: 0 0.5rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
}
.alive-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 400;
  border-radius: 0.5rem;
  color: rgba(0,0,0,0.6);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--alive-duration-fast) var(--alive-ease-standard), color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-sidebar-item:hover { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.85); }
.alive-sidebar-item.is-active {
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.9);
  font-weight: 500;
}

/* ── Utility: visually hidden (screen reader) ────────────────────── */
.alive-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Kbd ─────────────────────────────────────────────────────────── */

.alive-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1875rem 0.4375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(0,0,0,0.65);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.14);
  border-bottom-width: 2px;
  border-radius: 0.3125rem;
  white-space: nowrap;
  user-select: none;
}

/* ── Form group ──────────────────────────────────────────────────── */

.alive-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.alive-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(0,0,0,0.8);
}
.alive-label-required::after {
  content: ' *';
  color: #dc2626;
}
.alive-helper {
  font-size: 0.8125rem;
  color: rgba(0,0,0,0.45);
  line-height: 1.4;
}
.alive-error-msg {
  font-size: 0.8125rem;
  color: #dc2626;
  line-height: 1.4;
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */

.alive-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: rgba(0,0,0,0.45);
  list-style: none;
  margin: 0;
  padding: 0;
}
.alive-breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.alive-breadcrumb-item a {
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  transition: color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-breadcrumb-item a:hover { color: rgba(0,0,0,0.9); }
.alive-breadcrumb-item[aria-current="page"] { color: rgba(0,0,0,0.85); font-weight: 500; }
.alive-breadcrumb-sep {
  color: rgba(0,0,0,0.25);
  user-select: none;
  font-size: 0.8125rem;
}

/* ── Accordion ───────────────────────────────────────────────────── */

.alive-accordion {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.75rem;
  overflow: hidden;
}
.alive-accordion-item {
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.alive-accordion-item:last-child { border-bottom: none; }
.alive-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(0,0,0,0.8);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 0.75rem;
  transition: background var(--alive-duration-fast) var(--alive-ease-standard), color var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-accordion-trigger:hover { background: rgba(0,0,0,0.025); color: rgba(0,0,0,0.9); }
.alive-accordion-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: rgba(0,0,0,0.35);
  transition: transform var(--alive-duration-normal) var(--alive-ease-emphasized);
}
.alive-accordion-item.is-open .alive-accordion-icon { transform: rotate(180deg); }
.alive-accordion-content {
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(0,0,0,0.6);
}
.alive-accordion-content-inner { padding: 0 1.25rem 1.25rem; }

/* ── JS Runtime: is-open / is-active state helpers ──────────────── */

/* Modal and Drawer: hidden by default, shown when .is-open is added by runtime */
[data-alive-modal],
[data-alive-drawer] {
  display: none;
}
[data-alive-modal].is-open,
[data-alive-drawer].is-open {
  display: flex;
}

/* Dropdown: hidden by default */
[data-alive-dropdown-menu] {
  display: none;
}
[data-alive-dropdown-menu].is-open {
  display: block;
}

/* Accordion content: collapsed by default, expanded when parent has .is-open */
[data-alive-content] {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--alive-duration-normal) var(--alive-ease-standard);
}
[data-alive-content] > * {
  overflow: hidden;
}
[data-alive-accordion-item].is-open [data-alive-content] {
  grid-template-rows: 1fr;
}

/* Tabs: panels hidden by default, shown when .is-active */
[data-alive-panel] {
  display: none;
}
[data-alive-panel].is-active {
  display: block;
}
[data-alive-tab].is-active {
  color: rgba(0,0,0,0.9);
  border-bottom-color: rgba(0,0,0,0.9);
}

/* ── Pagination ──────────────────────────────────────────────────── */

.alive-pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.alive-page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  color: rgba(0,0,0,0.55);
  cursor: pointer;
  background: transparent;
  text-decoration: none;
  user-select: none;
  transition:
    background    var(--alive-duration-fast) var(--alive-ease-standard),
    border-color  var(--alive-duration-fast) var(--alive-ease-standard),
    color         var(--alive-duration-fast) var(--alive-ease-standard);
}
.alive-page-item:hover { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.85); }
.alive-page-item.is-active {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.14);
  color: rgba(0,0,0,0.9);
  font-weight: 600;
  cursor: default;
}
.alive-page-item:disabled,
.alive-page-item.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.alive-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.875rem;
  color: rgba(0,0,0,0.3);
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   AliveUI Build — Display & marketing components
   Browser frame · Phone frame · Stat card · Checklist · Dot grid
   ═══════════════════════════════════════════════════════════════ */

/* ── Browser Frame ───────────────────────────────────────────── */
.alive-browser {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  box-shadow: 0 24px 64px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}
.alive-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f3f3f3;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.alive-browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.alive-browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.85;
}
.alive-browser-dot:nth-child(1) { background: #ff5f57; }
.alive-browser-dot:nth-child(2) { background: #febc2e; }
.alive-browser-dot:nth-child(3) { background: #28c840; }
.alive-browser-url {
  flex: 1;
  max-width: 280px;
  margin: 0 auto;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 0.7rem;
  color: rgba(0,0,0,0.35);
  text-align: center;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.alive-browser-body {
  overflow: hidden;
}
/* Dark variant */
.alive-browser-dark {
  border-color: rgba(255,255,255,0.1);
  background: #0f0f0f;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
}
.alive-browser-dark .alive-browser-bar {
  background: #161616;
  border-bottom-color: rgba(255,255,255,0.07);
}
.alive-browser-dark .alive-browser-url {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.2);
}

/* ── Phone Frame ─────────────────────────────────────────────── */
.alive-phone {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  border-radius: 40px;
  border: 8px solid #1c1c1e;
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.1),
    0 0 0 1px rgba(0,0,0,0.5);
}
.alive-phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #1c1c1e;
  border-radius: 11px;
  z-index: 10;
}
.alive-phone-screen {
  width: 100%;
  overflow: hidden;
  flex: 1;
}
.alive-phone-dark {
  background: #0f0f0f;
}
.alive-phone-dark .alive-phone-screen {
  background: #0f0f0f;
}
/* Sizes */
.alive-phone-sm  { width: 220px; border-radius: 32px; border-width: 6px; }
.alive-phone-sm::before { width: 70px; height: 18px; border-radius: 9px; }
.alive-phone-lg  { width: 340px; border-radius: 48px; border-width: 10px; }
.alive-phone-lg::before { width: 110px; height: 26px; border-radius: 13px; }

/* ── Stat Card ───────────────────────────────────────────────── */
.alive-stat {
  padding: 1.5rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.alive-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.4);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.alive-stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(0,0,0,0.9);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.alive-stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.alive-stat-up   { color: #16a34a; }
.alive-stat-down { color: #dc2626; }
/* Dark variant */
.alive-stat-dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.09);
  box-shadow: none;
}
.alive-stat-dark .alive-stat-label { color: rgba(255,255,255,0.35); }
.alive-stat-dark .alive-stat-value { color: #ffffff; }

/* ── Feature Checklist ───────────────────────────────────────── */
.alive-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.alive-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: rgba(0,0,0,0.75);
  line-height: 1.45;
}
.alive-checklist-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(74,222,128,0.15);
  border: 1.5px solid rgba(74,222,128,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.alive-checklist-icon::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border-right: 2px solid #16a34a;
  border-bottom: 2px solid #16a34a;
  transform: rotate(45deg) translate(-1px, -1px);
}
/* Dark variant */
.alive-checklist-dark .alive-checklist-item { color: rgba(255,255,255,0.75); }
.alive-checklist-dark .alive-checklist-icon {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.3);
}

/* ── Dot Grid Background ─────────────────────────────────────── */
.alive-dot-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}
.alive-dot-grid-sm { background-size: 16px 16px; }
.alive-dot-grid-lg { background-size: 32px 32px; }
.alive-dot-grid-dark {
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
}

/* ── Terminal / Code Block ───────────────────────────────────── */
.alive-terminal {
  border-radius: 10px;
  overflow: hidden;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
}
.alive-terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #161616;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.alive-terminal-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  overflow: auto;
}
.alive-terminal-prompt {
  color: rgba(255,255,255,0.25);
  user-select: none;
}
.alive-terminal-cmd { color: #60a5fa; }
.alive-terminal-out { color: rgba(255,255,255,0.45); }
.alive-terminal-ok  { color: #4ade80; }
.alive-terminal-err { color: #f87171; }

/* ═══════════════════════════════════════════════════════════════
   AliveUI Video Blocks — cinematic building blocks for product videos
   ═══════════════════════════════════════════════════════════════ */

/* ── Gradient Mesh Background ────────────────────────────────── */
@keyframes alive-mesh-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.alive-gradient-mesh {
  background: linear-gradient(
    135deg,
    #6366f1 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #6366f1 75%,
    #8b5cf6 100%
  );
  background-size: 300% 300%;
  animation: alive-mesh-shift 8s ease infinite;
}
.alive-gradient-mesh-warm {
  background: linear-gradient(
    135deg,
    #f59e0b 0%,
    #ef4444 25%,
    #ec4899 50%,
    #f59e0b 75%,
    #ef4444 100%
  );
  background-size: 300% 300%;
  animation: alive-mesh-shift 8s ease infinite;
}
.alive-gradient-mesh-cool {
  background: linear-gradient(
    135deg,
    #0ea5e9 0%,
    #6366f1 25%,
    #14b8a6 50%,
    #0ea5e9 75%,
    #6366f1 100%
  );
  background-size: 300% 300%;
  animation: alive-mesh-shift 8s ease infinite;
}
.alive-gradient-mesh-dark {
  background: linear-gradient(
    135deg,
    #1e1b4b 0%,
    #312e81 20%,
    #1e3a5f 40%,
    #0f172a 60%,
    #1e1b4b 80%,
    #312e81 100%
  );
  background-size: 300% 300%;
  animation: alive-mesh-shift 10s ease infinite;
}
/* Noise overlay layer — place over any bg */
.alive-gradient-mesh::after,
.alive-gradient-mesh-warm::after,
.alive-gradient-mesh-cool::after,
.alive-gradient-mesh-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── Counter ─────────────────────────────────────────────────── */
@keyframes alive-count-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alive-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.alive-counter-value {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  animation: alive-count-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-counter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
}
.alive-counter-prefix,
.alive-counter-suffix {
  font-size: 1.25rem;
  font-weight: 700;
  opacity: 0.7;
  align-self: flex-start;
  margin-top: 6px;
}
/* JS-driven counter — add data-target="4200" and call aliveCounter() */
[data-alive-counter] { counter-reset: none; }

/* ── Toast Notification ──────────────────────────────────────── */
@keyframes alive-toast-loop {
  0%   { opacity: 0; transform: translateY(16px) scale(0.95); }
  8%   { opacity: 1; transform: translateY(0) scale(1); }
  70%  { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 0; transform: translateY(-10px) scale(0.97); }
  100% { opacity: 0; transform: translateY(16px) scale(0.95); }
}
.alive-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.24), 0 1px 0 rgba(255,255,255,0.06) inset;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  animation: alive-toast-loop 5s cubic-bezier(0.22, 1, 0.36, 1) infinite both;
}
.alive-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  background: rgba(255,255,255,0.1);
}
.alive-toast-title { font-weight: 600; font-size: 0.875rem; }
.alive-toast-body  { font-size: 0.8125rem; opacity: 0.65; margin-top: 1px; }
.alive-toast-content { display: flex; flex-direction: column; }
/* variants */
.alive-toast-success { border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }
.alive-toast-success .alive-toast-icon { background: rgba(74,222,128,0.15); color: #4ade80; }
.alive-toast-error   { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
.alive-toast-error   .alive-toast-icon { background: rgba(248,113,113,0.15); color: #f87171; }
.alive-toast-info    { border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.08); }
.alive-toast-info    .alive-toast-icon { background: rgba(99,102,241,0.15); color: #818cf8; }
.alive-toast-warning { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.08); }
.alive-toast-warning .alive-toast-icon { background: rgba(251,191,36,0.15); color: #fbbf24; }
/* light bg variant */
.alive-toast-light {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  color: #111;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── Typewriter ──────────────────────────────────────────────── */
@keyframes alive-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes alive-type-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
.alive-typewriter {
  display: inline-block;
  white-space: nowrap;
  border-right: 2px solid currentColor;
  animation:
    alive-type-in 2s steps(40, end) both,
    alive-blink 0.8s step-end infinite;
}
.alive-typewriter-fast {
  animation:
    alive-type-in 1s steps(30, end) both,
    alive-blink 0.8s step-end infinite;
}
.alive-typewriter-slow {
  animation:
    alive-type-in 3.5s steps(60, end) both,
    alive-blink 0.8s step-end infinite;
}
.alive-typewriter-no-cursor {
  border-right: none;
  animation: alive-type-in 2s steps(40, end) both;
}

/* ── Word Reveal ─────────────────────────────────────────────── */
@keyframes alive-word-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes alive-word-in-up {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes alive-word-in-scale {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
/* paused by default — add .alive-run to the wrapper to trigger */
.alive-word-reveal > * {
  display: inline-block;
  opacity: 0;
  animation: alive-word-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}
.alive-word-reveal.alive-run > * {
  animation-play-state: running;
}
/* stagger helpers — add these to children */
.alive-delay-1  { animation-delay: 0.1s; }
.alive-delay-2  { animation-delay: 0.2s; }
.alive-delay-3  { animation-delay: 0.3s; }
.alive-delay-4  { animation-delay: 0.4s; }
.alive-delay-5  { animation-delay: 0.5s; }
.alive-delay-6  { animation-delay: 0.6s; }
.alive-delay-7  { animation-delay: 0.7s; }
.alive-delay-8  { animation-delay: 0.8s; }
.alive-delay-9  { animation-delay: 0.9s; }
.alive-delay-10 { animation-delay: 1.0s; }
.alive-delay-12 { animation-delay: 1.2s; }
.alive-delay-15 { animation-delay: 1.5s; }
/* char-by-char variant */
.alive-char-reveal > * {
  display: inline-block;
  opacity: 0;
  animation: alive-word-in-scale 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}
.alive-char-reveal.alive-run > * {
  animation-play-state: running;
}

/* ── Animated Light Beam ─────────────────────────────────────── */
@keyframes alive-beam-sweep {
  0%   { transform: translateX(-100%) rotate(25deg); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(200%) rotate(25deg); opacity: 0; }
}
@keyframes alive-beam-pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.7; }
}
.alive-beam {
  position: relative;
  overflow: hidden;
}
.alive-beam::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.06) 40%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 60%,
    transparent 100%
  );
  animation: alive-beam-sweep 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: 1s;
  pointer-events: none;
}
/* radial glow beam from top */
.alive-beam-glow::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 50%;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.35) 0%, transparent 70%);
  animation: alive-beam-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

/* ── Noise / Film Grain ──────────────────────────────────────── */
@keyframes alive-noise-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -2%); }
  20%  { transform: translate(2%, 2%); }
  30%  { transform: translate(-1%, 1%); }
  40%  { transform: translate(1%, -1%); }
  50%  { transform: translate(-2%, 1%); }
  60%  { transform: translate(2%, -2%); }
  70%  { transform: translate(-1%, -1%); }
  80%  { transform: translate(1%, 2%); }
  90%  { transform: translate(-2%, 2%); }
  100% { transform: translate(0, 0); }
}
.alive-noise {
  position: relative;
}
.alive-noise::after {
  content: '';
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  animation: alive-noise-shift 0.3s steps(1) infinite;
  pointer-events: none;
  z-index: 10;
}
.alive-noise-subtle::after { opacity: 0.025; }
.alive-noise-strong::after { opacity: 0.07; }

/* ── Animated Grid Background ────────────────────────────────── */
@keyframes alive-grid-scroll {
  from { background-position: 0 0; }
  to   { background-position: 40px 40px; }
}
@keyframes alive-grid-fade {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}
.alive-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: alive-grid-scroll 4s linear infinite;
}
.alive-grid-dark {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.alive-grid-light {
  background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.alive-grid-sm { background-size: 20px 20px; }
.alive-grid-lg { background-size: 60px 60px; }
/* center fade — vignette over the grid */
.alive-grid-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

/* ── Spotlight ───────────────────────────────────────────────── */
@keyframes alive-spotlight-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.alive-spotlight {
  position: relative;
}
.alive-spotlight::before {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.25) 0%, rgba(99,102,241,0.08) 50%, transparent 70%);
  animation: alive-spotlight-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
  z-index: -1;
}
.alive-spotlight-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(99,102,241,0.4);
  box-shadow: 0 0 24px rgba(99,102,241,0.3), 0 0 48px rgba(99,102,241,0.15);
  animation: alive-spotlight-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
}
.alive-spotlight-white::before {
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.06) 50%, transparent 70%);
}

/* ── Badge Pulse / Live Indicator ────────────────────────────── */
@keyframes alive-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}
@keyframes alive-badge-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.alive-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: alive-badge-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-badge-pulse .alive-badge-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alive-badge-pulse .alive-badge-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: alive-pulse-ring 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
  background: inherit;
}
/* color variants */
.alive-badge-live {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
}
.alive-badge-live .alive-badge-dot { background: #ef4444; }
.alive-badge-online {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.2);
}
.alive-badge-online .alive-badge-dot { background: #22c55e; }
.alive-badge-recording {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.15);
}
.alive-badge-recording .alive-badge-dot { background: #f87171; }
.alive-badge-beta {
  background: rgba(99,102,241,0.12);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.2);
}
.alive-badge-beta .alive-badge-dot { background: #818cf8; }

/* ── Code Block (Syntax Highlight) ───────────────────────────── */
@keyframes alive-code-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes alive-code-scan {
  0%   { top: 0%;    opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%;  opacity: 0; }
}
@keyframes alive-code-glow {
  0%, 100% { box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.2), 0 0 24px rgba(99,102,241,0.1); }
}
.alive-code-block {
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
  animation: alive-code-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both, alive-code-glow 4s ease-in-out 1s infinite;
  position: relative;
}
/* scanning line — active code highlight */
.alive-code-block::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1.75rem;
  background: linear-gradient(180deg, transparent 0%, rgba(99,102,241,0.07) 50%, transparent 100%);
  animation: alive-code-scan 3s ease-in-out 1s infinite;
  pointer-events: none;
}
.alive-code-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.alive-code-block-dots {
  display: flex;
  gap: 6px;
}
.alive-code-block-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.alive-code-block-dots span:nth-child(1) { background: #ff5f57; }
.alive-code-block-dots span:nth-child(2) { background: #febc2e; }
.alive-code-block-dots span:nth-child(3) { background: #28c840; }
.alive-code-block-filename {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-family: inherit;
}
.alive-code-block-lang {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.25);
}
.alive-code-block-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.75;
  overflow: auto;
}
/* line-by-line reveal — add alive-delay-* to each line */
.alive-code-block-body .line {
  display: block;
  animation: alive-code-reveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* syntax tokens */
.alive-token-keyword  { color: #ff7b72; }
.alive-token-string   { color: #a5d6ff; }
.alive-token-number   { color: #79c0ff; }
.alive-token-comment  { color: rgba(255,255,255,0.3); font-style: italic; }
.alive-token-fn       { color: #d2a8ff; }
.alive-token-var      { color: #ffa657; }
.alive-token-op       { color: rgba(255,255,255,0.55); }
.alive-token-type     { color: #79c0ff; }
.alive-token-punct    { color: rgba(255,255,255,0.4); }

/* ── Testimonial Card ────────────────────────────────────────── */
@keyframes alive-card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes alive-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.alive-testimonial {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: alive-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both, alive-float 4s ease-in-out 0.5s infinite;
  max-width: 400px;
}
.alive-testimonial-quote {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}
.alive-testimonial-quote::before { content: '“'; }
.alive-testimonial-quote::after  { content: '”'; }
.alive-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.alive-testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  flex-shrink: 0;
  overflow: hidden;
}
.alive-testimonial-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.alive-testimonial-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}
.alive-testimonial-stars {
  display: flex;
  gap: 3px;
  color: #fbbf24;
  font-size: 0.75rem;
  margin-bottom: 4px;
}
/* light variant */
.alive-testimonial-light {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.alive-testimonial-light .alive-testimonial-quote { color: #1a1a1a; }
.alive-testimonial-light .alive-testimonial-name  { color: #111; }
.alive-testimonial-light .alive-testimonial-role  { color: rgba(0,0,0,0.4); }

/* ── Metric Card ─────────────────────────────────────────────── */
@keyframes alive-metric-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes alive-bar-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes alive-bar-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes alive-value-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.75; }
}
.alive-metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  animation: alive-metric-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  min-width: 160px;
}
.alive-metric-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.4);
}
.alive-metric-card-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.alive-metric-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}
.alive-metric-card-up   { color: #4ade80; background: rgba(74,222,128,0.12); }
.alive-metric-card-down { color: #f87171; background: rgba(248,113,113,0.12); }
.alive-metric-card-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  margin-top: 4px;
  overflow: hidden;
}
.alive-metric-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
  background-size: 200% auto;
  transform-origin: left;
  animation:
    alive-bar-grow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both,
    alive-bar-shimmer 2.5s linear 1.3s infinite;
}
/* light variant */
.alive-metric-card-light {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.alive-metric-card-light .alive-metric-card-label { color: rgba(0,0,0,0.4); }
.alive-metric-card-light .alive-metric-card-value { color: #111; }

/* ── Logo Marquee ────────────────────────────────────────────── */
@keyframes alive-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes alive-marquee-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.alive-marquee {
  display: flex;
  overflow: hidden;
  width: 100%;
  position: relative;
}
/* fade edges */
.alive-marquee::before,
.alive-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.alive-marquee::before { left: 0;  background: linear-gradient(to right, rgba(0,0,0,0.8), transparent); }
.alive-marquee::after  { right: 0; background: linear-gradient(to left,  rgba(0,0,0,0.8), transparent); }
.alive-marquee-track {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-shrink: 0;
  animation: alive-marquee 20s linear infinite;
  will-change: transform;
}
.alive-marquee-track-slow   { animation-duration: 35s; }
.alive-marquee-track-fast   { animation-duration: 12s; }
.alive-marquee-track-reverse { animation-name: alive-marquee-reverse; }
.alive-marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 32px;
  opacity: 0.45;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s;
}
.alive-marquee-item:hover { opacity: 0.8; filter: grayscale(0); }
.alive-marquee-item img { height: 100%; width: auto; object-fit: contain; }
/* light bg variant */
.alive-marquee-light::before { background: linear-gradient(to right, rgba(255,255,255,0.9), transparent); }
.alive-marquee-light::after  { background: linear-gradient(to left,  rgba(255,255,255,0.9), transparent); }
.alive-marquee-light .alive-marquee-item { filter: grayscale(1) invert(1); opacity: 0.35; }

/* ── Glitch Text ─────────────────────────────────────────────── */
@keyframes alive-glitch-1 {
  0%, 100% { clip-path: inset(0 0 95% 0); transform: translate(-3px, 0); }
  20%       { clip-path: inset(20% 0 60% 0); transform: translate(3px, 0); }
  40%       { clip-path: inset(50% 0 30% 0); transform: translate(-3px, 0); }
  60%       { clip-path: inset(80% 0 5% 0);  transform: translate(3px, 0); }
  80%       { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 0); }
}
@keyframes alive-glitch-2 {
  0%, 100% { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0);  }
  25%       { clip-path: inset(10% 0 70% 0); transform: translate(-3px, 0); }
  50%       { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0);  }
  75%       { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 0); }
}
@keyframes alive-glitch-shake {
  0%, 100% { transform: translate(0); }
  10%  { transform: translate(-2px, 1px); }
  20%  { transform: translate(2px, -1px); }
  30%  { transform: translate(-1px, 2px); }
  40%  { transform: translate(1px, -2px); }
  50%  { transform: translate(-2px, -1px); }
}
.alive-glitch {
  position: relative;
  display: inline-block;
}
.alive-glitch::before,
.alive-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.alive-glitch::before {
  color: #ff2d78;
  animation: alive-glitch-1 2.5s infinite linear alternate-reverse;
}
.alive-glitch::after {
  color: #00f5d4;
  animation: alive-glitch-2 2s infinite linear alternate-reverse;
}
.alive-glitch-shake {
  animation: alive-glitch-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both infinite;
}

/* ── Scene Transitions ───────────────────────────────────────────
   Usage: stack two scene layers (position:absolute, same inset).
   Add  .alive-transition-*-out  to the LEAVING layer.
   Add  .alive-transition-*-in   to the ENTERING layer.
   Both run for --alive-tr-dur (default 600ms).
   For video export: render each layer separately and composite.
──────────────────────────────────────────────────────────────── */
.alive-transition-fade-out,
.alive-transition-fade-in,
.alive-transition-wipe-left-out,
.alive-transition-wipe-left-in,
.alive-transition-wipe-right-out,
.alive-transition-wipe-right-in,
.alive-transition-wipe-up-out,
.alive-transition-wipe-up-in,
.alive-transition-wipe-down-out,
.alive-transition-wipe-down-in,
.alive-transition-slide-left-out,
.alive-transition-slide-left-in,
.alive-transition-slide-right-out,
.alive-transition-slide-right-in,
.alive-transition-slide-up-out,
.alive-transition-slide-up-in,
.alive-transition-slide-down-out,
.alive-transition-slide-down-in,
.alive-transition-zoom-in-out,
.alive-transition-zoom-in-in,
.alive-transition-zoom-out-out,
.alive-transition-zoom-out-in,
.alive-transition-blur-out,
.alive-transition-blur-in,
.alive-transition-flip-out,
.alive-transition-flip-in,
.alive-transition-clock-out,
.alive-transition-clock-in {
  --alive-tr-dur: 600ms;
  --alive-tr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  animation-duration: var(--alive-tr-dur);
  animation-timing-function: var(--alive-tr-ease);
  animation-fill-mode: both;
}

/* ── Fade ──────────────────────────────────────────────────────── */
@keyframes alive-tr-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes alive-tr-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.alive-transition-fade-out { animation-name: alive-tr-fade-out; }
.alive-transition-fade-in  { animation-name: alive-tr-fade-in; }

/* ── Wipe left (reveal from right) ────────────────────────────── */
@keyframes alive-tr-wipe-left-out {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(0 100% 0 0); }
}
@keyframes alive-tr-wipe-left-in {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}
.alive-transition-wipe-left-out { animation-name: alive-tr-wipe-left-out; }
.alive-transition-wipe-left-in  { animation-name: alive-tr-wipe-left-in; }

/* ── Wipe right (reveal from left) ────────────────────────────── */
@keyframes alive-tr-wipe-right-out {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(0 0 0 100%); }
}
@keyframes alive-tr-wipe-right-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.alive-transition-wipe-right-out { animation-name: alive-tr-wipe-right-out; }
.alive-transition-wipe-right-in  { animation-name: alive-tr-wipe-right-in; }

/* ── Wipe up (reveal from bottom) ─────────────────────────────── */
@keyframes alive-tr-wipe-up-out {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(100% 0 0 0); }
}
@keyframes alive-tr-wipe-up-in {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.alive-transition-wipe-up-out { animation-name: alive-tr-wipe-up-out; }
.alive-transition-wipe-up-in  { animation-name: alive-tr-wipe-up-in; }

/* ── Wipe down (reveal from top) ──────────────────────────────── */
@keyframes alive-tr-wipe-down-out {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(0 0 100% 0); }
}
@keyframes alive-tr-wipe-down-in {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.alive-transition-wipe-down-out { animation-name: alive-tr-wipe-down-out; }
.alive-transition-wipe-down-in  { animation-name: alive-tr-wipe-down-in; }

/* ── Slide left (new scene pushes in from right) ──────────────── */
@keyframes alive-tr-slide-left-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-40%); opacity: 0; }
}
@keyframes alive-tr-slide-left-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.alive-transition-slide-left-out { animation-name: alive-tr-slide-left-out; }
.alive-transition-slide-left-in  { animation-name: alive-tr-slide-left-in; }

/* ── Slide right (new scene pushes in from left) ──────────────── */
@keyframes alive-tr-slide-right-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(40%); opacity: 0; }
}
@keyframes alive-tr-slide-right-in {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.alive-transition-slide-right-out { animation-name: alive-tr-slide-right-out; }
.alive-transition-slide-right-in  { animation-name: alive-tr-slide-right-in; }

/* ── Slide up (new scene pushes in from bottom) ───────────────── */
@keyframes alive-tr-slide-up-out {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-40%); opacity: 0; }
}
@keyframes alive-tr-slide-up-in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.alive-transition-slide-up-out { animation-name: alive-tr-slide-up-out; }
.alive-transition-slide-up-in  { animation-name: alive-tr-slide-up-in; }

/* ── Slide down (new scene pushes in from top) ────────────────── */
@keyframes alive-tr-slide-down-out {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(40%); opacity: 0; }
}
@keyframes alive-tr-slide-down-in {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.alive-transition-slide-down-out { animation-name: alive-tr-slide-down-out; }
.alive-transition-slide-down-in  { animation-name: alive-tr-slide-down-in; }

/* ── Zoom in (old scene shrinks away) ─────────────────────────── */
@keyframes alive-tr-zoom-in-out {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(0.75); opacity: 0; }
}
@keyframes alive-tr-zoom-in-in {
  from { transform: scale(1.25); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.alive-transition-zoom-in-out { animation-name: alive-tr-zoom-in-out; }
.alive-transition-zoom-in-in  { animation-name: alive-tr-zoom-in-in; }

/* ── Zoom out (old scene blows up) ────────────────────────────── */
@keyframes alive-tr-zoom-out-out {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(1.3); opacity: 0; }
}
@keyframes alive-tr-zoom-out-in {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.alive-transition-zoom-out-out { animation-name: alive-tr-zoom-out-out; }
.alive-transition-zoom-out-in  { animation-name: alive-tr-zoom-out-in; }

/* ── Blur ──────────────────────────────────────────────────────── */
@keyframes alive-tr-blur-out {
  from { filter: blur(0px); opacity: 1; transform: scale(1); }
  to   { filter: blur(20px); opacity: 0; transform: scale(1.05); }
}
@keyframes alive-tr-blur-in {
  from { filter: blur(20px); opacity: 0; transform: scale(0.95); }
  to   { filter: blur(0px); opacity: 1; transform: scale(1); }
}
.alive-transition-blur-out { animation-name: alive-tr-blur-out; }
.alive-transition-blur-in  { animation-name: alive-tr-blur-in; }

/* ── Flip (3-D card flip on Y axis) ───────────────────────────── */
@keyframes alive-tr-flip-out {
  from { transform: perspective(800px) rotateY(0deg); opacity: 1; }
  to   { transform: perspective(800px) rotateY(-90deg); opacity: 0; }
}
@keyframes alive-tr-flip-in {
  from { transform: perspective(800px) rotateY(90deg); opacity: 0; }
  to   { transform: perspective(800px) rotateY(0deg); opacity: 1; }
}
.alive-transition-flip-out { animation-name: alive-tr-flip-out; }
.alive-transition-flip-in  { animation-name: alive-tr-flip-in; }

/* ── Clock wipe (radial reveal) ───────────────────────────────── */
@keyframes alive-tr-clock-out {
  from { clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 50% 0%); opacity: 1; }
  to   { clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%); opacity: 0; }
}
@keyframes alive-tr-clock-in {
  from { clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%); }
  to   { clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 50% 0%); }
}
.alive-transition-clock-out { animation-name: alive-tr-clock-out; }
.alive-transition-clock-in  { animation-name: alive-tr-clock-in; }

/* ── Duration overrides ────────────────────────────────────────── */
.alive-tr-fast   { --alive-tr-dur: 300ms; }
.alive-tr-slow   { --alive-tr-dur: 900ms; }
.alive-tr-xslow  { --alive-tr-dur: 1400ms; }

/* ── 3D Scenes ───────────────────────────────────────────────────
   CSS 3D building blocks for cinematic product videos.
   Most require a perspective parent (.alive-3d-scene).
   Note: opacity/filter/clip-path on a parent flatten preserve-3d
   contexts — keep 3D wrappers free of those properties.
──────────────────────────────────────────────────────────────── */

/* ── Foundation ─────────────────────────────────────────────────── */
.alive-3d-scene {
  perspective: var(--alive-3d-perspective, 900px);
  perspective-origin: 50% 40%;
}
.alive-3d-preserve   { transform-style: preserve-3d; }
.alive-3d-backface-hidden { backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* ── Spinning cube ──────────────────────────────────────────────── */
@keyframes alive-cube-spin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to   { transform: rotateX(-18deg) rotateY(360deg); }
}
.alive-3d-cube {
  --alive-cube-size: 80px;
  width: var(--alive-cube-size);
  height: var(--alive-cube-size);
  transform-style: preserve-3d;
  animation: alive-cube-spin 8s linear infinite;
  position: relative;
}
.alive-3d-cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}
.alive-3d-cube .face-front  { transform: translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(99,102,241,0.22); }
.alive-3d-cube .face-back   { transform: rotateY(180deg)  translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(99,102,241,0.08); }
.alive-3d-cube .face-left   { transform: rotateY(-90deg)  translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(139,92,246,0.16); }
.alive-3d-cube .face-right  { transform: rotateY(90deg)   translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(139,92,246,0.16); }
.alive-3d-cube .face-top    { transform: rotateX(90deg)   translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(167,139,250,0.24); }
.alive-3d-cube .face-bottom { transform: rotateX(-90deg)  translateZ(calc(var(--alive-cube-size) / 2)); background: rgba(99,102,241,0.06); }
.alive-3d-cube-sm { --alive-cube-size: 56px; }
.alive-3d-cube-lg { --alive-cube-size: 120px; }
/* Slow/fast spin */
.alive-3d-cube.alive-tr-slow { animation-duration: 16s; }
.alive-3d-cube.alive-tr-fast { animation-duration: 4s; }

/* ── Card flip ──────────────────────────────────────────────────── */
@keyframes alive-3d-flip-loop {
  0%, 35%  { transform: rotateY(0deg); }
  50%, 85% { transform: rotateY(180deg); }
  100%     { transform: rotateY(360deg); }
}
.alive-3d-flip {
  transform-style: preserve-3d;
  animation: alive-3d-flip-loop 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  position: relative;
}
.alive-3d-flip-front,
.alive-3d-flip-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.alive-3d-flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}
/* Flip on X axis variant */
@keyframes alive-3d-flip-x-loop {
  0%, 35%  { transform: rotateX(0deg); }
  50%, 85% { transform: rotateX(180deg); }
  100%     { transform: rotateX(360deg); }
}
.alive-3d-flip-x {
  transform-style: preserve-3d;
  animation: alive-3d-flip-x-loop 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  position: relative;
}
.alive-3d-flip-x .alive-3d-flip-back {
  transform: rotateX(180deg);
}

/* ── Stacked deck of cards ──────────────────────────────────────── */
.alive-3d-stack {
  transform-style: preserve-3d;
  position: relative;
}
.alive-3d-stack > *:nth-child(1) {
  position: relative;
  transform: translateZ(0px) rotateX(0deg);
  z-index: 3;
}
.alive-3d-stack > *:nth-child(2) {
  position: absolute; inset: 0;
  transform: translateZ(-20px) translateY(10px) scale(0.96);
  z-index: 2;
}
.alive-3d-stack > *:nth-child(3) {
  position: absolute; inset: 0;
  transform: translateZ(-40px) translateY(20px) scale(0.92);
  z-index: 1;
}

/* ── Float layers (parallax Z depth) ───────────────────────────── */
@keyframes alive-3d-float-anim {
  0%, 100% { transform: translateZ(var(--alive-z, 0px)) translateY(0px); }
  50%      { transform: translateZ(var(--alive-z, 0px)) translateY(-10px); }
}
.alive-3d-float-layer { animation: alive-3d-float-anim 4s ease-in-out infinite; }
.alive-3d-float-near  { --alive-z: 80px;   animation-delay: 0s; }
.alive-3d-float-mid   { --alive-z: 40px;   animation-delay: -0.6s; }
.alive-3d-float-base  { --alive-z: 0px;    animation-delay: -1.2s; }
.alive-3d-float-far   { --alive-z: -30px;  animation-delay: -1.8s; }

/* ── Extruded 3D text ───────────────────────────────────────────── */
.alive-3d-text {
  text-shadow:
    1px 1px 0 rgba(0,0,0,0.28),
    2px 2px 0 rgba(0,0,0,0.22),
    3px 3px 0 rgba(0,0,0,0.18),
    4px 4px 0 rgba(0,0,0,0.14),
    5px 5px 0 rgba(0,0,0,0.10),
    6px 6px 16px rgba(0,0,0,0.3);
}
.alive-3d-text-indigo {
  text-shadow:
    1px 1px 0 rgba(79,70,229,0.7),
    2px 2px 0 rgba(79,70,229,0.6),
    3px 3px 0 rgba(79,70,229,0.5),
    4px 4px 0 rgba(79,70,229,0.4),
    5px 5px 0 rgba(79,70,229,0.3),
    6px 6px 20px rgba(99,102,241,0.5);
}
.alive-3d-text-glow {
  text-shadow:
    1px 1px 0 rgba(0,0,0,0.3),
    2px 2px 0 rgba(0,0,0,0.22),
    3px 3px 0 rgba(0,0,0,0.14),
    0 0 40px rgba(99,102,241,0.7),
    0 0 80px rgba(99,102,241,0.3);
}

/* ── Looping perspective tilt ───────────────────────────────────── */
@keyframes alive-3d-tilt-loop {
  0%   { transform: rotateX(0deg)  rotateY(0deg); }
  25%  { transform: rotateX(8deg)  rotateY(10deg); }
  50%  { transform: rotateX(0deg)  rotateY(0deg); }
  75%  { transform: rotateX(-8deg) rotateY(-10deg); }
  100% { transform: rotateX(0deg)  rotateY(0deg); }
}
@keyframes alive-3d-tilt-loop-sm {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  25%  { transform: rotateX(4deg) rotateY(5deg); }
  50%  { transform: rotateX(0deg) rotateY(0deg); }
  75%  { transform: rotateX(-4deg) rotateY(-5deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}
.alive-3d-tilt    { transform-style: preserve-3d; animation: alive-3d-tilt-loop    6s ease-in-out infinite; }
.alive-3d-tilt-sm { transform-style: preserve-3d; animation: alive-3d-tilt-loop-sm 6s ease-in-out infinite; }

/* ── Continuous axis rotations ──────────────────────────────────── */
@keyframes alive-rotate-y { from { transform: rotateY(0deg); }  to { transform: rotateY(360deg); } }
@keyframes alive-rotate-x { from { transform: rotateX(0deg); }  to { transform: rotateX(360deg); } }
@keyframes alive-rotate-z { from { transform: rotateZ(0deg); }  to { transform: rotateZ(360deg); } }
.alive-3d-rotate-y { animation: alive-rotate-y 6s  linear infinite; transform-style: preserve-3d; }
.alive-3d-rotate-x { animation: alive-rotate-x 8s  linear infinite; transform-style: preserve-3d; }
.alive-3d-rotate-z { animation: alive-rotate-z 6s  linear infinite; }
.alive-3d-rotate-y.alive-tr-fast { animation-duration: 3s; }
.alive-3d-rotate-y.alive-tr-slow { animation-duration: 12s; }
.alive-3d-rotate-x.alive-tr-fast { animation-duration: 4s; }
.alive-3d-rotate-x.alive-tr-slow { animation-duration: 16s; }

/* ── 3D Carousel (6-item ring) ──────────────────────────────────── */
@keyframes alive-carousel-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(-360deg); }
}
.alive-3d-carousel {
  transform-style: preserve-3d;
  animation: alive-carousel-spin 12s linear infinite;
  position: relative;
  width: 100%;
  height: 100%;
}
.alive-3d-carousel > * { position: absolute; top: 50%; left: 50%; }
.alive-3d-carousel > *:nth-child(1) { transform: translate(-50%,-50%) rotateY(0deg)   translateZ(var(--alive-carousel-r, 140px)); }
.alive-3d-carousel > *:nth-child(2) { transform: translate(-50%,-50%) rotateY(60deg)  translateZ(var(--alive-carousel-r, 140px)); }
.alive-3d-carousel > *:nth-child(3) { transform: translate(-50%,-50%) rotateY(120deg) translateZ(var(--alive-carousel-r, 140px)); }
.alive-3d-carousel > *:nth-child(4) { transform: translate(-50%,-50%) rotateY(180deg) translateZ(var(--alive-carousel-r, 140px)); }
.alive-3d-carousel > *:nth-child(5) { transform: translate(-50%,-50%) rotateY(240deg) translateZ(var(--alive-carousel-r, 140px)); }
.alive-3d-carousel > *:nth-child(6) { transform: translate(-50%,-50%) rotateY(300deg) translateZ(var(--alive-carousel-r, 140px)); }
/* 4-item variant */
.alive-3d-carousel-4 > *:nth-child(1) { transform: translate(-50%,-50%) rotateY(0deg)   translateZ(var(--alive-carousel-r, 120px)); }
.alive-3d-carousel-4 > *:nth-child(2) { transform: translate(-50%,-50%) rotateY(90deg)  translateZ(var(--alive-carousel-r, 120px)); }
.alive-3d-carousel-4 > *:nth-child(3) { transform: translate(-50%,-50%) rotateY(180deg) translateZ(var(--alive-carousel-r, 120px)); }
.alive-3d-carousel-4 > *:nth-child(4) { transform: translate(-50%,-50%) rotateY(270deg) translateZ(var(--alive-carousel-r, 120px)); }
.alive-3d-carousel.alive-tr-slow { animation-duration: 24s; }
.alive-3d-carousel.alive-tr-fast { animation-duration: 6s; }

/* ── Charts & Data Visualization ────────────────────────────────── */
@keyframes alive-bar-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes alive-bar-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.alive-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
}
.alive-bar {
  flex: 1;
  transform-origin: bottom;
  border-radius: 4px 4px 0 0;
  animation: alive-bar-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  background: linear-gradient(180deg, rgba(99,102,241,0.9) 0%, rgba(99,102,241,0.5) 100%);
  position: relative;
  overflow: hidden;
}
.alive-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: alive-bar-shimmer 2s ease-in-out infinite;
  animation-delay: inherit;
}
.alive-bar:nth-child(1) { animation-delay: 0ms; }
.alive-bar:nth-child(2) { animation-delay: 80ms; }
.alive-bar:nth-child(3) { animation-delay: 160ms; }
.alive-bar:nth-child(4) { animation-delay: 240ms; }
.alive-bar:nth-child(5) { animation-delay: 320ms; }
.alive-bar:nth-child(6) { animation-delay: 400ms; }
.alive-bar:nth-child(7) { animation-delay: 480ms; }
/* Color variants */
.alive-bar-indigo  { background: linear-gradient(180deg, rgba(99,102,241,0.9),  rgba(99,102,241,0.4)); }
.alive-bar-violet  { background: linear-gradient(180deg, rgba(139,92,246,0.9),  rgba(139,92,246,0.4)); }
.alive-bar-sky     { background: linear-gradient(180deg, rgba(14,165,233,0.9),   rgba(14,165,233,0.4)); }
.alive-bar-emerald { background: linear-gradient(180deg, rgba(16,185,129,0.9),  rgba(16,185,129,0.4)); }
.alive-bar-rose    { background: linear-gradient(180deg, rgba(244,63,94,0.9),   rgba(244,63,94,0.4)); }
.alive-bar-amber   { background: linear-gradient(180deg, rgba(251,191,36,0.9),  rgba(251,191,36,0.4)); }
/* Chart axis / labels */
.alive-chart-axis {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 6px;
  margin-top: 4px;
}
.alive-chart-label {
  flex: 1;
  text-align: center;
  font-size: 0.625rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}
/* Donut / ring chart — use SVG stroke-dashoffset */
@keyframes alive-donut-fill {
  from { stroke-dashoffset: var(--alive-donut-circ, 283); }
  to   { stroke-dashoffset: var(--alive-donut-gap, 0); }
}
.alive-donut-arc {
  fill: none;
  stroke-linecap: round;
  animation: alive-donut-fill 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center;
  transform: rotate(-90deg);
}
/* Line chart path draw */
@keyframes alive-line-draw {
  from { stroke-dashoffset: var(--alive-line-len, 500); }
  to   { stroke-dashoffset: 0; }
}
.alive-line-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: alive-line-draw 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Area fill under line */
@keyframes alive-area-fill {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.alive-area-fill {
  animation: alive-area-fill 1.2s ease 0.3s both;
}

/* ── Device Frames ──────────────────────────────────────────────── */
/* Browser */
.alive-device-browser {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.alive-device-browser-bar {
  height: 38px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  flex-shrink: 0;
}
.alive-device-browser-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alive-device-browser-dot:nth-child(1) { background: rgba(255,95,87,0.8); }
.alive-device-browser-dot:nth-child(2) { background: rgba(254,188,46,0.8); }
.alive-device-browser-dot:nth-child(3) { background: rgba(40,200,64,0.8); }
.alive-device-browser-url {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  margin: 0 10px;
}
.alive-device-browser-screen {
  overflow: hidden;
}
/* Phone */
.alive-device-phone {
  border-radius: 36px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  padding: 44px 10px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.alive-device-phone::before {
  content: '';
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}
.alive-device-phone::after {
  content: '';
  position: absolute;
  bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
}
.alive-device-phone-screen {
  border-radius: 24px;
  overflow: hidden;
}
/* Tablet */
.alive-device-tablet {
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.alive-device-tablet::after {
  content: '';
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 36px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
}
/* Laptop */
.alive-device-laptop {
  position: relative;
}
.alive-device-laptop-screen {
  border-radius: 12px 12px 0 0;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-bottom: none;
  background: rgba(255,255,255,0.03);
  padding: 6px;
  overflow: hidden;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.alive-device-laptop-base {
  height: 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 0 0 4px 4px;
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  position: relative;
}
.alive-device-laptop-base::after {
  content: '';
  position: absolute;
  top: 4px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
}

/* ── Cursor & Interactions ──────────────────────────────────────── */
@keyframes alive-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes alive-click-ripple {
  0%   { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes alive-cursor-appear {
  from { transform: scale(0.5) translateY(-8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.alive-cursor {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.3);
  animation: alive-cursor-appear 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-cursor-ring {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.6);
  position: absolute;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-10px, -10px);
  transition: transform 0.1s ease;
}
.alive-click-ripple {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  position: absolute;
  pointer-events: none;
  animation: alive-click-ripple 0.6s ease-out forwards;
}
/* Hover highlight glow */
@keyframes alive-hover-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}
.alive-hover-glow {
  animation: alive-hover-pulse 2s ease-in-out infinite;
}
/* Text cursor (caret) */
@keyframes alive-caret-blink {
  0%, 100% { border-right-color: currentColor; }
  50%       { border-right-color: transparent; }
}
.alive-text-cursor {
  border-right: 2px solid currentColor;
  animation: alive-caret-blink 1s step-end infinite;
}
/* Scroll indicator */
@keyframes alive-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(6px); opacity: 0.4; }
}
.alive-scroll-indicator {
  animation: alive-scroll-bounce 1.5s ease-in-out infinite;
}

/* ── Lower Thirds ───────────────────────────────────────────────── */
@keyframes alive-lower-third-in {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes alive-lower-third-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.alive-lower-third {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 16px 10px 14px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  border-left: 3px solid #6366f1;
  border-radius: 0 8px 8px 0;
  animation: alive-lower-third-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-lower-third-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.alive-lower-third-title {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  animation: alive-lower-third-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}
/* variants */
.alive-lower-third-indigo { border-left-color: #6366f1; }
.alive-lower-third-sky    { border-left-color: #0ea5e9; }
.alive-lower-third-emerald{ border-left-color: #10b981; }
.alive-lower-third-rose   { border-left-color: #f43f5e; }
.alive-lower-third-amber  { border-left-color: #f59e0b; }
/* light variant */
.alive-lower-third-light {
  background: rgba(255,255,255,0.92);
}
.alive-lower-third-light .alive-lower-third-name  { color: #111; }
.alive-lower-third-light .alive-lower-third-title { color: rgba(0,0,0,0.5); }
/* News ticker */
@keyframes alive-ticker-scroll {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}
.alive-ticker {
  overflow: hidden;
  white-space: nowrap;
  background: rgba(99,102,241,0.9);
  padding: 8px 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.alive-ticker-track {
  display: inline-block;
  animation: alive-ticker-scroll 18s linear infinite;
  padding-right: 4rem;
}
.alive-ticker-sep {
  display: inline-block;
  margin: 0 1.5rem;
  opacity: 0.5;
}
/* Chapter / scene title card */
@keyframes alive-title-card-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.alive-title-card {
  text-align: center;
  animation: alive-title-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-title-card-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 6px;
  animation: alive-title-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}
.alive-title-card-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: alive-title-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}

/* ── Callouts & Annotations ─────────────────────────────────────── */
@keyframes alive-callout-in {
  from { transform: scale(0.8) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes alive-highlight-draw {
  from { clip-path: inset(0 100% 0 0 round 6px); }
  to   { clip-path: inset(0 0% 0 0 round 6px); }
}
@keyframes alive-line-draw-in {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}
/* Callout bubble */
.alive-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #a5b4fc;
  animation: alive-callout-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-callout-arrow {
  display: inline-block;
  animation: alive-callout-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 60ms both;
}
/* Highlight box around an element */
.alive-highlight-box {
  position: absolute;
  border: 2px solid #6366f1;
  border-radius: 8px;
  pointer-events: none;
  animation: alive-callout-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
/* Underline highlight (text marker) */
.alive-underline-highlight {
  position: relative;
  display: inline-block;
}
.alive-underline-highlight::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 2px;
  transform-origin: left;
  animation: alive-lower-third-bar 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
/* Step marker */
@keyframes alive-step-in {
  from { transform: scale(0) rotate(-90deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.alive-step-marker {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #6366f1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8125rem; color: #fff;
  flex-shrink: 0;
  animation: alive-step-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.alive-step-marker-outline {
  background: transparent;
  border: 2px solid #6366f1;
  color: #818cf8;
}
/* Zoom lens */
.alive-zoom-lens {
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.5);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1), 0 8px 32px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: alive-callout-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* SVG annotation line */
.alive-annotation-line {
  stroke-dasharray: 100;
  animation: alive-line-draw-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Kinetic Typography ─────────────────────────────────────────── */
/* Slam — drops from above, impacts with squash */
@keyframes alive-kinetic-slam {
  0%   { transform: translateY(-60px) scaleY(1.3); opacity: 0; }
  55%  { transform: translateY(6px) scaleY(0.88); opacity: 1; }
  75%  { transform: translateY(-3px) scaleY(1.04); }
  100% { transform: translateY(0) scaleY(1); }
}
.alive-kinetic-slam {
  display: inline-block;
  animation: alive-kinetic-slam 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Pop — scale in with overshoot */
@keyframes alive-kinetic-pop {
  0%   { transform: scale(0); opacity: 0; }
  55%  { transform: scale(1.15); opacity: 1; }
  75%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.alive-kinetic-pop {
  display: inline-block;
  animation: alive-kinetic-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Roll — comes from below with perspective */
@keyframes alive-kinetic-roll {
  from { transform: translateY(80%) rotateX(60deg); opacity: 0; }
  to   { transform: translateY(0) rotateX(0deg); opacity: 1; }
}
.alive-kinetic-roll {
  display: inline-block;
  transform-style: preserve-3d;
  animation: alive-kinetic-roll 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Stretch — squishes then stretches to final size */
@keyframes alive-kinetic-stretch {
  0%   { transform: scaleX(0.1) scaleY(1.5); opacity: 0; }
  40%  { transform: scaleX(1.1) scaleY(0.9); opacity: 1; }
  70%  { transform: scaleX(0.96) scaleY(1.04); }
  100% { transform: scaleX(1) scaleY(1); }
}
.alive-kinetic-stretch {
  display: inline-block;
  animation: alive-kinetic-stretch 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Neon flicker */
@keyframes alive-kinetic-neon {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 6px rgba(99,102,241,0.9),
      0 0 16px rgba(99,102,241,0.7),
      0 0 32px rgba(99,102,241,0.5),
      0 0 64px rgba(99,102,241,0.3);
  }
  20%, 24%, 55% { text-shadow: none; }
}
.alive-kinetic-neon {
  animation: alive-kinetic-neon 2.5s ease-in-out infinite;
  color: #a5b4fc;
}
/* Wave — each character waves */
@keyframes alive-kinetic-wave-char {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.alive-kinetic-wave > span {
  display: inline-block;
  animation: alive-kinetic-wave-char 1s ease-in-out infinite;
}
.alive-kinetic-wave > span:nth-child(1)  { animation-delay: 0ms; }
.alive-kinetic-wave > span:nth-child(2)  { animation-delay: 80ms; }
.alive-kinetic-wave > span:nth-child(3)  { animation-delay: 160ms; }
.alive-kinetic-wave > span:nth-child(4)  { animation-delay: 240ms; }
.alive-kinetic-wave > span:nth-child(5)  { animation-delay: 320ms; }
.alive-kinetic-wave > span:nth-child(6)  { animation-delay: 400ms; }
.alive-kinetic-wave > span:nth-child(7)  { animation-delay: 480ms; }
.alive-kinetic-wave > span:nth-child(8)  { animation-delay: 560ms; }
.alive-kinetic-wave > span:nth-child(9)  { animation-delay: 640ms; }
.alive-kinetic-wave > span:nth-child(10) { animation-delay: 720ms; }
/* Scramble placeholder — apply class, JS runtime handles character cycling */
.alive-kinetic-scramble {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}
/* Gradient text animation */
@keyframes alive-text-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.alive-kinetic-gradient {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #0ea5e9, #6366f1);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: alive-text-gradient-shift 4s ease infinite;
}

/* ── Scene Backgrounds ──────────────────────────────────────────── */
/* Aurora */
@keyframes alive-aurora-drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.alive-aurora {
  background: linear-gradient(135deg,
    rgba(99,102,241,0.5) 0%,
    rgba(14,165,233,0.4) 20%,
    rgba(139,92,246,0.5) 40%,
    rgba(16,185,129,0.35) 60%,
    rgba(99,102,241,0.5) 80%,
    rgba(14,165,233,0.4) 100%
  );
  background-size: 400% 400%;
  animation: alive-aurora-drift 10s ease infinite;
}
.alive-aurora-dark {
  background: linear-gradient(135deg,
    rgba(49,46,129,0.8) 0%,
    rgba(7,89,133,0.7) 25%,
    rgba(76,29,149,0.8) 50%,
    rgba(6,78,59,0.6) 75%,
    rgba(49,46,129,0.8) 100%
  );
  background-size: 400% 400%;
  animation: alive-aurora-drift 12s ease infinite;
}
/* Bokeh — blurred orbs */
@keyframes alive-bokeh-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -15px) scale(1.1); }
  66%       { transform: translate(-15px, 10px) scale(0.9); }
}
.alive-bokeh {
  position: relative;
  overflow: hidden;
}
.alive-bokeh::before,
.alive-bokeh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: alive-bokeh-drift 8s ease-in-out infinite;
}
.alive-bokeh::before {
  width: 200px; height: 200px;
  background: rgba(99,102,241,0.35);
  top: -50px; left: -50px;
}
.alive-bokeh::after {
  width: 160px; height: 160px;
  background: rgba(139,92,246,0.3);
  bottom: -40px; right: -40px;
  animation-delay: -4s;
  animation-direction: reverse;
}
/* Light rays / crepuscular */
@keyframes alive-rays-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.alive-rays {
  background: conic-gradient(
    rgba(99,102,241,0.12) 0deg,   transparent 25deg,
    rgba(99,102,241,0.08) 50deg,  transparent 75deg,
    rgba(99,102,241,0.12) 100deg, transparent 125deg,
    rgba(99,102,241,0.08) 150deg, transparent 175deg,
    rgba(99,102,241,0.12) 200deg, transparent 225deg,
    rgba(99,102,241,0.08) 250deg, transparent 275deg,
    rgba(99,102,241,0.12) 300deg, transparent 325deg,
    rgba(99,102,241,0.08) 350deg, transparent 360deg
  );
  animation: alive-rays-spin 24s linear infinite;
}
/* Starfield — dot pattern with twinkle */
@keyframes alive-star-twinkle {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 0.2; }
}
.alive-starfield {
  position: relative;
  overflow: hidden;
}
.alive-starfield::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 30%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 45%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 40%,  rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 35%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 90%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 65%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 5%,  rgba(255,255,255,0.8) 0%, transparent 100%);
  animation: alive-star-twinkle 4s ease-in-out infinite;
}
.alive-starfield::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 55%,  rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 75%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 40%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 60%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 95%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 88%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 3%  25%, rgba(255,255,255,0.5) 0%, transparent 100%);
  animation: alive-star-twinkle 6s ease-in-out infinite reverse;
  animation-delay: -2s;
}
/* Noise overlay */
.alive-film-grain {
  position: relative;
}
.alive-film-grain::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
}

/* ── Particles & FX ─────────────────────────────────────────────── */
/* Energy ring pulse */
@keyframes alive-ring-expand {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}
.alive-energy-ring {
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.7);
  position: relative;
  animation: alive-ring-expand 2s ease-out infinite;
}
.alive-energy-ring::before,
.alive-energy-ring::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.5);
  animation: alive-ring-expand 2s ease-out infinite;
}
.alive-energy-ring::before { animation-delay: 0.65s; border-color: rgba(139,92,246,0.5); }
.alive-energy-ring::after  { animation-delay: 1.3s;  border-color: rgba(99,102,241,0.3); }
/* Glow burst */
@keyframes alive-glow-burst {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
.alive-glow-burst {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.8) 0%, rgba(99,102,241,0.3) 40%, transparent 70%);
  animation: alive-glow-burst 1.5s ease-out infinite;
}
/* Floating orb */
@keyframes alive-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(12px, -16px) scale(1.08); }
  66%       { transform: translate(-8px, 8px) scale(0.94); }
}
.alive-orb {
  border-radius: 50%;
  filter: blur(var(--alive-orb-blur, 20px));
  animation: alive-orb-drift 6s ease-in-out infinite;
}
.alive-orb-indigo  { background: rgba(99,102,241,0.6);  --alive-orb-blur: 24px; }
.alive-orb-violet  { background: rgba(139,92,246,0.6);  --alive-orb-blur: 28px; animation-delay: -2s; }
.alive-orb-sky     { background: rgba(14,165,233,0.5);  --alive-orb-blur: 20px; animation-delay: -4s; }
.alive-orb-emerald { background: rgba(16,185,129,0.5);  --alive-orb-blur: 22px; animation-delay: -1s; }
.alive-orb-rose    { background: rgba(244,63,94,0.5);   --alive-orb-blur: 26px; animation-delay: -3s; }
/* Sparkle star */
@keyframes alive-sparkle-burst {
  0%   { transform: scale(0) rotate(0deg); opacity: 0; }
  40%  { transform: scale(1.2) rotate(120deg); opacity: 1; }
  80%  { transform: scale(0.8) rotate(240deg); opacity: 0.6; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}
.alive-sparkle {
  display: inline-block;
  color: #fbbf24;
  animation: alive-sparkle-burst 1.8s ease-in-out infinite;
}
.alive-sparkle:nth-child(2) { animation-delay: 0.3s; color: #818cf8; }
.alive-sparkle:nth-child(3) { animation-delay: 0.6s; color: #34d399; }
.alive-sparkle:nth-child(4) { animation-delay: 0.9s; color: #f472b6; }
.alive-sparkle:nth-child(5) { animation-delay: 1.2s; color: #60a5fa; }
/* Confetti pieces */
@keyframes alive-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120px) rotate(720deg); opacity: 0; }
}
.alive-confetti-piece {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: alive-confetti-fall 2s ease-in infinite;
}
.alive-confetti-piece:nth-child(1)  { left: 10%; background: #6366f1; animation-delay: 0s;    animation-duration: 2.1s; }
.alive-confetti-piece:nth-child(2)  { left: 20%; background: #f43f5e; animation-delay: 0.2s;  animation-duration: 1.8s; width: 6px; height: 10px; }
.alive-confetti-piece:nth-child(3)  { left: 30%; background: #fbbf24; animation-delay: 0.4s;  animation-duration: 2.3s; border-radius: 50%; }
.alive-confetti-piece:nth-child(4)  { left: 42%; background: #10b981; animation-delay: 0.1s;  animation-duration: 1.9s; width: 10px; height: 6px; }
.alive-confetti-piece:nth-child(5)  { left: 53%; background: #8b5cf6; animation-delay: 0.5s;  animation-duration: 2.2s; }
.alive-confetti-piece:nth-child(6)  { left: 63%; background: #0ea5e9; animation-delay: 0.3s;  animation-duration: 1.7s; border-radius: 50%; }
.alive-confetti-piece:nth-child(7)  { left: 72%; background: #f97316; animation-delay: 0.6s;  animation-duration: 2.4s; width: 6px; height: 10px; }
.alive-confetti-piece:nth-child(8)  { left: 83%; background: #ec4899; animation-delay: 0.15s; animation-duration: 2.0s; }
.alive-confetti-piece:nth-child(9)  { left: 91%; background: #6366f1; animation-delay: 0.45s; animation-duration: 1.85s; border-radius: 50%; }
.alive-confetti-piece:nth-child(10) { left: 5%;  background: #34d399; animation-delay: 0.7s;  animation-duration: 2.15s; width: 10px; height: 6px; }
.alive-confetti { position: relative; overflow: hidden; }
/* Meteor / shooting star */
@keyframes alive-meteor {
  0%   { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateX(200px) translateY(200px) rotate(-45deg); opacity: 0; }
}
.alive-meteor {
  position: absolute;
  width: 60px; height: 1.5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  border-radius: 1px;
  animation: alive-meteor 2s ease-in infinite;
}
.alive-meteor:nth-child(1) { top: 10%; left: 5%;  animation-delay: 0s;   animation-duration: 2.2s; }
.alive-meteor:nth-child(2) { top: 25%; left: 30%; animation-delay: 0.8s; animation-duration: 1.8s; width: 40px; }
.alive-meteor:nth-child(3) { top: 5%;  left: 60%; animation-delay: 1.5s; animation-duration: 2.5s; }
.alive-meteor:nth-child(4) { top: 40%; left: 75%; animation-delay: 0.4s; animation-duration: 1.6s; width: 80px; }
