/* =====================================================================
   Proyectos en tu mano — carrusel de iPhone
   ===================================================================== */
.manos{
  --mano-w: 230px;
  position: relative;
  margin: 8px calc(var(--pad) * -1) 10px;
  padding: 10px 0 8px;
}
.manos-vista{
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - (var(--mano-w) / 2));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  perspective: 1400px;
  padding-block: 18px 8px;
  touch-action: pan-x;
}
.manos-vista:active{cursor: grabbing}
.manos-vista:focus-visible{outline: 2px solid var(--agua); outline-offset: -8px}
.manos-vista::-webkit-scrollbar{display: none}
.manos-riel{
  display: flex;
  align-items: flex-end;
  gap: 36px;
  width: max-content;
  padding-inline: calc(50vw - (var(--mano-w) / 2));
  transform-style: preserve-3d;
}
.mano{
  flex: 0 0 var(--mano-w);
  width: var(--mano-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  justify-items: center;
  gap: 18px;
  transform-origin: center 42%;
  transform: scale(.84);
  will-change: transform, opacity, filter;
  transition: transform .45s var(--e), opacity .45s var(--e), filter .45s var(--e);
  opacity: .55;
  filter: saturate(.75);
}
.mano.es-centro{
  opacity: 1;
  filter: none;
  z-index: 2;
}
.mano.es-lado{z-index: 1}

/* --- iPhone (silueta tipo 15/16, sin marca) --- */
.iphone{
  position: relative;
  width: var(--mano-w);
  aspect-ratio: 9 / 19.5;
  transform-style: preserve-3d;
}
.iphone-btn{
  position: absolute;
  right: auto;
  background: linear-gradient(90deg, #6a6a70, #2a2a2e 55%, #111);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 .4px rgba(0,0,0,.6);
  z-index: 3;
}
.iphone-btn.silent{left: -3px; top: 18%; width: 3px; height: 18px; border-radius: 1px 0 0 1px}
.iphone-btn.vol-up{left: -3px; top: 28%; width: 3px; height: 32px; border-radius: 1px 0 0 1px}
.iphone-btn.vol-down{left: -3px; top: 40%; width: 3px; height: 32px; border-radius: 1px 0 0 1px}
.iphone-btn.power{left: auto; right: -3px; top: 30%; width: 3px; height: 54px; border-radius: 0 1px 1px 0; background: linear-gradient(90deg, #111, #2a2a2e 45%, #6a6a70)}
.iphone-marco{
  position: absolute;
  inset: 0;
  border-radius: 42px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.22), transparent 32%, transparent 70%, rgba(255,255,255,.06)),
    linear-gradient(180deg, #3f3f46, #1a1a1e 28%, #0b0b0d);
  box-shadow:
    0 1px 0 rgba(255,255,255,.18),
    inset 0 0 0 1.5px #2c2c32,
    inset 0 0 0 3px #0a0a0c,
    0 28px 50px -12px rgba(0,0,0,.72),
    0 50px 80px -20px rgba(0,0,0,.45);
}
.iphone-marco::after{
  /* reflejo sutil en el piso */
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.45), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}
.iphone-pantalla{
  position: absolute;
  inset: 10px;
  border-radius: 32px;
  overflow: hidden;
  background: #05080b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.iphone-pantalla img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.mano.es-centro.recorre .iphone-pantalla img{
  animation: manoPan 14s ease-in-out infinite alternate;
}
@keyframes manoPan{
  from{object-position: top center}
  to{object-position: bottom center}
}
.iphone-isla{
  position: absolute;
  top: 10px;
  left: 50%;
  width: 92px;
  height: 26px;
  transform: translateX(-50%);
  background: #050506;
  border-radius: 99px;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 4px 10px rgba(0,0,0,.45);
}
.iphone-isla::before,
.iphone-isla::after{
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
}
.iphone-isla::before{ /* camara */
  right: 8px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 35% 35%, #1b3a66, #0a1020 55%, #05080d);
  box-shadow: inset 0 0 0 1px rgba(80,140,220,.25);
}
.iphone-isla::after{ /* sensor */
  right: 22px;
  width: 6px;
  height: 6px;
  background: #121216;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.iphone-brillo{
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 22%, transparent 42%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  opacity: .55;
}
.iphone-barra{
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 38%;
  height: 5px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.85);
  border-radius: 99px;
  z-index: 2;
  box-shadow: 0 0 8px rgba(0,0,0,.35);
}

.mano-ficha{
  text-align: center;
  width: 100%;
  padding: 0 4px;
}
.mano-lugar{
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tenue);
  margin-bottom: 4px;
}
.mano-ficha h3{
  font: 800 1.02rem/1.2 var(--display);
  color: var(--crema);
  margin: 0 0 6px;
}
.mano-link,
.mano-sin{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
}
.mano-link{color: var(--naranja2); transition: color .3s}
.mano-link:hover{color: var(--crema)}
.mano-sin{color: var(--tenue); font-weight: 500}

.manos-flecha{
  position: absolute;
  top: 38%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--crema);
  background: rgba(10,15,20,.55);
  box-shadow: inset 0 0 0 1px var(--hilo2), 0 10px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  transition: transform .45s var(--e), background .3s, opacity .3s;
}
.manos-flecha span{font-size: 1.6rem; line-height: 1; margin-top: -2px}
.manos-flecha:hover{background: var(--naranja); transform: scale(1.06)}
.manos-flecha:disabled{opacity: .28; cursor: default; transform: none; background: rgba(10,15,20,.4)}
.manos-flecha.ant{left: max(8px, calc(var(--pad) - 8px))}
.manos-flecha.sig{right: max(8px, calc(var(--pad) - 8px))}

.manos-puntos{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 8px;
  max-width: 640px;
  padding: 0 16px;
}
.manos-puntos button{
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
}
.manos-puntos button::after{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--hilo2);
  transition: width .4s var(--e), background .3s, transform .4s var(--e);
  display: block;
}
.manos-puntos button[aria-selected="true"]::after{
  width: 22px;
  background: var(--naranja);
}
.manos-puntos button:focus-visible{outline: 2px solid var(--agua); outline-offset: 3px}

.manos-despues{margin-top: 56px}

/* Evitar que los flotantes tapen flechas o puntos en móvil */
@media (max-width: 900px){
  .manos{--mano-w: 188px; margin-inline: -18px}
  .manos-riel{gap: 22px}
  .iphone-marco{border-radius: 34px}
  .iphone-pantalla{inset: 8px; border-radius: 26px}
  .iphone-isla{width: 78px; height: 22px; top: 8px}
  .manos-flecha{width: 42px; height: 42px; top: 22%}
  .manos-flecha.ant{left: 6px}
  .manos-flecha.sig{right: 6px}
  .manos-puntos{padding: 4px 72px 12px; margin-bottom: 4px}
  .manos-despues{margin-top: 36px}
}
@media (max-width: 640px){
  .manos{--mano-w: 176px}
  .manos-puntos{padding-bottom: 8px}
  #proyectos{padding-bottom: 48px}
}

html.lite .mano,
html.lite .mano.es-centro,
html.lite .mano.es-lado{
  transform: none !important;
  opacity: 1;
  filter: none;
  transition: none;
}
html.lite .mano.es-centro.recorre .iphone-pantalla img{animation: none}
html.lite .manos-vista{perspective: none}
html.lite .manos-flecha{backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10,15,20,.88)}

@media (prefers-reduced-motion: reduce){
  .mano.es-centro.recorre .iphone-pantalla img{animation: none}
  .mano{transition: none}
}
