/* Grovu design system — shared tokens and primitives */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-0: #05070f;
  --bg-1: #0a0e1e;
  --bg-2: #10162c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1ff;
  --text-soft: #a6aed2;
  --text-faint: #6b7499;
  --violet: #7c5cff;
  --violet-soft: #a18aff;
  --teal: #37e6c3;
  --pink: #ff6ec7;
  --amber: #ffc76e;
  --danger: #ff6e7e;
  --grad-brand: linear-gradient(120deg, #7c5cff, #37e6c3);
  --grad-hot: linear-gradient(120deg, #ff6ec7, #7c5cff);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-pop: 0 18px 48px rgba(3, 5, 16, 0.55);
  --shadow-glow: 0 0 42px rgba(124, 92, 255, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.16; letter-spacing: -0.015em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: var(--text); }
img { max-width: 100%; }
::selection { background: rgba(124, 92, 255, 0.45); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* aurora backdrop */
.aurora-bg { position: fixed; inset: 0; z-index: -2; background: radial-gradient(1100px 620px at 78% -8%, rgba(124, 92, 255, 0.20), transparent 62%), radial-gradient(900px 560px at 8% 22%, rgba(55, 230, 195, 0.10), transparent 60%), radial-gradient(760px 500px at 92% 82%, rgba(255, 110, 199, 0.09), transparent 60%), var(--bg-0); }
.aurora-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(900px 620px at 55% 8%, #000 20%, transparent 75%); }

/* glass primitives */
.glass { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius-lg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.glass-strong { background: var(--glass-strong); border: 1px solid var(--stroke-strong); border-radius: var(--radius-lg); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14.5px; transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--grad-brand); color: #071018; box-shadow: 0 8px 26px rgba(124, 92, 255, 0.35); }
.btn-primary:hover { box-shadow: 0 10px 34px rgba(124, 92, 255, 0.5); transform: translateY(-1px); }
.btn-hot { background: var(--grad-hot); color: #fff; box-shadow: 0 8px 26px rgba(255, 110, 199, 0.3); }
.btn-hot:hover { transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--stroke-strong); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); }
.btn-danger { background: rgba(255, 110, 126, 0.14); color: var(--danger); border: 1px solid rgba(255, 110, 126, 0.4); }
.btn-danger:hover { background: rgba(255, 110, 126, 0.25); }
.btn-sm { padding: 7px 15px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.field input, .field select, .field textarea { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 11px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22); }
.field select option { background: var(--bg-2); }

/* misc */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(124, 92, 255, 0.13); border: 1px solid rgba(124, 92, 255, 0.35); color: var(--violet-soft); }
.pill.teal { background: rgba(55, 230, 195, 0.1); border-color: rgba(55, 230, 195, 0.35); color: var(--teal); }
.pill.pink { background: rgba(255, 110, 199, 0.1); border-color: rgba(255, 110, 199, 0.35); color: var(--pink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse-dot 2.2s infinite; }
@keyframes pulse-dot { 50% { opacity: 0.45; } }

.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* procedural 3D avatar surface */
.grovu-3d-host { position: relative; overflow: hidden; background: #070a12; }
.grovu-3d-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.grovu-ai-badge { position: absolute; left: 14px; bottom: 14px; z-index: 3; padding: 5px 10px; border-radius: 999px; background: rgba(7, 10, 18, 0.58); border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text-soft); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; backdrop-filter: blur(10px); }
.grovu-rpm-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.grovu-rotate-reset { position: absolute; right: 14px; bottom: 14px; z-index: 6; opacity: 0; transform: translateY(6px); pointer-events: none; padding: 7px 12px; border-radius: 999px; background: rgba(7, 10, 18, 0.66); border: 1px solid rgba(255, 255, 255, 0.18); color: var(--text); font-size: 12px; font-weight: 700; backdrop-filter: blur(12px); transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease; }
.grovu-rotate-reset.show, .is-rotating .grovu-rotate-reset { opacity: 1; transform: translateY(0); pointer-events: auto; }
.grovu-rotate-reset:hover { background: rgba(55, 230, 195, 0.18); border-color: rgba(55, 230, 195, 0.4); }
.accent-swatches .chip { min-width: 34px; color: transparent; border-color: rgba(255, 255, 255, 0.22); }

/* toast */
#gv-toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.gv-toast { padding: 12px 22px; border-radius: 999px; background: rgba(16, 22, 44, 0.92); border: 1px solid var(--stroke-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow-pop); font-size: 14px; animation: toast-in 0.3s ease; display: flex; gap: 9px; align-items: center; }
.gv-toast.ok::before { content: '✓'; color: var(--teal); font-weight: 700; }
.gv-toast.err::before { content: '!'; color: var(--danger); font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }

/* modal */
.gv-modal-back { position: fixed; inset: 0; background: rgba(4, 6, 14, 0.72); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in 0.22s ease; }
.gv-modal { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; padding: 28px; animation: modal-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(22px) scale(0.97); } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
