/* ==========================================================================
   TONALLITECH — Cursor Glow + Misc FX
   ========================================================================== */

/* ─── CURSOR GLOW ─── */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 106, 248, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transition: opacity 0.3s;
}

body.sd-theme .cursor-glow {
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.06) 0%,
    transparent 70%
  );
}

/* ─── HERO GRID BACKGROUND ─── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 106, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 106, 248, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sd-theme .hero-grid {
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.04) 1px, transparent 1px);
}

/* ─── AMBIENT GLOW BLOBS ─── */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.glow-blob--1 {
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    rgba(91, 106, 248, 0.10) 0%,
    transparent 70%
  );
  top: -300px;
  left: -200px;
  animation-delay: 0s;
}

.glow-blob--2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.07) 0%,
    transparent 70%
  );
  bottom: -100px;
  right: 5%;
  animation-delay: -3s;
}

/* SD blobs */
.sd-theme .glow-blob--1 {
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.08) 0%,
    transparent 70%
  );
}
.sd-theme .glow-blob--2 {
  background: radial-gradient(
    circle,
    rgba(134, 239, 172, 0.05) 0%,
    transparent 70%
  );
}

/* ─── GRADIENT TEXT ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--tt-accent) 0%, var(--tt-accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--gold {
  background: linear-gradient(135deg, var(--tt-gold) 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--sd {
  background: linear-gradient(135deg, var(--sd-accent) 0%, var(--sd-accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── SHIMMER EFFECT (on loading skeletons or special elements) ─── */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.04) 50%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}

/* ─── GLOW LINE ─── */
.glow-line {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--tt-accent),
    transparent
  );
  opacity: 0.4;
}

.glow-line--sd {
  background: linear-gradient(
    to right,
    transparent,
    var(--sd-accent),
    transparent
  );
}

/* ─── TYPING CURSOR ─── */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--tt-accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── STATUS DOT ─── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tt-success);
  animation: pulse 2.5s ease infinite;
}

.status-dot--warning { background: var(--tt-warning); }
.status-dot--error   { background: var(--tt-error); }
.status-dot--accent  { background: var(--tt-accent); }

/* ─── METRIC / STAT DISPLAY ─── */
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric__value {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tt-text);
  line-height: 1;
}

.metric__label {
  font-size: var(--text-xs);
  color: var(--tt-muted);
  letter-spacing: 0.06em;
}

/* ─── PILL / TAG ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--tt-border);
  color: var(--tt-muted);
  white-space: nowrap;
}

/* ─── HOVER LIFT ─── */
.hover-lift {
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ─── ANIMATED BORDER (on special cards) ─── */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.animated-border {
  position: relative;
}

.animated-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle),
    transparent 0deg,
    var(--tt-accent) 60deg,
    transparent 120deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  animation: spin 4s linear infinite;
  opacity: 0;
  transition: opacity 0.4s;
}

.animated-border:hover::after {
  opacity: 0.5;
}
