/*
 * reyplay/static/reyplay/css/tokens.css
 * ReyPlay Design System — Brand Tokens v1.0
 * "Tu entretenimiento real"
 *
 * CARGAR PRIMERO en base.html, antes que cualquier otro CSS.
 * Nunca hardcodear colores en otros archivos — siempre usar --rp-*.
 */

/* ── Fuentes locales ──────────────────────────────────────────────────────
   Cinzel  → Logo, headings hero, elementos premium
   Outfit  → Todo el UI cotidiano (navegación, cards, formularios)
   Archivos en static/lib/fonts/ — sin dependencia externa
   ──────────────────────────────────────────────────────────────────────── */

/* Cinzel — latin-ext */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../../lib/fonts/cinzel/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cinzel — latin */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../../lib/fonts/cinzel/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit — latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../../lib/fonts/outfit/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Outfit — latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../../lib/fonts/outfit/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens de marca ─────────────────────────────────────────────────────── */
:root {

  /* Primarios */
  --rp-gold:          #C9A227;
  --rp-gold-bright:   #E8C84A;
  --rp-gold-dark:     #B8901F;

  /* Fondos */
  --rp-bg-deep:       #0D0D1A;
  --rp-bg-surface:    #1A1A2E;
  --rp-bg-elevated:   #16162A;
  --rp-bg-navbar:     rgba(13, 13, 26, 0.94);
  --rp-bg-overlay:    rgba(13, 13, 26, 0.85);

  /* Bordes */
  --rp-border:        #333355;
  --rp-border-gold:   rgba(201, 162, 39, 0.35);
  --rp-border-bright: rgba(201, 162, 39, 0.7);

  /* Texto */
  --rp-text-primary:   #FFFFFF;
  --rp-text-secondary: #CCCCDD;
  --rp-text-muted:     #888899;
  --rp-text-disabled:  #555566;
  --rp-text-gold:      #C9A227;

  /* Categorías */
  --rp-cat-video:      #1E6FD9;
  --rp-cat-series:     #8E44AD;
  --rp-cat-tv:         #C0392B;
  --rp-cat-radio:      #27AE60;
  --rp-cat-karaoke:    #27AE60;

  --rp-cat-video-bg:   #1E2A4A;
  --rp-cat-series-bg:  #2A1E4A;
  --rp-cat-tv-bg:      #2A1E1E;
  --rp-cat-radio-bg:   #1E2A1E;

  /* Estados */
  --rp-success:  #27AE60;
  --rp-warning:  #E8C84A;
  --rp-error:    #C0392B;
  --rp-info:     #1E6FD9;

  /* Efectos */
  --rp-glow-gold:   0 0 20px rgba(201, 162, 39, 0.4);
  --rp-glow-soft:   0 0 40px rgba(201, 162, 39, 0.15);
  --rp-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --rp-shadow-deep: 0 8px 48px rgba(0, 0, 0, 0.7);

  /* Tipografía */
  --rp-font-display: 'Cinzel', serif;
  --rp-font-body:    'Outfit', sans-serif;
  --rp-font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Escala tipográfica propia (px) */
  --rp-text-xs:   11px;
  --rp-text-sm:   13px;
  --rp-text-base: 15px;
  --rp-text-md:   18px;
  --rp-text-lg:   22px;
  --rp-text-xl:   28px;
  --rp-text-2xl:  36px;
  --rp-text-hero: 56px;

  /* Radios */
  --rp-radius-sm:   6px;
  --rp-radius-md:   10px;
  --rp-radius-lg:   16px;
  --rp-radius-xl:   24px;
  --rp-radius-pill: 999px;

  /* Transiciones */
  --rp-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --rp-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --rp-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Animaciones de marca ────────────────────────────────────────────────── */
@keyframes rp-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rp-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 6px rgba(192, 57, 43, 0); }
}
@keyframes rp-shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
@keyframes rp-eq-bar {
  from { transform: scaleY(0.2); }
  to   { transform: scaleY(1); }
}

/* ── Clases de utilidad de marca ─────────────────────────────────────────── */
.rp-animate-in { animation: rp-fade-up 400ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.rp-stagger-1  { animation-delay:  50ms; }
.rp-stagger-2  { animation-delay: 100ms; }
.rp-stagger-3  { animation-delay: 150ms; }
.rp-stagger-4  { animation-delay: 200ms; }

.rp-live-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--rp-cat-tv);
  animation: rp-live-pulse 2s ease-in-out infinite;
}

.rp-skeleton {
  background:      linear-gradient(90deg, var(--rp-bg-surface) 25%, var(--rp-border) 50%, var(--rp-bg-surface) 75%);
  background-size: 200% 100%;
  animation:       rp-shimmer 1.5s infinite;
  border-radius:   var(--rp-radius-md);
}

/* Badges de categoría — usados en cards, player, TV panel */
.badge-video   { background: var(--rp-cat-video-bg);  color: var(--rp-cat-video);   }
.badge-series  { background: var(--rp-cat-series-bg); color: var(--rp-cat-series);  }
.badge-tv      { background: var(--rp-cat-tv-bg);     color: var(--rp-cat-tv);      }
.badge-radio   { background: var(--rp-cat-radio-bg);  color: var(--rp-cat-radio);   }
.badge-karaoke { background: var(--rp-cat-radio-bg);  color: var(--rp-cat-karaoke); }