/* ============================================================
   ME-RIISE QUIZ — Base / Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-100);
  background: var(--navy-900);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Animated hero background applied to app shells */
.app-bg {
  position: relative;
  min-height: 100vh;
  background: var(--grad-hero);
  background-attachment: fixed;
  isolation: isolate;
}

/* Floating background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: floatOrb 18s ease-in-out infinite;
}
.bg-orbs span:nth-child(1){ width: 380px; height: 380px; left: -80px; top: 8%;  background: radial-gradient(circle, var(--blue-electric), transparent 70%); }
.bg-orbs span:nth-child(2){ width: 300px; height: 300px; right: -60px; top: 30%; background: radial-gradient(circle, var(--cyan), transparent 70%); animation-delay: -4s; }
.bg-orbs span:nth-child(3){ width: 340px; height: 340px; left: 20%; bottom: -80px; background: radial-gradient(circle, var(--violet), transparent 70%); animation-delay: -8s; }
.bg-orbs span:nth-child(4){ width: 240px; height: 240px; right: 22%; bottom: 6%; background: radial-gradient(circle, var(--magenta), transparent 70%); animation-delay: -12s; opacity: 0.35; }

/* Subtle grid overlay */
.bg-grid { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
img { max-width: 100%; display: block; }

::selection { background: var(--cyan); color: var(--navy-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 34px); }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.muted { color: var(--text-300); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.gradient-text {
  background: var(--grad-primary-diag);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.grow { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
