:root {
  --bg: #070a10;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.1);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #69f0d2;
  --accent-2: #7aa7ff;
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --header-h: 64px;
  --max: 1100px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  padding-top: var(--header-h);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 15% 10%, rgba(122, 167, 255, 0.18), transparent 55%),
    radial-gradient(900px 600px at 80% 25%, rgba(105, 240, 210, 0.14), transparent 60%),
    radial-gradient(850px 650px at 40% 95%, rgba(240, 105, 195, 0.12), transparent 55%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='140'%20height='140'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.9'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='140'%20height='140'%20filter='url(%23n)'%20opacity='.35'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 16, 0.55);
  border-bottom: 1px solid var(--line);
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
}

.header,
.main,
.footer {
  padding-inline: 18px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.nav__toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav__toggle:focus-visible {
  outline: 2px solid rgba(105, 240, 210, 0.6);
  outline-offset: 2px;
}

.nav__icon {
  width: 18px;
  height: 2px;
  background: currentColor;
  display: block;
  margin-inline: auto;
  border-radius: 2px;
  position: relative;
}

.nav__icon::before,
.nav__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav__icon::before {
  top: -6px;
}

.nav__icon::after {
  top: 6px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav__link:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav__link.is-active {
  color: var(--text);
  border-color: rgba(105, 240, 210, 0.35);
  background: rgba(105, 240, 210, 0.08);
}

@media (max-width: 880px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #11141b;
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 16px;
    width: 220px;
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    pointer-events: none;
    transition:
      opacity 0.2s,
      transform 0.2s;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  }

  .nav.is-open .nav__menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav__link {
    justify-content: flex-start;
  }
}

.main {
  max-width: var(--max);
  margin-inline: auto;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.hero {
  position: relative;
  min-height: 80vh;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  padding-block: 40px;
}

/* Animación Canvas */
.hero__canvas {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, #fff, #b4c6ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Efecto Typing Cursor */
.hero__title::after {
  content: "|";
  display: inline-block;
  margin-left: 4px;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 99px;
  font-weight: 600;
  background: var(--accent);
  color: #000;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(105, 240, 210, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--text);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.hero__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-2);
}

.kpi__label {
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-top: 20px;
  }

  .hero__content {
    align-items: center;
  }

  .hero__cta {
    justify-content: center;
  }
}

/* Títulos de Página Premium */
.page-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0;
  text-align: center;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
  margin-bottom: 10px;
  animation: title-fade-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 20px var(--accent);
  animation: title-line-grow 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
  width: 0;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: var(--accent);
  filter: blur(100px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

@keyframes title-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes title-line-grow {
  to {
    width: 80px;
  }
}

/* Intro Bubble */
.intro-bubble {
  max-width: 720px;
  margin: 0 auto 50px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  animation: bubble-float 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s backwards;
}

.intro-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 240, 210, 0.3), transparent);
}

.intro-bubble p {
  margin-bottom: 16px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #c0c4ce;
}

.intro-bubble p:last-child {
  margin-bottom: 0;
}

.intro-bubble strong {
  color: var(--text);
  font-weight: 600;
}

@keyframes bubble-float {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section--accent {
  background: linear-gradient(to bottom, rgba(105, 240, 210, 0.03), transparent);
  margin-inline: -18px;
  padding-inline: 18px;
  padding-block: 60px;
  border-radius: 32px;
  border-top: 1px solid var(--line);
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 20px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--panel-2);
}

.card__title {
  font-size: 1.25rem;
  margin: 0 0 12px;
  color: var(--text);
}

.card__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.logo-card {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  transition: 0.2s;
}

.logo-card:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Contacto Nuevo */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin-inline: auto;
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-card {
    padding: 24px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-card__icon {
    margin-bottom: 12px;
  }

  .contact-card__cta {
    justify-content: center;
  }
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(105, 240, 210, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px -10px rgba(105, 240, 210, 0.15);
  background: var(--panel-2);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card__icon {
  width: 56px;
  height: 56px;
  background: rgba(105, 240, 210, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: 0.3s;
}

.contact-card:hover .contact-card__icon {
  background: var(--accent);
  color: #000;
  transform: scale(1.1) rotate(-5deg);
}

.contact-card__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.contact-card__label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.contact-card__value {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 700;
  word-break: break-all;
}

.contact-card__cta {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
  transition: 0.2s;
}

.contact-card:hover .contact-card__cta {
  opacity: 1;
  transform: translateX(5px);
}

/* Footer Nuevo */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.4));
  padding-block: 60px 40px;
  margin-top: 40px;
}

.footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__copy {
  color: var(--text);
  font-size: 1rem;
}

.footer__tagline {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__actions {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .footer__actions {
    align-items: flex-end;
  }
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: 0.2s;
  position: relative;
}

.footer__links a:hover {
  color: var(--text);
}

.footer__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.footer__links a:hover::after {
  width: 100%;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials__link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  border: 1px solid var(--line);
}

.socials__link:hover {
  background: var(--panel-2);
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(105, 240, 210, 0.2);
}

.socials__link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.5); /* Iconos más visibles */
  transition: 0.3s;
}

.socials__link:hover img {
  filter: grayscale(0) brightness(1);
}

/* Entrada */
.entrada {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg); /* Base color fallback */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s;
  padding: 20px;
}

/* Background complejo para la entrada, igual que el body */
.entrada::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 700px at 15% 10%, rgba(122, 167, 255, 0.18), transparent 55%),
    radial-gradient(900px 600px at 80% 25%, rgba(105, 240, 210, 0.14), transparent 60%),
    radial-gradient(850px 650px at 40% 95%, rgba(240, 105, 195, 0.12), transparent 55%),
    var(--bg);
  animation: bg-pulse 8s ease-in-out infinite alternate;
}

@keyframes bg-pulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.entrada.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.entrada__panel {
  text-align: center;
  z-index: 2;
  transition: opacity 0.4s;
  animation: float-entry 6s ease-in-out infinite;
  width: 100%;
  max-width: 400px;
}

@keyframes float-entry {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.entrada__marca {
  font-size: clamp(2rem, 8vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 32px;
  background: linear-gradient(to right, #fff, #999);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  word-break: break-word;
}

.entrada__marca::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 40px;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent);
}

.entrada__btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 99px;
  cursor: pointer;
  transition: 0.3s;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.entrada__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(105, 240, 210, 0.1);
  box-shadow: 0 0 20px rgba(105, 240, 210, 0.2);
}

.shatter {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: none;
}

.tile {
  background: var(--bg); /* Base color fallback */
  will-change: transform, opacity;
  position: relative;
  overflow: hidden;
}

/* 
   Para que cada tile parezca parte del fondo original,
   le damos el mismo background con attachment fixed.
   Esto alinea el gradiente de cada tile con el viewport.
*/
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 700px at 15% 10%, rgba(122, 167, 255, 0.18), transparent 55%),
    radial-gradient(900px 600px at 80% 25%, rgba(105, 240, 210, 0.14), transparent 60%),
    radial-gradient(850px 650px at 40% 95%, rgba(240, 105, 195, 0.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

.shatter.is-active .tile {
  animation: tile-anim 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d);
}

@keyframes tile-anim {
  0% {
    transform: translate(0, 0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--r));
    opacity: 0;
  }
}

/* Títulos Badge */
.title-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 16px;
  perspective: 1000px; /* Para efecto 3D */
}

.title-badge {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.title-badge:hover {
  transform: translateY(-10px) scale(1.05) rotateX(5deg);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -10px rgba(105, 240, 210, 0.2);
  z-index: 10;
}

/* Galería de Trabajos */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.media {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.media:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(105, 240, 210, 0.15);
}

.media__inner {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.media__inner img,
.media__inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.media:hover .media__inner img,
.media:hover .media__inner video {
  transform: scale(1.08);
}

.media__meta {
  padding: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.media__meta::after {
  content: "→";
  font-family: monospace;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
  color: var(--accent);
}

.media:hover .media__meta::after {
  opacity: 1;
  transform: translateX(0);
}

/* Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid items (up to 10) */
.scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.35s; }
.scroll-reveal:nth-child(7) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(8) { transition-delay: 0.45s; }
.scroll-reveal:nth-child(9) { transition-delay: 0.5s; }
.scroll-reveal:nth-child(10) { transition-delay: 0.55s; }

/* Lightbox (Modal de ampliación) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000; /* Por encima de todo, incluso header y entrada */
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  border: 1px solid var(--line);
}

.lightbox.is-active .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}
