/* ============================================================
   GALERIA.CSS — observatorio de producciones con IA
   Se carga DESPUÉS de studio.css. Todo prefijado .glr- para no
   pelear con la cascada base. Hereda las custom properties de
   studio.css (--accent, --gold, --text, --space-*, --fs-*).
   ============================================================ */

:root {
  --glr-ease: cubic-bezier(.22, .8, .24, 1);
  --glr-panel: #0d0d0d;
}

/* ---------- HERO: muro de fotogramas en marquee ---------- */
.glr-hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.glr-hero__wall {
  position: absolute;
  inset: -6% -2%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  z-index: 0;
  opacity: .55;
  filter: saturate(.8) contrast(1.04);
  pointer-events: none;
}
.glr-wall__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
  animation: glr-drift 64s linear infinite;
}
.glr-wall__col:nth-child(2) { animation-duration: 86s; animation-direction: reverse; }
.glr-wall__col:nth-child(3) { animation-duration: 74s; }
.glr-wall__col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}
@keyframes glr-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}
.glr-hero__grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.5) 32%, rgba(0,0,0,.78) 66%, #000 100%),
    radial-gradient(120% 70% at 12% 92%, rgba(232,115,58,.22) 0%, transparent 62%);
}
.glr-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 22vh;
  padding-bottom: var(--space-3xl);
}
.glr-hero__title {
  font-family: var(--font-heading, 'Oswald', sans-serif);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.2vw, 4.6rem);
  line-height: 1.03;
  color: var(--text);
  margin: 0 0 var(--space-lg);
  max-width: 20ch;
}
.glr-hero__title em {
  font-style: normal;
  color: var(--accent);
}
.glr-hero__sub {
  font-size: clamp(1rem, 1.5vw, var(--fs-lg));
  color: #d6cec4;
  max-width: 62ch;
  margin: 0 0 var(--space-xl);
  line-height: 1.6;
}
.glr-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-2xl);
  margin: 0 0 var(--space-xl);
  padding: 0;
  border-top: 1px solid rgba(196,168,130,.28);
  padding-top: var(--space-lg);
}
.glr-stats li { line-height: 1.2; }
.glr-stats b {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 700;
  color: var(--gold);
}
.glr-stats span {
  font-size: var(--fs-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- AVISO DE AUTORÍA ---------- */
.glr-notice {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}
.glr-notice p {
  margin: 0;
  font-size: var(--fs-sm);
  color: #a89f95;
  line-height: 1.7;
  max-width: 92ch;
}
.glr-notice strong { color: var(--text); font-weight: 600; }

/* ---------- FILTROS ---------- */
.glr-filters { margin-bottom: var(--space-2xl); }
.glr-filters__label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.glr-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.glr-chip {
  font-family: var(--font-cta, 'Montserrat', sans-serif);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #c9c1b7;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-full);
  padding: .48rem 1.05rem;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
  line-height: 1.2;
}
.glr-chip:hover { color: var(--text); border-color: var(--gold); }
.glr-chip[aria-pressed="true"] {
  color: #0a0a0a;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}
.glr-chip--sub { font-size: var(--fs-xs); padding: .34rem .8rem; }
.glr-chip__n { opacity: .55; margin-left: .35rem; font-variant-numeric: tabular-nums; }
.glr-count {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.glr-count b { color: var(--accent); font-weight: 600; }

/* ---------- REJILLA ---------- */
.glr-grid {
  columns: 4;
  column-gap: 16px;
}
@media (max-width: 1280px) { .glr-grid { columns: 3; } }
@media (max-width: 900px)  { .glr-grid { columns: 2; } }
@media (max-width: 560px)  { .glr-grid { columns: 1; } }

.glr-card {
  break-inside: avoid;
  margin: 0 0 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .25s var(--glr-ease), transform .25s var(--glr-ease);
}
.glr-card[hidden] { display: none; }
.glr-card:hover,
.glr-card:focus-within {
  border-color: rgba(196,168,130,.55);
  transform: translateY(-2px);
}
.glr-card__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  position: relative;
  line-height: 0;
}
.glr-card__media {
  position: relative;
  display: block;
  width: 100%;
  background: #0a0a0a;
}
.glr-card__media > img,
.glr-card__media > video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.glr-card__media > video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s var(--glr-ease);
}
.glr-card__media > video.is-playing { opacity: 1; }

.glr-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(245,240,235,.32);
  display: grid;
  place-items: center;
  backdrop-filter: blur(3px);
  transition: background-color .2s, border-color .2s;
}
.glr-card__play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid var(--text);
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
  margin-left: 3px;
}
.glr-card__open:hover .glr-card__play { background: var(--accent); border-color: var(--accent); }

.glr-card__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: var(--font-cta);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--gold);
  padding: .22rem .5rem;
  border-radius: 2px;
}
.glr-card__badge--foto { background: #cfcfcf; }

.glr-card__meta {
  padding: .8rem .9rem .9rem;
  line-height: 1.4;
}
.glr-card__title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 .4rem;
  line-height: 1.28;
}
.glr-card__credit {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: 0;
}
.glr-card__credit b { color: #b9b0a6; font-weight: 600; }
.glr-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .55rem;
}
.glr-tag {
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8e8e8e;
  border: 1px solid #232323;
  border-radius: 2px;
  padding: .16rem .4rem;
}
.glr-tag--real { color: var(--accent); border-color: rgba(232,115,58,.4); }

.glr-empty {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-3xl) 0;
}

/* ---------- CLAVES DE LECTURA ---------- */
.glr-keys { background: var(--bg-elevated); }
.glr-keys__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: var(--space-xl);
}
.glr-key {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-lg);
}
.glr-key h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 var(--space-sm);
  color: var(--text);
}
.glr-key p { color: #a89f95; font-size: var(--fs-sm); line-height: 1.7; margin: 0 0 var(--space-sm); }
.glr-key a {
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(196,168,130,.4);
  text-decoration: none;
}
.glr-key a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- CASOS DE MARCA ---------- */
.glr-cases__list { list-style: none; margin: 0; padding: 0; }
.glr-case {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: var(--space-lg);
  align-items: baseline;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}
.glr-case__sector {
  font-size: var(--fs-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.glr-case__title { color: var(--text); margin: 0 0 .3rem; font-size: var(--fs-md); line-height: 1.4; }
.glr-case__who { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.glr-case__src {
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8e8e8e;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid #2a2a2a;
}
.glr-case__src:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .glr-case { grid-template-columns: 1fr; gap: var(--space-xs); }
}

/* ---------- FICHA AMPLIADA ---------- */
.glr-lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.94);
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 34px);
}
.glr-lb[hidden] { display: none; }
.glr-lb__box {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(16px, 2.4vw, 34px);
  width: min(1320px, 100%);
  max-height: 100%;
  align-items: center;
}
.glr-lb__stage {
  background: #000;
  border: 1px solid #1c1c1c;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  max-height: 86svh;
}
.glr-lb__stage video,
.glr-lb__stage img {
  max-width: 100%;
  max-height: 86svh;
  display: block;
  object-fit: contain;
}
.glr-lb__stage iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 86svh;
  border: 0;
  display: block;
}
.glr-lb__stage--vertical iframe { aspect-ratio: 9 / 16; }

.glr-lb__panel {
  color: var(--text);
  max-height: 86svh;
  overflow-y: auto;
  padding-right: 4px;
}
.glr-lb__cat {
  font-size: var(--fs-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-md);
}
.glr-lb__title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 var(--space-lg);
  text-transform: none;
}
.glr-lb__read {
  color: #cbc3b9;
  line-height: 1.75;
  margin: 0 0 var(--space-xl);
  font-size: var(--fs-base);
}
.glr-lb__dl {
  margin: 0 0 var(--space-xl);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem var(--space-lg);
  font-size: var(--fs-sm);
}
.glr-lb__dl dt {
  color: var(--text-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  padding-top: .18rem;
}
.glr-lb__dl dd { margin: 0; color: #d6cec4; }
.glr-lb__note {
  font-size: var(--fs-xs);
  color: #8e8e8e;
  line-height: 1.65;
  border-left: 2px solid #2a2a2a;
  padding-left: var(--space-md);
  margin: 0 0 var(--space-xl);
}
.glr-lb__orig {
  display: inline-block;
  font-family: var(--font-cta);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(232,115,58,.5);
  border-radius: var(--radius-full);
  padding: .55rem 1.15rem;
}
.glr-lb__orig:hover { background: var(--accent); color: #0a0a0a; }

.glr-lb__close,
.glr-lb__nav {
  position: absolute;
  background: rgba(0,0,0,.55);
  border: 1px solid #2f2f2f;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: background-color .2s, border-color .2s;
}
.glr-lb__close:hover,
.glr-lb__nav:hover { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.glr-lb__close { top: 14px; right: 16px; }
.glr-lb__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.glr-lb__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

@media (max-width: 960px) {
  .glr-lb { place-items: start center; overflow-y: auto; }
  .glr-lb__box { grid-template-columns: 1fr; align-items: start; padding-top: 52px; }
  .glr-lb__stage { max-height: 58svh; }
  .glr-lb__stage video, .glr-lb__stage img { max-height: 58svh; }
  .glr-lb__panel { max-height: none; overflow: visible; }
  .glr-lb__nav { top: auto; bottom: 12px; transform: none; }
  .glr-lb__nav--prev { left: 16px; }
  .glr-lb__nav--next { right: 16px; }
}

body.glr-lb-open { overflow: hidden; }

/* ---------- CIERRE ---------- */
.glr-close-cta {
  background:
    linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  border-top: 1px solid var(--border);
}
.glr-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
  list-style: none;
  padding: 0;
}
.glr-step__n {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(196,168,130,.32);
  display: block;
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.glr-step h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 var(--space-sm);
  color: var(--text);
}
.glr-step p { color: #a89f95; font-size: var(--fs-sm); line-height: 1.7; margin: 0; }

/* ---------- ACCESIBILIDAD Y MOVIMIENTO ---------- */
@media (prefers-reduced-motion: reduce) {
  .glr-wall__col { animation: none; }
  .glr-card { transition: none; }
  .glr-card:hover { transform: none; }
  .glr-card__media > video { transition: none; }
}
.glr-chip:focus-visible,
.glr-card__open:focus-visible,
.glr-lb__close:focus-visible,
.glr-lb__nav:focus-visible,
.glr-lb__orig:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- PIEZAS DE CHROME PROPIAS ----------
   La base (studio.css) trae .section, .section-title, .btn y .container.
   Lo que falta para esta página se define aquí para no depender de otras hojas. */
.glr-slate {
  font-family: var(--font-cta, 'Montserrat', sans-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-lg);
}
.glr-slate::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
}
.glr-sub {
  color: #a89f95;
  font-size: var(--fs-md);
  line-height: 1.7;
  max-width: 74ch;
  margin: 0 0 var(--space-2xl);
}
.glr-faq { max-width: 82ch; }
.glr-faq__item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}
.glr-faq__q {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 var(--space-sm);
  line-height: 1.35;
}
.glr-faq__a {
  color: #a89f95;
  line-height: 1.75;
  margin: 0;
  font-size: var(--fs-sm);
}
.glr-faq__more { margin: var(--space-xl) 0 0; }
.glr-faq__more a {
  font-family: var(--font-cta);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(232,115,58,.4);
}
.glr-faq__more a:hover { border-color: var(--accent); }
.glr-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.glr-more {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2xl);
}
