/* ═══════════════════════════════════════════════════════════════════════════
   ATLAS HOME — Design System v1.0
   Premium fintech-inmobiliaria · marino + dorado
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Paleta base — v5: fondo más profundo (elite dark) */
  --navy:    #080E1C;
  --navy2:   #0D1526;
  --card:    #0D1526;
  --card2:   #121D30;
  --border:  rgba(212,160,23,0.15);
  --border2: rgba(212,160,23,0.30);

  /* Dorado */
  --gold:    #D4A017;
  --gold2:   #F3D27A;
  --gold3:   #B8860B;
  --gold-gradient: linear-gradient(135deg, #F3D27A 0%, #D4A017 50%, #B8860B 100%);

  /* Texto */
  --text:    #F8FAFC;
  --muted:   #94A3B8;
  --muted2:  #64748B;

  /* Semánticos */
  --green:   #22C55E;
  --red:     #EF4444;
  --orange:  #F97316;

  /* Tipografía */
  --font-display: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Sombras */
  --shadow-gold: 0 8px 32px rgba(212,160,23,0.25);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.4);

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ── Fondo con grid sutil ──────────────────────────────────────────────── */
body.atlas-ds {
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  background-image:
    linear-gradient(rgba(212,160,23,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,160,23,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Cards con glassmorphism ───────────────────────────────────────────── */
.atlas-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.atlas-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.atlas-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.atlas-card:hover::before { opacity: 1; }

/* ── Botones ────────────────────────────────────────────────────────────── */
.btn-atlas-primary {
  background: var(--gold-gradient);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-atlas-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212,160,23,0.45);
}
.btn-atlas-secondary {
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-atlas-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,160,23,0.05);
}
.btn-atlas-ghost {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-atlas-ghost:hover { color: var(--gold); border-color: var(--border); }

/* ── Badges / Pills ─────────────────────────────────────────────────────── */
[class^="badge-ds-"] {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-ds-hot   { background:rgba(239,68,68,0.15);  color:var(--red);    border:1px solid rgba(239,68,68,0.3); }
.badge-ds-warm  { background:rgba(249,115,22,0.15); color:var(--orange); border:1px solid rgba(249,115,22,0.3); }
.badge-ds-cold  { background:rgba(148,163,184,0.15);color:var(--muted);  border:1px solid rgba(148,163,184,0.2); }
.badge-ds-gold  { background:rgba(212,160,23,0.15); color:var(--gold);   border:1px solid rgba(212,160,23,0.3); }
.badge-ds-green { background:rgba(34,197,94,0.15);  color:var(--green);  border:1px solid rgba(34,197,94,0.3); }

/* ── Texto dorado ───────────────────────────────────────────────────────── */
.text-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.atlas-input {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  outline: none;
}
.atlas-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,0.1); }
.atlas-input::placeholder { color: var(--muted2); }

/* ── Select ─────────────────────────────────────────────────────────────── */
.atlas-select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 12px 40px 12px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.2s;
}
.atlas-select:focus { border-color: var(--gold); }
.atlas-select option { background: #1A2640; color: var(--text); }

/* ── Label ──────────────────────────────────────────────────────────────── */
.atlas-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

/* ── Divisor dorado ─────────────────────────────────────────────────────── */
.atlas-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
  margin: 24px 0;
  border: none;
}

/* ── Eyebrow labels ─────────────────────────────────────────────────────── */
.atlas-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

/* ── Dot pulsante ───────────────────────────────────────────────────────── */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: atlas-pulse 2s infinite;
}
@keyframes atlas-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

/* ── Hero portal ────────────────────────────────────────────────────────── */
.hero-atlas {
  min-height: 68vh;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 72px 24px 40px;
  position: relative;
  text-align: center;
  overflow: hidden;
}
@media (max-width: 768px) {
  .hero-atlas { min-height: 75vh; max-height: none; padding: 56px 20px 32px; }
}
.hero-atlas-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,
      rgba(212,160,23,0.07) 0%, transparent 60%),
    linear-gradient(180deg, #0B1120 0%, #0F172A 100%);
  pointer-events: none;
}
.hero-atlas-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,160,23,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,160,23,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-atlas-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  color: #F8FAFC;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: clamp(13px, 1.6vw, 16px);
  color: rgba(248,250,252,0.82);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(248,250,252,0.15);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  line-height: 1;
}
.hero-stat-lbl {
  font-size: 11px;
  color: rgba(248,250,252,0.7);
  margin-top: 3px;
}

/* ── Scrollbar dorado ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb {
  background: rgba(212,160,23,0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Sidebar mejorado (para base.html) ─────────────────────────────────── */
.nav-item-ds {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.nav-item-ds:hover {
  color: var(--text);
  background: rgba(212,160,23,0.08);
  border-left-color: rgba(212,160,23,0.4);
}
.nav-item-ds.active {
  color: var(--gold);
  background: rgba(212,160,23,0.12);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMACIONES PREMIUM — Emil Kowalski / Linear.app level
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 20px rgba(212,160,23,0.2); }
  50%      { box-shadow: 0 0 40px rgba(212,160,23,0.5), 0 0 80px rgba(212,160,23,0.2); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes border-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ripple-anim {
  to { transform: scale(2); opacity: 0; }
}

.anim-fade-up    { animation: fadeInUp 0.5s ease forwards; }
.anim-scale-in   { animation: fadeInScale 0.4s ease forwards; }
.anim-slide-left { animation: slideInLeft 0.4s ease forwards; }
.anim-float      { animation: float 3s ease-in-out infinite; }
.anim-glow       { animation: glow-pulse 2s ease-in-out infinite; }
.anim-delay-1    { animation-delay: 0.1s; }
.anim-delay-2    { animation-delay: 0.2s; }
.anim-delay-3    { animation-delay: 0.3s; }
.anim-delay-4    { animation-delay: 0.4s; }
.anim-delay-5    { animation-delay: 0.5s; }

/* GLASSMORPHISM PREMIUM */
.glass {
  background: rgba(21,31,53,0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(212,160,23,0.12);
  border-radius: var(--radius-lg);
}
.glass-strong {
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(212,160,23,0.2);
}

/* SHIMMER / SKELETON */
.skeleton {
  background: linear-gradient(90deg, var(--card2,#1A2640) 25%, rgba(212,160,23,0.1) 50%, var(--card2,#1A2640) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* HOVER EFFECTS */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(212,160,23,0.2);
}
.hover-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(212,160,23,0.25);
  border-color: rgba(212,160,23,0.5) !important;
}

/* TEXTO DEGRADADO */
.text-gradient-gold {
  background: linear-gradient(135deg, #F3D27A, #D4A017, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-aurora {
  background: linear-gradient(135deg, #D4A017, #22C55E, #D4A017);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: border-flow 4s ease infinite;
}

/* CARD PREMIUM */
.card-premium {
  background: var(--card,#151F35);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.card-premium::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.card-premium:hover {
  border-color: rgba(212,160,23,0.35);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,160,23,0.1),
              inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.card-premium:hover::after { opacity: 1; }

/* SCROLLBAR DORADO */
* { scrollbar-width: thin; scrollbar-color: var(--gold3,#B8860B) var(--navy,#0B1120); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--navy,#0B1120); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold3,#B8860B), var(--gold,#D4A017));
  border-radius: 2px;
}

/* PARTÍCULAS DE FONDO */
.particle-bg { position: relative; overflow: hidden; }
.particle-bg::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(212,160,23,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(212,160,23,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(212,160,23,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(212,160,23,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 60%, rgba(212,160,23,0.3) 0%, transparent 100%);
}

/* COUNTER */
.counter-num {
  font-family: var(--font-display,'Poppins',sans-serif);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: all 0.5s ease;
}

@media (max-width: 480px) {
  .card-premium { padding: 16px; border-radius: 12px; }
  .card-premium:hover { transform: none; }
  .hover-lift:hover { transform: none; }
}

/* ── Nav público unificado (landings + simulador) ─────────────────────────── */
.atlas-theme-pill {
  display: flex;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(212,160,23,.2);
  border-radius: 20px;
  overflow: hidden;
  padding: 2px;
}
.atlas-theme-opt {
  background: none;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 16px;
  transition: all .15s;
  opacity: .5;
  line-height: 1;
}
.atlas-theme-opt.active {
  background: rgba(212,160,23,.2);
  opacity: 1;
}
[data-theme="sol"] .atlas-theme-pill {
  background: rgba(0,0,0,.06);
  border-color: rgba(212,160,23,.25);
}

/* ── Atlas Match Engine (AMC) — tarjetas Tinder reutilizables ───────────── */
.amc-card {
  position: absolute; inset: 0; border-radius: 20px; overflow: hidden;
  cursor: grab; user-select: none; touch-action: none;
  transition: transform .08s ease, box-shadow .08s ease;
  will-change: transform; box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.amc-card:active { cursor: grabbing; }
.amc-front  { z-index: 2; }
.amc-back1  { transform: scale(.95) translateY(12px); z-index: 1; }
.amc-back2  { transform: scale(.90) translateY(24px); z-index: 0; }
.amc-fly-l  { animation: amcFlyL .35s ease forwards; }
.amc-fly-r  { animation: amcFlyR .35s ease forwards; }
@keyframes amcFlyL { to { transform: translateX(-130%) rotate(-20deg); opacity: 0; } }
@keyframes amcFlyR { to { transform: translateX(130%)  rotate(20deg);  opacity: 0; } }

.amc-img     { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.amc-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.97) 0%, rgba(15,23,42,.6) 50%, transparent 100%); }
.amc-body    { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; }

/* Stamps LIKE / NOPE */
.amc-stamp-like, .amc-stamp-nope {
  position: absolute; top: 28px; padding: 8px 18px; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: 2px;
  opacity: 0; pointer-events: none; z-index: 10; border: 4px solid;
}
.amc-stamp-like { left: 20px;  color: #22C55E; border-color: #22C55E; transform: rotate(-15deg); }
.amc-stamp-nope { right: 20px; color: #EF4444; border-color: #EF4444; transform: rotate(15deg);  }

/* Floating space cards */
.amc-spaces     { position: absolute; top: 14px; right: 14px; width: 76px; z-index: 5; }
.amc-space-card {
  width: 76px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.6); border: 1.5px solid rgba(212,160,23,.4);
  opacity: 0; transition: opacity .3s ease;
}
.amc-space-card img  { width: 100%; height: 56px; object-fit: cover; display: block; }
.amc-space-card span {
  display: block; background: rgba(15,23,42,.92); font-size: 8px; font-weight: 700;
  color: #D4A017; padding: 3px 5px; text-align: center; text-transform: uppercase; letter-spacing: .4px;
}

/* Card content */
.amc-tags    { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.amc-tag     { font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 10px;
               background: rgba(255,255,255,.1); color: #F8FAFC; }
.amc-tag-hot { background: rgba(239,68,68,.85); }

.amc-loc   { font-size: 11px; font-weight: 600; color: #D4A017; margin-bottom: 3px; }
.amc-title { font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 800;
             color: #F8FAFC; line-height: 1.3; margin-bottom: 6px; }
.amc-price { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 900;
             color: #D4A017; margin-bottom: 8px; }

.amc-stats  { display: flex; gap: 7px; margin-bottom: 6px; }
.amc-stat   { flex: 1; border-radius: 11px; padding: 7px 9px; }
.amc-stat-g { background: rgba(212,160,23,.1); border: 1px solid rgba(212,160,23,.2); }
.amc-stat-d { background: rgba(148,163,184,.08); border: 1px solid rgba(148,163,184,.15); }
.amc-stat-l { font-size: 9px; font-weight: 600; color: #D4A017; margin-bottom: 2px; }
.amc-stat-v { font-size: 12px; font-weight: 700; color: #F8FAFC; }

.amc-lugares { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.amc-lugar   { font-size: 9px; padding: 3px 8px; border-radius: 10px;
               background: rgba(96,165,250,.12); border: 1px solid rgba(96,165,250,.2); color: #93C5FD; }

.amc-links { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.amc-link  { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
             border-radius: 8px; font-size: 10px; font-weight: 700; text-decoration: none; }
.amc-link-g { background: rgba(212,160,23,.12); border: 1px solid rgba(212,160,23,.3); color: #D4A017; }
.amc-link-b { background: rgba(96,165,250,.1);  border: 1px solid rgba(96,165,250,.25); color: #60A5FA; }

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM v4.0 — ELITE ADDITIONS — Linear.app / Vercel / Stripe level
   ══════════════════════════════════════════════════════════════════════════ */

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

:root {
  /* 5-tone gold palette */
  --gold-100: #FEF3C7;
  --gold-200: #FDE68A;
  --gold-300: #F3D27A;
  --gold-400: #D4A017;
  --gold-500: #B8860B;
  --gold-600: #92680A;

  /* Physics-based easing curves */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-expo:   cubic-bezier(0.19, 1, 0.22, 1);
  --ease-back:   cubic-bezier(0.36, 0, 0.66, -0.56);

  /* Monospace for financial data */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Deep bg for elite dark mode */
  --bg-base: #080E1C;
}

/* ── Font utility ─────────────────────────────────────────────────────────── */
.font-mono { font-family: var(--font-mono); }
.text-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── card-elite — glassmorphism premium ───────────────────────────────────── */
.card-elite {
  /* Fallback dark si la página no define --card-glass (este archivo se
     usa también fuera del shell de base.html). El brightness(110%) se
     quitó: en tema claro aclaraba aún más un fondo ya claro y comía el
     contraste del texto. Ver AUDITORIA_REESTRUCTURACION.md sección B. */
  background: var(--card-glass, rgba(15, 23, 42, 0.55));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(212, 160, 23, 0.14);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-expo);
}
.card-elite::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,0.55), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card-elite:hover {
  border-color: rgba(212, 160, 23, 0.32);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5),
              0 0 0 1px rgba(212,160,23,0.08),
              inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-3px);
}
.card-elite:hover::before { opacity: 1; }

/* ── badge-elite ──────────────────────────────────────────────────────────── */
.badge-elite {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid;
}
.badge-elite-gold  { background:rgba(212,160,23,0.12); border-color:rgba(212,160,23,0.30); color:var(--gold-300,#F3D27A); }
.badge-elite-green { background:rgba(34,197,94,0.10);  border-color:rgba(34,197,94,0.25);  color:#22C55E; }
.badge-elite-red   { background:rgba(239,68,68,0.10);  border-color:rgba(239,68,68,0.25);  color:#EF4444; }
.badge-elite-muted { background:rgba(148,163,184,0.08);border-color:rgba(148,163,184,0.2); color:#94A3B8; }
.badge-elite-ia    { background:rgba(129,140,248,0.10); border-color:rgba(129,140,248,0.28);color:#A5B4FC; }

/* ── Keyframes v4.0 ───────────────────────────────────────────────────────── */
@keyframes aurora-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(212,160,23,0.25); }
  50%       { box-shadow: 0 0 40px rgba(212,160,23,0.55), 0 0 80px rgba(212,160,23,0.15); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-aurora {
  background: linear-gradient(135deg, #D4A017, #22C55E, #D4A017, #F3D27A);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aurora-shift 5s ease infinite;
}
.anim-float-y    { animation: floatY 4s ease-in-out infinite; }
.anim-glow-pulse { animation: glowPulse 2.5s ease-in-out infinite; }
.anim-slide-up   { animation: slideUp 0.5s var(--ease-expo) forwards; }

/* ── Stagger delays para [data-stagger] ───────────────────────────────────── */
[data-stagger] > *:nth-child(1) { animation-delay:   0ms; }
[data-stagger] > *:nth-child(2) { animation-delay:  80ms; }
[data-stagger] > *:nth-child(3) { animation-delay: 160ms; }
[data-stagger] > *:nth-child(4) { animation-delay: 240ms; }
[data-stagger] > *:nth-child(5) { animation-delay: 320ms; }
[data-stagger] > *:nth-child(6) { animation-delay: 400ms; }

/* ── Agents grid ──────────────────────────────────────────────────────────── */
.agents-section { padding: 64px 24px; }
.agents-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 1100px) { .agents-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .agents-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px)  { .agents-grid { grid-template-columns: 1fr; } }

.agent-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(212, 160, 23, 0.12);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  transition: all 0.35s var(--ease-expo);
  position: relative;
  overflow: hidden;
}
.agent-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  transition: opacity 0.3s;
  opacity: 0;
}
.agent-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 160, 23, 0.28);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,160,23,0.06);
}
.agent-card:hover::after { opacity: 1; }

.agent-atlas::after  { background: linear-gradient(90deg,#D4A017,#F3D27A); }
.agent-atenea::after { background: linear-gradient(90deg,#22C55E,#16A34A); }
.agent-orion::after  { background: linear-gradient(90deg,#3B82F6,#6366F1); }
.agent-hermes::after { background: linear-gradient(90deg,#F97316,#FBBF24); }
.agent-minerva::after{ background: linear-gradient(90deg,#EC4899,#A855F7); }

.agent-icon  { font-size: 30px; margin-bottom: 10px; display: block; }
.agent-name  { font-family:'Poppins',sans-serif; font-size:13px; font-weight:800; color:#F8FAFC; margin-bottom:3px; }
.agent-role  { font-size:10px; color:#94A3B8; line-height:1.4; margin-bottom:10px; }
.agent-status { display:inline-flex; align-items:center; gap:5px; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:#22C55E; }
.agent-status-dot { width:6px; height:6px; border-radius:50%; background:#22C55E; animation:atlas-pulse 2s infinite; }

/* ── Magnetic button wrapper ──────────────────────────────────────────────── */
.btn-magnetic { display:inline-block; will-change:transform; }

/* ── Section eyebrow v4.0 ─────────────────────────────────────────────────── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-300, #F3D27A);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM v5.0 — ELITE FINAL — Linear.app / Vercel / Stripe
   Tokens semánticos completos + física framer-motion + micro-interacciones.
   Las reglas [data-animate]/[data-stagger] están GATED por html.js-motion:
   sin atlas-motion.js cargado, nada se oculta (progressive enhancement).
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Fondos semánticos */
  --bg-card:  #0D1526;
  --bg-card2: #121D30;
  --bg-glass: rgba(13,21,38,.75);

  /* Texto semántico */
  --text-primary:   #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted:     #64748B;
  --text-subtle:    #334155;

  /* Estado */
  --success: #10B981;
  --warning: #F59E0B;
  --error:   #EF4444;
  --info:    #3B82F6;

  /* Bordes — 4 niveles */
  --border-subtle:  rgba(212,160,23,.08);
  --border-default: rgba(212,160,23,.18);
  --border-strong:  rgba(212,160,23,.35);
  --border-focus:   rgba(212,160,23,.7);

  /* Gradientes */
  --grad-gold:   linear-gradient(135deg,#F9E4A0,#D4A017,#B8860B);
  --grad-aurora: linear-gradient(135deg,#F3D27A 0%,#D4A017 40%,#10B981 100%);

  /* Sombras con glow */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.4), 0 0 0 1px var(--border-subtle);
  --shadow-md:   0 4px 16px rgba(0,0,0,.5), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 40px rgba(212,160,23,.2), 0 20px 48px rgba(0,0,0,.6);

  /* Radios */
  --r-sm: 6px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px;

  /* Spacing (base 4px) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Física framer-motion → CSS */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-expo:  cubic-bezier(0.95, 0.05, 0.795, 0.035);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:   cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Duraciones */
  --dur-fast: 150ms; --dur-normal: 280ms; --dur-slow: 500ms; --dur-xslow: 800ms;
}

::selection { background: rgba(212,160,23,.25); color: var(--gold-200,#F9E4A0); }

/* ── Escala tipográfica estricta ──────────────────────────────────────────── */
.text-xs   { font-size: 10px; line-height: 1.4; }
.text-sm   { font-size: 12px; line-height: 1.5; }
.text-base { font-size: 14px; line-height: 1.6; }
.text-md   { font-size: 16px; line-height: 1.55; }
.text-lg   { font-size: 20px; line-height: 1.4; }
.text-xl   { font-size: 28px; line-height: 1.25; }
.text-2xl  { font-size: 40px; line-height: 1.15; }
.text-3xl  { font-size: 56px; line-height: 1.08; }
.text-hero { font-size: clamp(40px,6vw,80px); line-height: 1.02; letter-spacing: -2px; }

.font-light    { font-weight: 300; } .font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; } .font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; } .font-extrabold{ font-weight: 800; }
.font-black    { font-weight: 900; }

.font-display { font-family: 'Poppins', sans-serif; }
.font-body    { font-family: 'Inter', sans-serif; }

.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-aurora {
  background: var(--grad-aurora); background-size: 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aurora-shift 4s ease infinite;
}

/* ── Animate-on-scroll — GATED por html.js-motion ─────────────────────────── */
html.js-motion [data-animate]:not(.in) { opacity: 0; transform: translateY(20px); }
[data-animate].in { animation: slideUp var(--dur-slow) var(--ease-out-expo) forwards; }
[data-animate="left"].in  { animation-name: slideInLeft; }
[data-animate="scale"].in { animation-name: fadeInScale; }
[data-animate="fade"].in  { animation-name: fadeInUp; }

html.js-motion [data-stagger]:not(.in) > * { opacity: 0; transform: translateY(16px); }
[data-stagger].in > * { animation: slideUp 500ms var(--ease-out-expo) forwards; }
[data-stagger].in > *:nth-child(1) { animation-delay: 0ms; }
[data-stagger].in > *:nth-child(2) { animation-delay: 60ms; }
[data-stagger].in > *:nth-child(3) { animation-delay: 120ms; }
[data-stagger].in > *:nth-child(4) { animation-delay: 180ms; }
[data-stagger].in > *:nth-child(5) { animation-delay: 240ms; }
[data-stagger].in > *:nth-child(6) { animation-delay: 300ms; }
[data-stagger].in > *:nth-child(7) { animation-delay: 360ms; }
[data-stagger].in > *:nth-child(8) { animation-delay: 420ms; }

/* ── Botón primario: shimmer sweep + spring press ─────────────────────────── */
.btn-atlas-primary { position: relative; overflow: hidden; }
.btn-atlas-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.22) 0%, transparent 50%);
  transform: translateX(-110%);
  transition: transform .6s var(--ease-out-expo);
  pointer-events: none;
}
.btn-atlas-primary:hover::before { transform: translateX(110%); }
.btn-atlas-primary:active {
  transform: scale(.97) translateY(0);
  box-shadow: 0 2px 8px rgba(212,160,23,.3);
}
.btn-atlas-secondary:active { transform: scale(.97); }

/* ── Empty state genérico (Atlas Media AI Studio, 2026-07-30) ──────────────
   macro atlas_empty_state() en templates/macros.html. Reemplaza los
   estados vacíos ad-hoc de Atlas Media AI (antes .amai-empty inline,
   texto plano sin ícono ni jerarquía) -- disponible para cualquier
   página nueva que necesite un estado vacío honesto en vez de
   inventar datos. */
.atlas-empty-state { display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding:22px 14px; color:var(--muted); }
.atlas-empty-state .aes-icon { font-size:22px; opacity:.75; margin-bottom:2px; }
.atlas-empty-state .aes-title { font-family:"Poppins",sans-serif; font-size:12.5px; font-weight:600; color:var(--text); }
.atlas-empty-state .aes-detail { font-size:11px; color:var(--muted); max-width:320px; line-height:1.5; }
.atlas-empty-state .aes-action { margin-top:8px; background:transparent; border:1px solid var(--border); color:var(--accent); border-radius:8px; padding:7px 14px; font-size:11.5px; font-weight:600; cursor:pointer; transition:border-color .15s, background .15s; }
.atlas-empty-state .aes-action:hover { border-color:var(--accent); background:rgba(212,160,23,.08); }
.atlas-empty-state.aes-compact { padding:12px 6px; gap:4px; }
.atlas-empty-state.aes-compact .aes-icon { font-size:16px; margin-bottom:0; }
.btn-atlas-secondary {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--dur-fast) var(--ease-spring),
    border-color var(--dur-normal) var(--ease-smooth),
    background var(--dur-normal) var(--ease-smooth),
    color var(--dur-normal) var(--ease-smooth);
}
.btn-atlas-secondary:hover { transform: translateY(-2px); }

/* ── Badges alias v5 (compat con CLAUDE.md) ───────────────────────────────── */
.badge-gold  { display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;
  font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  background:rgba(212,160,23,.1);border:1px solid var(--border-default);color:var(--gold-300); }
.badge-green { display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;
  font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.3);color:var(--success); }
.badge-hot   { display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;
  font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:var(--error); }
.badge-live  { display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;
  font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.35);color:var(--success);
  animation:glowPulse 2s infinite; }

/* ── Glass gold + divider ─────────────────────────────────────────────────── */
.glass-gold {
  background: rgba(13,21,38,.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-glow);
}
.divider-gold {
  height: 1px; width: 100%; border: none;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: var(--sp-6) 0;
}

/* ── Noise texture (profundidad sutil) ────────────────────────────────────── */
.noise::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px; opacity: .4; mix-blend-mode: overlay;
}

/* ── Grid layouts ─────────────────────────────────────────────────────────── */
.grid-auto { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:var(--sp-4); }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-4); }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--sp-4); }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--sp-4); }
@media (max-width:768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
  .hide-mobile { display:none !important; }
}

/* ── Input focus elite ────────────────────────────────────────────────────── */
.atlas-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212,160,23,.12), 0 1px 3px rgba(0,0,0,.3);
  background: rgba(212,160,23,.03);
}

/* ── Accesibilidad ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js-motion [data-animate]:not(.in),
  html.js-motion [data-stagger]:not(.in) > * { opacity: 1; transform: none; }
}
