/* =========================================================================
   SOLET — Página de Inicio
   ========================================================================= */

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -3; overflow: hidden; }

.hero__video,
.hero__poster {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  /* parallax de puntero: --px / --py las escribe main.js */
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -10px), 0) scale(1.03);
  transition: transform 900ms var(--ease-out);
}
.hero__poster {
  background-size: cover;
  background-position: center;
  filter: saturate(0.92) brightness(1.04);
}
.hero__video { filter: saturate(0.92) brightness(1.04); }
.hero__video { opacity: 0; transition: opacity 1400ms var(--ease-out); }
.hero__video.is-playing { opacity: 1; }

/* Velo: oscurece el vídeo y lo tiñe con la paleta de marca */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(97deg,
      var(--paper-1) 0%, var(--paper-1) 43%,
      rgba(247, 249, 250, 0.93) 53%,
      rgba(247, 249, 250, 0.58) 67%,
      rgba(247, 249, 250, 0.14) 86%,
      rgba(247, 249, 250, 0) 98%),
    linear-gradient(180deg,
      rgba(247, 249, 250, 0.8) 0%,
      rgba(247, 249, 250, 0.2) 24%,
      rgba(247, 249, 250, 0.12) 58%,
      rgba(247, 249, 250, 0.8) 88%,
      var(--paper-1) 100%),
    radial-gradient(58% 66% at 80% 28%, rgba(0, 133, 200, 0.1), transparent 66%);
}

/* En móvil no hay vídeo, sólo el póster, y el texto lo cruza entero:
   ahí el velo tiene que ser mucho más opaco para que se lea. */
@media (max-width: 820px) {
  .hero__scrim {
    background:
      linear-gradient(180deg,
        rgba(247, 249, 250, 0.94) 0%,
        rgba(247, 249, 250, 0.86) 46%,
        rgba(247, 249, 250, 0.93) 78%,
        var(--paper-1) 100%),
      radial-gradient(70% 50% at 70% 18%, rgba(0, 133, 200, 0.12), transparent 70%);
  }
}

/* Retícula técnica finísima sobre el vídeo */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(180deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: clamp(80px, 9vw, 140px) clamp(80px, 9vw, 140px);
  -webkit-mask-image: radial-gradient(90% 90% at 22% 46%, #000 20%, transparent 76%);
  mask-image: radial-gradient(90% 90% at 22% 46%, #000 20%, transparent 76%);
}

/* Torres estilizadas en SVG (capa de parallax) */
.hero__towers {
  position: absolute;
  right: -2%;
  bottom: 0;
  z-index: -1;
  width: min(54%, 720px);
  color: var(--ink-700);
  opacity: 0.16;
  pointer-events: none;
  transform: translate3d(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 8px), 0);
  transition: transform 1100ms var(--ease-out);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 32%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 32%, #000 82%, transparent);
}
@media (max-width: 900px) { .hero__towers { width: 92%; right: -14%; opacity: 0.1; } }

.hero__inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero__title {
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 17ch;
  margin-bottom: 1.6rem;
}
.hero__title .hl { background-size: 100% 3px; }

.hero__sub {
  max-width: 52ch;
  color: var(--text);
  font-size: var(--step-1);
  margin-bottom: 2.4rem;
}

.hero__actions { gap: 1rem; }

/* Entrada escalonada del hero */
.js .hero__inner > * { opacity: 0; transform: translateY(24px); animation: hero-in 1000ms var(--ease-out) forwards; }
.js .hero__inner > *:nth-child(1) { animation-delay: 1.05s; }
.js .hero__inner > *:nth-child(2) { animation-delay: 1.18s; }
.js .hero__inner > *:nth-child(3) { animation-delay: 1.31s; }
.js .hero__inner > *:nth-child(4) { animation-delay: 1.44s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* Pie del hero: accesos rápidos y aviso de scroll */
.hero__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-top: clamp(2rem, 5vh, 3.5rem);
}

.hero__quick { display: flex; flex-wrap: wrap; gap: 0 clamp(1.2rem, 3vw, 2.6rem); }
.hero__quick li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
  padding-block: 0.35rem;
}
.hero__quick li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-low);
  white-space: nowrap;
}
.hero__scroll::after {
  content: "";
  width: 46px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
  animation: scroll-hint 2.4s var(--ease-in-out) infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(8px); opacity: 1; }
}
@media (max-width: 760px) { .hero__scroll { display: none; } }

/* ============ LÍNEAS DE NEGOCIO ============ */

.lines { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(0.8rem, 1.8vw, 1.4rem); }
@media (max-width: 760px) { .lines { grid-template-columns: 1fr; } }

.line-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-md);
  min-height: clamp(320px, 40vw, 440px);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  overflow: hidden;
  border: 1px solid var(--hairline);
  isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color var(--dur) var(--ease-out);
}
.line-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.line-card__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(0.72) contrast(1.06) brightness(0.62);
  transform: scale(1.02);
  transition: transform 1600ms var(--ease-out), filter 900ms var(--ease-out);
}
.line-card:hover .line-card__img { transform: scale(1.09); filter: saturate(1) contrast(1.02) brightness(0.78); }

.line-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 12, 18, 0.12) 0%, rgba(6, 12, 18, 0.72) 54%, rgba(6, 12, 18, 0.93) 100%),
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent 58%);
  transition: opacity var(--dur) var(--ease-out);
}

/* Barra de acento que crece desde el borde inferior */
.line-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 620ms var(--ease-out);
}
.line-card:hover::after { transform: scaleX(1); }

.line-card__num {
  position: absolute;
  top: clamp(1.3rem, 3vw, 2rem);
  left: clamp(1.5rem, 3vw, 2.4rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.line-card__tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 0.9rem;
}
.line-card__title {
  font-size: var(--step-2);
  margin-bottom: 0.6rem;
  max-width: 15ch;
}
.line-card__text {
  color: var(--text-mid);
  font-size: 0.92rem;
  max-width: 40ch;
  margin-bottom: 1.3rem;
}
.line-card__go {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.line-card__go svg { width: 15px; height: 15px; transition: transform var(--dur) var(--ease-out); }
.line-card:hover .line-card__go svg { transform: translateX(5px); }

/* Enlace que cubre toda la tarjeta sin romper la semántica */
.line-card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }

/* ============ PROCESO ============ */

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--hairline); }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

.step {
  position: relative;
  padding: clamp(2rem, 3.5vw, 2.8rem) clamp(1.2rem, 2.4vw, 2rem) clamp(2rem, 3.5vw, 2.8rem) 0;
  border-right: 1px solid var(--hairline-soft);
}
.step:last-child { border-right: 0; }
@media (max-width: 900px) {
  .step:nth-child(2n) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--hairline-soft); }
}
@media (max-width: 560px) {
  .step { border-right: 0; border-bottom: 1px solid var(--hairline-soft); padding-right: 0; }
}

/* Nodo sobre la línea superior */
.step::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 9px; height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent-ink);
  margin-bottom: 1.1rem;
  display: block;
}
.step__title { font-size: var(--step-1); margin-bottom: 0.55rem; }
.step__text { font-size: 0.9rem; color: var(--text-mid); margin: 0; max-width: 34ch; }

/* ============ CALIDAD ============ */

.quality { position: relative; }
.quality__media { position: relative; }
.quality__badges { display: grid; gap: 0.7rem; margin-top: 1.8rem; }
.quality__badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.quality__badge:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: translateX(4px); }
.quality__badge svg { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
