/* BITSMART v2 — HOME (estructura compacta) */

.page-home {
  --section-spacing: clamp(2.8rem, 4.2vw, 4.5rem);
}

@media (min-width: 1024px) {
  .page-home .site-header.is-over-hero {
    opacity: 1;
    pointer-events: auto;
  }

  .page-home .site-header--expanded:not(.is-hero-immersive) {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
  }

  .page-home .hero-negativo-brand,
  .page-home .hero-negativo-top > .hero-negativo-burger {
    display: none;
  }
}

.page-home .site-header--expanded.is-hero-immersive,
.page-home .site-header--expanded.is-hero-immersive.is-scrolled,
.page-home .site-header.is-scrolled.is-hero-immersive {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.page-home .logo-official-white {
  height: clamp(44px, 3.9vw, 52px);
  max-width: min(232px, 43vw);
}

.page-home .site-header--expanded.is-hero-immersive .logo-official-white {
  display: block;
  height: clamp(46px, 4.1vw, 54px);
  max-width: min(240px, 45vw);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-link,
.page-home .site-header--expanded.is-hero-immersive .header-nav-link[aria-current="page"] {
  color: var(--bitsmart-white);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-link:hover {
  color: rgba(255, 255, 255, 0.82);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-cta.btn-red {
  background: transparent;
  color: var(--bitsmart-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-cta.btn-red:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--bitsmart-white);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-toggle {
  color: var(--bitsmart-white);
}

.page-home .site-header--expanded.is-hero-immersive .header-nav-dropdown {
  border-color: rgba(255, 255, 255, 0.12);
}

.page-home .site-header--expanded.is-scrolled:not(.is-hero-immersive) {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border-subtle);
}

@media (min-width: 768px) {
  .page-home .hero-negativo-title {
    padding-top: 4.35rem;
  }
}

.page-home .site-header--expanded.is-hero-immersive .logo-official-color {
  display: none;
}

.page-home .preloader-logo-wrap {
  filter: drop-shadow(0 8px 24px rgba(0, 45, 93, 0.08));
  max-width: min(78vw, 340px);
}

.page-home #inicio.hero-negativo {
  --hero-fill: 0;
  --hero-cta-fill: 0;
  min-height: 100svh;
}

.page-home #inicio.hero-negativo .hero-negativo-lead {
  color: color-mix(
    in srgb,
    var(--color-blue) calc((1 - var(--hero-fill)) * 100%),
    var(--bitsmart-white)
  );
  text-shadow: 0 calc(1px * var(--hero-fill)) calc(22px * var(--hero-fill))
    rgba(0, 45, 93, 0.42);
}

.page-home #inicio.hero-negativo .hero-negativo-notes,
.page-home #inicio.hero-negativo .hero-negativo-notes p {
  color: color-mix(
    in srgb,
    var(--color-muted) calc((1 - var(--hero-fill)) * 100%),
    rgba(255, 255, 255, 0.9)
  );
}

@media (min-width: 768px) {
  .page-home #inicio .hero-negativo-bottom {
    align-items: start;
  }

  .page-home #inicio .hero-negativo-cta {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

.page-home #inicio.hero-negativo .hero-negativo-cta .fill-box-label {
  color: color-mix(
    in srgb,
    var(--color-blue) calc((1 - var(--hero-cta-fill)) * 100%),
    var(--bitsmart-white)
  );
}

.page-home #inicio.hero-negativo .hero-negativo-cta .fill-box-btn {
  background: color-mix(
    in srgb,
    var(--bitsmart-white) calc((1 - var(--hero-cta-fill)) * 100%),
    rgba(255, 255, 255, 0.12)
  );
  border-color: color-mix(
    in srgb,
    var(--border-subtle) calc((1 - var(--hero-cta-fill)) * 100%),
    rgba(255, 255, 255, 0.55)
  );
}

.page-home #inicio.hero-negativo .hero-negativo-cta-note {
  color: color-mix(
    in srgb,
    var(--color-muted) calc((1 - var(--hero-cta-fill)) * 100%),
    rgba(255, 255, 255, 0.9)
  );
}

.page-home .hero-negativo-inner {
  min-height: 100svh;
  height: 100svh;
}

.home-solutions {
  padding-top: clamp(2rem, 3.5vw, 2.8rem);
}

.home-solutions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.4rem, 2.5vw, 2rem);
}

.home-solutions-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.04em;
}

.solutions-row {
  display: grid;
  gap: clamp(0.75rem, 1.2vw, 1rem);
}

@media (min-width: 1024px) {
  .solutions-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .solutions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.solution-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(17rem, 28vw, 22rem);
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--bitsmart-white);
  background: var(--color-blue);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.solution-card:hover,
.solution-card:focus-visible {
  border-color: rgba(225, 37, 27, 0.45);
  transform: translateY(-3px);
}

.solution-card__media {
  position: absolute;
  inset: 0;
}

.solution-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease), filter 0.65s var(--ease);
}

.solution-card:hover .solution-card__media img,
.solution-card:focus-visible .solution-card__media img {
  transform: scale(1.06);
  filter: brightness(0.92);
}

.solution-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 45, 93, 0.15) 0%,
    rgba(0, 45, 93, 0.55) 52%,
    rgba(0, 45, 93, 0.92) 100%
  );
  transition: background 0.45s var(--ease);
}

.solution-card:hover .solution-card__shade,
.solution-card:focus-visible .solution-card__shade {
  background: linear-gradient(
    180deg,
    rgba(0, 45, 93, 0.35) 0%,
    rgba(0, 45, 93, 0.72) 48%,
    rgba(0, 45, 93, 0.96) 100%
  );
}

.solution-card__body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.55rem;
  padding: 1rem 0.95rem 1.05rem;
}

.solution-card__num {
  font-size: var(--text-meta);
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.solution-card h3 {
  margin: 0;
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.solution-card__points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
}

.solution-card:hover .solution-card__points,
.solution-card:focus-visible .solution-card__points {
  max-height: 6rem;
  opacity: 1;
  margin-top: 0.15rem;
}

@media (max-width: 1023px) {
  .solution-card__points {
    max-height: none;
    opacity: 1;
    margin-top: 0.15rem;
  }
}

.solution-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bitsmart-white);
}

.solution-card__cta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.solution-card:hover .solution-card__cta span,
.solution-card:focus-visible .solution-card__cta span {
  background: var(--color-red);
  border-color: var(--color-red);
}

.page-home #quienes-somos {
  padding-bottom: clamp(2rem, 3vw, 3rem);
}

.page-home #por-que-elegirnos {
  padding-bottom: clamp(2rem, 3vw, 3rem);
}

.page-home #quienes-somos .about-grid {
  margin-top: 1.75rem !important;
}

.page-home #contacto {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
  padding-block: clamp(2.5rem, 4.5vw, 3.5rem);
}

.page-home .contact-bg img {
  opacity: 0.35;
  filter: blur(3px) brightness(1.05);
}

.page-home .contact-inner {
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .page-home .contact-inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

.page-home .contact .section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-home .contact .lede {
  margin-top: 0.65rem;
}

.page-home .contact .form-card {
  padding: 1.15rem;
}

.page-home .site-footer {
  padding-top: 2.2rem;
}

/* Hero portada (escritorio): CTA y descripción alineados abajo, en la misma línea. */
@media (min-width: 768px) {
  .page-home #inicio .hero-negativo-cta {
    grid-row: 2;
    align-self: end;
    margin-top: 0 !important;
  }
  .page-home #inicio .hero-negativo-desc {
    grid-row: 2;
    align-self: end;
  }
  .page-home #inicio .hero-negativo-notes {
    margin-top: 0;
  }
}

/* Tarjetas de servicios: en PC el texto del hover se ve completo */
@media (min-width: 1024px) {
  .page-home .bs-card:hover .bs-card-points,
  .page-home .bs-card:focus-within .bs-card-points { max-height: 16em !important; }
}

/* Quiénes somos: en escritorio la foto de Esteban se apoya sobre el «CTA azul bajo CEO» (sin hueco inferior). */
@media (min-width: 768px) {
  .page-home #quienes-somos {
    padding-bottom: 0;
  }
}
