/* ============================================================
   BRACKET VISUALS QUIZ FUNNEL — GLOBAL CSS
   design_mode: glass | detected_from: inferred
   Version: 2026-03-06
   ============================================================ */

:root {
  /* ── BRAND COLORS ── */
  --color-primary: #00CFFF;
  --color-primary-rgb: 0, 207, 255;
  --color-primary-light: #66E2FF;
  --color-primary-dark: #0099CC;
  --color-secondary: #6366F1;
  --color-secondary-rgb: 99, 102, 241;
  --color-accent: #00CFFF;
  --color-accent-rgb: 0, 207, 255;

  /* ── BACKGROUNDS ── */
  --bg-page: #0A0E1A;
  --bg-card: #111827;
  --bg-card-alt: #161F35;
  --bg-muted: #1C2A44;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-strong: rgba(255, 255, 255, 0.07);

  /* ── TEXT ── */
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-on-primary: #0A0E1A;
  --text-accent: #00CFFF;

  /* ── BORDERS ── */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-active: #00CFFF;
  --border-glass: rgba(255, 255, 255, 0.08);
  --color-border-rgb: 255, 255, 255;

  /* ── FEEDBACK ── */
  --color-success: #10B981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #F59E0B;
  --color-warning-rgb: 245, 158, 11;
  --color-error: #EF4444;
  --color-error-rgb: 239, 68, 68;

  /* ── TEMPERATURE (internal only — never shown to users) ── */
  --color-temp-hot: #22C55E;
  --color-temp-warm: #F59E0B;
  --color-temp-cold: #60A5FA;

  /* ── TYPOGRAPHY ── */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --text-h1: 3.25rem;
  --text-h2: 2.375rem;
  --text-h3: 1.625rem;
  --text-h4: 1.125rem;
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-label: 0.6875rem;
  --text-score-lg: 4rem;
  --text-score-sm: 1.5rem;

  /* ── SPACING ── */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* ── BORDER RADIUS ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-xxl: 28px;
  --radius-full: 9999px;

  /* ── LAYOUT ── */
  --max-width-quiz: 600px;
  --max-width-landing: 1200px;
  --max-width-content: 720px;
  --max-width-result: 680px;
  --max-width-admin: 1400px;

  /* ── EASING (no bare 'ease' keyword — all cubic-bezier) ── */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── SHADOWS (5-LAYER GLASS MODE) ── */
  --shadow-sm:
    0 1px 2px rgba(100, 120, 180, 0.06),
    0 2px 4px rgba(100, 120, 180, 0.05),
    0 4px 8px rgba(100, 120, 180, 0.04);

  --shadow-md:
    0 1px 2px rgba(100, 120, 180, 0.06),
    0 2px 4px rgba(100, 120, 180, 0.06),
    0 4px 8px rgba(100, 120, 180, 0.06),
    0 8px 16px rgba(100, 120, 180, 0.05),
    0 16px 32px rgba(100, 120, 180, 0.04);

  --shadow-lg:
    0 1px 2px rgba(100, 120, 180, 0.07),
    0 2px 4px rgba(100, 120, 180, 0.07),
    0 4px 8px rgba(100, 120, 180, 0.07),
    0 8px 16px rgba(100, 120, 180, 0.06),
    0 16px 32px rgba(100, 120, 180, 0.05),
    0 24px 48px rgba(100, 120, 180, 0.03);

  --shadow-xl:
    0 2px 4px rgba(100, 120, 180, 0.07),
    0 4px 8px rgba(100, 120, 180, 0.07),
    0 8px 16px rgba(100, 120, 180, 0.07),
    0 16px 32px rgba(100, 120, 180, 0.06),
    0 24px 48px rgba(100, 120, 180, 0.05),
    0 32px 64px rgba(100, 120, 180, 0.03),
    0 48px 96px rgba(0, 0, 0, 0.2);

  --shadow-xxl:
    0 2px 4px rgba(100, 120, 180, 0.08),
    0 4px 8px rgba(100, 120, 180, 0.08),
    0 8px 16px rgba(100, 120, 180, 0.07),
    0 16px 32px rgba(100, 120, 180, 0.06),
    0 24px 48px rgba(100, 120, 180, 0.05),
    0 48px 96px rgba(100, 120, 180, 0.04),
    0 64px 128px rgba(0, 0, 0, 0.3);

  --shadow-card-hover:
    0 1px 2px rgba(100, 120, 180, 0.08),
    0 2px 4px rgba(100, 120, 180, 0.08),
    0 4px 8px rgba(100, 120, 180, 0.08),
    0 8px 16px rgba(100, 120, 180, 0.07),
    0 16px 32px rgba(100, 120, 180, 0.06),
    0 32px 64px rgba(100, 120, 180, 0.04),
    0 48px 96px rgba(0, 0, 0, 0.25);

  /* ── GLOW VARIABLES ── */
  --shadow-glow-selected:
    0 0 0 2px var(--color-primary),
    0 0 0 6px rgba(0, 207, 255, 0.2),
    0 0 20px rgba(0, 207, 255, 0.3),
    0 0 40px rgba(0, 207, 255, 0.15);

  --shadow-glow-cta:
    0 4px 15px rgba(0, 207, 255, 0.4),
    0 8px 30px rgba(0, 207, 255, 0.3),
    0 16px 60px rgba(0, 207, 255, 0.2),
    0 24px 80px rgba(0, 207, 255, 0.1);

  --shadow-glow-focus:
    0 0 0 2px rgba(0, 207, 255, 0.5),
    0 0 0 4px rgba(0, 207, 255, 0.2),
    0 0 20px rgba(0, 207, 255, 0.15),
    0 0 40px rgba(0, 207, 255, 0.08);

  --shadow-glow-progress:
    0 0 8px rgba(0, 207, 255, 0.6),
    0 0 16px rgba(0, 207, 255, 0.4);

  --shadow-glow-result:
    0 0 40px rgba(0, 207, 255, 0.25),
    0 0 80px rgba(0, 207, 255, 0.15),
    0 0 120px rgba(0, 207, 255, 0.08);

  /* ── SHIMMER ── */
  --shimmer-gradient: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.30) 50%, transparent 100%);
  --shimmer-duration: 0.5s;
  --shimmer-opacity: 0.30;
}

/* ── MOBILE TYPE SCALE OVERRIDES ── */
@media (max-width: 640px) {
  :root {
    --text-h1: 2.125rem;
    --text-h2: 1.75rem;
    --text-h3: 1.375rem;
    --text-body: 0.9375rem;
    --text-score-lg: 3rem;
  }
}

/* ── BASE RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(0, 207, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 207, 255, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

code, pre, .score, [data-type="number"] {
  font-family: var(--font-mono);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── GLASS BACKGROUND LAYER ── */
.quiz-background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 207, 255, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  top: -150px;
  left: -50px;
  animation: orbFloat 18s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.glow-orb-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 70%);
  filter: blur(60px);
  bottom: -100px;
  right: -50px;
  animation: orbFloat 22s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  animation-delay: -7s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
}

.gradient-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(0, 207, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 207, 255, 0.04) 0%, transparent 50%);
}

/* ── BUTTONS ── */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85em 2em;
  background: linear-gradient(135deg, var(--color-primary), #0099EE);
  color: var(--text-on-primary);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
  box-shadow: 0 4px 15px rgba(0, 207, 255, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  user-select: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--shimmer-gradient);
  transition: left var(--shimmer-duration) var(--ease-smooth);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cta);
  text-decoration: none;
  color: var(--text-on-primary);
}

.btn-primary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 207, 255, 0.2);
}

.btn-primary:disabled::before,
.btn-primary[aria-disabled="true"]::before {
  display: none;
}

.btn-primary.btn-full {
  width: 100%;
}

.btn-primary.btn-lg {
  padding: 1em 2.5em;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.8em 1.8em;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ── FORM INPUTS ── */
.form-input {
  width: 100%;
  padding: 0.75em 1em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  transition: border-color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth);
  outline: none;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.form-input:focus {
  border-color: var(--border-active);
  background: rgba(0, 207, 255, 0.04);
  box-shadow: var(--shadow-glow-focus);
  outline: none;
}

/* ── KEYFRAME ANIMATIONS ── */

/* Glass page entrance — fade + lift + blur-out */
@keyframes glassPageEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Question exit — dissolves upward */
@keyframes questionExitGlass {
  0% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-20px); filter: blur(4px); }
}

/* Question enter — rises from below */
@keyframes questionEnterGlass {
  0% { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Slide up */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Result reveal — scale + blur-in for diagnostic archetype */
@keyframes resultRevealGlass {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); filter: blur(10px); }
  60% { opacity: 1; transform: scale(1.02) translateY(-4px); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Glow pulse — for CTA and selected states */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 207, 255, 0.3), 0 0 40px rgba(0, 207, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 207, 255, 0.45), 0 0 60px rgba(0, 207, 255, 0.3);
  }
}

/* Ambient orb float */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.12; }
  33% { transform: translate(20px, -30px); opacity: 0.18; }
  66% { transform: translate(-20px, 20px); opacity: 0.10; }
}

/* Confetti fall */
@keyframes confettiFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Shimmer */
@keyframes shimmer {
  0% { left: -100px; }
  100% { left: calc(100% + 100px); }
}

/* Shimmer sweep on hover */
@keyframes shimmerSweep {
  from { left: -100%; }
  to { left: 100%; }
}

/* Spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Staggered fade in */
@keyframes staggeredFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ripple effect */
@keyframes ripple {
  0% { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

/* Bar slide in — for comparison bars */
@keyframes barSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger utilities */
.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 200ms; }
.stagger-4 { animation-delay: 300ms; }
.stagger-5 { animation-delay: 400ms; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RESULT CARD TEMPERATURE VARIANTS ── */
.result-card-hot {
  border-color: rgba(34, 197, 94, 0.3);
  background:
    linear-gradient(160deg, rgba(34, 197, 94, 0.06) 0%, transparent 60%),
    var(--bg-glass);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.15), 0 0 80px rgba(34, 197, 94, 0.08), var(--shadow-xxl);
}

.result-card-hot::before {
  background: linear-gradient(90deg, transparent 0%, var(--color-temp-hot) 50%, transparent 100%);
}

.result-card-warm {
  border-color: rgba(245, 158, 11, 0.3);
  background:
    linear-gradient(160deg, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
    var(--bg-glass);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), 0 0 80px rgba(245, 158, 11, 0.08), var(--shadow-xxl);
}

.result-card-warm::before {
  background: linear-gradient(90deg, transparent 0%, var(--color-temp-warm) 50%, transparent 100%);
}

.result-card-cold {
  border-color: rgba(96, 165, 250, 0.3);
  background:
    linear-gradient(160deg, rgba(96, 165, 250, 0.06) 0%, transparent 60%),
    var(--bg-glass);
  box-shadow: 0 0 40px rgba(96, 165, 250, 0.15), 0 0 80px rgba(96, 165, 250, 0.08), var(--shadow-xxl);
}

.result-card-cold::before {
  background: linear-gradient(90deg, transparent 0%, var(--color-temp-cold) 50%, transparent 100%);
}
