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

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

/* ===== 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,Inter,Ubuntu,Cantarell,Noto Sans,Arial,"Apple Color Emoji","Segoe UI Emoji",sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;               /* como en tu versión */
}
body.is-loaded{ overflow:auto }

/* ……… TODO TU CSS ORIGINAL AQUÍ SIN CAMBIOS ………
   (iconos, hints, hero, modales, telón, etc.)
*/
/* ===== Tokens ===== */
:root{
  --bg:#0b1117;
  --surface:#0f1720;
  --stroke:#243042;           /* borde sutil (v1) */
  --text:#cfe0f5;             /* color título como v1 */
  --muted:#9fb0c3;
  --ring:rgba(46,120,239,.28);/* halo hover (v1) */
  --border:#242a33;           /* panel telón v2 */
  --container:1280px;

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

  /* 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,Inter,Ubuntu,Cantarell,Noto Sans,Arial,"Apple Color Emoji","Segoe UI Emoji",sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;

  /* Centrado global (v2) */
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;               /* evita parpadeo previo */
}
body.is-loaded{ overflow:auto }

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

/* ===== Layout / Hero (centrado v2) ===== */
.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;
}
.is-loaded .hero{ opacity:1; transform:none }

.logo-text{
  font-family:'Orbitron',system-ui,-apple-system,Segoe UI,Roboto,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 auto; max-width:70ch; margin-top:.6rem }

/* ===== Iconos (estilo/hover v1) ===== */
.cta-row{ display:flex; justify-content:center; flex-wrap:wrap; gap:22px; margin-top:6px }

.social-icon{
  width:72px; height:72px; border-radius:999px;
  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%);
  color:#9fd0ff;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .2s ease, color .12s ease;
}
.social-icon:hover, .social-icon.is-focus{
  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);
  color:#cfe6ff;
}
.social-icon svg{ width:30px; height:30px }

/* Tooltip */
.social-icon .hint{
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:-44px;
  background:#0c1117; 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;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.social-icon:hover .hint, .social-icon.is-focus .hint{
  opacity:1; transform:translate(-50%, -2px);
}

/* ===== 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%) } }

/* ===== Modales (rejilla de tarjetas) ===== */
.modal{ position:fixed; inset:0; background:rgba(5,8,12,.7); display:none; place-items:center; z-index:60; padding:16px }
.modal.open{ display:grid }
.modal-sheet{
  width:min(94vw, 860px);
  background:#0f1720; border:1px solid var(--stroke); border-radius:18px;
  padding:22px 22px 24px; position:relative; box-shadow:0 12px 48px rgba(0,0,0,.4);
}
.modal h2{ margin:0 0 12px 0; font-weight:700; font-size:1.15rem; color:#dbe9ff }
.modal-close{
  position:absolute; top:12px; right:12px;
  display:grid; place-items:center; width:36px; height:36px; border-radius:10px;
  background:transparent; color:#cfe0f5; border:1px solid var(--stroke); cursor:pointer;
}
.modal-close:hover{ background:#0b131c }

/* Rejilla de tarjetas */
.quick-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px;
  margin-top:10px;
}
@media (max-width: 740px){
  .quick-grid{ grid-template-columns:repeat(2, minmax(0,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: radial-gradient(120% 120% at 30% 20%, #0e1a26 0%, #0b141d 60%, #0b131c 100%);
  color:#cfe0f5;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .2s ease, color .12s ease;
}
.quick-card:focus{ outline:none }
.quick-card:hover, .quick-card:focus{
  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);
  color:#e8f2ff;
}
.qicon{ font-size:1.25rem; line-height:1 }
.qtext{ font-size:1rem }

/* ===== Vista móvil sólida (3-3-2 + altura segura) ===== */
@media (max-width: 600px){
  /* Altura fiable y márgenes seguros bajo barras del navegador/notch */
  .hero{
    min-height: 100vh;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
  @supports (height: 100svh){ .hero{ min-height: 100svh; } }
  @supports (height: 100dvh){ .hero{ min-height: 100dvh; } }

  .container{ padding: 22px 16px; }
  .logo-text{ font-size:clamp(40px, 11vw, 72px) }
  .lead{ max-width: 38ch; font-size: .98rem; line-height: 1.55; margin-top: .5rem; }

  /* 3 por fila y última fila (2) centrada */
  .cta-row{
    display: grid;
    grid-template-columns: repeat(3, var(--icon));
    justify-content: center;
    gap: var(--gap);
    margin-inline: auto;
  }

  .social-icon{ width: var(--icon); height: var(--icon); }
  .social-icon svg{ width: 32px; height: 32px; }

  /* Tooltips fuera en pantallas táctiles */
  .social-icon .hint{ display:none !important; }
}

/* Ajuste extra para móviles muy estrechos (si alguna vez cae a 2 columnas) */
@media (max-width: 380px){
  :root{ --icon: 76px; --gap: 14px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  .page-transition, .page-transition__panel, .hero{ animation:none!important; transition:none!important }
  .hero{ opacity:1!important; transform:none!important }
  .page-transition{ display:none!important }
}




/* ===== Telón (v2) — de tu versión ===== */
.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%) } }

/* ======= ÚNICO AÑADIDO: Fondo de vídeo ======= */
.bg-video{
  position:fixed; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  z-index:0;
  opacity:0;
  /* Aparece DESPUÉS del telón: mismo tiempo que el telón como delay */
  transition: opacity var(--ts-normal) ease var(--ts-normal);
  pointer-events:none;
  background:#000;
  filter:contrast(105%) brightness(60%);
}
/* Cuando el body entra en estado "is-loaded" (lo marca tu JS), el vídeo hace fade-in */
.is-loaded .bg-video{ opacity:.35 }

/* Asegura que el contenido quede por encima del vídeo */
.hero{ position:relative; z-index:1 }

/* ======= FIN AÑADIDO ======= */
