/* === links.css — LaCode links page === */

:root {
  --lk-bg:          #F4F4F2;
  --lk-surface:     #FFFFFF;
  --lk-text:        #111827;
  --lk-muted:       #6B7280;
  --lk-line:        #E5E7EB;
  --lk-accent:      #6D28D9;
  --lk-accent-mid:  #7C3AED;
  --lk-accent-soft: #EDE9FE;
  --lk-shadow:      0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --lk-shadow-h:    0 4px 16px rgba(109,40,217,.16), 0 12px 32px rgba(109,40,217,.20);
}

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

body {
  background: var(--lk-bg);
  color: var(--lk-text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(env(safe-area-inset-top, 0px), 56px)
    24px
    max(env(safe-area-inset-bottom, 0px), 20px);
  position: relative;
  overflow-x: hidden;
  animation: lkFadeIn 380ms ease-out both;
}

/* ── Soft aurora blob ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 10% 12%, rgba(109,40,217,.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(139,92,246,.05) 0%, transparent 60%);
  animation: lkAuroraDrift 50s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ── Main container ── */
.lk {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ── */
.lk-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

/* ── Logo container ── */
.lk-logo {
  width: 148px;
  height: 78px;
  border-radius: 14px;
  background: #0E0E12;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.10);
  animation: lkAvatarIn 640ms cubic-bezier(.2,.8,.2,1) 80ms both;
  flex-shrink: 0;
}

.lk-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Name ── */
.lk-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--lk-text);
  line-height: 1.2;
  margin-bottom: 7px;
  animation: lkFadeUp 500ms cubic-bezier(.2,.8,.2,1) 200ms both;
}

/* ── Bio ── */
.lk-bio {
  font-size: 13px;
  font-weight: 400;
  color: var(--lk-muted);
  line-height: 1.55;
  max-width: 280px;
  animation: lkFadeUp 500ms cubic-bezier(.2,.8,.2,1) 290ms both;
}

/* ── Card stack ── */
.lk-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Base card ── */
.lk-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: 58px;
  padding: 0 18px 0 14px;
  border-radius: 14px;
  text-decoration: none;
  border: 1.5px solid var(--lk-line);
  background: var(--lk-surface);
  box-shadow: var(--lk-shadow);
  transition:
    transform    220ms cubic-bezier(.2,.8,.2,1),
    box-shadow   220ms cubic-bezier(.2,.8,.2,1),
    border-color 220ms ease-out;
  opacity: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lk-card.is-in {
  animation: lkFadeUp 600ms cubic-bezier(.2,.8,.2,1) both;
}

.lk-card.is-tapped {
  transform: scale(.981) !important;
  transition-duration: 100ms !important;
}

/* ── Card icon ── */
.lk-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--lk-accent-soft);
}

.lk-card-icon svg,
.lk-icon-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.lk-card--primary .lk-icon-img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}

/* ── Card text block ── */
.lk-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.lk-card-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--lk-text);
  line-height: 1.1;
}

.lk-card-sublabel {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--lk-muted);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Arrow ── */
.lk-card-arrow {
  color: var(--lk-muted);
  font-size: 16px;
  transition: transform 220ms ease-out, color 220ms ease-out;
  line-height: 1;
  flex-shrink: 0;
}

/* ═══════════════════════════════════
   PRIMARY card — Sitio web
   ═══════════════════════════════════ */
.lk-card--primary {
  height: 68px;
  border-color: transparent;
  background: linear-gradient(130deg, #5B21B6 0%, #6D28D9 35%, #7C3AED 65%, #8B5CF6 100%);
  background-size: 220% 100%;
  box-shadow:
    0 4px 20px rgba(109,40,217,.38),
    0 1px 4px  rgba(109,40,217,.20);
  animation: lkFadeUp 600ms cubic-bezier(.2,.8,.2,1) both, lkPrimaryShimmer 8s ease-in-out 1200ms infinite !important;
}

.lk-card--primary .lk-card-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
}

.lk-card--primary .lk-card-icon svg {
  width: 24px;
  height: 24px;
}

.lk-card--primary .lk-card-label {
  color: #fff;
  font-size: 14px;
}

.lk-card--primary .lk-card-sublabel {
  color: rgba(255,255,255,.65);
  font-size: 12px;
}

.lk-card--primary .lk-card-arrow {
  color: rgba(255,255,255,.70);
  font-size: 18px;
}

/* ── WhatsApp card ── */
.lk-card--strong {
  border-color: rgba(37,211,102,.25);
}

.lk-card--strong .lk-card-icon {
  background: rgba(37,211,102,.10);
}

/* ── Neutral cards (Instagram, LinkedIn) ── */
.lk-card--neutral .lk-card-icon {
  background: #F3F4F6;
}

/* ── Desktop hover ── */
@media (hover: hover) {
  .lk-card--primary:hover {
    transform: translateY(-2px);
    box-shadow:
      0 8px 32px rgba(109,40,217,.50),
      0 2px 8px  rgba(109,40,217,.22);
  }

  .lk-card:not(.lk-card--primary):hover {
    transform: translateY(-2px);
    box-shadow: var(--lk-shadow-h);
    border-color: rgba(109,40,217,.35);
  }

  .lk-card:not(.lk-card--primary):hover .lk-card-arrow {
    transform: translateX(3px);
    color: var(--lk-accent);
  }

  .lk-card:not(.lk-card--primary):hover .lk-card-sublabel {
    color: var(--lk-accent-mid);
  }
}

/* ── Footer ── */
.lk-footer {
  margin-top: 22px;
  font-size: 11px;
  color: var(--lk-muted);
  letter-spacing: .02em;
  opacity: .6;
  animation: lkFadeUp 500ms cubic-bezier(.2,.8,.2,1) 960ms both;
}

/* ══════════════════════════════════
   LANGUAGE SWITCH  — pill with contrast
   ══════════════════════════════════ */
#lang-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--lk-line);
  border-radius: 100px;
  padding: 5px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

#lang-switch .lang-btn {
  background: none;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #9CA3AF;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 100px;
  transition: color 180ms, background 180ms;
  line-height: 1;
}

#lang-switch .lang-btn.active {
  color: var(--lk-text);
  background: var(--lk-accent-soft);
}

#lang-switch .lang-sep {
  color: #D1D5DB;
  font-size: 11px;
  pointer-events: none;
  margin: 0 1px;
}

/* ── Keyframes ── */
@keyframes lkFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lkFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes lkAvatarIn {
  from { opacity: 0; transform: scale(.87); }
  to   { opacity: 1; transform: scale(1);   }
}

@keyframes lkAuroraDrift {
  0%   { transform: translate3d(0,   0,   0) scale(1);    }
  30%  { transform: translate3d(8%,  6%,  0) scale(1.05); }
  55%  { transform: translate3d(3%,  12%, 0) scale(.97);  }
  80%  { transform: translate3d(-6%, 5%,  0) scale(1.04); }
  100% { transform: translate3d(0,   0,   0) scale(1);    }
}

@keyframes lkPrimaryShimmer {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  body, body::before, .lk-logo,
  .lk-name, .lk-bio, .lk-card, .lk-footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .lk-card.is-tapped { transform: none !important; }
}

/* ── Tablet + ── */
@media (min-width: 480px) {
  .lk-logo  { width: 168px; height: 88px; }
  .lk-name  { font-size: 24px; }
  .lk-bio   { font-size: 14px; }
  .lk-card  { height: 62px; }
  .lk-card--primary { height: 74px; }
}
