/* ==========================================================================
   TARUYASH GROUP STUDIO DESIGN SYSTEM
   Part 1: Taruyash Ayurveda (#173D2D, #315C43, #A5AD83, #EDE5D3, #C49A52)
   Part 2: VORTRAX Power Systems (#090E18, #171F2D, #2563EB, #19C6D9, #EAF0F8
           + #171A1D, #343A40, #737C83, #D5D5CF, #E58A24)
   ========================================================================== */

:root {
  /* Part 1 — Taruyash Ayurveda Reference Palette */
  --ty-forest-deep: #173D2D;
  --ty-forest-mid: #315C43;
  --ty-sage: #A5AD83;
  --ty-parchment: #EDE5D3;
  --ty-brass: #C49A52;
  --ty-void: #0B1912;
  --ty-ink-dark: #0B1912;

  /* Liquid Glass Refraction Tokens */
  --glass-surface: linear-gradient(
    145deg,
    rgba(237, 229, 211, 0.12) 0%,
    rgba(23, 61, 45, 0.52) 48%,
    rgba(11, 25, 18, 0.72) 100%
  );
  --glass-border-rim: rgba(196, 154, 82, 0.34);
  --glass-specular-glow: rgba(196, 154, 82, 0.22);
  --cursor-accent: #C49A52;
  --cursor-secondary: #A5AD83;

  /* Part 2 — VORTRAX Dual Industrial + Electric Palette */
  --vx-void: #090E18;
  --vx-navy: #171F2D;
  --vx-cobalt: #2563EB;
  --vx-cyan: #19C6D9;
  --vx-ice: #EAF0F8;

  --vx-iron: #171A1D;
  --vx-steel: #343A40;
  --vx-titanium: #737C83;
  --vx-alu: #D5D5CF;
  --vx-amber: #E58A24;
}

body.theme-ayurveda {
  background-color: var(--ty-void);
  color: var(--ty-parchment);
}

body.theme-vortrax {
  background-color: var(--vx-void);
  color: var(--vx-ice);
  --cursor-accent: #19C6D9;
  --cursor-secondary: #E58A24;
  --glass-border-rim: rgba(25, 198, 217, 0.32);
  --glass-specular-glow: rgba(37, 99, 235, 0.24);
}

/* ==========================================================================
   ANIMATED MESH GRADIENT & DEPTH LAYERS
   ========================================================================== */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.ty-mesh-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: 160% 160%;
  animation: meshShift 18s ease-in-out infinite alternate;
}

.theme-ayurveda .ty-mesh-atmosphere {
  background-image:
    radial-gradient(circle at 18% 18%, rgba(49, 92, 67, 0.56) 0%, transparent 45%),
    radial-gradient(circle at 82% 24%, rgba(196, 154, 82, 0.24) 0%, transparent 42%),
    radial-gradient(circle at 50% 84%, rgba(23, 61, 45, 0.64) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(165, 173, 131, 0.16) 0%, transparent 40%);
}

.theme-vortrax .ty-mesh-atmosphere {
  background-image:
    radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.34) 0%, transparent 46%),
    radial-gradient(circle at 84% 22%, rgba(25, 198, 217, 0.24) 0%, transparent 44%),
    radial-gradient(circle at 48% 82%, rgba(229, 138, 36, 0.2) 0%, transparent 46%),
    radial-gradient(circle at 20% 78%, rgba(23, 31, 45, 0.65) 0%, transparent 52%);
}

.ty-mesh-orb {
  display: none;
}

@keyframes meshShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 60% 40%; }
  100% { background-position: 20% 80%; }
}

/* Override & Deepen Liquid Glass for #173D2D / #315C43 / #C49A52 Ayurveda Theme */
body.theme-ayurveda .liquid-glass {
  background: linear-gradient(
    142deg,
    rgba(237, 229, 211, 0.10) 0%,
    rgba(23, 61, 45, 0.62) 50%,
    rgba(11, 25, 18, 0.76) 100%
  );
  border: 1px solid rgba(196, 154, 82, 0.28);
  backdrop-filter: blur(14px) saturate(155%);
  -webkit-backdrop-filter: blur(14px) saturate(155%);
  box-shadow:
    0 20px 52px rgba(4, 12, 8, 0.56),
    inset 0 1.5px 1px rgba(237, 229, 211, 0.24),
    inset 0 -1px 1px rgba(196, 154, 82, 0.14);
}

body.theme-ayurveda .liquid-glass-strong {
  background: linear-gradient(
    148deg,
    rgba(49, 92, 67, 0.52) 0%,
    rgba(17, 45, 33, 0.82) 48%,
    rgba(10, 22, 16, 0.88) 100%
  );
  border: 1px solid rgba(196, 154, 82, 0.36);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  box-shadow:
    0 28px 72px rgba(3, 10, 7, 0.68),
    inset 0 1.5px 1px rgba(237, 229, 211, 0.28),
    inset 0 -1px 1px rgba(196, 154, 82, 0.16);
}

/* Apple Caustic Top Refraction Hairline (GPU-friendly, zero mask-composite readback) */
.liquid-glass,
.liquid-glass-strong,
.vx-liquid-glass {
  border-top-color: rgba(255, 255, 255, 0.24);
}

/* VORTRAX Dual-Surface Liquid Glass & Cast Gunmetal Panels */
.vx-liquid-glass {
  position: relative;
  background: linear-gradient(
    146deg,
    rgba(25, 198, 217, 0.10) 0%,
    rgba(23, 31, 45, 0.78) 46%,
    rgba(9, 14, 24, 0.90) 100%
  );
  border: 1px solid rgba(25, 198, 217, 0.28);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    0 24px 64px rgba(3, 7, 14, 0.72),
    inset 0 1px 0 rgba(234, 240, 248, 0.22),
    inset 0 -1px 0 rgba(37, 99, 235, 0.18);
}

.vx-chassis-glass {
  position: relative;
  background: linear-gradient(
    152deg,
    rgba(52, 58, 64, 0.70) 0%,
    rgba(23, 26, 29, 0.88) 60%,
    rgba(16, 18, 21, 0.94) 100%
  );
  border: 1px solid rgba(213, 213, 207, 0.2);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(213, 213, 207, 0.18);
}

/* Refined Solid Industrial + Botanical CTAs (Zero Rainbow Gradients) */
body.theme-ayurveda .btn-gold {
  background: linear-gradient(135deg, #DEC07D 0%, #C49A52 55%, #A77D39 100%);
  color: #0B1912 !important;
  border: 1px solid rgba(237, 229, 211, 0.56);
}

.vx-btn-cobalt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2563EB;
  color: #FFFFFF !important;
  font-weight: 600;
  border: 1px solid rgba(25, 198, 217, 0.45);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.36), inset 0 1px 0 rgba(234, 240, 248, 0.3);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}
.vx-btn-cobalt:hover {
  background: #1D4ED8;
  box-shadow: 0 14px 34px rgba(25, 198, 217, 0.34);
}

.vx-btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #E58A24;
  color: #090E18 !important;
  font-weight: 700;
  border: 1px solid rgba(234, 240, 248, 0.35);
  box-shadow: 0 10px 26px rgba(229, 138, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease;
  cursor: pointer;
}
.vx-btn-amber:hover {
  filter: brightness(1.06);
}

.vx-btn-slate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(52, 58, 64, 0.56);
  color: #EAF0F8;
  font-weight: 600;
  border: 1px solid rgba(115, 124, 131, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.22s ease, background-color 0.22s ease;
  cursor: pointer;
}
.vx-btn-slate:hover {
  border-color: #19C6D9;
  background: rgba(23, 31, 45, 0.85);
}

/* ==========================================================================
   3D TILT CARDS + INTERACTIVE SPECULAR LIGHTING
   ========================================================================== */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.specular-card::before,
.vx-specular::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 30%),
    var(--glass-specular-glow),
    transparent 64%
  );
  z-index: 2;
}
.specular-card:hover::before,
.vx-specular:hover::before {
  opacity: 1;
}

/* ==========================================================================
   KINETIC TYPOGRAPHY, TEXT SPLIT & IMAGE MASK / CLIP-PATH REVEALS
   ========================================================================== */
.ty-split-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.ty-split-token {
  display: inline-block;
  will-change: transform, opacity;
}

.kinetic-skew {
  display: inline-block;
  will-change: transform;
}

.mask-reveal {
  overflow: hidden;
  clip-path: inset(0% 0% 0% 0% round 18px);
}

html.ty-motion-ready .mask-reveal.is-pre-reveal {
  clip-path: inset(12% 4% 12% 4% round 22px);
}

.clip-wipe-panel {
  transition: clip-path 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   PINNED STORYTELLING & HORIZONTAL GALLERY TRACK
   ========================================================================== */
.horizontal-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.horizontal-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
}

.horizontal-card {
  width: clamp(275px, 78vw, 390px);
  flex: 0 0 auto;
  scroll-snap-align: start;
}

@media (min-width: 1024px) {
  .horizontal-viewport.is-pinned-ready {
    overflow: hidden;
  }
}

/* ==========================================================================
   MAGNETIC CURSOR + CUSTOM CURSOR TRAIL + PAGE TRANSITION CURTAIN
   ========================================================================== */
#ty-cursor-trail {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9992;
  pointer-events: none;
  display: none;
}

.ty-cursor-dot,
.ty-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9993;
  transform: translate3d(-100px, -100px, 0);
  display: none;
}

.ty-cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--cursor-accent);
  box-shadow: 0 0 14px var(--cursor-accent);
}

.ty-cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid var(--cursor-accent);
  background: radial-gradient(circle, rgba(196, 154, 82, 0.08), transparent 70%);
  transition: width 0.22s ease, height 0.22s ease, margin 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ty-cursor-ring.is-magnet {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: var(--cursor-secondary);
  background: rgba(25, 198, 217, 0.08);
}

@media (pointer: fine) and (hover: hover) {
  #ty-cursor-trail,
  .ty-cursor-dot,
  .ty-cursor-ring {
    display: block;
  }
}

/* Cinematic Page Transition Overlay (Clip-path Liquid Iris) */
#ty-page-curtain {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 0.62s cubic-bezier(0.76, 0, 0.24, 1);
  background: radial-gradient(circle at 50% 45%, rgba(49, 92, 67, 0.96), rgba(11, 25, 18, 0.99));
}

#ty-page-curtain.is-vortrax-curtain {
  background: radial-gradient(circle at 50% 45%, rgba(23, 31, 45, 0.98), rgba(9, 14, 24, 0.99));
}

#ty-page-curtain.is-entering {
  clip-path: circle(150% at 50% 50%);
  pointer-events: auto;
}

/* Circular Telemetry Scroll Progress Ring (Bottom-Right, opposite bottom-left Audio Capsule) */
#ty-scroll-ring {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 39;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(11, 25, 18, 0.72);
  border: 1px solid var(--glass-border-rim);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

body.theme-vortrax #ty-scroll-ring {
  background: rgba(9, 14, 24, 0.8);
}

#ty-scroll-ring:hover {
  transform: translateY(-3px);
}

#ty-scroll-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

#ty-scroll-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 639px) {
  #ty-scroll-ring {
    bottom: 78px;
    right: 12px;
    width: 46px;
    height: 46px;
  }
}

/* Accessible Focus Rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cursor-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   REDUCED MOTION GUARANTEES (Static Clean Layout, Zero Disorienting Motion)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ty-mesh-orb,
  .marquee-track,
  .audio-breathing {
    animation: none !important;
  }
  .tilt-card,
  .img-zoom,
  .clip-wipe-panel,
  #ty-page-curtain {
    transition: none !important;
    transform: none !important;
  }
  #ty-cursor-trail,
  .ty-cursor-dot,
  .ty-cursor-ring {
    display: none !important;
  }
  [data-reveal],
  [data-stagger-item] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
