/* =============================================================
   INTEGRAL DESIGN — landing page (v2)
   Poppins + Fraunces serif accent · cream/dark · refined motion
   ============================================================= */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400&family=JetBrains+Mono:wght@300;400;500&display=swap");

:root {
  --sans: "Poppins", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", monospace;

  --cream-2: #ece8dd;
  --cream: white;
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #2a2a2a;
  --btnTra: #111318;
  --muted: #6b6b6b;
  --line: #1d1d1d;
  --line-soft: rgba(0, 0, 0, 0.35);

  --brand: black; /* Integral Design deep blue */
  --brand-2: #2d5fbf;
  --accent: #6aa84f; /* the green from the logo */
  --red: #d92e2e; /* integral audio red */
  --white: #ffff;
}

/* =============================================================
   Reset
   ============================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--sans);
}

html {
  scroll-behavior: smooth;
}
body {
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
section {
  scroll-margin-top: 90px;
}

::selection {
  background: var(--ink);
  color: var(--cream);
}

/* =============================================================
   HEADER — real glass, reveals on scroll
   ============================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition:
    padding 0.35s ease,
    background 0.35s ease,
    backdrop-filter 0.35s ease,
    border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.35s ease,
    backdrop-filter 0.35s ease;
  z-index: -1;
}
.header.scrolled {
  padding: 12px 40px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.header.scrolled::before {
  background: rgba(14, 14, 14, 0.78);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 60px;
  width: auto;
  transition: transform 0.4s ease;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 36px;
}
.navbar a {
  font-size: 14px;
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.navbar a:not(.nav-flag)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.navbar a:not(.nav-flag):hover::after {
  width: 100%;
}
.navbar a.active::after {
  width: 100%;
  opacity: 0.7;
}

.nav-flag {
  width: 30px;
  height: 18px; /* 30/18 = 5:3, proporción oficial */
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  flex-shrink: 0; /* evita que se deforme si el navbar se achica */
}
.nav-flag img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* o 'cover', ya no importa porque las proporciones coinciden */
  display: block;
}

#check {
  display: none;
}
.icons {
  display: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../media/Fondo/Inicio.webp");
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroBgSlowZoom 24s ease-in-out infinite alternate;
}
@keyframes heroBgSlowZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10, 10, 10, 0.75) 0%,
      rgba(10, 10, 10, 0.35) 55%,
      rgba(10, 10, 10, 0.15) 100%
    ),
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.35) 0%,
      rgba(10, 10, 10, 0) 40%,
      rgba(10, 10, 10, 0.5) 100%
    );
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 90px 90px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 64px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  animation: fadeUp 0.9s ease 0.1s both;
}
.hero-eyebrow::before {
  content: "";
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  display: inline-block;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7.5vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  max-width: 12ch;
  animation: fadeUp 1s ease 0.2s both;
}
.hero h1 em {
  font-style: italic;
  color: #f0d8a8;
}

.hero p.hero-lede {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
  font-weight: 300;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 40px;
  animation: fadeUp 1s ease 0.4s both;
}

.solo-mobile {
  display: none;
}
.solo-desktop {
  display: block;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 22px;
  animation: fadeUp 1s ease 0.55s both;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px 16px 28px;
  background: #fff;
  color: var(--ink);
  border-radius: 60px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    gap 0.3s ease;
  border: 0;
  cursor: pointer;
}
.btn-primary:hover {
  background: #f0d8a8;
}
.btn-primary .chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.btn-primary .chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(1) brightness(2);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 60px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.hero-meta {
  position: absolute;
  bottom: 40px;
  left: 64px;
  display: flex;
  align-items: flex-end;
  gap: 48px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
  animation: fadeUp 1s ease 0.8s both;
}
.hero-meta .divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  right: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
  animation: fadeUp 1s ease 0.9s both;
}
.hero-scroll .line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}
.hero-scroll .line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================
   SECTION HEADER helper
   ============================================================= */
.sh {
  text-align: center;
  margin-bottom: 64px;
}
.sh-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.sh-eyebrow::before,
.sh-eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.sh-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(42px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sh-title em {
  font-style: italic;
  color: var(--brand);
}
.sh-sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* =============================================================
   QUIENES SOMOS
   ============================================================= */
.QuienesSomos-section {
  min-height: 100vh;
  position: relative;
  padding: 110px 0 80px;
  background: var(--cream);
  overflow: hidden;
}
#QuienesSomos-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}
.QuienesSomos-content {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 48px;
}
.QuienesSomos-envolve {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
  margin-top: 48px;
}

/* Refined 3-column collage using real photos */
.QuienesSomos-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 120px;
  gap: 10px;
}
.qs-cell {
  overflow: hidden;
  border-radius: 4px;
  background: #ddd;
  position: relative;
}
.qs-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.6s;
}
.qs-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.15));
  opacity: 0;
  transition: opacity 0.4s;
}
.qs-cell:hover img {
  transform: scale(1.08);
}
.qs-cell:hover::after {
  opacity: 1;
}

.qs-a {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
} /* big left */
.qs-b {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
}
.qs-c {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}
.qs-d {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}
.qs-e {
  grid-column: 2 / 4;
  grid-row: 3 / 5;
} /* big right-bottom */
.qs-f {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}

.QuienesSomos-text {
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
  padding-top: 8px;
  padding-bottom: 8px;
}
.QuienesSomos-text .year-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 24px;
}
.QuienesSomos-text .year-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.4);
  }
}
.QuienesSomos-text h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.QuienesSomos-text h2 em {
  font-style: italic;
  color: var(--brand);
}
.QuienesSomos-text h3 {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}
.QuienesSomos-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 32px;
  font-weight: 300;
}
.btn-saber-mas {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 60px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background 0.3s,
    transform 0.3s,
    gap 0.3s;
}
.btn-saber-mas:hover {
  background: var(--brand);
  gap: 18px;
}
.btn-saber-mas .arr {
  transition: transform 0.3s;
}
.btn-saber-mas:hover .arr {
  transform: translateX(4px);
}

/* stats strip below the copy */
.qs-stats {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.qs-stat .num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
}
.qs-stat .num em {
  font-style: italic;
  color: var(--brand);
}
.qs-stat .lbl {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =============================================================
   STEREO (sticky scroll reveal)
   ============================================================= */
.stereo-section {
  height: 260vh;
  position: relative;
  background: var(--cream);
}
.stereo-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stereo-bg-text {
  position: absolute;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.85;
  color: rgba(15, 62, 122, 0.06);
  letter-spacing: -0.04em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}
.stereo-container {
  position: relative;
  /* width: min(1500px, 90vw); */
  width: 100%;
  transform: scale(0.96);
  aspect-ratio: 1 / 1;
  z-index: 1;
}
.stereo-boceto,
.stereo-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.stereo-color {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.1s linear;
}
.stereo-meta {
  position: absolute;
  bottom: 60px;
  left: 60px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.stereo-meta .hdr {
  color: var(--brand);
  margin-bottom: 4px;
}
.stereo-caption {
  position: absolute;
  bottom: 60px;
  right: 60px;
  max-width: 280px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
  z-index: 2;
}

/* =============================================================
   NUESTRA EXPERIENCIA
   ============================================================= */
.NuestraExperiencia-seccion {
  padding: 120px 0 100px;
  background: #0e0e0e;
  color: #f5f2ea;
  overflow: hidden;
  position: relative;
}
.NuestraExperiencia-seccion .sh-title {
  color: #f5f2ea;
}
.NuestraExperiencia-seccion .sh-title em {
  color: #f0d8a8;
}
.NuestraExperiencia-seccion .sh-eyebrow {
  color: rgba(245, 242, 234, 0.6);
}
.NuestraExperiencia-seccion .sh-sub {
  color: rgba(245, 242, 234, 0.6);
  max-width: 620px;
  margin: 14px auto 0;
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  padding: 2rem 0;
  position: relative;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}
.carousel-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: scrollLeft 55s linear infinite;
}
.carousel-track:hover {
  animation-play-state: paused;
}
@keyframes scrollLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.carousel-item {
  width: 380px;
  height: 480px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}
.carousel-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}
.carousel-item .caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s,
    transform 0.4s;
}
.carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.6));
  opacity: 0;
  transition: opacity 0.4s;
}
.carousel-item:hover::after {
  opacity: 1;
}
.carousel-item:hover .caption {
  opacity: 1;
  transform: translateY(0);
}
.carousel-item .caption .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}
.carousel-item .caption .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

/* =============================================================
   FEATURES GRID
   ============================================================= */
.grid-section {
  padding: 120px 48px;
  background: var(--cream);
  position: relative;
}
.grid-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.grid-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  position: relative;
  z-index: 1;
}
.grid-item {
  background: var(--cream);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.45s ease;
  min-height: 260px;
}
.grid-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.grid-item:hover {
  background: var(--paper);
}
.grid-item:hover::before {
  transform: scaleX(1);
}

.grid-item .grid-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}
.grid-item .material-icons {
  font-size: 34px;
  color: var(--brand);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  margin-top: auto;
}
.grid-item:hover .material-icons {
  transform: translateY(-4px) rotate(-6deg);
  color: var(--ink);
}

.span-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 30px;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.span-title em {
  font-style: italic;
  color: var(--brand);
}
.grid-item small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =============================================================
   QUE HACEMOS — Split Territories (light)
   ============================================================= */
.QueHacemos-section {
  background: var(--cream);
  position: relative;
  padding: 0;
  overflow: hidden;
}
.QueHacemos-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}
.qh-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: flex-end;
  padding: 110px 60px 60px;
  max-width: 1500px;
  margin: 0 auto;
}
.qh-header .sh-eyebrow {
  margin-bottom: 16px;
}
.qh-header h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.qh-header h2 em {
  font-style: italic;
  color: var(--brand);
}
.qh-legend {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.9;
  min-width: 280px;
}
.qh-legend div {
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.qh-legend div:last-child {
  border-bottom: 0;
}
.qh-legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.qh-legend .sw.field {
  background: #2f8a5e;
}
.qh-legend .sw.tech {
  background: #3d5fbf;
}
.qh-legend .sw.trade {
  background: #c66a22;
}

.qh-columns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  min-height: 640px;
}
.qh-col {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--cream);
  transition: flex 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  min-height: 640px;
}
.qh-col .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  transition:
    transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.8s;
  filter: grayscale(15%);
}
.qh-col:hover .bg {
  transform: scale(1.06);
  opacity: 0.7;
}
.qh-col .ov {
  position: absolute;
  inset: 0;
  transition: background 0.6s;
}
.qh-col[data-div="field"] {
  --c: #2f8a5e;
}
.qh-col[data-div="tech"] {
  --c: #3d5fbf;
}
.qh-col[data-div="trade"] {
  --c: #c66a22;
}

.qh-col[data-div="field"] .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.55) 0%,
    rgba(226, 240, 230, 0.9) 80%
  );
}
.qh-col[data-div="field"]:hover .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.25) 0%,
    rgba(206, 234, 216, 0.95) 80%
  );
}
.qh-col[data-div="tech"] .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.55) 0%,
    rgba(225, 230, 243, 0.9) 80%
  );
}
.qh-col[data-div="tech"]:hover .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.25) 0%,
    rgba(206, 218, 242, 0.95) 80%
  );
}
.qh-col[data-div="trade"] .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.55) 0%,
    rgba(246, 228, 212, 0.9) 80%
  );
}
.qh-col[data-div="trade"]:hover .ov {
  background: linear-gradient(
    180deg,
    rgba(246, 243, 236, 0.25) 0%,
    rgba(248, 214, 186, 0.95) 80%
  );
}

.qh-num {
  position: absolute;
  top: 32px;
  left: 44px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.qh-div {
  position: absolute;
  top: 32px;
  right: 44px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.qh-div .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.qh-content {
  position: relative;
  z-index: 2;
}
.qh-id {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}
.qh-id em {
  font-style: italic;
  color: var(--c);
}
.qh-tags {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 16px;
}
.qh-desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.75);
  max-width: 34ch;
  margin-bottom: 22px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.5s,
    margin-bottom 0.6s;
}
.qh-col:hover .qh-desc {
  max-height: 160px;
  opacity: 1;
}
.qh-arrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
}
.qh-arrow .arr {
  transition: transform 0.4s;
  display: inline-block;
}
.qh-col:hover .qh-arrow .arr {
  transform: translateX(8px);
}
.qh-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--c);
  width: 40px;
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.qh-col:hover .qh-bar {
  width: 100%;
}

.qh-foot {
  position: relative;
  z-index: 1;
  padding: 22px 60px 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 1500px;
  margin: 0 auto;
}

/* =============================================================
   MARCAS — infinite marquee in two directions
   ============================================================= */
.marcas-section {
  padding: 110px 0;
  background: #0e0e0e;
  color: #f5f2ea;
  overflow: hidden;
  position: relative;
}
.marcas-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(240, 216, 168, 0.08),
      transparent 50%
    ),
    radial-gradient(circle at 80% 70%, rgba(45, 95, 191, 0.08), transparent 50%);
}
.marcas-section .sh {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.marcas-section .sh-title {
  color: #f5f2ea;
}
.marcas-section .sh-title em {
  color: #f0d8a8;
}
.marcas-section .sh-eyebrow {
  color: rgba(245, 242, 234, 0.6);
}
.marcas-section .sh-sub {
  color: rgba(245, 242, 234, 0.55);
  max-width: 540px;
  margin: 14px auto 0;
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  margin: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
}
.marquee-track.lr {
  animation: marqueeLeft 48s linear infinite;
}
.marquee-track.rl {
  animation: marqueeRight 58s linear infinite;
}
@keyframes marqueeLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes marqueeRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.brand-tile {
  width: 240px;
  height: 140px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  transition:
    background 0.4s,
    border-color 0.4s,
    transform 0.4s;
  position: relative;
  overflow: hidden;
}
.brand-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  background: #f0d8a8;
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.brand-tile:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-4px);
}
.brand-tile:hover::before {
  width: 100%;
}
.brand-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.78);
  transition:
    filter 0.4s,
    transform 0.4s;
}
.brand-tile:hover img {
  filter: none;
  transform: scale(1.04);
}

.marcas-footer {
  margin-top: 48px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 242, 234, 0.5);
  position: relative;
  z-index: 1;
}
.marcas-footer span {
  color: #f0d8a8;
}

/* =============================================================
   CLOSING HERO-2
   ============================================================= */
.img-section-2 {
  width: 100%;
  min-height: 560px;
  background-image: url("../media/Fondo/CrecemosJuntos.webp");
  background-size: cover;
  background-position: center 35%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}
.img-section-2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.35) 0%,
    rgba(10, 10, 10, 0.7) 100%
  );
}
.img-overlay-2 {
  position: relative;
  max-width: 700px;
  text-align: center;
  padding: 0 40px;
}
.img-overlay-2 .eye {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}
.img-overlay-2 p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.img-overlay-2 p em {
  font-style: italic;
  color: #f0d8a8;
}
.img-overlay-2 strong {
  display: block;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #f0d8a8;
}

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  background: #0a0a0a;
  color: #e8e4d8;
  padding: 80px 60px 32px;
}
.footer-container {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 48px;
  max-width: 1300px;
  margin: 0 auto 48px;
}
.footer-logo img {
  height: 65px;
  width: auto;
  margin-bottom: 20px;
}
.footer-logo p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 228, 216, 0.6);
  max-width: 26ch;
}
.footer-heading {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(232, 228, 216, 0.45);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  font-size: 15px;
  color: #e8e4d8;
  transition:
    color 0.3s,
    padding-left 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-links a::before {
  content: "→";
  opacity: 0;
  margin-right: -8px;
  transition:
    opacity 0.3s,
    margin-right 0.3s;
}
.footer-links a:hover {
  color: #f0d8a8;
}
.footer-links a:hover::before {
  opacity: 1;
  margin-right: 0;
}

.footer-contact p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 228, 216, 0.6);
  margin-bottom: 20px;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #f0d8a8;
  color: #0a0a0a;
  border-radius: 60px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background 0.3s,
    transform 0.3s,
    gap 0.3s;
}
.contact-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  gap: 14px;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  border-top: 1px solid rgba(232, 228, 216, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(232, 228, 216, 0.5);
}

/* =============================================================
   RESPONSIVE
   Breakpoints:
     - 1024px (tablet)
     - 768px  (mobile)
   ============================================================= */

/* Oculta por defecto los dos íconos del label (se muestran solo en mobile) */
.icons #menu-icon,
.icons #close-icon {
  display: none;
}

/* -------------------------------------------------------------
   TABLET — hasta 1024px
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .header {
    padding: 16px 32px;
  }
  .header.scrolled {
    padding: 12px 32px;
  }

  /* Hero */
  .hero-inner {
    padding: 0 40px;
  }
  .hero-meta {
    left: 40px;
    gap: 32px;
  }
  .hero-scroll {
    right: 40px;
  }

  /* Quiénes somos */
  .QuienesSomos-content {
    padding: 0 32px;
  }
  .QuienesSomos-envolve {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .QuienesSomos-collage {
    max-width: 640px;
    margin: 0 auto;
  }
  .QuienesSomos-text {
    border-left: 0;
    padding-left: 0;
    max-width: 640px;
    margin: 0 auto;
  }

  /* Features grid */
  .grid-section {
    padding: 100px 32px;
  }
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Qué hacemos */
  .qh-header {
    grid-template-columns: 1fr;
    padding: 90px 32px 40px;
    gap: 28px;
  }
  .qh-columns {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .qh-col {
    min-height: 420px;
    padding: 48px 32px;
  }
  /* En tablet/mobile mostramos la descripción siempre (el hover no se aplica) */
  .qh-desc {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 22px;
  }
  .qh-foot {
    padding: 20px 32px;
  }

  /* Marcas */
  .brand-tile {
    width: 200px;
    height: 120px;
    padding: 24px;
  }

  /* Stereo — agrandar el producto para que se vea en tablet */
  .stereo-container {
    transform: scale(1.6);
  }

  /* Footer */
  .site-footer {
    padding: 70px 32px 28px;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* -------------------------------------------------------------
   MOBILE — hasta 768px
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  /* HEADER + MENU HAMBURGUESA */
  .hero-eyebrow {
    font-size: 0.3rem;
  }
  .header {
    padding: 14px 20px;
  }
  .header.scrolled {
    padding: 10px 20px;
  }

  /* En mobile el header tiene fondo por defecto para que el menú lo tape bien */
  .header::before {
    background: rgba(14, 14, 14, 0.85);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
  }

  .logo img {
    height: 48px;
  }

  /* Mostrar el ícono hamburguesa */
  .icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 30px;
    position: relative;
  }
  /* Por defecto se muestra el menú (hamburguesa) */
  .icons #menu-icon {
    display: inline-block;
  }
  .icons #close-icon {
    display: none;
  }
  /* Cuando el checkbox está activo, invertimos: se muestra la X */
  #check:checked ~ .icons #menu-icon {
    display: none;
  }
  #check:checked ~ .icons #close-icon {
    display: inline-block;
  }

  /* Navbar en mobile: dropdown desde arriba */
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, 0.97);
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
      padding 0.4s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  #check:checked ~ .navbar {
    max-height: 500px;
    padding: 16px 24px 24px;
  }
  .navbar a {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .navbar a:last-child {
    border-bottom: 0;
  }
  /* Sacamos el subrayado animado que queda raro en el dropdown */
  .navbar a:not(.nav-flag)::after {
    display: none;
  }

  /* HERO */
  .solo-mobile {
    display: block;
  }
  .solo-desktop {
    display: none;
  }

  .hero p.hero-lede.solo-mobile {
    animation: fadeUp 1s ease 0.4s both;
  }
  .hero p.hero-lede.solo-desktop {
    animation: none;
  }

  .hero-inner {
    padding: 0 24px;
  }
  .hero h1 {
    font-size: clamp(40px, 11vw, 64px);
  }
  .hero-eyebrow {
    font-size: 12px;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
  }
  .hero p.hero-lede {
    font-size: 15px;
    margin-bottom: 32px;
  }
  .hero-ctas {
    gap: 14px;
  }
  .btn-primary,
  .btn-ghost {
    padding: 14px 20px;
    font-size: 12px;
  }
  .btn-primary {
    padding-left: 22px;
  }

  .hero-meta {
    bottom: 24px;
    left: 24px;
    right: 24px;
    gap: 18px;
    font-size: 10px;
  }
  .hero-meta .divider {
    height: 22px;
  }
  .hero-scroll {
    display: none;
  }

  /* QUIENES SOMOS */
  .solo-desktop {
    display: none;
  }
  .QuienesSomos-section {
    padding: 80px 0 60px;
  }
  .QuienesSomos-content {
    padding: 0 24px;
  }
  .QuienesSomos-collage {
    grid-auto-rows: 90px;
    gap: 8px;
  }
  .QuienesSomos-text h3 {
    font-size: 16px;
    margin-bottom: 24px;
  }
  .QuienesSomos-text p {
    font-size: 15px;
  }
  .qs-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
  }
  .qs-stat .num {
    font-size: 28px;
  }
  .qs-stat .lbl {
    font-size: 9px;
    letter-spacing: 0.15em;
  }

  /* STEREO */
  .stereo-section {
    height: 220vh;
  }
  .stereo-container {
    transform: scale(2.2);
  }
  .stereo-meta,
  .stereo-caption {
    left: 24px;
    right: 24px;
    bottom: 32px;
    max-width: none;
    text-align: left;
    font-size: 11px;
  }
  .stereo-caption {
    display: none;
  }

  /* NUESTRA EXPERIENCIA (carrusel) */
  .NuestraExperiencia-seccion {
    padding: 80px 0 70px;
  }
  .sh {
    margin-bottom: 40px;
  }
  .sh-sub {
    padding: 0 24px;
    font-size: 14px;
  }
  .carousel-item {
    width: 220px;
    height: 290px;
  }
  /* FEATURES GRID */
  .grid-section {
    padding: 70px 20px;
  }
  .grid-container {
    grid-template-columns: 1fr;
  }
  .grid-item {
    padding: 36px 28px;
    min-height: 200px;
  }
  .span-title {
    font-size: 26px;
  }

  /* QUE HACEMOS */
  #queHacemosSpan {
    font-size: 0.6rem;
  }
  .qh-header {
    padding: 70px 24px 32px;
  }
  .qh-legend {
    text-align: left;
    min-width: 0;
    font-size: 10px;
  }
  .qh-legend div {
    justify-content: flex-start;
  }
  .qh-col {
    min-height: 360px;
    padding: 40px 24px;
  }
  .qh-num,
  .qh-div {
    top: 24px;
    font-size: 10px;
  }
  .qh-num {
    left: 24px;
  }
  .qh-div {
    right: 24px;
  }
  .qh-id {
    font-size: clamp(40px, 10vw, 56px);
  }
  .qh-foot {
    padding: 20px 24px;
    flex-direction: column;
    gap: 6px;
  }

  /* MARCAS */
  .marcas-section {
    padding: 70px 0;
  }
  .brand-tile {
    width: 160px;
    height: 100px;
    padding: 18px;
  }

  /* CLOSING BANNER */
  .img-section-2 {
    min-height: 420px;
  }
  .img-overlay-2 {
    padding: 0 24px;
  }
  .img-overlay-2 p {
    font-size: clamp(22px, 6vw, 32px);
  }

  /* FOOTER */
  .site-footer {
    padding: 60px 24px 28px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-logo img {
    height: 52px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    font-size: 10px;
  }
}

/* -------------------------------------------------------------
   MOBILE CHICO — hasta 420px (ajustes finos)
   ------------------------------------------------------------- */
@media (max-width: 420px) {
  .hero-meta {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .hero-meta .divider {
    display: none;
  }
  .qs-stats {
    grid-template-columns: 1fr;
  }
  .qs-stat {
    text-align: left;
  }
}

/* ==============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================== */

/* Base: todos los elementos reveal parten invisibles y desplazados */
[data-anim] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

/* Variantes direccionales */
[data-anim="fade"] {
  transform: translate3d(0, 0, 0);
}
[data-anim="up"] {
  transform: translate3d(0, 40px, 0);
}
[data-anim="down"] {
  transform: translate3d(0, -40px, 0);
}
[data-anim="left"] {
  transform: translate3d(-50px, 0, 0);
}
[data-anim="right"] {
  transform: translate3d(50px, 0, 0);
}
[data-anim="zoom"] {
  transform: scale(0.92);
}
[data-anim="zoom-up"] {
  transform: translate3d(0, 40px, 0) scale(0.94);
}
[data-anim="clip"] {
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 0, 0);
  transition:
    opacity 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
    clip-path 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Estado visible */
[data-anim].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0 0 0 0);
}

/* Delays escalonados (para grupos) */
[data-anim-delay="1"] {
  transition-delay: 0.08s;
}
[data-anim-delay="2"] {
  transition-delay: 0.16s;
}
[data-anim-delay="3"] {
  transition-delay: 0.24s;
}
[data-anim-delay="4"] {
  transition-delay: 0.32s;
}
[data-anim-delay="5"] {
  transition-delay: 0.4s;
}
[data-anim-delay="6"] {
  transition-delay: 0.48s;
}

/* Stagger automático para hijos de un contenedor */
[data-anim-group] > * {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
[data-anim-group].is-visible > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
[data-anim-group].is-visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
[data-anim-group].is-visible > *:nth-child(2) {
  transition-delay: 0.12s;
}
[data-anim-group].is-visible > *:nth-child(3) {
  transition-delay: 0.19s;
}
[data-anim-group].is-visible > *:nth-child(4) {
  transition-delay: 0.26s;
}
[data-anim-group].is-visible > *:nth-child(5) {
  transition-delay: 0.33s;
}
[data-anim-group].is-visible > *:nth-child(6) {
  transition-delay: 0.4s;
}
[data-anim-group].is-visible > *:nth-child(7) {
  transition-delay: 0.47s;
}
[data-anim-group].is-visible > *:nth-child(8) {
  transition-delay: 0.54s;
}

/* Reveal para grid-items existentes (ya tenían data-reveal en el HTML) */
.grid-item[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.grid-item[data-reveal].in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.grid-container:has(.grid-item[data-reveal].in) .grid-item:nth-child(1).in {
  transition-delay: 0s;
}
.grid-item[data-reveal]:nth-child(2).in {
  transition-delay: 0.08s;
}
.grid-item[data-reveal]:nth-child(3).in {
  transition-delay: 0.16s;
}
.grid-item[data-reveal]:nth-child(4).in {
  transition-delay: 0.24s;
}
.grid-item[data-reveal]:nth-child(5).in {
  transition-delay: 0.32s;
}
.grid-item[data-reveal]:nth-child(6).in {
  transition-delay: 0.4s;
}

/* Collage QuienesSomos: pequeño stagger por celda */
.QuienesSomos-collage[data-anim-group] > .qs-cell {
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(0.96);
  transition:
    opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.QuienesSomos-collage[data-anim-group].is-visible > .qs-cell {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* QueHacemos: columnas con entrada desde abajo + stagger */
.qh-columns[data-anim-group] > .qh-col {
  opacity: 0;
  transform: translate3d(0, 60px, 0);
  transition:
    opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.qh-columns[data-anim-group].is-visible > .qh-col {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ==============================================================
   PERFORMANCE HINTS
   ============================================================== */

/* content-visibility: el navegador no renderiza secciones fuera de viewport
   hasta que están cerca. Acelera mucho el primer paint y el scroll. */
.QuienesSomos-section,
.NuestraExperiencia-seccion,
.grid-section,
.QueHacemos-section,
.marcas-section,
.img-section-2,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

/* La sección stereo NO lleva content-visibility porque su sticky reveal
   necesita medir altura desde el JS. */

/* Containment: aísla repaints/relayouts dentro de cada componente */
.carousel-item,
.brand-tile,
.qh-col,
.grid-item,
.qs-cell {
  contain: layout paint;
}

/* Hardware-accelerate las animaciones que no paran (marquees, hero, scrollline) */
.marquee-track,
.hero-bg,
.hero-scroll .line {
  will-change: transform;
  transform: translateZ(0);
}

/* La imagen del carrusel y collage: evita layout shift, decode async */
.carousel-item img,
.qs-cell img,
.brand-tile img {
  content-visibility: auto;
}

/* reduce-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-anim],
  [data-anim-group] > *,
  .grid-item[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* probando boton traduccion */
/* Oculta el widget nativo de Google */
.goog-te-banner-frame,
.goog-te-gadget,
#google_translate_element {
  display: none !important;
}
body {
  top: 0 !important;
}
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

/* Botón de traducción custom */
#translate-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--btnTra);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--line-soft);
  z-index: 9999;
  transition: transform 0.15s ease;
}
#translate-btn:hover {
  transform: scale(1.06);
}
#translate-icon {
  font-size: 26px; /* Material Icons necesita un poco más que Boxicons para verse bien centrado */
  color: var(--white);
}
