/* ============================================================
   NANA LÓPEZ STUDIO — rediseño editorial claro (inspirado en larajade.com)
   Blanco, serif alta, mayúsculas espaciadas, la foto manda.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-soft: #4a4a4a;
  --ink-mute: #8a8a8a;
  --hairline: #e7e4de;
  --serif: 'Playfair Display', 'Georgia', serif;
  --body: 'EB Garamond', 'Georgia', serif;
  --track: 0.22em;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: #eee9df; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  transition: opacity .7s ease, visibility .7s ease;
}
.preloader-name {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: .38em;
  padding-left: .38em; /* compensa el tracking para centrar de verdad */
  animation: pl-in 1s ease both;
}
.preloader-sub {
  font-size: 11px; letter-spacing: .5em; padding-left: .5em;
  color: var(--ink-mute);
  animation: pl-in 1s .15s ease both;
}
@keyframes pl-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Cabecera ---------- */
.masthead {
  position: relative;
  text-align: center;
  padding: clamp(44px, 7vh, 72px) 24px 8px;
}
.lang-toggle {
  position: absolute; top: 26px; right: 28px;
  font-size: 12px; letter-spacing: .14em;
  color: var(--ink-mute);
}
.lang-toggle i { font-style: normal; margin: 0 4px; color: var(--hairline); }
.lang-toggle span.is-on { color: var(--ink); }

.brand { display: inline-block; }
.brand-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5.4vw, 52px);
  letter-spacing: .34em;
  padding-left: .34em;
  line-height: 1.1;
}
.brand-sub {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: .34em;
  padding-left: .34em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* navegación por categorías, centrada, serif en mayúsculas finas */
.cat-nav, .page-nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  column-gap: clamp(18px, 2.6vw, 38px); row-gap: 6px;
}
.cat-nav { margin-top: clamp(28px, 4vh, 44px); }
.page-nav { margin-top: 10px; }
.cat-nav a, .page-nav a {
  font-size: 12.5px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.page-nav a { color: var(--ink-mute); font-size: 11.5px; }
.cat-nav a:hover, .page-nav a:hover { color: var(--ink); }
.cat-nav a.is-on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Muro de fotos ---------- */
.work {
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 70px) clamp(20px, 4.5vw, 64px) 30px;
}
.wall {
  display: flex;
  gap: clamp(22px, 3.2vw, 48px);
  align-items: flex-start;
  transition: opacity .28s ease;
}
.wall.is-swap { opacity: 0; }
.wall-col {
  flex: 1;
  display: flex; flex-direction: column;
  gap: clamp(38px, 5vh, 64px);
  min-width: 0;
}
.wall-item {
  display: block; width: 100%;
  text-align: center;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.wall-item.is-in { opacity: 1; transform: none; }
.wall-item img {
  width: 100%;
  object-fit: cover;
  background: #f4f2ee;
  transition: opacity .35s ease;
}
.wall-item:hover img { opacity: .88; }
.wall-item .cap {
  display: inline-block;
  margin-top: 12px;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
/* portadas del Overview: una por categoría, el nombre con más presencia */
.wall-item--cover .cap {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ink);
  margin-top: 16px;
}

/* ---------- Títulos de sección ---------- */
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 2.4vw, 24px);
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
  text-align: center;
}
.section-sub {
  margin: 14px auto 0;
  max-width: 560px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* ---------- Retoque antes / después ---------- */
.retouch {
  padding: clamp(70px, 11vh, 120px) 24px 0;
}
.rt-hero {
  max-width: 880px;
  margin: clamp(34px, 5vh, 54px) auto 0;
}
.rt-hero img {
  display: block;
  width: 100%;
  height: auto;
  /* reserva el espacio aunque la foto perezosa no haya cargado (evita brincos y pruebas rotas) */
  aspect-ratio: 1264 / 1650;
}
.ba-wrap { max-width: 880px; margin: clamp(34px, 5vh, 54px) auto 0; }
.ba {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  /* reserva el espacio aunque la foto perezosa no haya cargado (evita brincos y pruebas rotas) */
  aspect-ratio: 1280 / 1242;
}
.ba-img { width: 100%; display: block; }
.ba-before {
  position: absolute; inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
}
.ba-before .ba-img { max-width: none; height: 100%; object-fit: cover; object-position: left; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ba-handle-line { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.9); }
.ba-handle-knob {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 14px rgba(0,0,0,.18);
}
.ba-tag {
  position: absolute; bottom: 14px;
  font-size: 10px; letter-spacing: .3em;
  color: #fff;
  background: rgba(0,0,0,.45);
  padding: 5px 10px 5px 13px;
}
.ba-tag-before { left: 14px; }
.ba-tag-after { right: 14px; }
.ba-note {
  margin-top: 18px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 14.5px;
  font-style: italic;
}

/* ---------- Estudio / About ---------- */
.studio {
  padding: clamp(80px, 12vh, 130px) clamp(24px, 5vw, 64px) 0;
}
.studio-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.studio-photo img { width: 100%; }
.studio-photo figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.studio-text { text-align: center; }
.studio-text .section-title { margin-bottom: 26px; }
.studio-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.studio-text p:not(.studio-quote):not(.clients-label):not(.clients-list) {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 16px;
}
.clients-label {
  margin-top: 34px;
  font-size: 11px; letter-spacing: .3em; padding-left: .3em;
  text-transform: uppercase;
  color: var(--ink);
}
.clients-list {
  margin-top: 10px;
  font-size: 12px; letter-spacing: .18em;
  color: var(--ink-mute);
  line-height: 2.1;
}
.stats {
  list-style: none;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; justify-content: center;
  column-gap: 34px; row-gap: 10px;
}
.stats li { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.stats b { font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--ink); margin-right: 6px; letter-spacing: .04em; }

/* ---------- Contacto ---------- */
.contact {
  padding: clamp(80px, 12vh, 130px) 24px 0;
  text-align: center;
}
.contact-links {
  margin-top: clamp(28px, 4vh, 40px);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.contact-links a {
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: color .25s ease, border-color .25s ease;
}
.contact-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.contact-area {
  margin-top: 30px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-mute);
}

/* ---------- Pie ---------- */
.site-footer {
  margin-top: clamp(80px, 12vh, 130px);
  padding: 30px 24px 40px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.foot-dot { margin: 0 10px; }

/* ---------- Lightbox (claro, de galería) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-stage {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  display: flex; flex-direction: column; align-items: center;
}
.lb-stage img {
  max-width: 100%;
  max-height: calc(86vh - 50px);
  object-fit: contain;
  transition: opacity .25s ease;
}
.lb-stage img.is-fading { opacity: 0; }
.lb-stage figcaption {
  margin-top: 16px;
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-mute);
}
.lb-stage figcaption em { font-style: normal; margin-left: 14px; }
.lb-close, .lb-arrow {
  position: absolute; z-index: 2;
  color: var(--ink-soft);
  font-size: 20px;
  padding: 14px;
  transition: color .2s ease;
}
.lb-close:hover, .lb-arrow:hover { color: var(--ink); }
.lb-close { top: 18px; right: 22px; }
.lb-arrow { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-photo { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .lang-toggle { top: 16px; right: 16px; }
  .cat-nav a, .page-nav a { font-size: 11.5px; }
  /* celular: una sola columna y la foto ocupa casi toda la página */
  .work { padding-left: 16px; padding-right: 16px; }
  .wall-col { gap: 44px; }
  .wall-item .cap { margin-top: 10px; font-size: 10px; }
  .wall-item--cover .cap { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .wall-item { opacity: 1; transform: none; transition: none; }
  .preloader-name, .preloader-sub { animation: none; }
}
