/* ============================================================
   ACADEMIA JOTA RUBIO — Sistema de Diseño
   ============================================================ */

:root {
  /* Paleta exacta del prompt */
  --bg-primary:    #0F172A;
  --bg-secondary:  #1E293B;
  --bg-tertiary:   #334155;
  --bg-elevated:   rgba(30, 41, 59, 0.6);

  --accent:        #3B82F6;
  --accent-hover:  #2563EB;
  --accent-glow:   rgba(59, 130, 246, 0.4);
  --accent-soft:   rgba(59, 130, 246, 0.12);

  --success:       #10B981;
  --success-soft:  rgba(16, 185, 129, 0.12);

  --warning:       #F59E0B;
  --warning-soft:  rgba(245, 158, 11, 0.12);

  --danger:        #EF4444;
  --danger-soft:   rgba(239, 68, 68, 0.12);

  --text-primary:  #F8FAFC;
  --text-secondary:#94A3B8;
  --text-muted:    #64748B;

  --border:        rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);

  --glass-bg:      rgba(15, 23, 42, 0.55);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-blur:    20px;

  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md:     0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:     0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-glow:   0 0 40px var(--accent-glow);

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-lg:   1.125rem;  /* 18px */
  --fs-xl:   1.25rem;   /* 20px */
  --fs-2xl:  1.5rem;    /* 24px */
  --fs-3xl:  1.875rem;  /* 30px */
  --fs-4xl:  2.25rem;   /* 36px */
  --fs-5xl:  3rem;      /* 48px */
  --fs-6xl:  3.75rem;   /* 60px */
  --fs-7xl:  4.5rem;    /* 72px */

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  /* Espaciado (8px scale) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Transiciones */
  --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1280px;
  --nav-height:    72px;
  --sidebar-width: 260px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image:
    radial-gradient(at 20% 0%,  rgba(59, 130, 246, 0.10) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245, 158, 11, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--fs-6xl); font-weight: var(--fw-black); letter-spacing: -0.04em; }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { color: var(--text-secondary); line-height: 1.7; }

.gradient-text {
  background: linear-gradient(135deg, #3B82F6 0%, #10B981 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-mono { font-family: var(--font-mono); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section {
  padding: var(--sp-24) 0;
  position: relative;
}

.section-sm { padding: var(--sp-16) 0; }

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-tag {
  display: inline-block;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title {
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================================
   COMPONENTES BASE
   ============================================================ */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  transition: all var(--t-base);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: white;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-4);
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-lg);
}

.btn-sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
}

/* Cards */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  backdrop-filter: blur(var(--glass-blur));
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

/* Glassmorphism */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary  { background: var(--accent-soft);  color: var(--accent); }
.badge-success  { background: var(--success-soft); color: var(--success); }
.badge-warning  { background: var(--warning-soft); color: var(--warning); }
.badge-danger   { background: var(--danger-soft);  color: var(--danger); }
.badge-neutral  { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); }

/* Inputs */
.input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-base);
  transition: all var(--t-base);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

/* Animaciones de scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Utilidades */
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.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 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection { background: var(--accent); color: white; }

/* Responsive base */
@media (max-width: 768px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }
  .section { padding: var(--sp-16) 0; }
  .container { padding: 0 var(--sp-4); }
}
