/* =============================================
   SPEDIS LINKS — alineado al Design System de Spedis Web
   Mobile-first · max 440px · sin emoji
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100svh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* --- Tokens (mirror de Spedis Web) --- */
:root {
  --navy: #0f172a;
  --navy-800: #1e293b;
  --purple-700: #5b21b6;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-glow: rgba(124, 58, 237, 0.10);

  --emerald-600: #059669;
  --emerald-500: #10b981;

  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;

  --text-primary: #24315E;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  --border-light: #e2e8f0;

  --gradient-brand: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
  --gradient-brand-soft: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  --text-2xl: clamp(1.375rem, 1.2rem + 0.7vw, 1.5rem);

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --tracking-tight: -0.025em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 24px rgba(124,58,237,0.08);

  --ease-out: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.4s;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--white);
  position: relative;
  overflow-x: hidden;
}

/* Background ambient: dos radial-gradients sutiles (purple top-left, navy bottom-right) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(124, 58, 237, 0.10) 0%, rgba(124, 58, 237, 0) 60%),
    radial-gradient(60% 50% at 100% 100%, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0) 60%),
    var(--gray-50);
  pointer-events: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

/* --- Layout --- */
.bio {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-5) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* --- Hero --- */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  animation: fadeUp var(--duration-normal) var(--ease-out) both;
}

.logo {
  width: auto;
  height: 64px;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Links --- */
.links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn {
  --bg: var(--white);
  --fg: var(--text-primary);
  --border: var(--border-light);
  --shadow: var(--shadow-sm);

  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3) var(--space-5);
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  font-family: var(--font-heading);
  text-align: left;
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out);
  opacity: 0;
  animation: fadeUp var(--duration-normal) var(--ease-out) forwards;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--purple-600);
  outline-offset: 3px;
}

/* Stagger */
.links .btn:nth-child(1) { animation-delay: 0.05s; }
.links .btn:nth-child(2) { animation-delay: 0.10s; }
.links .btn:nth-child(3) { animation-delay: 0.15s; }
.links .btn:nth-child(4) { animation-delay: 0.20s; }
.links .btn:nth-child(5) { animation-delay: 0.25s; }
.links .btn:nth-child(6) { animation-delay: 0.30s; }

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--text-primary);
}
.btn-icon svg { width: 20px; height: 20px; }

.btn-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.btn-label strong {
  font-weight: 600;
  font-size: var(--text-base);
  color: inherit;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}
.btn-label small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* --- Variants --- */

/* Primary: gradiente brand (mismo CTA principal del site) */
.btn-primary {
  --bg: var(--gradient-brand);
  --fg: var(--white);
  --border: transparent;
  --shadow: 0 8px 24px rgba(91, 33, 182, 0.25);
  background: var(--gradient-brand);
}
.btn-primary .btn-icon { background: rgba(255,255,255,0.15); color: var(--white); }
.btn-primary .btn-label small { color: rgba(255,255,255,0.78); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(91, 33, 182, 0.32); }

/* Accent: navy sólido (segunda jerarquía, alterna purple) */
.btn-accent {
  --bg: var(--navy);
  --fg: var(--white);
  --border: transparent;
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
  background: var(--navy);
}
.btn-accent .btn-icon { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-accent .btn-label small { color: rgba(255,255,255,0.72); }
.btn-accent:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28); }

/* WhatsApp: emerald (success state del site) */
.btn-whatsapp {
  --bg: var(--emerald-500);
  --fg: var(--white);
  --border: transparent;
  --shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
  background: var(--emerald-500);
}
.btn-whatsapp:hover { background: var(--emerald-600); box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32); }
.btn-whatsapp .btn-icon { background: rgba(255,255,255,0.18); color: var(--white); }
.btn-whatsapp .btn-label small { color: rgba(255,255,255,0.82); }

/* Glass: card limpio sobre fondo claro (estilo pillar-card del site) */
.btn-glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border-light);
}
.btn-glass:hover {
  border-color: var(--purple-400);
  background: var(--white);
}
.btn-glass:hover .btn-icon { background: var(--purple-glow); color: var(--purple-600); }

/* --- Socials --- */
.socials {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-2);
  animation: fadeUp var(--duration-normal) var(--ease-out) 0.4s both;
}
.socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: transform var(--duration-fast) var(--ease-spring), color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}
.socials a:hover {
  color: var(--purple-600);
  border-color: var(--purple-400);
  background: var(--white);
  transform: translateY(-2px);
}
.socials a:focus-visible {
  outline: 2px solid var(--purple-600);
  outline-offset: 3px;
}
.socials svg { width: 20px; height: 20px; }

/* --- Footer --- */
.foot {
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  padding-top: var(--space-4);
  animation: fadeUp var(--duration-normal) var(--ease-out) 0.5s both;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
