/* ============================================================
   Liquid Glass design system  —  iOS 26 inspired, less-transparent
   Deep obsidian base · tinted frosted panels · specular highlights
   ============================================================ */

:root {
  /* --- palette: deep plum obsidian + violet aurora --- */
  --ink-900: #08040f;
  --ink-800: #0e0820;
  --ink-700: #170d2c;

  --aurora-violet: #8b5cf6;
  --aurora-magenta:#d946ef;
  --aurora-indigo: #6d4bff;
  --aurora-teal:   #7c3aed;  /* second blob: deep violet-magenta so aurora has depth not just one hue */

  /* accents */
  --violet:  #a855f7;
  --violet-2:#7c3aed;
  --magenta: #e26bff;
  --gold:    #f1cf8a;
  --gold-2:  #cda05a;
  --mint:    #6ef0d6;   /* used sparingly for "secured" states */
  --coral:   #ff6f8f;
  --sky:     #c4b5fd;   /* lilac */

  /* glass — purple-tinted, intentionally MORE opaque (less see-through) */
  --glass-bg:      linear-gradient(160deg, rgba(46,32,72,0.74), rgba(26,16,46,0.68));
  --glass-bg-soft: linear-gradient(160deg, rgba(52,38,80,0.56), rgba(28,18,48,0.52));
  --glass-brite:   linear-gradient(160deg, rgba(78,54,120,0.80), rgba(40,26,68,0.74));
  --glass-border:  rgba(196,170,255,0.18);
  --glass-border-strong: rgba(206,180,255,0.30);
  --glass-blur: 22px;

  /* text */
  --tx-1: #f6f8ff;
  --tx-2: #aeb6c8;
  --tx-3: #727b90;

  /* shape & depth */
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --shadow-card: 0 18px 50px -16px rgba(0,0,0,0.65);
  --shadow-pop:  0 30px 80px -20px rgba(0,0,0,0.78);
  --hl-top: inset 0 1px 0 rgba(255,255,255,0.22);
  --hl-edge: inset 0 0 0 0.5px rgba(255,255,255,0.06);

  /* motion — spring-like iOS easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.42s;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink-900);
  color: var(--tx-1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Onest",
               system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

/* ---------- atmospheric aurora background ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, #14203a 0%, var(--ink-800) 42%, var(--ink-900) 100%);
}
.bg-aurora::before,
.bg-aurora::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.55; will-change: transform;
}
.bg-aurora::before {
  width: 70vw; height: 70vw; left: -20vw; top: -10vh;
  background: radial-gradient(circle, var(--aurora-indigo), transparent 62%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.bg-aurora::after {
  width: 65vw; height: 65vw; right: -22vw; top: 28vh;
  background: radial-gradient(circle, var(--aurora-magenta), transparent 60%);
  animation: drift2 32s var(--ease) infinite alternate;
}
.bg-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@keyframes drift1 { to { transform: translate3d(8vw, 10vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-10vw, -6vh, 0) scale(1.2); } }

/* ---------- the glass primitive ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), var(--hl-top), var(--hl-edge);
  overflow: hidden;
}
/* specular sheen running along the top edge */
.glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(140% 70% at 18% -20%, rgba(255,255,255,0.16), transparent 55%);
  mix-blend-mode: screen; opacity: 0.7;
}
.glass-soft { background: var(--glass-bg-soft); }
.glass-brite { background: var(--glass-brite); border-color: var(--glass-border-strong); }

/* reduced-motion: kill the heavy ambient movement */
@media (prefers-reduced-motion: reduce) {
  .bg-aurora::before, .bg-aurora::after { animation: none; }
  * { scroll-behavior: auto !important; }
}
