/* ═══════════════════════════════════════════════════════════════
   ELRHOS — Design System
   Paleta: Azul #3B6ED4, Grises oscuros, Ámbar para beta
═══════════════════════════════════════════════════════════════ */

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

/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg-root:    #0D1017;
  --bg-deep:    #111420;
  --bg-card:    #181C28;
  --bg-raised:  #1F2435;
  --bg-input:   #151926;
  --blue:       #3B6ED4;
  --blue-mid:   #4A7EE8;
  --blue-light: #6B9CF8;
  --blue-glow:  rgba(59,110,212,0.15);
  --blue-border:rgba(59,110,212,0.28);
  --gray-700:   #374151;
  --gray-mid:   #4B5568;
  --gray-sub:   #6B7280;
  --gray-muted: #9CA3AF;
  --text:       #E9EDF6;
  --text-dim:   #9BA4B8;
  --amber:      #F0A500;
  --amber-light:#FFD166;
  --amber-bg:   rgba(240,165,0,0.09);
  --amber-bdr:  rgba(240,165,0,0.28);
  --green:      #34D399;
  --green-bg:   rgba(52,211,153,0.09);
  --red:        #F87171;
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --shadow-md:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.5);
  --shadow-blue:0 8px 32px rgba(59,110,212,0.35);
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-root);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ─── CONTAINER ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}
.container--sm { max-width: 820px; }
.container--lg { max-width: 1360px; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
.display {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.01em;
}
.display--xl { font-size: clamp(52px, 8vw, 96px); }
.display--lg { font-size: clamp(40px, 6vw, 68px); }
.display--md { font-size: clamp(28px, 4vw, 48px); }
.display--sm { font-size: clamp(22px, 3vw, 32px); }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-light);
}
.body-lg { font-size: 18px; line-height: 1.7; color: var(--text-dim); }
.body-md { font-size: 15px; line-height: 1.65; color: var(--text-dim); }
.body-sm { font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.badge--blue   { background: var(--blue-glow);  color: var(--blue-light); border: 1px solid var(--blue-border); }
.badge--amber  { background: var(--amber-bg);   color: var(--amber);      border: 1px solid var(--amber-bdr); }
.badge--green  { background: var(--green-bg);   color: var(--green);      border: 1px solid rgba(52,211,153,0.28); }
.badge--red    { background: rgba(248,113,113,.09); color: var(--red);    border: 1px solid rgba(248,113,113,.28); }
.badge--ghost  { background: rgba(255,255,255,.05); color: var(--text-dim); border: 1px solid rgba(255,255,255,.1); }

/* pulse dot for live badges */
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
}
.btn:active::after { opacity: 0.06; }

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-blue);
  padding: 14px 32px;
  font-size: 15px;
}
.btn--primary:hover {
  background: var(--blue-mid);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59,110,212,0.45);
}

.btn--primary-lg {
  padding: 17px 44px;
  font-size: 16px;
}

.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 13px 28px;
  font-size: 15px;
}
.btn--ghost:hover {
  border-color: rgba(255,255,255,0.28);
  color: var(--text);
  transform: translateY(-2px);
}

.btn--amber {
  background: var(--amber);
  color: #0D1017;
  padding: 14px 32px;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(240,165,0,0.35);
}
.btn--amber:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(240,165,0,0.45);
}

.btn--green {
  background: var(--green);
  color: #0D1017;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(52,211,153,0.3);
}
.btn--green:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn--icon { padding: 12px; border-radius: var(--radius-sm); }

.btn svg { flex-shrink: 0; }

/* ─── DIVIDERS & DECORATORS ──────────────────────────────────── */
.divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  border: none;
  margin: 0;
}
.section-gap { padding: 96px 0; }
.section-gap--sm { padding: 64px 0; }
.section-gap--lg { padding: 128px 0; }

.section-header { margin-bottom: 64px; }
.section-header--center { text-align: center; }
.section-header--center .body-lg { margin: 0 auto; max-width: 560px; }

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover {
  border-color: var(--blue-border);
  transform: translateY(-4px);
}
.card--p { padding: 36px 32px; }

/* ─── GRID BACKGROUND ────────────────────────────────────────── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,110,212,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,110,212,0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .grid-bg--animated {
    animation: gridScroll 20s linear infinite;
  }
}
@keyframes gridScroll {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 0 52px, 52px 0; }
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 68px;
  background: rgba(13,16,23,0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-link.active { color: var(--blue-light); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(13,16,23,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 20px 28px 28px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { padding: 12px 14px; font-size: 16px; }
.nav-mobile .btn--primary { width: 100%; justify-content: center; margin-top: 12px; }

/* ─── PAGE WRAPPER ───────────────────────────────────────────── */
.page-top { padding-top: 68px; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: #090C13;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}
.footer-logo img { height: 36px; margin-bottom: 16px; }
.footer-logo p { font-size: 14px; color: var(--gray-sub); line-height: 1.7; max-width: 240px; }
.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-size: 14px;
  color: var(--gray-sub);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: var(--gray-sub); }
.footer-bottom span { color: var(--blue-light); }

/* ─── SCROLL ANIMATIONS ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.changelog.reveal { opacity: 1; transform: none; }
.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; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── TOOLTIP ────────────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
[data-tip]:hover::after { opacity: 1; }

/* ─── FORM ELEMENTS ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,110,212,0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-raised); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section-gap { padding: 72px 0; }
  .section-gap--lg { padding: 80px 0; }
  .section-header { margin-bottom: 44px; }
  .nav-menu, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-logo { grid-column: 1 / -1; }
  .display--xl { font-size: clamp(40px, 12vw, 64px); }
  .display--lg { font-size: clamp(32px, 10vw, 52px); }
  .hero-actions, .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn, .cta-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
