/* ============================================
   EduLar — Design System Tokens
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* ── Cores Primárias ── */
  --color-primary:        hsl(246, 80%, 62%);
  --color-primary-light:  hsl(246, 80%, 72%);
  --color-primary-dark:   hsl(246, 80%, 52%);
  --color-primary-subtle: hsl(246, 80%, 62%, 0.12);
  --color-primary-glow:   hsl(246, 80%, 62%, 0.35);

  /* ── Cores Secundárias ── */
  --color-secondary:        hsl(168, 65%, 42%);
  --color-secondary-light:  hsl(168, 65%, 52%);
  --color-secondary-subtle: hsl(168, 65%, 42%, 0.12);

  /* ── Accent ── */
  --color-accent:        hsl(38, 92%, 58%);
  --color-accent-light:  hsl(38, 92%, 68%);
  --color-accent-subtle: hsl(38, 92%, 58%, 0.12);

  /* ── Danger / Warning / Success ── */
  --color-danger:          hsl(4, 72%, 58%);
  --color-danger-subtle:   hsl(4, 72%, 58%, 0.12);
  --color-warning:         hsl(38, 92%, 58%);
  --color-warning-subtle:  hsl(38, 92%, 58%, 0.12);
  --color-success:         hsl(142, 60%, 45%);
  --color-success-subtle:  hsl(142, 60%, 45%, 0.12);

  /* ── Superfícies (Light Mode) ── */
  --surface-base:    hsl(240, 33%, 98%);
  --surface-1:       hsl(0, 0%, 100%);
  --surface-2:       hsl(240, 20%, 96%);
  --surface-3:       hsl(240, 16%, 92%);
  --surface-4:       hsl(240, 12%, 88%);
  --surface-raised:  hsl(0, 0%, 100%);
  --surface-overlay: hsl(240, 33%, 98%, 0.85);

  /* ── Texto ── */
  --text-primary:   hsl(240, 40%, 10%);
  --text-secondary: hsl(240, 20%, 30%);
  --text-muted:     hsl(240, 15%, 45%);
  --text-disabled:  hsl(240, 10%, 65%);

  /* ── Bordas ── */
  --border-subtle:  hsl(240, 15%, 90%);
  --border-default: hsl(240, 15%, 85%);
  --border-strong:  hsl(240, 15%, 75%);

  /* ── Glassmorphism ── */
  --glass-bg:      hsl(0, 0%, 100%, 0.75);
  --glass-border:  hsl(0, 0%, 0%, 0.06);
  --glass-blur:    16px;

  /* ── Tipografia ── */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extrabold:800;
  --fw-black:    900;

  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-normal: 1.5;
  --lh-relaxed:1.7;

  /* ── Espaçamento ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ── Border Radius ── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ── Sombras ── */
  --shadow-sm:  0 1px 3px hsl(0,0%,0%,0.3), 0 1px 2px hsl(0,0%,0%,0.2);
  --shadow-md:  0 4px 12px hsl(0,0%,0%,0.35), 0 2px 6px hsl(0,0%,0%,0.2);
  --shadow-lg:  0 10px 30px hsl(0,0%,0%,0.4), 0 4px 12px hsl(0,0%,0%,0.25);
  --shadow-xl:  0 20px 50px hsl(0,0%,0%,0.5), 0 8px 20px hsl(0,0%,0%,0.3);
  --shadow-glow-primary: 0 0 24px var(--color-primary-glow), 0 0 48px hsl(246,80%,62%,0.15);
  --shadow-glow-secondary: 0 0 24px hsl(168,65%,42%,0.3);
  --shadow-glow-accent: 0 0 24px hsl(38,92%,58%,0.3);

  /* ── Transições ── */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-Index ── */
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-toast:   300;
  --z-tooltip: 400;

  /* ── Layout ── */
  --sidebar-width:      260px;
  --sidebar-collapsed:  72px;
  --header-height:      64px;
  --content-max-width:  1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--surface-base);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Utility Classes ── */
.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent    { color: var(--color-accent); }
.text-danger    { color: var(--color-danger); }
.text-muted     { color: var(--text-muted); }
.text-success   { color: var(--color-success); }

.bg-primary-subtle   { background: var(--color-primary-subtle); }
.bg-secondary-subtle { background: var(--color-secondary-subtle); }
.bg-accent-subtle    { background: var(--color-accent-subtle); }
.bg-danger-subtle    { background: var(--color-danger-subtle); }
.bg-success-subtle   { background: var(--color-success-subtle); }

.font-heading { font-family: var(--font-heading); }
.font-mono    { font-family: var(--font-mono); }

.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Scrollbar Customizada ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-1); }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Seleção de texto ── */
::selection {
  background: var(--color-primary-subtle);
  color: var(--color-primary-light);
}

/* ── Keyframes globais ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes progressFill {
  from { width: 0%; }
  to   { width: var(--progress-width, 0%); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--color-primary-subtle); box-shadow: 0 0 0 transparent; }
  50%       { border-color: var(--color-primary); box-shadow: var(--shadow-glow-primary); }
}

.animate-fade-in       { animation: fadeIn var(--transition-normal) ease both; }
.animate-fade-in-scale { animation: fadeInScale var(--transition-normal) ease both; }
.animate-slide-right   { animation: slideInRight var(--transition-normal) ease both; }
.animate-float         { animation: float 3s ease-in-out infinite; }
