/*
 * ═══════════════════════════════════════════════════════════════════════════
 * BLOQUEADO — Hero completo (#hero)
 * Logo, cuadro de textos, rombos, fondo, scroll y responsive.
 * NO editar styles.css para el hero. Solo modificar este archivo si el
 * usuario lo pide explícitamente.
 *
 * Logo:     --hero-logo-x / --hero-logo-y / --hero-logo-size / --hero-logo-max-h
 * Cuadro:   --hero-desc-x / --hero-desc-y / --hero-text-panel-max-w
 * Rombos:   --hero-rombo-x / --hero-rombo-y
 * ═══════════════════════════════════════════════════════════════════════════
 */

@keyframes heroLogoFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroDescFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes romboReveal {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroScrollLine {
  to { top: 100%; }
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

#hero {
  --hero-deep: #000814;
  --hero-shadow: #001d4a;
  --hero-mid: #003366;
  --hero-blue: #0066ff;
  --hero-blue-light: #5db2ff;
  --hero-rombo-x: 28px;
  --hero-rombo-y: 132px;
  --hero-logo-x: -24px;
  --hero-logo-y: -8px;
  --hero-logo-size: 880px;
  --hero-logo-max-h: 560px;
  --hero-desc-x: -24px;
  --hero-desc-y: 8px;
  --hero-text-panel-max-w: 660px;

  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-rows: 1fr auto;
  align-items: start;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  position: relative;
  padding: 5.5rem var(--section-pad-x) 3rem;
  overflow: hidden;
  background-color: var(--hero-deep);
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 8, 20, 0.12) 0%,
    rgba(0, 8, 20, 0) 45%,
    rgba(0, 8, 20, 0.1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 4;
  justify-self: center;
  align-self: start;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transform: translate(var(--hero-rombo-x), var(--hero-rombo-y));
  padding: 0.5rem 0;
}

@media (min-width: 901px) {
  #hero {
    height: 100svh;
    height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
    padding-bottom: 1.1rem;
  }

  .hero-content {
    min-height: 0;
  }

  .hero-scroll {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.4rem;
    width: max-content;
    margin: 0 auto;
  }
}

@media (min-width: 901px) and (max-height: 800px) {
  #hero {
    --hero-logo-max-h: 440px;
    --hero-rombo-y: 72px;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  #hero .grid {
    grid-template-columns: repeat(3, 128px);
    gap: 20px;
  }

  #hero .rombo {
    width: 128px;
    height: 128px;
    --rombo-border: 3.5px;
  }
}

.hero .grid {
  pointer-events: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 24px;
  place-items: center;
  transform: rotate(45deg);
}

.rombo {
  width: 150px;
  height: 150px;
  --rombo-border: 4px;
  --rombo-metal-base: linear-gradient(
    145deg,
    #7ec8f0 0%,
    #3a7ec8 18%,
    #9dd4f5 36%,
    #2d6aad 52%,
    #6eb8e8 70%,
    #3578b8 86%,
    #5a9fd4 100%
  );
  --rombo-metal-brush: repeating-linear-gradient(
    -12deg,
    rgba(255, 255, 255, 0.18) 0 1px,
    rgba(255, 255, 255, 0) 1px 5px,
    rgba(0, 40, 90, 0.12) 5px 6px,
    rgba(0, 0, 0, 0) 6px 10px
  );
  background-color: #4a90c4;
  background-image: var(--rombo-metal-brush), var(--rombo-metal-base);
  border: var(--rombo-border) solid rgba(155, 236, 255, 0.92);
  box-shadow:
    0 6px 26px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -2px 5px rgba(0, 0, 0, 0.14),
    0 0 16px rgba(0, 180, 255, 0.14);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.rombo-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 142%;
  height: 142%;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%) rotate(-45deg);
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
  filter: none;
}

.rombo-label {
  font-size: 18px;
  opacity: 1;
  transition: 0.3s;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  transform: rotate(-45deg);
  transform-origin: center;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(0, 0, 0, 0.65);
  z-index: 3;
  position: relative;
  pointer-events: none;
  max-width: 7.5em;
  line-height: 1.2;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.rombo:hover {
  transform: scale(1.1);
  border-color: rgba(0, 229, 255, 0.95);
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -2px 6px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 212, 255, 0.4),
    0 0 36px rgba(0, 180, 255, 0.28);
}

.rombo:hover .rombo-label {
  color: var(--gold2);
  background: transparent;
  letter-spacing: 0.07em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 12px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(201, 168, 76, 0.35);
}

.rombo:hover .rombo-img {
  filter: none;
}

body.light-mode .rombo {
  background-color: #6eb0e0;
  background-image: var(--rombo-metal-brush), var(--rombo-metal-base);
  border: var(--rombo-border) solid rgba(155, 236, 255, 0.88);
  box-shadow:
    0 6px 22px rgba(30, 35, 48, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

body.light-mode .rombo-label {
  color: #ffffff;
  background: transparent;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.75);
}

body.light-mode .rombo:hover {
  border-color: rgba(0, 212, 255, 0.85);
  box-shadow:
    0 10px 30px rgba(30, 35, 48, 0.1),
    0 0 0 1px rgba(0, 180, 255, 0.3),
    0 0 28px rgba(0, 180, 255, 0.2);
}

body.light-mode .rombo:hover .rombo-label {
  color: #fffdf6;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--hero-deep);
  overflow: hidden;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 8, 20, 0.08) 0%, rgba(0, 8, 20, 0.22) 100%);
  z-index: 1;
}

/* Imagen cableado — fondo completo del hero */
.hero-cableado {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero-cableado picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.hero-cableado-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.92;
  filter: none;
  transform: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    #000 16%,
    #000 78%,
    rgba(0, 0, 0, 0.45) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    #000 16%,
    #000 78%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero-cableado::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 8, 20, 0.18) 0%,
    rgba(0, 8, 20, 0.02) 38%,
    rgba(0, 8, 20, 0.06) 68%,
    rgba(0, 8, 20, 0.28) 100%
  );
  pointer-events: none;
}

/* Hero en modo claro: mantiene la atmósfera azul con overlay más suave */
body.light-mode #hero {
  background: #eef4ff;
}

body.light-mode .hero-bg {
  background-color: #eef4ff;
}

body.light-mode .hero-bg::after {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.32) 100%);
}

body.light-mode .hero-cableado::after {
  background:
    linear-gradient(
      105deg,
      rgba(255, 255, 255, 0.82) 0%,
      rgba(255, 255, 255, 0.48) 38%,
      rgba(0, 0, 0, 0.12) 62%,
      rgba(0, 0, 0, 0.28) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(0, 0, 0, 0.04) 42%,
      rgba(0, 0, 0, 0.35) 100%
    );
}

.hero-content {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 4;
  align-self: start;
  justify-self: start;
  width: 100%;
  max-width: min(760px, 98%);
  margin: 0;
  padding: 0 clamp(0.75rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-height: calc(var(--hero-logo-max-h) + 11rem);
  pointer-events: none;
}

.hero-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  align-items: stretch;
  gap: 0.6rem;
  position: absolute;
  top: 5.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  z-index: 6;
  pointer-events: auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 15.8em;
  padding: 0.4rem 0.95rem;
  border: 1px solid rgba(201, 168, 76, 0.58);
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-pill i,
.hero-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--gold);
}

.hero-logo {
  position: relative;
  top: auto;
  left: auto;
  width: min(var(--hero-logo-size), 100%);
  margin: 0;
  transform: translate(var(--hero-logo-x), var(--hero-logo-y));
  opacity: 0;
  animation: heroLogoFade 1s 0.35s forwards;
  pointer-events: auto;
  overflow: visible;
}

.hero-logo picture {
  display: block;
  line-height: 0;
  position: relative;
  z-index: 1;
}

.hero-logo-img {
  width: min(var(--hero-logo-size), 100%);
  max-width: 100%;
  max-height: var(--hero-logo-max-h, none);
  height: auto;
  display: block;
  object-fit: contain;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.35rem, 4.8vw, 4.2rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.25rem;
}

h1 em {
  font-style: normal;
  color: var(--gold);
  font-weight: 600;
}

.hero-scroll {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: end;
  justify-self: center;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 5;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--gold);
  opacity: 0;
  animation: fadeUp 0.9s 1.6s forwards;
}

.hero-scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, rgba(201, 168, 76, 0.35));
  position: relative;
  overflow: hidden;
  animation: heroScrollBounce 2.4s ease-in-out 2.5s infinite;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold2);
  animation: heroScrollLine 2.2s ease-in-out infinite;
}

.hero-scroll-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-scroll:hover .hero-scroll-label {
  opacity: 1;
}

/* Entrada escalonada de rombos con servicios */
.hero .grid .rombo:not(.rombo-empty) {
  opacity: 0;
  animation: romboReveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero .grid .rombo[data-id="1"] { animation-delay: 0.85s; }
.hero .grid .rombo[data-id="2"] { animation-delay: 0.92s; }
.hero .grid .rombo[data-id="3"] { animation-delay: 1s; }
.hero .grid .rombo[data-id="4"] { animation-delay: 1.07s; }
.hero .grid .rombo[data-id="5"] { animation-delay: 1.15s; }
.hero .grid .rombo[data-id="6"] { animation-delay: 1.22s; }
.hero .grid .rombo[data-id="7"] { animation-delay: 1.3s; }
.hero .grid .rombo[data-id="8"] { animation-delay: 1.37s; }
.hero .grid .rombo[data-id="9"] { animation-delay: 1.45s; }
@media (min-width: 901px) {
  #hero > .hero-content {
    max-width: min(700px, 96%);
  }

  #hero .hero-logo {
    z-index: 3;
  }
}

.hero-text-panel {
  position: relative;
  left: auto;
  top: auto;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: var(--hero-text-panel-max-w, 660px);
  min-width: 0;
  margin-top: 0;
  padding: 1rem 1.15rem 1.05rem;
  box-sizing: border-box;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.42);
  border-radius: 0;
  box-shadow: none;
  transform: translate(var(--hero-desc-x), var(--hero-desc-y));
  opacity: 0;
  animation: heroDescFade 0.9s 0.5s forwards;
  pointer-events: auto;
}

body.light-mode .hero-text-panel {
  background: transparent;
  border: 1.5px solid #6f5820;
  box-shadow: none;
}

#hero .hero-desc {
  position: relative;
  top: auto;
  left: auto;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-family: 'Raleway', 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  color: #ffffff;
  line-height: 1.65;
  letter-spacing: 0.03em;
  margin: 0;
  z-index: 2;
  font-weight: 300;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 4px 18px rgba(0, 8, 20, 0.75);
  opacity: 1;
  transform: none;
  animation: none;
  pointer-events: auto;
}

body.light-mode #hero .hero-desc {
  color: #f0f4fb;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 10px rgba(0, 8, 20, 0.5);
}

#hero .hero-services {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  margin: 0.65rem 0 0;
  padding: 0;
  font-family: 'Raleway', 'DM Sans', sans-serif;
  font-size: clamp(0.76rem, 0.98vw, 0.88rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  color: var(--gold2);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 3px 14px rgba(0, 8, 20, 0.65);
  opacity: 1;
  transform: none;
  animation: none;
  pointer-events: auto;
}

body.light-mode #hero .hero-services {
  color: #d4b76a;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.75),
    0 2px 10px rgba(0, 8, 20, 0.45);
}

@media (max-width: 900px) {
  #hero {
    --hero-desc-y: 0px;
    --hero-logo-max-h: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5.5rem 4.5vw 2.5rem;
    min-height: auto;
    overflow: visible;
  }

  .hero-cableado {
    height: 100dvh;
    max-height: 100dvh;
  }

  .hero-cableado-img {
    opacity: 0.82;
    filter: none;
    object-fit: cover;
    object-position: center center;
  }

  #hero > .hero-content {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;
    pointer-events: none;
  }

  #hero .hero-pills {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(100%, 26rem);
    max-width: 100%;
    margin: 0 auto 0.85rem;
    z-index: 5;
  }

  #hero .hero-pill {
    min-width: 0;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
    padding: 0.36rem 0.55rem;
    white-space: normal;
    text-align: center;
  }

  #hero .hero-logo {
    position: relative;
    width: min(420px, 92vw);
    --hero-logo-size: 420px;
    margin: 0 auto;
    transform: none;
    pointer-events: auto;
    opacity: 1;
    animation: none;
  }

  #hero .hero-logo-img {
    animation: none !important;
    opacity: 1;
  }

  #hero .hero-text-panel {
    position: relative;
    left: auto;
    top: auto;
    display: block;
    width: calc(100% - 0.5rem);
    max-width: 34rem;
    min-width: 0;
    margin: 0.85rem auto 0.35rem;
    padding: 0.95rem 1rem 1rem;
    text-align: center;
    transform: none;
    opacity: 1;
    animation: none;
    pointer-events: auto;
  }

  #hero .hero-desc {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    text-align: center;
    margin: 0;
    padding: 0;
    z-index: 5;
    transform: none;
    opacity: 1;
    animation: none;
    pointer-events: auto;
  }

  #hero .hero-services {
    width: 100%;
    max-width: none;
    text-align: center;
    margin: 0.55rem 0 0;
    padding: 0;
    font-size: clamp(0.72rem, 3vw, 0.88rem);
    letter-spacing: 0.09em;
    line-height: 1.6;
    white-space: normal;
    transform: none;
    opacity: 1;
    animation: none;
  }

  #hero > .hero {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 4.35rem 0 2.6rem;
    margin: 0.35rem 0 0;
    transform: none;
  }

  .hero-scroll {
    position: relative;
    margin: 0.65rem auto 0;
    transform: none;
    opacity: 1;
    animation: none;
  }

  .hero-scroll-line {
    animation: heroScrollBounce 2.4s ease-in-out 2.5s infinite;
  }

  #hero .grid {
    grid-template-columns: repeat(3, 100px);
    gap: 20px;
    transform: rotate(45deg);
  }

  #hero .rombo {
    width: 100px;
    height: 100px;
    --rombo-border: 3.5px;
  }

  #hero .rombo-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    max-width: 5.2em;
    line-height: 1.15;
  }
}

@media (max-width: 600px) {
  #hero {
    --hero-desc-y: 0px;
    --hero-logo-max-h: 260px;
    padding: 5.25rem 4vw 2rem;
  }

  #hero > .hero-content {
    gap: 0;
  }

  #hero .hero-logo {
    width: min(360px, 94vw);
    --hero-logo-size: 360px;
    margin: 0 auto;
    transform: none;
  }

  #hero .hero-text-panel {
    display: block;
    width: calc(100% - 0.25rem);
    max-width: none;
    margin: 0.75rem auto 0.25rem;
    padding: 0.9rem 0.85rem 0.95rem;
    transform: none;
  }

  #hero .hero-desc {
    width: 100%;
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    margin-top: 0;
    transform: none;
  }

  #hero .hero-services {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
    transform: none;
  }

  #hero > .hero {
    margin-top: 0.25rem;
    padding: 3.85rem 0 2.4rem;
  }

  #hero .grid {
    grid-template-columns: repeat(3, 84px);
    gap: 16px;
    transform: rotate(45deg);
  }

  #hero .rombo {
    width: 84px;
    height: 84px;
    --rombo-border: 3px;
  }

  #hero .rombo-label {
    font-size: 14px;
    max-width: 4.6em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-logo-img,
  #hero .hero-desc,
  #hero .hero-text-panel,
  #hero .hero-services,
  .hero .grid .rombo,
  .hero-scroll,
  .hero-scroll-line::after {
    animation: none !important;
  }

  .hero-logo,
  .hero-logo-img,
  #hero .hero-desc,
  #hero .hero-text-panel,
  #hero .hero-services,
  .hero .grid .rombo:not(.rombo-empty),
  .hero-scroll {
    opacity: 1 !important;
  }

  .hero .grid .rombo:not(.rombo-empty) {
    transform: none;
  }
}
