/* Página principal: vidrio físico sobre negro. Sin blur pesado: solo transform/opacity animados. */

.shards {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 10px), 0);
  transition: transform .6s var(--ease);
}

.shards i {
  position: absolute;
  display: block;
  will-change: transform;
  animation: rc-drift 24s ease-in-out infinite alternate;
}

.shards i:nth-child(1) {
  top: -8%; left: -18%; width: 72vmax; height: 46vmax;
  background: linear-gradient(200deg, rgba(255,255,255,.075), rgba(150,200,255,.03) 45%, transparent 75%);
  clip-path: polygon(0 0, 100% 18%, 38% 100%);
  --dx: 26px; --dy: 18px;
}
.shards i:nth-child(2) {
  bottom: -10%; right: -20%; width: 66vmax; height: 50vmax;
  background: linear-gradient(20deg, rgba(255,255,255,.06), rgba(255,170,225,.025) 50%, transparent 78%);
  clip-path: polygon(100% 0, 100% 100%, 0 82%);
  animation-duration: 30s; animation-delay: -9s;
  --dx: -22px; --dy: -16px;
}
.shards i:nth-child(3) {
  top: 34%; left: 52%; width: 34vmax; height: 60vmax;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04) 50%, transparent);
  clip-path: polygon(46% 0, 100% 100%, 0 100%);
  animation-duration: 36s; animation-delay: -15s;
  --dx: 14px; --dy: -24px;
}

@keyframes rc-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(var(--dx), var(--dy), 0); }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 24px calc(env(safe-area-inset-bottom, 0px) + 32px);
}

.card { width: 100%; max-width: 420px; }

.head { text-align: center; margin-bottom: 44px; }

.slot {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, .86);
  opacity: 0; /* el logo llega desde la intro; se muestra al aterrizar */
}
body.is-landed .slot { opacity: 1; }

/* Destello ambiental lento sobre el logo */
body.is-landed .slot .sweep { animation: rc-slot-sweep 9s var(--ease) 2s infinite; }
@keyframes rc-slot-sweep {
  0%   { opacity: 0; transform: translateX(0); }
  6%   { opacity: .9; }
  22%  { opacity: .9; }
  28%, 100% { opacity: 0; transform: translateX(480px); }
}

h1 {
  font-weight: 300;
  font-size: clamp(15px, 4.6vw, 19px);
  letter-spacing: .42em;
  text-indent: .42em; /* compensa el tracking final para centrar */
  line-height: 1.3;
}

.sub {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .14em;
  color: var(--dim);
}

/* Aparición: solo opacidad, escalonada */
.reveal {
  opacity: 0;
  transition: opacity .9s ease;
  transition-delay: calc(var(--i, 0) * 90ms + 200ms);
}
body.is-ready .reveal { opacity: 1; }

/* Botones: paneles de vidrio facetados (esquinas cortadas), no cápsulas */
.links { display: grid; gap: 12px; }

.btn {
  --shape: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  --mx: 50%; --my: 50%; --lit: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  overflow: hidden;
  isolation: isolate;
  clip-path: var(--shape);
  /* borde de 1px: luz que entra por una esquina y se apaga en la otra */
  background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,.08) 38%, rgba(255,255,255,.04) 62%, rgba(190,215,255,.34));
  transition: transform .35s var(--ease);
  -webkit-user-select: none;
  user-select: none;
}

.btn::before { /* cuerpo del cristal */
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -2;
  clip-path: var(--shape);
  background:
    radial-gradient(170px circle at var(--mx) var(--my), rgba(255,255,255,calc(.09 * var(--lit))), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,0) 40%, rgba(255,255,255,.025)),
    #000;
}

.btn::after { /* reflejo prismático que cruza el panel */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 42%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(150,210,255,.10) 30%, rgba(255,255,255,.16) 50%, rgba(255,170,225,.09) 70%, transparent);
  transform: translateX(-160%) skewX(-20deg);
}

.btn:hover { --lit: 1; }
.btn:hover::after, .btn:active::after {
  transform: translateX(340%) skewX(-20deg);
  transition: transform 1.1s var(--ease);
}
.btn:active { transform: scale(.985); }

/* Reflejo ambiental escalonado (baja frecuencia, solo transform) */
body.is-landed .links li:nth-child(1) .btn::after { animation: rc-glint 11s var(--ease) 3s infinite; }
body.is-landed .links li:nth-child(2) .btn::after { animation: rc-glint 11s var(--ease) 4.2s infinite; }
body.is-landed .links li:nth-child(3) .btn::after { animation: rc-glint 11s var(--ease) 5.4s infinite; }
body.is-landed .links li:nth-child(4) .btn::after { animation: rc-glint 11s var(--ease) 6.6s infinite; }
body.is-landed .links li:nth-child(5) .btn::after { animation: rc-glint 11s var(--ease) 7.8s infinite; }
@keyframes rc-glint {
  0%   { transform: translateX(-160%) skewX(-20deg); }
  12%, 100% { transform: translateX(340%) skewX(-20deg); }
}

.t { font-size: 15px; font-weight: 400; letter-spacing: .12em; }
.hint { font-size: 12px; font-weight: 300; letter-spacing: .06em; color: var(--dim); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.save { margin-top: 30px; text-align: center; }
.save a {
  display: inline-block;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .16em;
  color: var(--dim);
  border-bottom: 1px solid rgba(255,255,255,.22);
  transition: color .3s ease, border-color .3s ease;
}
.save a:hover, .save a:active { color: var(--white); border-color: var(--white); }

/* Escritorio: misma columna, más aire */
@media (min-width: 900px) {
  .slot { width: 120px; height: 120px; }
  .head { margin-bottom: 52px; }
  .card { max-width: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .shards { transform: none; }
}
