/* ── Hero v2: dos tarjetas grandes a los lados + título y carrusel 3D de productos al centro ──
   El fondo de puntos (Vanta) y las animaciones del título se conservan (home.css). */

.hero .container.hero2 {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(230px, 300px);
  align-items: center;
  gap: clamp(20px, 3vw, 52px);
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

/* ---------- Centro ---------- */
.hero2-center.hero-inner {
  max-width: none;
  min-width: 0;
  gap: clamp(10px, 1.6vw, 20px);
}
.hero2-center .hero-title { font-size: clamp(2.3rem, 3.9vw, 4.9rem); }
@media (min-width: 821px) {
  .hero2-center .hero-title-row { max-width: 100%; }
  .hero2-center .hero-title-line--rainbow,
  .hero2-center .hero-title-line.text-rainbow {
    max-width: 100%;
    font-size: clamp(3rem, 5.6vw, 7.4rem);
  }
}

/* Orden del centro: carrusel arriba → todo el texto abajo ("Diseñamos. Creamos." + "Dejamos huella").
   El h1 se "aplana" (display: contents) para poder ordenar sus líneas con el carrusel. */
.hero2-center .hero-title { display: contents; }
.hero2-center .hero2-stage { order: 1; }
.hero2-center .hero-title-row { order: 2; margin-top: clamp(22px, 3.2vw, 52px); }
.hero2-center .hero-title > .hero-title-line--rainbow { order: 3; margin-top: calc(clamp(10px, 1.6vw, 20px) * -1); }
.hero2-center .hero-lead { order: 4; }
.hero2-center .hero-title-row .hero-title-line--lead { font-size: clamp(2.6rem, 4.4vw, 5.5rem); }

/* Carrusel 3D */
.hero2-stage {
  --size: clamp(118px, 10.5vw, 178px);
  position: relative;
  width: 100%;
  height: calc(var(--size) * 1.9);
  margin-top: clamp(4px, 1vw, 14px);
  perspective: 1100px;
  perspective-origin: 50% 35%;
  pointer-events: auto; /* se puede agarrar y arrastrar (no sigue al mouse) */
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  opacity: 0;
  animation: hero2-fade-up 1.1s cubic-bezier(.22, 1, .36, 1) .35s forwards;
}
.hero2-stage.is-dragging { cursor: grabbing; }
.hero2-ring {
  position: absolute;
  left: 50%;
  top: 44%;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, -8deg)) rotateY(var(--spin, 0deg));
}
.hero2-item {
  --r: calc(var(--size) * max(1.7, var(--n) * .2)); /* el anillo se abre si hay más obras */
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  transform: rotateY(calc(var(--i) * (360deg / var(--n)))) translateZ(var(--r));
  background: #15141a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08);
  opacity: calc(.28 + var(--d, 1) * .72);
  filter: brightness(calc(.5 + var(--d, 1) * .5)) saturate(calc(.6 + var(--d, 1) * .4));
}
.hero2-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.hero2-item::after { /* brillo de la tarjeta del frente */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, .22), transparent 40%);
  opacity: calc(var(--d, 1) * .8);
  pointer-events: none;
}
.hero2-floor {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(92%, 560px);
  height: 46px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 162, 0, .28), rgba(255, 162, 0, .06) 45%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

/* ---------- Tarjetas laterales ---------- */
.hero2-side {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 30%;
  --accent: #ffa200;
  --accent-2: #ff6a00;
  --accent-soft: rgba(255, 162, 0, .26);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  align-self: stretch; /* las dos tarjetas con la misma altura */
  min-height: clamp(420px, 64vh, 600px);
  padding: 26px 22px 22px;
  border-radius: 28px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  pointer-events: auto;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--accent-soft), transparent 60%),
    linear-gradient(170deg, rgba(30, 28, 36, .92), rgba(12, 12, 16, .94));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease, border-color .4s ease;
  opacity: 0;
  animation: hero2-fade-up 1.1s cubic-bezier(.22, 1, .36, 1) .5s forwards;
}
.hero2-side--shop {
  --accent: #b77cff;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(168, 85, 247, .3);
  animation-delay: .7s;
}
.hero2-side.is-tilting { transition: transform .12s ease-out, box-shadow .4s ease, border-color .4s ease; }
.hero2-side:hover,
.hero2-side:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 0 46px color-mix(in srgb, var(--accent) 30%, transparent);
  outline: none;
}

/* Aro de luz que gira por el borde al pasar el mouse */
.hero2-side__glow {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--h2-angle, 0deg), transparent 0 70%, var(--accent) 82%, #fff 88%, var(--accent-2) 94%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
  animation: hero2-spin 3.2s linear infinite;
  pointer-events: none;
}
.hero2-side:hover .hero2-side__glow { opacity: 1; }
@property --h2-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes hero2-spin { to { --h2-angle: 360deg; } }

/* Luz que sigue al cursor */
.hero2-side__shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .13), transparent 45%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.hero2-side:hover .hero2-side__shine { opacity: 1; }

.hero2-side__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transform: translateZ(36px);
}
.hero2-side__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 20px;
  color: #1a1206;
  background: linear-gradient(140deg, #ffd166, var(--accent) 45%, var(--accent-2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.hero2-side--shop .hero2-side__icon { color: #170a2a; background: linear-gradient(140deg, #e9d5ff, var(--accent) 45%, var(--accent-2)); }
.hero2-side__icon svg { width: 30px; height: 30px; }
.hero2-side:hover .hero2-side__icon { transform: translateY(-4px) rotate(-6deg) scale(1.06); }
.hero2-side__kicker {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero2-side__title {
  font-size: clamp(2.3rem, 2.9vw, 3.3rem);
  line-height: .92;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #fff;
}
.hero2-side__desc {
  font-size: .98rem;
  line-height: 1.5;
  color: rgba(232, 230, 240, .78);
}
.hero2-side__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.hero2-side__chips span {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
}
.hero2-side__avatars {
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.hero2-side__avatars img {
  width: 44px;
  height: 44px;
  margin-left: -10px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1b1922;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  transition: transform .35s ease;
}
.hero2-side__avatars img:first-child { margin-left: 0; }
.hero2-side:hover .hero2-side__avatars img { transform: translateY(-3px); }
.hero2-side:hover .hero2-side__avatars img:nth-child(2) { transition-delay: .05s; }
.hero2-side:hover .hero2-side__avatars img:nth-child(3) { transition-delay: .1s; }
.hero2-side:hover .hero2-side__avatars img:nth-child(4) { transition-delay: .15s; }
.hero2-side__avatars-more {
  margin-left: 10px;
  font-size: .8rem;
  font-weight: 700;
  color: rgba(232, 230, 240, .75);
}

/* Productos dentro de las tarjetas */
.hero2-side__art {
  position: relative;
  flex: 1 1 auto;
  min-height: 120px;
  transform: translateZ(50px);
  pointer-events: none;
}
.hero2-side__art img {
  display: block;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1);
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}
/* Abanico (Personalizar): se abre al pasar el mouse */
.hero2-fan img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(88px, 7.6vw, 122px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(calc((var(--k) - 1) * 9deg)) translateX(calc((var(--k) - 1) * 26px));
}
.hero2-fan img:nth-child(2) { z-index: 2; }
.hero2-side:hover .hero2-fan img {
  transform: translate(-50%, -58%) rotate(calc((var(--k) - 1) * 16deg)) translateX(calc((var(--k) - 1) * 58px));
}
/* Cuadrícula (Catálogo): las miniaturas se levantan en cascada */
.hero2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 10px;
  width: 100%;
  max-width: 210px;
  margin: 0 auto;
}
/* ---- Imágenes de las tarjetas: "carta coleccionable" ----
   La imagen con el mouse se levanta y se inclina en 3D hacia el cursor con un brillo que lo sigue;
   las demás se encogen y se apagan para que la elegida resalte. (js/home-hero-v2.js pone --tx/--ty/--gx/--gy) */
.hero2-side__art { pointer-events: auto; perspective: 600px; }
.hero2-tile {
  --tx: 0deg;
  --ty: 0deg;
  --gx: 50%;
  --gy: 50%;
  position: relative;
  z-index: 0;
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1);
  transform: rotateX(var(--tx)) rotateY(var(--ty)) translateZ(0) scale(1);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), filter .35s ease, box-shadow .35s ease, opacity .35s ease;
  will-change: transform;
}
.hero2-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
/* Brillo que sigue al cursor */
.hero2-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .45), rgba(255, 255, 255, .08) 35%, transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
/* Las demás se apagan y se encogen */
.hero2-side .hero2-grid:has(.hero2-tile:hover) .hero2-tile:not(:hover) {
  transform: scale(.9);
  filter: grayscale(.55) brightness(.55);
}
/* La elegida: se levanta e inclina hacia el cursor */
.hero2-side .hero2-tile:hover {
  z-index: 3;
  transform: rotateX(var(--tx)) rotateY(var(--ty)) translateZ(40px) scale(1.14);
  transition: transform .12s ease-out, filter .35s ease, box-shadow .35s ease;
  box-shadow: 0 24px 40px rgba(0, 0, 0, .65), 0 0 0 2px var(--accent), 0 0 30px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero2-side .hero2-tile:hover::after { opacity: 1; }
.hero2-side .hero2-tile:hover img { transform: scale(1.08); }

/* Subtítulo pequeño bajo el título */
.hero2-side__sub {
  margin-top: -4px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
}

/* Imágenes de la cuadrícula más grandes */
.hero2-side .hero2-grid { max-width: 250px; gap: 12px; }

/* Icono superior más grande */
.hero2-side__icon { width: 80px; height: 80px; border-radius: 24px; }
.hero2-side__icon svg { width: 38px; height: 38px; }

/* Perfiles de artista (Catálogo): foto + nombre */
.hero2-artist__name {
  z-index: 3;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 6px 6px;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, transparent, rgba(10, 8, 16, .85));
}
.hero2-side__count {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Acción inferior: texto grande con flecha (sin fondo de botón) */
.hero2-side__cta {
  display: flex;
  flex-direction: column; /* flecha debajo del texto */
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(1.35rem, 1.7vw, 1.75rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--accent);
  text-align: center;
  transform: translateZ(28px);
}
.hero2-side__arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 100%;
  height: 56px;
  border-radius: 16px; /* botón cuadrado con esquinas suaves, a todo el ancho */
  color: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  transition: background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.hero2-side__arrow svg { width: 30px; height: 30px; }
/* Hover: el círculo se rellena y la flecha "empuja" hacia la derecha en bucle */
.hero2-side:hover .hero2-side__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #14101c;
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 55%, transparent);
}
.hero2-side:hover .hero2-side__arrow svg { animation: hero2-arrow-nudge .9s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes hero2-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(7px); }
  60% { transform: translateX(7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero2-side:hover .hero2-side__arrow svg { animation: none; }
}
.hero2-side--shop:hover .hero2-side__arrow { color: #fff; }

@keyframes hero2-fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Las tarjetas usan transform para la inclinación: su entrada solo anima la opacidad */
.hero2-side { animation-name: hero2-fade-in; }
@keyframes hero2-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero .container.hero2 {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .hero2-center { grid-column: 1 / -1; order: -1; }
  .hero2-side { min-height: 0; }
  .hero2-side__body { transform: none; }
}
@media (max-width: 600px) {
  .hero .container.hero2 { grid-template-columns: 1fr; gap: 14px; }
  .hero2-stage { --size: 112px; }
  .hero2-side { padding: 20px 18px 18px; gap: 16px; border-radius: 22px; }
  .hero2-side__icon { width: 52px; height: 52px; border-radius: 16px; }
  .hero2-side__title { font-size: 2.5rem; }
  .hero2-side__art { display: none; } /* tarjetas compactas en celular */
}
@media (prefers-reduced-motion: reduce) {
  .hero2-side, .hero2-stage { animation: none; opacity: 1; }
  .hero2-side__glow { animation: none; }
}
