/* ==========================================================================
   Liquid Glass system
   Layers: translucent fill + backdrop blur -> gradient hairline border (::before)
   -> pointer-tracked specular sheen (::after). Chromium also gets a refraction
   displacement filter on .glass--liquid (see #liquid-glass in index.html).
   ========================================================================== */

.glass {
  --mx: 50%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.04) 100%),
    var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border-radius: var(--r-md);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 20px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 0.5px rgba(255, 255, 255, 0.04);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(17, 197, 255, 0.35) 22%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(139, 92, 246, 0.25) 75%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.glass:hover::after,
.glass.is-lit::after {
  opacity: 1;
}

.glass--strong {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.015) 50%),
    var(--glass-fill-strong);
}

.is-chromium .glass--liquid {
  -webkit-backdrop-filter: url(#liquid-glass) blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: url(#liquid-glass) blur(var(--glass-blur)) saturate(180%);
}

/* Cards --------------------------------------------------------------- */
.card-glass {
  /* darker tint than base glass so body copy stays AA-legible over the bright orb */
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.015) 45%),
    rgba(8, 22, 58, 0.42);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.4vw, 32px);
  transform-style: preserve-3d;
  /* transform is driven by GSAP (reveal + tilt), so only shadow transitions here */
  transition: box-shadow 0.5s var(--ease-out);
  will-change: transform;
}
.card-glass:hover {
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 30px 80px -30px rgba(17, 197, 255, 0.35),
    0 0 0 0.5px rgba(17, 197, 255, 0.2);
}

.icon-bubble {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--cyan);
  background: radial-gradient(circle at 30% 25%, rgba(17, 197, 255, 0.35), rgba(6, 27, 68, 0.6) 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 1px rgba(17, 197, 255, 0.35),
    0 0 24px rgba(17, 197, 255, 0.25);
  transform: translateZ(30px);
}
.icon-bubble svg {
  width: 24px;
  height: 24px;
}

/* Buttons ------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.35s;
}
.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover svg {
  transform: translateX(4px);
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: var(--midnight);
  background: linear-gradient(180deg, #5fdcff 0%, var(--cyan) 55%, #0aa8e0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 6px rgba(0, 60, 120, 0.25),
    0 10px 40px -8px rgba(17, 197, 255, 0.7);
}
.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 60px -6px rgba(17, 197, 255, 0.9);
}

.btn-secondary {
  color: var(--white);
  background: rgba(17, 197, 255, 0.06);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 0 0 1.5px rgba(17, 197, 255, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 30px -8px rgba(17, 197, 255, 0.5);
}
.btn-secondary svg {
  color: var(--cyan);
}
.btn-secondary:hover {
  background: rgba(17, 197, 255, 0.14);
}

/* Chips & pills ------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.5s, background 0.5s, opacity 0.5s, transform 0.5s var(--ease-out);
}
.chip svg {
  width: 18px;
  height: 18px;
}
.chip-success {
  box-shadow: inset 0 0 0 1.5px rgba(25, 227, 177, 0.7), 0 0 24px -6px rgba(25, 227, 177, 0.6);
}
.chip-success svg {
  color: var(--success);
}
.chip-ai {
  box-shadow: inset 0 0 0 1.5px rgba(139, 92, 246, 0.8), 0 0 24px -6px rgba(139, 92, 246, 0.7);
}
.chip-ai svg {
  color: #b79cff;
}
.chip-cyan {
  box-shadow: inset 0 0 0 1.5px rgba(17, 197, 255, 0.8), 0 0 24px -6px rgba(17, 197, 255, 0.7);
}
.chip-cyan svg {
  color: var(--cyan);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 12px;
  border-radius: var(--r-md);
}
.status-pill__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(17, 197, 255, 0.15);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(17, 197, 255, 0.4);
}
.status-pill__icon svg {
  width: 18px;
  height: 18px;
}
.status-pill__icon--ok {
  background: var(--success);
  color: var(--midnight);
  box-shadow: 0 0 20px rgba(25, 227, 177, 0.6);
}
.status-pill strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.status-pill small {
  display: block;
  font-size: 0.74rem;
  color: var(--grey);
}

.wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin-left: 6px;
}
.wave i {
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: wave 1.1s ease-in-out infinite;
  transform-origin: center;
}
.wave i:nth-child(2) { animation-delay: -0.9s; }
.wave i:nth-child(3) { animation-delay: -0.6s; }
.wave i:nth-child(4) { animation-delay: -0.3s; }
.wave i:nth-child(5) { animation-delay: -0.75s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

/* Form fields --------------------------------------------------------- */
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--grey);
}
.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-sm);
  background: rgba(2, 8, 23, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 6px rgba(0, 0, 0, 0.3);
  color: var(--white);
  transition: box-shadow 0.3s;
}
.field input::placeholder {
  color: var(--grey-dim);
}
.field input:focus,
.field select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 24px -6px rgba(17, 197, 255, 0.6);
}
.field select option {
  background: var(--midnight);
}
