/* ===== Tokens ===== */
:root {
  --bg: #0b1117;
  --surface: #0f1720;
  --stroke: #243042;           /* borde sutil */
  --text: #cfe0f5;             /* color título */
  --muted: #9fb0c3;
  --ring: rgba(46, 120, 239, .28); /* halo hover */
  --border: #242a33;           /* panel telón */
  --container: 1280px;

  --ts-fast: 180ms;
  --ts-normal: 1000ms;         /* duración telón */

  /* Tamaños móviles */
  --icon: 84px;                /* diámetro del círculo en móvil */
  --gap: 18px;                 /* separación entre iconos en móvil */
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Evita parpadeo inicial */
}

body.is-loaded { overflow: auto; 
overflow-y: hidden;   /* Solo permite scroll vertical tras la carga */
overflow-x: hidden; /* Evita que la web "baile" de lado a lado */
}

/* Evita flash azul al tocar en Android */
:where(a, button) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ===== Layout / Hero ===== */
.container { max-width: var(--container); margin-inline: auto; padding: 28px 24px; }

.hero {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--ts-normal) ease, transform var(--ts-normal) ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  position: relative;
  z-index: 1;

  max-width: 100%;
  width: 100%;
}

.is-loaded .hero { opacity: 1; transform: none; }

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(42px, 8.5vw, 84px);
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--text);
}

.lead { color: var(--muted); margin: 0.6rem auto 0; max-width: 70ch; }

/* ===== Iconos e Imágenes ===== */
.cta-row { 
  display: flex; 
  justify-content: center; 
  flex-wrap: wrap; /* CRÍTICO: permite que los botones bajen de línea */
  gap: 22px; 
  margin-top: 50px; 
}

.social-icon {
  width: 72px; 
  height: 72px; 
  border-radius: 50%;
  display: grid; 
  place-items: center; 
  position: relative;
  text-decoration: none; 
  border: 1px solid var(--stroke);
  background: radial-gradient(120% 120% at 30% 20%, #0e1a26 0%, #0b141d 60%, #0b131c 100%);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* Para que la imagen siga siendo circular */
.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%; 
}

.social-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 120, 239, .6);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 6px var(--ring);
}

/* Tooltip (Hint) */
.social-icon .hint {
  position: absolute; 
  left: 50%; 
  bottom: -44px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(12, 17, 23, 0.9); 
  color: #d7dee7; 
  border: 1px solid #1f2833;
  border-radius: 10px; 
  padding: .45rem .6rem; 
  font-size: .9rem;
  white-space: nowrap; 
  opacity: 0; 
  pointer-events: none;
  transition: opacity var(--ts-fast) ease, transform var(--ts-fast) ease;
  z-index: 100;
}

.social-icon:hover .hint { 
  opacity: 1; 
  transform: translateX(-50%) translateY(0); 
}

/* NUEVO: Etiqueta móvil (oculta por defecto en PC) */
.mobile-label {
  display: none;
}

/* ===== Modales ===== */
.modal { position: fixed; inset: 0; background: rgba(5, 8, 12, .7); display: none; place-items: center; z-index: 1000; padding: 16px; }
.modal.open { display: grid; }

.modal-sheet {
  width: min(94vw, 860px);
  background: #0f1720; 
  border: 1px solid var(--stroke); 
  border-radius: 18px;
  padding: 22px; 
  position: relative; 
  box-shadow: 0 12px 48px rgba(0,0,0,.4);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--stroke);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--muted);
}

.modal-close svg { width: 18px; height: 18px; stroke-width: 2.5px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
@media (max-width: 740px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }

.quick-card {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #0b141d; color: #cfe0f5;
  transition: transform .12s ease;
}
.quick-card:hover { transform: translateY(-2px); border-color: rgba(46,120,239,.6); }

/* ===== Telón (v2) ===== */
.page-transition { position: fixed; inset: 0; pointer-events: none; z-index: 9999; display: grid; grid-template-rows: 1fr 1fr; }
.page-transition__panel { background: var(--surface); border-bottom: 1px solid var(--border); transform: translateY(0); }
.page-transition__panel--bottom { border-bottom: none; border-top: 1px solid var(--border); }
.is-loaded .page-transition__panel--top { animation: curtainUp var(--ts-normal) ease forwards; }
.is-loaded .page-transition__panel--bottom { animation: curtainDown var(--ts-normal) ease forwards; }
@keyframes curtainUp { to { transform: translateY(-100%); } }
@keyframes curtainDown { to { transform: translateY(100%); } }

/* ===== Fondo de Vídeo ===== */
.bg-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity var(--ts-normal) ease var(--ts-normal);
  pointer-events: none;
  background: #000;
  filter: contrast(105%) brightness(60%);
}
.is-loaded .bg-video { opacity: .35; }

/* ===== FAB (La Puerta) ===== */
.fab-link {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  display: inline-block;
  line-height: 0;
  background: transparent;
  border: 0;
  text-decoration: none;
}
.fab-link img {
  display: block;
  width: 42px; 
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
  transition: transform 180ms ease, opacity 180ms ease;
  opacity: 0.8;
}
.fab-link:hover img { transform: translateY(-3px) scale(1.05); opacity: 1; }

/* ===== Vista Móvil (ACTUALIZADA) ===== */
@media (max-width: 600px) {
  .cta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 30px var(--gap); /* Aumentamos el gap vertical para el texto */
    padding: 0 10px;
  }

  .social-icon {
    width: auto; /* Dejamos que el ancho lo maneje el grid */
    height: auto;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  /* El círculo de fondo y el borde se lo damos a la imagen */
  .social-icon img {
    width: var(--icon);
    height: var(--icon);
    border: 1px solid var(--stroke);
    background: radial-gradient(120% 120% at 30% 20%, #0e1a26 0%, #0b141d 60%, #0b131c 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .social-icon .hint { display: none !important; }

  /* Mostramos el texto debajo del icono */
  .mobile-label {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.2;
  }

/* Esto oculta visualmente cualquier rastro de scrollbar */
::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

}