/* ============================================================
   CRONORUN – BASE CSS
   Reset, tipografía base, utilidades globales
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=Barlow:wght@400;500;600;700&family=Orbitron:wght@700;900&display=swap');

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

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

body {
  font-family: var(--font-body);
  background: var(--cr-bg);
  color: var(--cr-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ── Scrollbar personalizada ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cr-dark-2); }
::-webkit-scrollbar-thumb {
  background: var(--cr-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--cr-red); }

/* ── Contenedor principal ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.text-gradient {
  background: var(--cr-gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.text-muted  { color: var(--cr-muted); }
.text-red    { color: var(--cr-red); }
.text-orange { color: var(--cr-orange); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }

/* ── Layout utilities ───────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }

.grid        { display: grid; }
.grid-2      { grid-template-columns: repeat(2, 1fr); }
.grid-3      { grid-template-columns: repeat(3, 1fr); }
.grid-4      { grid-template-columns: repeat(4, 1fr); }

/* ── Espaciado ─────────────────────────────────────────────── */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-red {
  background: rgba(230, 48, 48, 0.15);
  color: var(--cr-red-light);
  border: 1px solid rgba(230, 48, 48, 0.3);
}

.badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-orange {
  background: rgba(255, 107, 53, 0.12);
  color: var(--cr-orange-light);
  border: 1px solid rgba(255, 107, 53, 0.25);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cr-muted-light);
  border: 1px solid var(--cr-border-subtle);
}

/* ── Divisor ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--cr-border-subtle);
  width: 100%;
  margin: var(--space-xl) 0;
}

/* ── Sección ────────────────────────────────────────────────── */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cr-red);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: var(--cr-gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--cr-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ── Animaciones globales ───────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 48, 48, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(230, 48, 48, 0); }
}

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

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

.animate-fade-in  { animation: fadeIn var(--transition-slow) ease forwards; }
.animate-pulse    { animation: pulse 2s infinite; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--space-2xl) 0; }
}
