/* ============================================================
   alek digital — Galería (portafolio fotográfico)
   Editorial, full-dark gallery. Built on the portfolio system:
   nav, footer, buttons and tokens are inherited.
   ============================================================ */

@import url('portfolio.css');

/* The whole gallery lives on near-black so the photography leads. */
body.galpage { background: var(--ink-900); color: rgba(245,242,236,0.7); }

/* ------------------------------------------------------------
   HERO — full-bleed photo, centered title
   ------------------------------------------------------------ */
.galhero {
  position: relative; min-height: 88vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(60px + 5rem) 2rem 5rem;
  background: var(--ink-950); overflow: hidden;
  border-bottom: 2px solid var(--yellow-400);
}
.galhero__media { position: absolute; inset: 0; width: 100%; height: 100%; }
.galhero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.72) 70%, rgba(0,0,0,0.92) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 40%, rgba(0,0,0,0.55) 100%);
}
.galhero__scrim::after {
  content: ''; position: absolute; inset: 0;
  background-image: var(--paper-grain); opacity: 0.05; mix-blend-mode: screen;
}
.galhero__content { position: relative; z-index: 2; max-width: 880px; }
.galhero__crumb {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--yellow-400);
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1.6rem;
}
.galhero__crumb::before, .galhero__crumb::after { content: ''; width: 34px; height: 1px; background: rgba(255,255,0,0.5); }
.galhero__title {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(2.8rem, 8vw, 6.6rem); line-height: 0.92;
  letter-spacing: var(--tracking-tight); color: var(--ink-50);
  text-transform: uppercase; margin: 0;
}
.galhero__title em { font-style: normal; color: var(--yellow-400); }
.galhero__sub {
  font-family: var(--font-mono); font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,242,236,0.65); margin-top: 1.4rem;
}
.galhero__cats {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 2.2rem;
}
.galhero__cats a {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-50);
  padding: 0.5rem 1rem; border: 1px solid rgba(245,242,236,0.28);
  border-radius: var(--radius-pill); transition: all var(--dur-base) var(--ease-out);
}
.galhero__cats a:hover { background: var(--yellow-400); color: var(--ink-950); border-color: var(--yellow-400); }
.galhero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245,242,236,0.5); display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.galhero__scroll i { width: 16px; height: 16px; animation: galbob 1.8s var(--ease-out) infinite; }
@keyframes galbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ------------------------------------------------------------
   GALLERY SECTIONS — alternating editorial blocks
   ------------------------------------------------------------ */
.gallery { background: var(--ink-900); padding-top: 5.5rem; padding-bottom: 1rem; }
.galsec {
  display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 3.4rem;
  align-items: center; padding: 4.5rem 0; border-top: 1px solid rgba(245,242,236,0.1);
}
.galsec:first-child { border-top: none; padding-top: 1rem; }
/* even rows: text on the right, grid on the left */
.galsec:nth-child(even) { grid-template-columns: 1.18fr 0.82fr; }
.galsec:nth-child(even) .galsec__text { order: 2; }
.galsec:nth-child(even) .galgrid { order: 1; }

.galsec__index {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  color: rgba(245,242,236,0.4); margin-bottom: 1.1rem;
}
.galsec__index b { color: var(--yellow-400); font-weight: 500; }
.galsec__kicker {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta-400);
  margin-bottom: 0.8rem;
}
.galsec__title {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--ink-50); margin: 0;
}
.galsec__title em { font-style: normal; color: var(--yellow-400); }
.galsec__desc {
  font-size: 1rem; line-height: var(--leading-relaxed);
  color: rgba(245,242,236,0.62); margin-top: 1.2rem; max-width: 42ch;
}
.galsec__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.4rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(245,242,236,0.45);
}
.galsec__meta b { color: var(--yellow-400); font-weight: 500; }
.galsec__link {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 1.9rem;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-50);
  border-bottom: 2px solid var(--yellow-400); padding-bottom: 0.3rem;
  transition: gap var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.galsec__link:hover { gap: 0.95rem; color: var(--yellow-400); }
.galsec__link i { width: 15px; height: 15px; }

/* Photo grid ------------------------------------------------- */
.galgrid {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: 14px;
}
.galgrid image-slot {
  width: 100%; height: 100%; display: block; background: var(--ink-950);
  border: 2px solid var(--ink-950); box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.galgrid image-slot:hover {
  transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--yellow-400);
  border-color: var(--yellow-400); z-index: 2; position: relative;
}
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* Layout variants for visual rhythm */
.galgrid--a > :nth-child(1) { grid-row: span 2; }            /* tall left */
.galgrid--b > :nth-child(3) { grid-row: span 2; }            /* tall right */
.galgrid--c > :nth-child(2) { grid-row: span 2; }            /* tall center-right */
.galgrid--c > :nth-child(4) { grid-column: span 2; }         /* wide bottom */

/* ------------------------------------------------------------
   CLOSING CTA — dark variant
   ------------------------------------------------------------ */
.galcta {
  background: var(--ink-900); padding: 1rem 2.5rem 6rem;
}
.galcta__inner {
  max-width: var(--container-lg); margin: 0 auto;
  background: var(--yellow-400); border: 2px solid var(--ink-950);
  border-radius: var(--radius-lg); box-shadow: var(--sticker-ink);
  padding: 3.4rem 2.5rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  position: relative; overflow: hidden;
}
.galcta__inner::after {
  content: ''; position: absolute; inset: 0;
  background-image: var(--paper-grain); opacity: 0.06; mix-blend-mode: multiply; pointer-events: none;
}
.galcta__kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--terracotta-600); position: relative;
}
.galcta__title {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -0.02em;
  line-height: 1.05; color: var(--ink-950); position: relative; max-width: 22ch;
}
.galcta__sub { font-size: 0.98rem; color: var(--ink-800); max-width: 480px; line-height: var(--leading-normal); position: relative; }
.galcta .hero__cta { justify-content: center; position: relative; }

/* ------------------------------------------------------------
   RECENT WORK — horizontal reel / carousel
   ------------------------------------------------------------ */
.galreel {
  background: var(--ink-950); padding: 4.6rem 0 5rem;
  border-top: 1px solid rgba(245,242,236,0.1);
}
.galreel__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.4rem;
  margin-bottom: 2.1rem;
  padding-inline: max(2.5rem, calc((100vw - var(--container-lg)) / 2));
}
.galreel__kicker {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta-400);
  margin-bottom: 0.7rem;
}
.galreel__title {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--ink-50); margin: 0;
}
.galreel__title em { font-style: normal; color: var(--yellow-400); }
.galreel__nav { display: flex; gap: 0.6rem; flex-shrink: 0; }
.galreel__arrow {
  width: 48px; height: 48px; border: 2px solid var(--yellow-400); background: transparent;
  color: var(--yellow-400); border-radius: var(--radius-md); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.galreel__arrow:hover { background: var(--yellow-400); color: var(--ink-950); }
.galreel__arrow:active { transform: translate(2px,2px); }
.galreel__arrow i { width: 20px; height: 20px; }

.galreel__track {
  display: flex; gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-inline: max(2.5rem, calc((100vw - var(--container-lg)) / 2));
  padding-bottom: 0.6rem;
  scrollbar-width: none;
}
.galreel__track::-webkit-scrollbar { display: none; }

.rcard {
  flex: 0 0 clamp(255px, 30vw, 330px); scroll-snap-align: start;
  position: relative; border: 2px solid var(--ink-950); background: var(--ink-900);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.6);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.rcard:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--yellow-400); border-color: var(--yellow-400); }
.rcard image-slot { display: block; width: 100%; aspect-ratio: 4/5; background: var(--ink-950); }
.rcard__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: 1.1rem 1.1rem 0.95rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
}
.rcard__tag {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--yellow-400); margin-bottom: 0.3rem;
}
.rcard__name {
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.12rem;
  color: var(--ink-50); line-height: 1.1;
}
.rcard__date { font-family: var(--font-mono); font-size: 0.64rem; color: rgba(245,242,236,0.55); margin-top: 0.2rem; }

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .galsec,
  .galsec:nth-child(even) { grid-template-columns: 1fr; gap: 2rem; }
  .galsec:nth-child(even) .galsec__text,
  .galsec:nth-child(even) .galgrid { order: 0; }
  .galgrid { grid-auto-rows: 150px; }
}
@media (max-width: 560px) {
  .galhero { min-height: 78vh; padding: calc(60px + 3rem) 1.2rem 4rem; }
  .gallery { padding-left: 1.2rem; padding-right: 1.2rem; }
  .galsec { padding: 3rem 0; }
  .galgrid { grid-auto-rows: 130px; gap: 10px; }
  .galcta { padding: 1rem 1.2rem 4rem; }
  .galcta__inner { padding: 2.4rem 1.4rem; }
  .galreel__head { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .rcard { flex-basis: 76vw; }
}
