/* labs glass design system — link as <link rel="stylesheet" href="/glass.css">
   and add the 3 orb divs:
     <div class="orb orb-a" aria-hidden="true"></div>
     <div class="orb orb-b" aria-hidden="true"></div>
     <div class="orb orb-c" aria-hidden="true"></div>
   Design system + generic component classes only — no page layout here
   (no grids, no page structure). Page-specific CSS belongs in the page. */

:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #0a0a0c;
  color: #e8e8e8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

/* Ambient color orbs — glass needs something behind it to blur.
   Fixed + transform-only drift keeps them off layout and on the compositor.
   Delays keep the three loops unsynced (28s/36s/24s). */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.orb-a {
  top: -14vw; left: -10vw;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(110,168,254,0.32) 0%, rgba(110,168,254,0) 65%);
  animation: drift-a 28s ease-in-out infinite alternate;
}
.orb-b {
  top: 28vh; right: -16vw;
  width: 44vw; height: 44vw;
  background: radial-gradient(circle, rgba(167,139,250,0.28) 0%, rgba(167,139,250,0) 65%);
  animation: drift-b 36s ease-in-out infinite alternate;
  animation-delay: -11s;
}
.orb-c {
  bottom: -18vw; left: 20vw;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(94,234,212,0.24) 0%, rgba(94,234,212,0) 65%);
  animation: drift-c 24s ease-in-out infinite alternate;
  animation-delay: -17s;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 7vh) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.06); }
  to   { transform: translate(-8vw, -6vh) scale(0.94); }
}
@keyframes drift-c {
  from { transform: translate(0, 0) scale(0.95); }
  to   { transform: translate(7vw, -8vh) scale(1.1); }
}

/* Gradient headline text (apply to h1 or any hero element). */
.gradient-text { color: #e8e8e8; /* fallback when background-clip:text is unsupported */ }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gradient-text {
    background: linear-gradient(180deg, #ffffff, #9bb8e8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* Glass card surface. `.card` is the short alias — the store's catalog script
   assigns className="card" (frozen); new code should use .glass-card.
   Padding/layout is page-specific and intentionally not set here. */
.glass-card,
.card {
  background: rgba(255,255,255,0.06);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  animation: card-in 420ms cubic-bezier(0.22,1,0.36,1) backwards;
}
.glass-card:hover,
.card:hover {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.14);
}
/* `backwards` (not `forwards`) so the finished animation stops overriding
   the :hover transform — otherwise hover lift would never apply. */
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Entrance stagger: any element carrying --i in its style attribute delays
   its animation by --i × 60ms. Must stay BELOW every `animation` shorthand
   above — equal specificity, so source order decides. */
[style*="--i"] { animation-delay: calc(var(--i, 0) * 60ms); }

/* Glass text field (the hero search look). Pages wanting a flatter variant
   (e.g. fields nested inside a glass card) override per-page. */
.glass-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  color: #e8e8e8;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  font: inherit;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.glass-input:focus {
  outline: none;
  border-color: #6ea8fe;
  box-shadow: 0 0 0 3px rgba(110,168,254,0.25);
}
.glass-input::placeholder { color: #77777c; }

/* Primary action — blue gradient, hover brightens, active presses in. */
.btn-primary {
  display: inline-block;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: center;
  text-decoration: none;
  padding: 8px 16px;
  background: linear-gradient(135deg, #6ea8fe, #8fb5ff);
  color: #0a0a0c;
  font-weight: 600;
  transition: filter 180ms ease, transform 120ms ease;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

/* Ghost action — quiet glass button for secondary actions. */
.btn-ghost {
  font: inherit;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.06);
  color: #c4c4ca;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 120ms ease;
}
.btn-ghost:hover {
  color: #e8e8e8;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.10);
}
.btn-ghost:active { transform: scale(0.97); }

/* Small pill label (category tags etc.). */
.chip {
  background: rgba(255,255,255,0.08);
  color: #c4c4ca;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
}

/* SAFETY: no backdrop-filter support → opaque-enough surfaces so text
   stays readable on every text-bearing translucent component. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-card, .card, .glass-input, .btn-ghost, .chip { background: rgba(30,30,36,0.92); }
}

/* SAFETY: a11y — kill every animation/transition on request. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
