/* ══════════════════════════════════════════════════
   shared.css  —  DBLinkOn Design System
   Tokens, backgrounds, typography y utilidades
   comunes a todas las páginas de la plataforma.
══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────── */
:root {
  /* Colores base */
  --bg:        #04070d;
  --surface:   rgba(10,16,30,0.85);
  --surface2:  rgba(15,22,40,0.97);

  /* Bordes */
  --border:    rgba(255,255,255,0.06);
  --border2:   rgba(255,255,255,0.12);

  /* Paleta de acento */
  --blue:      #1d8cff;
  --blue-dim:  rgba(29,140,255,0.12);
  --emerald:   #22d3a8;
  --rose:      #ff4d6d;
  --amber:     #ffb830;
  --violet:    #a78bfa;

  /* Tipografía */
  --text:      #e8edf5;
  --muted:     rgba(232,237,245,0.38);
  --mono:      'DM Mono', monospace;

  /* Transiciones */
  --ease:      cubic-bezier(.16,1,.3,1);
}

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

/* ── BASE BODY ──────────────────────────────────── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
  overflow-x: hidden;
}

/* ── ATMOSPHERIC BACKGROUND ─────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% 0%,  rgba(29,140,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(34,211,168,0.07) 0%, transparent 55%);
}

/* ── NOISE TEXTURE ──────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.022;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── GRID BACKGROUND ────────────────────────────── */
.grid-bg,
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── PAGE WRAPPER ───────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
}

/* ── BRAND ICON ─────────────────────────────────── */
.brand-icon,
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-dim);
  border: 1px solid rgba(29,140,255,0.3);
  border-radius: 10px;
}

/* ── BRAND NAME ─────────────────────────────────── */
.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-name span,
.brand-name em {
  font-style: normal;
  color: var(--blue);
}

/* ── LIVE BADGE ─────────────────────────────────── */
.live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(34,211,168,0.08);
  border: 1px solid rgba(34,211,168,0.2);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2s infinite;
}

.live-text {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* ── POWERED-BY BADGE ───────────────────────────── */
.powered-by,
.powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.powered-label {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(232,237,245,0.2);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.powered-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blue), #0044bb);
}

.powered-icon svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.powered-name {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(232,237,245,0.35);
}

.powered-name em {
  font-style: normal;
  color: rgba(255,102,0,0.6);
}

/* ── TOAST ──────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  transform: translateY(12px);
  opacity: 0;
  transition: all .3s var(--ease);
  pointer-events: none;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── KEYFRAMES ──────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,211,168,0.5); }
  50%       { opacity: .8; box-shadow: 0 0 0 5px rgba(34,211,168,0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── SCROLL REVEAL ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible         { opacity: 1; transform: none; }
.reveal.reveal-d1       { transition-delay: .1s; }
.reveal.reveal-d2       { transition-delay: .2s; }
.reveal.reveal-d3       { transition-delay: .3s; }
.reveal.reveal-d4       { transition-delay: .4s; }

/* ── UTILITY ────────────────────────────────────── */
.hidden { display: none !important; }
