/* ==========================================================================
   Pikiis · Alimix — landing de redes sociales
   ========================================================================== */

:root {
  --bg-deep: #0b0714;
  --bg-deep-2: #170f26;

  --pikiis-yellow: #ffc72c;
  --pikiis-yellow-2: #f5a300;
  --pikiis-red: #e31e24;
  --pikiis-red-2: #a8121b;

  --ig-1: #feda75;
  --ig-2: #fa7e1e;
  --ig-3: #d62976;
  --ig-4: #962fbf;

  --tiktok-a: #25f4ee;
  --tiktok-b: #fe2c55;

  --fb: #1877f2;
  --fb-2: #0a58c2;

  --text: #f5f0ff;
  --text-dim: #b8aecb;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 20%, var(--bg-deep-2), var(--bg-deep) 70%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

img {
  max-width: 100%;
}

/* ---------------------------------------------------------------------
   Fondo — foto de producto a pantalla completa, con velo para que el
   logo y los íconos mantengan contraste sobre ella.
   --------------------------------------------------------------------- */
.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg,
      rgba(11, 7, 20, 0.75) 0%,
      rgba(11, 7, 20, 0.25) 26%,
      rgba(11, 7, 20, 0.32) 60%,
      rgba(11, 7, 20, 0.85) 100%),
    url("../assets/portada-pikiis.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ---------------------------------------------------------------------
   Fondo ambiental — grandes manchas de color muy difuminadas y en
   movimiento lento, se funden con la foto en vez de taparla.
   --------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  will-change: transform;
}

.blob--a {
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle, var(--pikiis-red) 0%, transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.blob--b {
  bottom: -25vmax;
  right: -15vmax;
  background: radial-gradient(circle, var(--pikiis-yellow) 0%, transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.blob--c {
  top: 40%;
  left: 60%;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle, var(--fb) 0%, transparent 70%);
  opacity: 0.14;
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to { transform: translate(6vmax, 8vmax) scale(1.1); }
}
@keyframes drift-b {
  to { transform: translate(-6vmax, -6vmax) scale(1.08); }
}
@keyframes drift-c {
  to { transform: translate(-8vmax, 5vmax) scale(0.95); }
}

/* ---------------------------------------------------------------------
   Layout principal
   --------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 6vh 5vw 4vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vh, 2rem);
}

/* ---------------------------------------------------------------------
   Tarjeta de vidrio — centra logo, íconos, tagline y footer sobre la
   foto de fondo, dejando ver los productos simétricos a los lados.
   --------------------------------------------------------------------- */
.content-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  container-type: inline-size;
  container-name: card;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vh, 1.75rem);
  padding: clamp(2rem, 6vh, 3.25rem) clamp(1.5rem, 6vw, 2.5rem);
  border-radius: 32px;
  background:
    radial-gradient(130% 65% at 22% -12%, rgba(255, 255, 255, 0.32), transparent 55%),
    linear-gradient(165deg, rgba(11, 7, 20, 0.3), rgba(23, 15, 38, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -28px 46px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(13px) saturate(165%);
  -webkit-backdrop-filter: blur(13px) saturate(165%);
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 4vh, 2.5rem);
  transition: transform 0.2s ease-out;
  will-change: transform;
}

/* ---------------------------------------------------------------------
   Logo + luz central
   --------------------------------------------------------------------- */
.logo-wrap {
  position: relative;
  width: clamp(170px, 76cqi, 300px);
  z-index: 2;
  opacity: 0;
  animation: pop-in 0.8s cubic-bezier(.2, .9, .25, 1) 0.15s forwards;
}

.logo-glow {
  position: absolute;
  inset: -55%;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 199, 44, 0.95) 0%,
    rgba(255, 199, 44, 0.55) 22%,
    rgba(227, 30, 36, 0.45) 42%,
    rgba(227, 30, 36, 0) 72%);
  filter: blur(38px);
  animation: pulse-glow 5s ease-in-out infinite;
}

.logo-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

/* ---------------------------------------------------------------------
   Íconos de redes — en fila debajo del logo
   --------------------------------------------------------------------- */
.icon-row {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 7cqi, 1.75rem);
}

.social-node {
  position: relative;
  width: clamp(56px, 21cqi, 80px);
  aspect-ratio: 1 / 1;
  opacity: 0;
  animation: icon-drop-in 0.85s cubic-bezier(.22, .85, .28, 1) forwards;
}

/* Los tres bajan juntos, en fila, uno un poco detrás del otro */
.social-node:nth-child(1) { animation-delay: 0.45s; }
.social-node:nth-child(2) { animation-delay: 0.58s; }
.social-node:nth-child(3) { animation-delay: 0.71s; }

.social-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  text-decoration: none;
  outline-offset: 6px;
  animation: icon-pulse 2.8s ease-in-out infinite;
}

/* El pulso arranca justo cuando cada ícono termina de llegar a su lugar */
.social-node:nth-child(1) .social-link { animation-delay: 1.30s; }
.social-node:nth-child(2) .social-link { animation-delay: 1.43s; }
.social-node:nth-child(3) .social-link { animation-delay: 1.56s; }

.social-glow {
  position: absolute;
  inset: -70%;
  z-index: 1;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.85;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.social-glow--tiktok {
  background: radial-gradient(circle,
    var(--tiktok-a) 0%,
    var(--tiktok-b) 38%,
    rgba(254, 44, 85, 0) 72%);
}

.social-glow--instagram {
  background: radial-gradient(circle,
    var(--ig-1) 0%,
    var(--ig-2) 30%,
    var(--ig-3) 50%,
    rgba(150, 47, 191, 0) 74%);
}

.social-glow--facebook {
  background: radial-gradient(circle,
    var(--fb) 0%,
    var(--fb-2) 40%,
    rgba(10, 88, 194, 0) 72%);
}

.social-icon {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease;
}

.social-link:hover .social-icon,
.social-link:focus-visible .social-icon {
  transform: scale(1.14);
}

.social-link:hover .social-glow,
.social-link:focus-visible .social-glow {
  opacity: 1;
  filter: blur(28px);
}

.social-link:focus-visible {
  outline: 2px solid var(--pikiis-yellow);
  border-radius: 50%;
}

/* ---------------------------------------------------------------------
   Texto
   --------------------------------------------------------------------- */
.tagline {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 4.4cqi, 1.05rem);
  color: var(--text-dim);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fade-up 0.8s ease 0.85s forwards;
}

/* ---------------------------------------------------------------------
   Botón "Página oficial" — mismo lenguaje visual que los íconos de
   redes (glow, escala al hover), centrado para guardar la simetría.
   --------------------------------------------------------------------- */
.site-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: clamp(0.6rem, 2.8cqi, 0.75rem) clamp(1.1rem, 6.5cqi, 1.6rem);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: clamp(0.82rem, 3.6cqi, 0.95rem);
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--pikiis-red), var(--pikiis-red-2));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(227, 30, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  opacity: 0;
  animation: fade-up 0.8s ease 1.0s forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.site-link-icon {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--pikiis-yellow);
}

.site-link:hover,
.site-link:focus-visible {
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(135deg, var(--pikiis-yellow-2), var(--pikiis-red));
  box-shadow: 0 14px 30px rgba(227, 30, 36, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.site-link:focus-visible {
  outline: 2px solid var(--pikiis-yellow);
  outline-offset: 3px;
}

.site-footer {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0;
  animation: fade-up 0.8s ease 1.15s forwards;
}

/* ---------------------------------------------------------------------
   Animaciones
   --------------------------------------------------------------------- */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.09); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

/* Entrada de los íconos: bajan desde arriba de la pantalla hasta su
   lugar en la fila, debajo del logo, en un solo trazo fluido. */
@keyframes icon-drop-in {
  0% {
    opacity: 0;
    transform: translate(6vw, -60vh) scale(0.65);
  }
  65% {
    opacity: 1;
    transform: translate(1.5vw, 4vh) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

/* Palpitar suave y lento una vez que el ícono ya llegó a su lugar */
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}

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

/* ---------------------------------------------------------------------
   Accesibilidad: respeta "reducir movimiento"
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .blob,
  .logo-glow,
  .social-glow,
  .logo-wrap,
  .social-node,
  .social-link,
  .tagline,
  .site-link,
  .site-footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

