@tailwind base;
@tailwind components;
@tailwind utilities;

/* ── Theme Variables ────────────────────────────────────── */

/* ODS — default dark theme with indigo accents */
:root, :root[data-theme="ods"] {
  --theme-bg: 15 15 19;
  --theme-card: 24 24 27;
  --theme-border: 39 39 42;
  --theme-text: 228 228 231;
  --theme-text-secondary: 161 161 170;
  --theme-text-muted: 113 113 122;
  --theme-accent: 157 0 255;
  --theme-accent-hover: 137 0 223;
  --theme-accent-light: 215 164 255;
  --theme-surface-hover: 39 39 42;
  --theme-scrollbar-track: #18181b;
  --theme-scrollbar-thumb: #3f3f46;
  --theme-scrollbar-hover: #52525b;
  --theme-focus: #9d00ff;
  --theme-loading-logo: #d7a4ff;
  --theme-gradient-from: rgba(157,0,255,0.42);
  --theme-gradient-to: rgba(215,164,255,0.26);
  --theme-sidebar: 24 24 27;
  --dashboard-shell-base: #050507;
  --dashboard-shell-grid: rgba(255, 255, 255, 0.028);
  --dashboard-shell-depth: rgba(255, 255, 255, 0.014);
  --dashboard-shell-accent: rgba(157, 0, 255, 0.11);
  --dashboard-shell-accent-soft: rgba(215, 164, 255, 0.08);
  --theme-card-shadow: none;
  --theme-card-radius: 12px;
  --liquid-border-size: 1px;
  --liquid-card-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-soft-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-pressed-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -18px 28px rgba(0,0,0,0.18);
  --liquid-outline-gradient: conic-gradient(
    from var(--liquid-angle),
    rgba(229, 220, 255, 0.84),
    rgba(255, 255, 255, 0.96),
    rgba(157, 0, 255, 0.82),
    rgba(255, 205, 122, 0.72),
    rgba(255, 255, 255, 0.96),
    rgba(131, 92, 201, 0.82),
    rgba(229, 220, 255, 0.84)
  );
  --liquid-button-fill: linear-gradient(135deg, rgba(157, 0, 255, 0.98), rgba(120, 24, 216, 0.96));
  --liquid-nav-fill: linear-gradient(135deg, rgba(157, 0, 255, 0.96), rgba(120, 24, 216, 0.94));
  --liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  --sidebar-bg: linear-gradient(180deg, #1a1722 0%, #17131f 58%, #110f17 100%);
  --sidebar-bg-glow: radial-gradient(circle at top left, rgba(157,0,255,0.2), transparent 28%);
  --sidebar-border: rgba(157,0,255,0.16);
  --sidebar-accent: #8a2cff;
  --sidebar-accent-soft: #b56dff;
  --sidebar-text: rgba(226,223,255,0.82);
  --sidebar-text-muted: rgba(226,223,255,0.62);
  --sidebar-text-secondary: rgba(226,223,255,0.72);
  --sidebar-label: rgba(220,204,255,0.72);
  --sidebar-active-border: rgba(181,109,255,0.2);
  --sidebar-active-shadow: 0 12px 28px rgba(126,34,206,0.24);
  --sidebar-hover-bg: rgba(255,255,255,0.02);
  --sidebar-inactive: rgba(161,161,170,0.3);
}

/* Lemonade — warm parchment theme matching lemonade-server.ai branding */
:root[data-theme="lemonade"] {
  --theme-bg: 240 232 207;
  --theme-card: 253 251 243;
  --theme-border: 228 218 187;
  --theme-text: 38 38 38;
  --theme-text-secondary: 107 102 92;
  --theme-text-muted: 138 132 120;
  --theme-accent: 245 197 24;
  --theme-accent-hover: 226 178 15;
  --theme-accent-light: 242 222 136;
  --theme-surface-hover: 243 233 207;
  --theme-scrollbar-track: #F6EFD9;
  --theme-scrollbar-thumb: #E1D4B0;
  --theme-scrollbar-hover: #D0C4A0;
  --theme-focus: #E2B20F;
  --theme-loading-logo: #E2B20F;
  --theme-gradient-from: rgba(245,197,24,0.15);
  --theme-gradient-to: rgba(226,178,15,0.15);
  --theme-sidebar: 239 228 198;
  --dashboard-shell-base: #f4ecd5;
  --dashboard-shell-grid: rgba(88, 72, 32, 0.05);
  --dashboard-shell-depth: rgba(88, 72, 32, 0.03);
  --dashboard-shell-accent: rgba(245, 197, 24, 0.1);
  --dashboard-shell-accent-soft: rgba(226, 178, 15, 0.07);
  --theme-card-shadow: 0 2px 12px rgba(80,60,20,0.08);
  --theme-card-radius: 16px;
  --theme-dark-contrast: #1E2240;
  --liquid-border-size: 1px;
  --liquid-card-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-soft-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-pressed-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -18px 28px rgba(0,0,0,0.08);
  --liquid-outline-gradient: conic-gradient(
    from var(--liquid-angle),
    rgba(255,255,255,0.55),
    rgba(245,197,24,0.28),
    rgba(255,255,255,0.48)
  );
  --liquid-button-fill: linear-gradient(135deg, rgba(245,197,24,0.92), rgba(226,178,15,0.9));
  --liquid-nav-fill: linear-gradient(135deg, rgba(245,197,24,0.92), rgba(226,178,15,0.88));
  --liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.04));
  --sidebar-bg: linear-gradient(180deg, #EFE4C6 0%, #E8DCBA 58%, #E2D5B0 100%);
  --sidebar-bg-glow: radial-gradient(circle at top left, rgba(245,197,24,0.15), transparent 28%);
  --sidebar-border: rgba(196,176,120,0.3);
  --sidebar-accent: #D4A810;
  --sidebar-accent-soft: #B8920D;
  --sidebar-text: #3D3626;
  --sidebar-text-muted: #8A8478;
  --sidebar-text-secondary: #6B665C;
  --sidebar-label: #8A8478;
  --sidebar-active-border: rgba(245,197,24,0.3);
  --sidebar-active-shadow: 0 12px 28px rgba(180,140,10,0.12);
  --sidebar-hover-bg: rgba(0,0,0,0.03);
  --sidebar-inactive: rgba(138,132,120,0.4);
}

/* Light — clean modern futuristic light theme */
:root[data-theme="light"] {
  --theme-bg: 244 244 245;
  --theme-card: 255 255 255;
  --theme-border: 228 228 231;
  --theme-text: 24 24 27;
  --theme-text-secondary: 82 82 91;
  --theme-text-muted: 161 161 170;
  --theme-accent: 37 99 235;
  --theme-accent-hover: 29 78 216;
  --theme-accent-light: 96 165 250;
  --theme-surface-hover: 240 240 243;
  --theme-scrollbar-track: #F4F4F5;
  --theme-scrollbar-thumb: #D4D4D8;
  --theme-scrollbar-hover: #A1A1AA;
  --theme-focus: #2563EB;
  --theme-loading-logo: #2563EB;
  --theme-gradient-from: rgba(37,99,235,0.15);
  --theme-gradient-to: rgba(99,102,241,0.15);
  --theme-sidebar: 234 234 236;
  --dashboard-shell-base: #f7f8fb;
  --dashboard-shell-grid: rgba(24, 24, 27, 0.05);
  --dashboard-shell-depth: rgba(24, 24, 27, 0.03);
  --dashboard-shell-accent: rgba(37, 99, 235, 0.08);
  --dashboard-shell-accent-soft: rgba(96, 165, 250, 0.06);
  --theme-card-shadow: 0 4px 16px rgba(0,0,0,0.06);
  --theme-card-radius: 14px;
  --liquid-border-size: 1px;
  --liquid-card-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-soft-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-pressed-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -18px 28px rgba(0,0,0,0.05);
  --liquid-outline-gradient: conic-gradient(
    from var(--liquid-angle),
    rgba(255,255,255,0.7),
    rgba(96,165,250,0.24),
    rgba(255,255,255,0.56)
  );
  --liquid-button-fill: linear-gradient(135deg, rgba(37,99,235,0.94), rgba(29,78,216,0.9));
  --liquid-nav-fill: linear-gradient(135deg, rgba(37,99,235,0.94), rgba(29,78,216,0.88));
  --liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.04));
  --sidebar-bg: linear-gradient(180deg, #EAEAEC 0%, #E4E4E7 58%, #DDDDE0 100%);
  --sidebar-bg-glow: radial-gradient(circle at top left, rgba(37,99,235,0.1), transparent 28%);
  --sidebar-border: rgba(161,161,170,0.3);
  --sidebar-accent: #2563EB;
  --sidebar-accent-soft: #3B82F6;
  --sidebar-text: #27272A;
  --sidebar-text-muted: #A1A1AA;
  --sidebar-text-secondary: #52525B;
  --sidebar-label: #A1A1AA;
  --sidebar-active-border: rgba(37,99,235,0.25);
  --sidebar-active-shadow: 0 12px 28px rgba(37,99,235,0.12);
  --sidebar-hover-bg: rgba(0,0,0,0.03);
  --sidebar-inactive: rgba(161,161,170,0.4);
}

/* Arctic — cool light theme with ice blue accents */
:root[data-theme="arctic"] {
  --theme-bg: 240 247 255;
  --theme-card: 255 255 255;
  --theme-border: 208 227 247;
  --theme-text: 26 35 50;
  --theme-text-secondary: 74 97 120;
  --theme-text-muted: 138 160 184;
  --theme-accent: 14 165 233;
  --theme-accent-hover: 2 132 199;
  --theme-accent-light: 56 189 248;
  --theme-surface-hover: 230 240 252;
  --theme-scrollbar-track: #F0F7FF;
  --theme-scrollbar-thumb: #D0E3F7;
  --theme-scrollbar-hover: #A8C8E8;
  --theme-focus: #0EA5E9;
  --theme-loading-logo: #0EA5E9;
  --theme-gradient-from: rgba(14,165,233,0.15);
  --theme-gradient-to: rgba(56,189,248,0.15);
  --theme-sidebar: 228 238 248;
  --dashboard-shell-base: #f4f8fd;
  --dashboard-shell-grid: rgba(26, 35, 50, 0.05);
  --dashboard-shell-depth: rgba(26, 35, 50, 0.03);
  --dashboard-shell-accent: rgba(14, 165, 233, 0.08);
  --dashboard-shell-accent-soft: rgba(56, 189, 248, 0.06);
  --theme-card-shadow: 0 4px 16px rgba(0,0,0,0.05);
  --theme-card-radius: 14px;
  --liquid-border-size: 1px;
  --liquid-card-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-soft-fill: linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card)));
  --liquid-pressed-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -18px 28px rgba(0,0,0,0.05);
  --liquid-outline-gradient: conic-gradient(
    from var(--liquid-angle),
    rgba(255,255,255,0.72),
    rgba(56,189,248,0.22),
    rgba(255,255,255,0.58)
  );
  --liquid-button-fill: linear-gradient(135deg, rgba(14,165,233,0.94), rgba(2,132,199,0.9));
  --liquid-nav-fill: linear-gradient(135deg, rgba(14,165,233,0.94), rgba(2,132,199,0.88));
  --liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.04));
  --sidebar-bg: linear-gradient(180deg, #E4EEF8 0%, #DCE8F4 58%, #D4E2F0 100%);
  --sidebar-bg-glow: radial-gradient(circle at top left, rgba(14,165,233,0.12), transparent 28%);
  --sidebar-border: rgba(168,200,232,0.4);
  --sidebar-accent: #0EA5E9;
  --sidebar-accent-soft: #38BDF8;
  --sidebar-text: #1A2332;
  --sidebar-text-muted: #8AA0B8;
  --sidebar-text-secondary: #4A6178;
  --sidebar-label: #8AA0B8;
  --sidebar-active-border: rgba(14,165,233,0.25);
  --sidebar-active-shadow: 0 12px 28px rgba(14,165,233,0.12);
  --sidebar-hover-bg: rgba(0,0,0,0.03);
  --sidebar-inactive: rgba(138,160,184,0.4);
}

/* ── Card styling (shadow + radius from theme) ──────────── */

[class*="rounded-xl"] {
  border-radius: var(--theme-card-radius, 12px);
  box-shadow: var(--theme-card-shadow, none);
}

.dashboard-market-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dashboard-shell-base, rgb(var(--theme-bg)));
}

.dashboard-market-shell::before,
.dashboard-market-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dashboard-market-shell::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 14%),
    repeating-linear-gradient(90deg, transparent 0 47px, var(--dashboard-shell-grid) 47px 48px),
    repeating-linear-gradient(180deg, transparent 0 47px, var(--dashboard-shell-grid) 47px 48px);
  opacity: 0.75;
}

.dashboard-market-shell::after {
  background:
    radial-gradient(circle at 84% 10%, var(--dashboard-shell-accent), transparent 18%),
    linear-gradient(135deg, transparent 56%, var(--dashboard-shell-accent-soft) 72%, transparent 86%),
    linear-gradient(90deg, transparent 0 64%, var(--dashboard-shell-depth) 64%, transparent 65%, transparent 100%),
    linear-gradient(180deg, transparent 0 68%, var(--dashboard-shell-depth) 68%, transparent 69%, transparent 100%);
  opacity: 0.72;
}

.dashboard-market-shell > * {
  position: relative;
  z-index: 1;
}

/* ── Scrollbar ──────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--theme-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--theme-scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--theme-scrollbar-hover);
}

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

:focus-visible {
  outline: 2px solid var(--theme-focus);
  outline-offset: 2px;
}

/* ── Transitions (scoped to interactive elements) ───────── */

a, button, input, select, textarea,
[class*="rounded-xl"], [class*="rounded-lg"],
[class*="border-"] {
  transition-property: background-color, border-color, color, fill, stroke, opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ── Animations ─────────────────────────────────────────── */

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@property --liquid-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 220deg;
}

@keyframes liquidMetalOrbit {
  from { --liquid-angle: 220deg; }
  to { --liquid-angle: 580deg; }
}

@keyframes liquidMetalFlow {
  from { background-position: 0px 50%; }
  to { background-position: -132px 50%; }
}

@keyframes liquidMetalLogoFlow {
  from { background-position: 0px 50%; }
  to { background-position: 132px 50%; }
}

@keyframes liquidBorderOrbit {
  from { background-position: 180% 0%; }
  to { background-position: -60% 100%; }
}

@keyframes liquidBorderSequence {
  0% {
    background-position: 180% 0%;
    opacity: 0;
  }

  3.5% {
    opacity: 0.54;
  }

  8.5% {
    background-position: -60% 100%;
    opacity: 0;
  }

  100% {
    background-position: -60% 100%;
    opacity: 0;
  }
}

@keyframes liquidBorderBaseDrift {
  from { opacity: 0.92; }
  to { opacity: 0.92; }
}

.liquid-metal-frame,
.liquid-metal-nav,
.liquid-metal-button {
  position: relative;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, rgb(var(--theme-border)) 82%, white 18%) !important;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -14px 24px rgba(0,0,0,0.14);
}

.liquid-metal-frame {
  background: var(--liquid-card-fill, linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card))));
}

.liquid-metal-frame::before,
.liquid-metal-nav::before,
.liquid-metal-button::before {
  content: none;
}

.liquid-metal-frame::after,
.liquid-metal-nav::after,
.liquid-metal-button::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      115deg,
      transparent 24%,
      rgba(255,255,255,0.015) 34%,
      rgba(255,255,255,0.96) 45%,
      rgba(255,220,152,0.78) 49%,
      rgba(157,0,255,0.22) 54%,
      transparent 66%
    );
  background-size: 240% 240%;
  background-repeat: no-repeat;
  background-position: 180% 0%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: none;
  opacity: 0.28;
  z-index: 0;
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    background-size 220ms ease;
}

.liquid-metal-frame > *,
.liquid-metal-nav > *,
.liquid-metal-button > * {
  position: relative;
  z-index: 1;
}

.liquid-metal-frame:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(255,255,255,0.04),
    0 18px 36px rgba(0,0,0,0.22);
}

.liquid-metal-frame:hover::after,
.liquid-metal-frame:focus-within::after,
.liquid-metal-nav:hover::after,
.liquid-metal-nav:focus-visible::after,
.liquid-metal-button:hover::after,
.liquid-metal-button:focus-visible::after {
  animation: liquidBorderOrbit 3.6s linear infinite;
  animation-delay: -1.15s;
  opacity: 0.92;
  background-size: 190% 190%;
  filter: saturate(1.2) brightness(1.08);
}

/* Allow tooltips to escape liquid-metal-frame overflow clipping and stacking context */
.liquid-metal-frame:has([data-tooltip]:hover) {
  overflow: visible;
  isolation: auto;
  z-index: 10;
}

/* Elevate the card section containing a hovered tooltip above sibling sections (footer, progress) */
.liquid-metal-frame > *:has([data-tooltip]:hover) {
  z-index: 60;
}

.liquid-metal-frame--soft {
  background: var(--liquid-soft-fill, linear-gradient(rgb(var(--theme-card)), rgb(var(--theme-card))));
}

.liquid-metal-frame--soft::after {
  animation-duration: 12.8s;
  opacity: 0.2;
}

.liquid-metal-nav {
  background: var(--liquid-nav-fill, linear-gradient(135deg, rgba(157, 0, 255, 0.92), rgba(123, 31, 228, 0.92))) !important;
}

.liquid-metal-nav::after {
  animation-duration: 3.2s;
  opacity: 0.88;
}

.liquid-metal-button {
  background: var(--liquid-button-fill, linear-gradient(135deg, rgba(157, 0, 255, 0.95), rgba(123, 31, 228, 0.92))) !important;
  box-shadow: 0 14px 30px rgba(94, 24, 178, 0.28);
}

.liquid-metal-button::after {
  animation-duration: 5.8s;
  opacity: 0.9;
}

.liquid-metal-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(94, 24, 178, 0.28);
}

.liquid-metal-progress-track {
  background: var(--liquid-progress-track, linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.24);
}

.liquid-metal-progress-fill {
  background-image: linear-gradient(
    90deg,
    rgba(232, 236, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.98) 18%,
    rgba(209, 138, 255, 0.9) 42%,
    rgba(255, 220, 152, 0.88) 58%,
    rgba(255, 255, 255, 0.98) 78%,
    rgba(192, 201, 255, 0.9) 100%
  );
  background-size: 132px 100%;
  background-repeat: repeat-x;
  background-position: 0px 50%;
  animation: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 0 10px rgba(157, 0, 255, 0.16);
}

.liquid-metal-frame:hover .liquid-metal-progress-fill,
.liquid-metal-frame:focus-within .liquid-metal-progress-fill,
.liquid-metal-progress-track:hover .liquid-metal-progress-fill {
  animation: liquidMetalFlow 5.5s linear infinite;
}

.liquid-metal-progress-fill--warn {
  background-image: linear-gradient(
    90deg,
    rgba(255, 244, 214, 0.96) 0%,
    rgba(255, 255, 255, 0.98) 20%,
    rgba(255, 205, 92, 0.9) 48%,
    rgba(255, 240, 182, 0.9) 64%,
    rgba(255, 255, 255, 0.98) 82%,
    rgba(255, 214, 120, 0.9) 100%
  );
  background-size: 132px 100%;
  background-repeat: repeat-x;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 0 10px rgba(245, 158, 11, 0.16);
}

.liquid-metal-progress-fill--danger {
  background-image: linear-gradient(
    90deg,
    rgba(255, 228, 228, 0.98) 0%,
    rgba(255, 255, 255, 0.98) 16%,
    rgba(255, 115, 115, 0.92) 46%,
    rgba(255, 196, 196, 0.9) 62%,
    rgba(255, 255, 255, 0.98) 82%,
    rgba(255, 128, 128, 0.92) 100%
  );
  background-size: 132px 100%;
  background-repeat: repeat-x;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 10px rgba(239, 68, 68, 0.18);
}

.osmantic-logo {
  display: block;
  width: min(100%, 214px);
  height: auto;
  max-height: 68px;
  margin: 0;
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--sidebar-accent) 32%, transparent))
    drop-shadow(0 0 2px rgba(246, 240, 255, 0.28));
}

.osmantic-logo-tile {
  display: flex;
  height: 44px;
  width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--sidebar-accent-soft) 24%, transparent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--sidebar-accent) 18%, transparent),
    color-mix(in srgb, var(--sidebar-accent) 6%, transparent)
  );
}

.osmantic-logo--compact {
  width: 34px;
  height: 34px;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.liquid-metal-sequence-grid {
  --liquid-sequence-step: 3.4s;
}

.liquid-metal-sequence-grid--features {
  --liquid-sequence-duration: 26s;
}

.liquid-metal-sequence-grid--system {
  --liquid-sequence-duration: 34s;
}

.liquid-metal-sequence-grid--services {
  --liquid-sequence-duration: 42s;
}

.liquid-metal-sequence-grid > *:nth-child(1) { --liquid-sequence-delay: 0s; }
.liquid-metal-sequence-grid > *:nth-child(2) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 1); }
.liquid-metal-sequence-grid > *:nth-child(3) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 2); }
.liquid-metal-sequence-grid > *:nth-child(4) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 3); }
.liquid-metal-sequence-grid > *:nth-child(5) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 4); }
.liquid-metal-sequence-grid > *:nth-child(6) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 5); }
.liquid-metal-sequence-grid > *:nth-child(7) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 6); }
.liquid-metal-sequence-grid > *:nth-child(8) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 7); }
.liquid-metal-sequence-grid > *:nth-child(9) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 8); }
.liquid-metal-sequence-grid > *:nth-child(10) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 9); }
.liquid-metal-sequence-grid > *:nth-child(11) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 10); }
.liquid-metal-sequence-grid > *:nth-child(12) { --liquid-sequence-delay: calc(var(--liquid-sequence-step) * 11); }

.liquid-metal-sequence-card::after {
  animation: none;
  background-position: 180% 0%;
  opacity: 0;
}

.liquid-metal-sequence-card:hover::after,
.liquid-metal-sequence-card:focus-within::after {
  animation: liquidBorderOrbit 3.6s linear infinite;
  animation-delay: -1.15s;
  opacity: 0.96;
  background-size: 190% 190%;
  filter: saturate(1.24) brightness(1.08);
}

.liquid-metal-sequence-slot:hover .liquid-metal-sequence-card::after,
.liquid-metal-sequence-slot:focus-within .liquid-metal-sequence-card::after {
  animation: liquidBorderOrbit 3.6s linear infinite;
  animation-delay: -1.15s;
  opacity: 0.96;
  background-size: 190% 190%;
  filter: saturate(1.24) brightness(1.08);
}

.liquid-metal-sequence-slot:hover .liquid-metal-sequence-card,
.liquid-metal-sequence-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 38px rgba(0,0,0,0.24);
}

.feature-card-compact {
  overflow: visible !important;
}

.feature-card-compact:hover,
.feature-card-compact:focus-within {
  z-index: 8;
}

@media (prefers-reduced-motion: reduce) {
  .liquid-metal-frame,
  .liquid-metal-nav,
  .liquid-metal-button,
  .liquid-metal-progress-fill,
  .osmantic-logo {
    animation: none !important;
    will-change: auto !important;
  }

  .liquid-metal-frame::after,
  .liquid-metal-nav::after,
  .liquid-metal-button::after,
  .liquid-metal-sequence-card::after {
    animation: none !important;
  }

  .liquid-metal-button:hover {
    transform: none;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
