/* ============================================
   servicios.css — Página de listado de servicios
   ============================================ */

/* ══ HERO ══ */
.sv-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(130px, 14vw, 180px) 0 clamp(60px, 7vw, 90px);
  background: var(--ink);
}
.sv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/portadas/servic.jpg') center / cover no-repeat;
  z-index: 0;
}
.sv-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(5,3,14,0.88) 0%,
    rgba(5,3,14,0.70) 55%,
    rgba(5,3,14,0.50) 100%
  );
  z-index: 1;
}
.sv-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: flex-end;
}
.sv-hero-left { display: flex; flex-direction: column; gap: 20px; }
.sv-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 1px;
}
.sv-hero-eyebrow {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.sv-hero-left h1 {
  font-family: var(--mono);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}
.sv-hero-left h1 em { color: var(--accent); font-style: normal; }
.sv-hero-left p {
  font-size: clamp(14px, 1.4vw, 17px);
  color: rgba(255,255,255,0.45);
  line-height: 1.75;
  max-width: 52ch;
  margin: 0;
}
.sv-hero-stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.07);
}
.sv-hero-stat-item {
  background: rgba(8,6,18,0.7);
  backdrop-filter: blur(8px);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-hero-stat-num {
  font-family: var(--mono);
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sv-hero-stat-num em { color: var(--accent); font-style: normal; }
.sv-hero-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ══ CARDS GRID (segunda sección) ══ */
.sv-cards-section {
  background: #f7f5f2;
  padding: clamp(72px, 9vw, 120px) 0;
}
.sv-cards-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.sv-cards-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card base */
.sv-card {
  position: relative;
  display: block;
  text-decoration: none;
  overflow: hidden;
  background: var(--ink);
  cursor: grab;
}
.sv-dragging { opacity: 0.3; cursor: grabbing !important; }
.sv-drag-over { outline: 3px solid var(--accent); outline-offset: -3px; }
/* Card grande ocupa toda la altura */
.sv-cards-grid > .sv-card { min-height: 560px; }
/* Cards pequeñas mitad de altura */
.sv-cards-col .sv-card { flex: 1; min-height: 260px; }

/* Imagen de fondo */
.sv-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1), filter 0.5s ease;
  filter: brightness(0.45) saturate(0.6);
  transform: scale(1.02);
}
.sv-card:hover .sv-card-bg {
  transform: scale(1.08);
  filter: brightness(0.3) saturate(0.4);
}

/* Spotlight */
.sv-card-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Contenido */
.sv-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 32px;
  z-index: 2;
}
.sv-card-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35);
}
.sv-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sv-card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(236,0,140,0.4);
  padding: 7px 16px;
  align-self: flex-start;
  transition: background .3s, color .3s;
}
.sv-card:hover .sv-card-tag {
  background: var(--accent);
  color: #fff;
}
.sv-card-title {
  font-family: var(--mono);
  font-size: clamp(20px, 2.5vw, 34px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  transform: translateY(6px);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.sv-card-title em { color: var(--accent); font-style: normal; }
.sv-card:hover .sv-card-title { transform: translateY(0); }

.sv-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0);
  line-height: 1.6;
  margin: 0;
  max-width: 28ch;
  transition: color 0.35s ease 0.05s;
}
.sv-card:hover .sv-card-desc { color: rgba(255,255,255,0.55); }

.sv-card-arrow {
  display: inline-flex;
  align-items: center;
  color: #fff;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sv-card:hover .sv-card-arrow { opacity: 1; transform: translateX(0); }

/* ══ PROPUESTA DE VALOR ══ */
.sv-value {
  background: var(--ink);
  padding: clamp(72px,9vw,120px) 0;
  position: relative;
  overflow: hidden;
}
.sv-value-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}
.sv-right-group {
  display: flex;
  align-items: center;
  gap: clamp(100px, 12vw, 180px);
  margin-right: clamp(32px, 5vw, 80px);
}
.sv-value-left h2 {
  font-family: var(--mono);
  font-size: clamp(28px,3.5vw,48px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.sv-value-left h2 em { color: var(--accent); font-style: normal; }
.sv-value-left p { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.85; margin: 0; }
.sv-value-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Lista vertical de números ── */
.sv-num-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 20px);
  align-self: center;
}
.sv-num-item {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: rgba(255,255,255,0.15);
  letter-spacing: -0.02em;
  line-height: 1;
  cursor: pointer;
  padding: 4px 0;
  transition: color .25s ease, text-shadow .25s ease, transform .28s cubic-bezier(.2,.8,.25,1);
  user-select: none;
  display: block;
}
.sv-num-item:hover {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(236,0,140,.6), 0 0 50px rgba(236,0,140,.25);
  transform: translateX(6px);
}
.sv-num-item.is-active {
  color: #fff;
  text-shadow: 0 0 24px rgba(236,0,140,.8), 0 0 60px rgba(236,0,140,.35);
  transform: translateX(8px);
}
.sv-value-left h2 {
  position: relative;
  z-index: 3;
  transition: text-shadow .35s ease, transform .35s cubic-bezier(.2,.8,.25,1);
}
.sv-value.is-layering .sv-value-left h2 {
  transform: translateX(10px);
  text-shadow: 0 0 28px rgba(236,0,140,.18);
}
.sv-title-orbit {
  position: absolute;
  left: clamp(170px, 20vw, 280px);
  top: 50%;
  width: clamp(220px, 22vw, 300px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(236,0,140,.18);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: svTitleOrbitSpin 24s linear infinite;
}
.sv-title-orbit::before {
  content: '';
  position: absolute;
  inset: 22%;
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 50%;
}
.sv-title-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236,0,140,.48);
  border-radius: 50%;
  background: rgba(17,16,24,.86);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 0 7px rgba(236,0,140,.04), 0 0 18px rgba(236,0,140,.14);
  transform: rotate(var(--a)) translateX(clamp(110px, 11vw, 150px)) rotate(calc(var(--a) * -1));
  transition: background .28s ease, color .28s ease, box-shadow .28s ease, border-color .28s ease, transform .36s cubic-bezier(.2,.8,.25,1);
}
.sv-title-orbit span:nth-child(1) { --a: -38deg; }
.sv-title-orbit span:nth-child(2) { --a: 42deg; }
.sv-title-orbit span:nth-child(3) { --a: 142deg; }
.sv-title-orbit span:nth-child(4) { --a: 218deg; }
.sv-title-orbit span {
  cursor: pointer;
}
.sv-title-orbit span:hover {
  background: rgba(236,0,140,0.18);
  border-color: rgba(236,0,140,.6);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(236,0,140,.1), 0 0 20px rgba(236,0,140,.35);
}
/* Pausa la órbita cuando el cursor está encima del número */
.sv-title-orbit:has(span:hover) {
  animation-play-state: paused;
}
.sv-title-orbit span.is-active {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255,255,255,.72);
  box-shadow: 0 0 0 12px rgba(236,0,140,.12), 0 0 34px rgba(236,0,140,.4);
}
.sv-layer-stack {
  position: absolute;
  inset: 0;
  width: auto;
  height: clamp(170px, 17vw, 225px);
  transform: rotateX(58deg) rotateZ(-22deg);
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 0;
}
.sv-layer {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(236,0,140,.22);
  background:
    linear-gradient(135deg, rgba(236,0,140,.11), rgba(255,255,255,.025) 48%, transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px);
  box-shadow: 0 18px 42px rgba(0,0,0,.16), inset 0 0 28px rgba(236,0,140,.035);
  transform: translate3d(calc(var(--i) * 12px), calc(var(--i) * 10px), calc(var(--i) * 22px));
  opacity: .42;
  transition: transform .56s cubic-bezier(.2,.8,.25,1), opacity .36s ease, border-color .36s ease, background .36s ease;
}
.sv-layer::before {
  content: attr(data-layer);
  position: absolute;
  left: 18px;
  top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(255,255,255,.36);
  transition: color .3s ease, transform .45s cubic-bezier(.2,.8,.25,1);
}
/* texto movido al .sv-float-label — ::after vacío */
.sv-layer:nth-child(1) { --i: -1.5; }
.sv-layer:nth-child(2) { --i: -.5; }
.sv-layer:nth-child(3) { --i: .5; }
.sv-layer:nth-child(4) { --i: 1.5; }
.sv-value.is-layering .sv-layer { opacity: .26; }
.sv-layer.is-active {
  opacity: 1 !important;
  border-color: rgba(236,0,140,.76);
  background:
    linear-gradient(135deg, rgba(236,0,140,.28), rgba(255,255,255,.06) 48%, rgba(236,0,140,.04)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 34px);
  transform: translate3d(-38px, -42px, 132px) scale(1.04);
  box-shadow: 0 32px 70px rgba(0,0,0,.26), 0 0 42px rgba(236,0,140,.24);
}
.sv-layer.is-active::before {
  color: #fff;
  transform: translateY(-4px);
}

/* ── Label flotante horizontal (fuera del cuadro) ── */
.sv-float-label {
  position: absolute;
  bottom: calc(100% + 18px);
  left: 0;
  right: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .38s ease, transform .44s cubic-bezier(.2,.8,.25,1);
}
.sv-float-label.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.sv-fl-title {
  font-family: var(--sans);
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: block;
}
.sv-fl-copy {
  font-family: var(--sans);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  display: block;
}
.sv-value-right {
  position: relative;
  width: clamp(230px, 22vw, 310px);
  height: clamp(160px, 18vw, 220px);
  flex-shrink: 0;
  perspective: 900px;
}

.sv-value-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 86px;
  padding: 22px 18px 22px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: opacity .32s ease, filter .32s ease, border-color .36s ease, background .36s ease, transform .36s cubic-bezier(.2,.8,.25,1);
}
.sv-value-item:first-child { border-top: 1px solid rgba(255,255,255,0.06); }
.sv-value.is-layering .sv-value-item {
  opacity: .36;
  filter: blur(.8px) saturate(.7);
}
.sv-value-item:hover,
.sv-value-item.is-layer-active {
  opacity: 1;
  filter: blur(0) saturate(1);
  border-color: rgba(236,0,140,.36);
  background: linear-gradient(90deg, rgba(255,255,255,.045), rgba(236,0,140,.08) 46%, rgba(255,255,255,.025));
  transform: translateX(-8px) scale(1.018);
}
.sv-value-item-num {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
  position: relative;
  z-index: 1;
  transition: transform .36s cubic-bezier(.2,.8,.25,1), color .28s ease, text-shadow .28s ease;
}
.sv-value-item:hover .sv-value-item-num,
.sv-value-item.is-layer-active .sv-value-item-num {
  transform: translateX(-4px) scale(1.08);
  color: #ff3fb6;
  text-shadow: 0 0 18px rgba(236,0,140,.5);
}
.sv-value-item-text {
  display: block;
  position: relative;
  z-index: 1;
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  transition: transform .35s cubic-bezier(.2,.8,.25,1), color .28s ease;
}
.sv-value-item:hover .sv-value-item-text,
.sv-value-item.is-layer-active .sv-value-item-text {
  transform: translateX(8px);
  color: rgba(255,255,255,.72);
}
.sv-value-item-text strong,
.sv-value-desc {
  transition: color .28s ease;
}
.sv-value-item-text strong {
  color: #fff;
  font-weight: 600;
}
.sv-value-item:hover .sv-value-item-text strong {
  color: #fff;
}
.sv-value-item:hover .sv-value-desc,
.sv-value-item.is-layer-active .sv-value-desc {
  color: rgba(255,255,255,.78);
}

.sv-value-anim .sv-value-tag,
.sv-value-anim .sv-value-left h2,
.sv-value-anim .sv-value-item {
  opacity: 0;
}
.sv-value-anim .sv-value-tag {
  transform: translateX(-28px);
}
.sv-value-anim .sv-value-left h2 {
  transform: translateX(-48px);
  filter: blur(8px);
}
.sv-value-anim .sv-value-item {
  transform: translateX(72px);
}
.sv-value-anim.is-in .sv-value-tag {
  opacity: 1;
  transform: translateX(0);
  transition: opacity .55s ease, transform .7s cubic-bezier(.16,.84,.22,1);
}
.sv-value-anim.is-in .sv-value-left h2 {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  transition: opacity .75s ease .18s, transform 1s cubic-bezier(.16,.84,.22,1) .18s, filter .85s ease .18s;
}
.sv-value-anim.is-in .sv-value-item {
  opacity: 1;
  transform: translateX(0);
  transition: opacity .7s ease calc(.4s + var(--vd)), transform .95s cubic-bezier(.16,.84,.22,1) calc(.4s + var(--vd));
}
.sv-value-anim.is-in .sv-value-item:hover,
.sv-value-anim.is-in .sv-value-item.is-layer-active {
  transform: translateX(-8px) scale(1.018);
  transition: opacity .32s ease, filter .32s ease, border-color .36s ease, background .36s ease, transform .36s cubic-bezier(.2,.8,.25,1);
}

.sv-value .wrap {
  position: relative;
  z-index: 1;
}
@keyframes svTitleOrbitSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ══ CTA ══ */
.sv-cta {
  background: #f7f5f2;
  padding: clamp(72px,9vw,112px) 0;
  text-align: center;
}
.sv-cta h2 {
  font-family: var(--mono);
  font-size: clamp(30px,4.5vw,64px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 auto 16px;
  max-width: 20ch;
}
.sv-cta h2 em { color: var(--accent); font-style: normal; }
.sv-cta p { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); margin: 0 auto 40px; max-width: 44ch; line-height: 1.8; }
.sv-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 18px 52px;
  text-decoration: none;
  transition: background .2s, gap .2s;
}
.sv-cta-btn:hover { background: var(--accent); gap: 20px; }



/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .sv-hero-inner { grid-template-columns: 1fr; }
  .sv-cards-grid { grid-template-columns: 1fr; }
  .sv-cards-grid > .sv-card { min-height: 400px; }

  /* sv-value: 2 columnas, centrado vertical */
  .sv-value-inner {
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
  }
  .sv-value-left { min-height: auto; }

  /* Grupo derecho: columna con espacio arriba para el label */
  .sv-right-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-right: 0;
    padding-top: 110px;
    padding-right: clamp(20px, 4vw, 48px);
    position: relative;
  }

  /* Stack: primero, tamaño fijo, 3D igual que desktop */
  .sv-value-right {
    order: 1;
    width: clamp(200px, 28vw, 280px);
    height: clamp(150px, 18vw, 195px);
    position: relative;
    perspective: 900px;
    flex-shrink: 0;
  }
  .sv-layer-stack {
    display: block;
    position: absolute;
    inset: 0;
    width: auto;
    height: clamp(135px, 16vw, 175px);
  }

  /* Texto flotante: encima del stack (en el padding-top del grupo) */
  .sv-float-label {
    position: absolute;
    bottom: calc(100% + 40px);
    top: auto;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .38s ease, transform .44s cubic-bezier(.2,.8,.25,1);
  }
  .sv-float-label.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Números: fila horizontal, debajo del stack */
  .sv-num-list {
    order: 2;
    flex-direction: row;
    gap: clamp(16px, 4vw, 40px);
    flex-wrap: wrap;
  }
  .sv-num-item { font-size: clamp(22px, 3.5vw, 34px); }
}

@media (max-width: 600px) {
  .sv-cards-col .sv-card { min-height: 220px; }
  .sv-card-desc { color: rgba(255,255,255,0.45) !important; }
  .sv-card-arrow { opacity: 1 !important; transform: none !important; }
}
