* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "courier-new", sans-serif;
  font-weight: 400;
  font-style: normal;
  background: #fff;
  color: #231CC7;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading .header,
body.is-loading .gallery {
  opacity: 0;
}

/* Evita colores por defecto en botones */
button {
  font: inherit;
  color: #231CC7;
}

/* HEADER */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  z-index: 100; /* Siempre por encima de overlays */
  transition: opacity 0.3s ease;
}

.logo {
  font-size: 18px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.info-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.logo:hover,
.info-btn:hover {
  opacity: 0.6;
}

/* GALLERY */

.gallery {
  column-count: 2;
  column-gap: 24px;
  padding: 120px 32px 32px;
  transition: opacity 0.3s ease;
}

.column {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 24px;
  display: inline-block;
  width: 100%;
}

.column img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.32s ease, transform 0.32s ease, filter 0.32s ease;
  will-change: opacity, transform, filter;
}

.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  z-index: 200;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__mark {
  font-size: 24px;
  letter-spacing: 0.08em;
  animation: loaderPulse 0.95s ease-in-out infinite alternate;
}

@keyframes loaderPulse {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }

  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* INFO OVERLAY */

.info-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 90; /* Debajo del header, por encima del fullscreen */
  display: none;
}

.info-overlay.active {
  display: block;
}

.info-content {
  padding: 120px 32px 40px;
}

.info-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.info-text {
  max-width: 640px;
  flex: 1;
}

.info-text p {
  font-size: 16px;
  line-height: 1.2;
}

.info-review-panel {
  width: 296px;
  min-height: 296px;
  flex-shrink: 0;
}

.info-review-card {
  width: 100%;
  height: 100%;
  background: #231CC7;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.info-review-card.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.info-review-name,
.info-review-divider,
.info-review-quote {
  color: inherit;
  text-align: right;
  margin-left: auto;
}

.info-review-name {
  font-size: 16px;
  line-height: 1.08;
  max-width: none;
  white-space: normal;
}

.info-review-divider {
  font-size: 14px;
  line-height: 1;
}

.info-review-quote {
  font-size: 15px;
  line-height: 1.12;
  max-width: 100%;
}

/* FULLSCREEN IMAGE */

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80; /* Debajo del header para que siga visible */
  cursor: pointer;
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-frame {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: default;
}

.fullscreen-overlay img,
.fullscreen-video-stage {
  display: none;
  max-width: 90vw;
  max-height: calc(90vh - 52px);
}

.fullscreen-overlay img.active,
.fullscreen-video-stage.active {
  display: block;
}

.fullscreen-overlay img {
  max-width: 90vw;
  max-height: calc(90vh - 52px);
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.32s ease, transform 0.32s ease, filter 0.32s ease;
  will-change: opacity, transform, filter;
}

.fullscreen-video-stage {
  position: relative;
  display: none;
}

.fullscreen-video-stage.active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-video-stage video {
  display: block;
  max-width: 90vw;
  max-height: calc(90vh - 52px);
  object-fit: contain;
  cursor: pointer;
  background: #fff;
}

.fullscreen-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: #231CC7;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.fullscreen-video-play.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.fullscreen-video-play__icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.fullscreen-caption {
  min-height: 1em;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fullscreen-caption.has-text {
  opacity: 1;
}

.column img.image-switching,
.fullscreen-overlay img.image-switching {
  opacity: 0.94;
  transform: scale(0.9985);
  filter: saturate(0.985);
}

/* MOBILE */

@media (max-width: 768px) {
  :root {
    --fullscreen-mobile-max-width: calc(100vw - 12px);
    --fullscreen-mobile-max-height: calc(100dvh - 132px);
    --fullscreen-mobile-width: min(var(--fullscreen-mobile-max-width), calc(var(--fullscreen-mobile-max-height) * 9 / 16));
    --fullscreen-mobile-height: min(var(--fullscreen-mobile-max-height), calc(var(--fullscreen-mobile-max-width) * 16 / 9));
  }

  .header {
    padding: 20px;
  }

  .logo,
  .info-btn {
    font-size: 18px;
  }

  .gallery {
    column-count: 1;
    padding: 94px 10px 28px;
  }

  .column {
    margin-bottom: 20px;
  }

  .fullscreen-frame {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    justify-content: flex-start;
    gap: 8px;
    padding: 72px 0 14px;
    position: static;
  }

  .fullscreen-overlay img,
  .fullscreen-video-stage {
    width: var(--fullscreen-mobile-width);
    height: var(--fullscreen-mobile-height);
    max-width: var(--fullscreen-mobile-width);
    max-height: var(--fullscreen-mobile-height);
    aspect-ratio: 1080 / 1920;
  }

  .fullscreen-overlay img {
    width: var(--fullscreen-mobile-width);
    height: var(--fullscreen-mobile-height);
    max-width: var(--fullscreen-mobile-width);
    max-height: var(--fullscreen-mobile-height);
    object-fit: contain;
    background: #fff;
  }

  .fullscreen-video-stage {
    width: var(--fullscreen-mobile-width);
    height: var(--fullscreen-mobile-height);
  }

  .fullscreen-video-stage video {
    width: 100%;
    height: 100%;
    max-width: var(--fullscreen-mobile-width);
    max-height: var(--fullscreen-mobile-height);
    object-fit: contain;
  }

  .fullscreen-video-play {
    width: 64px;
    height: 64px;
  }

  .fullscreen-caption {
    position: static;
    width: 100%;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1.18;
  }

  .info-content {
    padding: 100px 20px 40px;
  }

  .info-layout {
    flex-direction: column;
    gap: 24px;
  }

  .info-review-panel {
    width: 100%;
    min-height: 0;
  }

  .info-review-card {
    padding: 18px;
  }

  .info-review-name,
  .info-review-divider,
  .info-review-quote {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }

  .info-review-name {
    font-size: 16px;
  }

  .info-review-quote {
    font-size: 14px;
  }
}
