/* ============================================
   GLASS.CSS — Apple Liquid Glass Material
   ============================================ */

/* --- Base Glass Card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

/* Top-edge light refraction */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 70%,
    transparent 100%
  );
  z-index: 2;
}

/* Internal light gradient */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.015) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.glass-card > * {
  position: relative;
  z-index: 1;
}

/* --- Glass Card Hover --- */
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(0, 212, 170, 0.04);
}

/* --- Hero Glass Card (larger, more prominent) --- */
.glass-card--hero {
  padding: 48px 56px;
  max-width: 720px;
  margin: 0 auto;
  background: rgba(8, 12, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-card--hero::before {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 212, 170, 0.3) 20%,
    rgba(124, 58, 237, 0.3) 50%,
    rgba(59, 130, 246, 0.3) 80%,
    transparent 100%
  );
}

.glass-card--hero::after {
  background: linear-gradient(
    180deg,
    rgba(0, 212, 170, 0.03) 0%,
    transparent 40%
  );
}

.glass-card--hero:hover {
  transform: none;
}

/* --- Glass Button Style --- */
.btn--glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.btn--glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 100%
  );
  pointer-events: none;
}

/* --- Glass Stat Cards --- */
.stat-card {
  background: rgba(255, 255, 255, 0.02);
}

.stat-card:hover {
  background: rgba(0, 212, 170, 0.04);
  border-color: rgba(0, 212, 170, 0.15);
}

/* --- Glass Feature Cards with Colored Glow --- */
.feature-card:nth-child(3n+1):hover {
  box-shadow: 0 8px 40px rgba(0, 212, 170, 0.08);
  border-color: rgba(0, 212, 170, 0.2);
}

.feature-card:nth-child(3n+2):hover {
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}

.feature-card:nth-child(3n):hover {
  box-shadow: 0 8px 40px rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

/* --- Glass Form Inputs --- */
.contact__form input,
.contact__form textarea {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact__form input:focus,
.contact__form textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-teal);
  box-shadow:
    0 0 0 3px rgba(0, 212, 170, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- Glass Comparison Column Accents --- */
.benefits__column--old {
  background: rgba(239, 68, 68, 0.03);
  border-color: rgba(239, 68, 68, 0.1);
}

.benefits__column--old::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(239, 68, 68, 0.2),
    transparent
  );
}

.benefits__column--new {
  background: rgba(0, 212, 170, 0.03);
  border-color: rgba(0, 212, 170, 0.1);
}

.benefits__column--new::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 170, 0.3),
    transparent
  );
}

/* --- Glass Navigation Background --- */
.header--scrolled {
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.88) 0%, rgba(8, 12, 20, 0.72) 100%);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SPOTLIGHT CARD EFFECT
   ============================================ */
.card-spotlight {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(0, 212, 170, 0.15);
}

.card-spotlight::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background:
    radial-gradient(
      600px circle at var(--mouse-x) var(--mouse-y),
      var(--spotlight-color),
      transparent 40%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.015) 50%,
      transparent 100%
    );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

/* Ensure spotlight cards show aurora even without hover */
.card-spotlight .glass-card-aurora {
  opacity: 1;
}

.card-spotlight:hover::after {
  opacity: 1;
}

/* Spotlight color variants */
.benefits__column--old.card-spotlight {
  --spotlight-color: rgba(239, 68, 68, 0.1);
}

.benefits__column--new.card-spotlight {
  --spotlight-color: rgba(0, 212, 170, 0.15);
}

.step-card.card-spotlight:nth-child(2) { --spotlight-color: rgba(0, 212, 170, 0.15); }
.step-card.card-spotlight:nth-child(3) { --spotlight-color: rgba(124, 58, 237, 0.15); }
.step-card.card-spotlight:nth-child(4) { --spotlight-color: rgba(59, 130, 246, 0.15); }
.step-card.card-spotlight:nth-child(5) { --spotlight-color: rgba(0, 212, 170, 0.15); }

.use-case-card.card-spotlight:nth-child(2n) { --spotlight-color: rgba(124, 58, 237, 0.15); }
.use-case-card.card-spotlight:nth-child(3n) { --spotlight-color: rgba(59, 130, 246, 0.15); }

.team-card.card-spotlight { --spotlight-color: rgba(124, 58, 237, 0.12); }
