/* ==========================================================================
   Portafolio — sitio público
   La foto es todo; la interfaz casi desaparece.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable-latin.1c4cd2c1df6e.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --measure: 40rem;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: 1.4s;
  --radius: 0px;
  --space-section: clamp(96px, 14vw, 200px);
}

/* Oscuro por defecto: las fotos lucen mejor sobre negro. */
:root,
:root[data-theme="dark"] {
  --bg: #000;
  --bg-elev: #0d0d0e;
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f5f5f7;
  --accent-fg: #000;
  --focus: #2997ff;
  --placeholder: #141416;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fbfbfd;
  --bg-elev: #fff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.12);
  --accent: #1d1d1f;
  --accent-fg: #fff;
  --focus: #0066cc;
  --placeholder: #ececef;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
button { font: inherit; color: inherit; }
main { outline: none; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.visually-hidden,
.hp {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px; background: var(--fg); color: var(--bg);
  transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.dot::before { content: "·"; margin: 0 0.5em; }
.dot:first-child::before { content: none; }
.eyebrow {
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin: 0 0 1rem;
}
.display { font-size: clamp(32px, 5vw, 56px); }
.display--lg { font-size: clamp(36px, 6vw, 72px); }
.display--xl { font-size: clamp(44px, 9vw, 112px); letter-spacing: -0.04em; }
.lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.4; letter-spacing: -0.01em; max-width: var(--measure); }
.empty { color: var(--muted); padding: 4rem var(--gutter); }

/* ---------- Botones y enlaces ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 28px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg);
  font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.button:hover { opacity: 0.85; }
.button:active { transform: scale(0.98); }
.button--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.link-arrow { text-decoration: none; font-size: 16px; color: var(--muted); transition: color 0.3s; white-space: nowrap; }
.link-arrow::after { content: " →"; transition: margin 0.3s var(--ease); }
.link-arrow:hover { color: var(--fg); }
.link-quiet { color: var(--muted); font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h); padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.5s var(--ease), transform 0.5s var(--ease);
}
.site-header--overlay {
  position: fixed; inset: 0 0 auto 0; color: #fff;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.site-header--overlay.is-scrolled {
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.site-header.is-hidden { transform: translateY(-100%); }
.brand { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.site-nav a { font-size: 14px; text-decoration: none; opacity: 0.8; transition: opacity 0.3s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"] { text-decoration: underline; }
.menu-toggle { display: none; }

.theme-toggle {
  width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; opacity: 0.8;
}
.theme-toggle span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.theme-toggle:hover { opacity: 1; }

@media (max-width: 799px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    border: 0; background: none; padding: 8px 0; cursor: pointer; z-index: 2; font-size: 15px;
  }
  .menu-toggle__icon, .menu-toggle__icon::before {
    display: block; width: 18px; height: 1.5px; background: currentColor;
    transition: transform 0.4s var(--ease);
  }
  .menu-toggle__icon { position: relative; transform: translateY(-3px); }
  .menu-toggle__icon::before { content: ""; position: absolute; top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(-6px) rotate(-90deg); }
  .site-nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px;
    padding: var(--gutter); background: var(--bg); color: var(--fg);
    opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
  }
  .site-nav a { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; opacity: 1; }
  .site-nav .theme-toggle { margin-top: 24px; }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .brand { position: relative; z-index: 2; }
  .hero__scroll { display: none; }
  .menu-open .site-header { color: var(--fg); }
  .menu-open { overflow: hidden; }
}

/* ---------- Imagen responsiva con placeholder ---------- */
.ph {
  position: relative; display: block; width: 100%;
  aspect-ratio: var(--ar, 3 / 2);
  background-color: var(--dc, var(--placeholder));
  background-image: var(--lqip, none);
  background-size: cover; background-position: center;
  overflow: hidden;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.ph img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.9s var(--ease);
}
.js .ph img:not(.is-loaded) { opacity: 0; }
.ph--fill { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.ph--cover { aspect-ratio: 4 / 5; }
.ph--cover img { object-fit: cover; }
.ph--contain { background: none; aspect-ratio: auto; }
.ph--contain img { object-fit: contain; max-height: calc(100svh - var(--header-h) - 48px); width: auto; margin: 0 auto; }
.ph--empty { background: linear-gradient(135deg, #1a1a1c, #0b0b0c); }
:root[data-theme="light"] .ph--empty { background: linear-gradient(135deg, #e8e8ec, #f5f5f7); }
.ph--portrait { aspect-ratio: 4 / 5; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 520px; overflow: hidden;
  background: #000; color: #fff;
}
.hero__slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 2.4s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide .ph img { transform: scale(1.06); transition: opacity 0.9s var(--ease), transform 9s linear; }
.hero__slide.is-active .ph img { transform: scale(1); }
.hero__slide--empty { background: radial-gradient(ellipse at 30% 20%, #2a2a2e, #000 70%); }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 45%);
}
.hero__text {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(56px, 10vh, 112px);
}
.hero__name { font-size: clamp(48px, 11vw, 148px); letter-spacing: -0.045em; line-height: 0.95; }
.hero__tagline { margin-top: 1rem; font-size: clamp(18px, 2.2vw, 26px); max-width: 32ch; opacity: 0.85; }
.hero__scroll {
  position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(56px, 10vh, 112px);
  width: 1px; height: 64px; background: rgba(255, 255, 255, 0.3); overflow: hidden;
}
.hero__scroll span {
  position: absolute; inset: 0; background: #fff; transform: translateY(-100%);
  animation: scrollcue 2.6s var(--ease) infinite;
}
@keyframes scrollcue { 60%, 100% { transform: translateY(100%); } }

/* ---------- Secciones ---------- */
.section { padding: var(--space-section) var(--gutter) 0; max-width: var(--max); margin: 0 auto; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.page-head { padding: calc(var(--header-h) + clamp(24px, 6vw, 96px)) var(--gutter) clamp(32px, 5vw, 72px); max-width: var(--max); margin: 0 auto; }
.page-head .lead { margin-top: 1.25rem; }
.statement { max-width: 1100px; }
.statement__text { font-size: clamp(26px, 4vw, 48px); line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; margin-bottom: 2rem; }
.cta { text-align: center; padding-bottom: var(--space-section); }
.cta .display { margin-bottom: 2rem; }

/* ---------- Series ---------- */
.series-grid {
  display: grid; gap: clamp(48px, 6vw, 96px) clamp(16px, 3vw, 40px);
  grid-template-columns: 1fr; padding: 0 var(--gutter) var(--space-section);
  max-width: var(--max); margin: 0 auto;
}
.section .series-grid { padding: 0; }
@media (min-width: 720px) { .series-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) {
  .series-grid--home > :nth-child(3n + 1) { grid-column: 1 / -1; }
  .series-grid--home > :nth-child(3n + 1) .ph--cover { aspect-ratio: 16 / 8; }
}
.series-card { display: block; text-decoration: none; }
.series-card__media { overflow: hidden; }
.series-card__media .ph img { transition: opacity 0.9s var(--ease), transform var(--slow) var(--ease); }
.series-card:hover .series-card__media .ph img { transform: scale(1.03); }
.series-card__text { padding-top: 18px; }
.series-card__title { font-size: clamp(22px, 2.6vw, 32px); margin-bottom: 4px; }
.series-card .muted { font-size: 15px; margin: 0; }

.series-hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; color: #fff; background: #000; }
.series-hero__media { position: absolute; inset: -6% 0; will-change: transform; }
.series-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%); }
.series-hero__text { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 9vh, 96px); }
.series-hero__text .lead { margin-top: 1rem; opacity: 0.85; }

.series-intro {
  display: grid; gap: 2rem; max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 10vw, 160px) var(--gutter);
}
@media (min-width: 900px) { .series-intro { grid-template-columns: 1fr 2fr; } }
.meta-list { display: flex; flex-wrap: wrap; gap: 24px 40px; margin: 0; align-content: start; }
.meta-list dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.meta-list dd { margin: 4px 0 0; }
.meta-list--stack { flex-direction: column; gap: 16px; margin: 2.5rem 0; }
.prose { max-width: var(--measure); }
.prose--lg { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.55; letter-spacing: -0.01em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Secuencia editorial ---------- */
.sequence { display: flex; flex-direction: column; gap: clamp(64px, 12vw, 200px); padding-bottom: var(--space-section); }
.row { display: grid; gap: clamp(16px, 3vw, 40px); padding: 0 var(--gutter); }
.frame { margin: 0; }
.frame a { display: block; cursor: zoom-in; }
.frame figcaption { margin-top: 12px; font-size: 14px; }
.row--full { padding: 0; }
.row--full figcaption { padding: 0 var(--gutter); }
.row--wide .frame { width: min(100%, 1600px); margin: 0 auto; }
.row--inset .frame { width: min(100%, 900px); margin: 0 auto; }
.row--offset-left .frame, .row--offset-right .frame { width: 100%; }
@media (min-width: 800px) {
  .row--offset-left .frame { width: 62%; margin-left: 6%; }
  .row--offset-right .frame { width: 62%; margin-left: auto; margin-right: 6%; }
  .row--offset-left .frame--portrait, .row--offset-right .frame--portrait { width: 44%; }
  .row--pair { grid-template-columns: 1fr 1fr; align-items: end; max-width: 1600px; margin: 0 auto; width: 100%; }
  .row--pair .frame:nth-child(2) { margin-bottom: clamp(48px, 8vw, 140px); }
  .row--pair-single { grid-template-columns: 1fr; }
  .row--pair-single .frame { width: 50%; margin: 0 auto; }
  .row--inset .frame--portrait { width: min(100%, 640px); }
  .row--wide .frame--portrait { width: min(100%, 760px); }
}
/* Las fotos verticales nunca deben exceder la altura de la pantalla. */
.frame--portrait .ph, .frame--square .ph { max-height: 92svh; aspect-ratio: var(--ar); width: auto; max-width: 100%; margin: 0 auto; }
.frame--portrait .ph img, .frame--square .ph img { object-fit: contain; }

.next-series { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) var(--space-section); }
.next-series .ph--cover { aspect-ratio: 21 / 9; }

/* ---------- Archivo (masonry) ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 2rem 0 1rem; }
.filter select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 0 40px 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: 15px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer;
}
.filter select option { background: var(--bg-elev); color: var(--fg); }
.masonry { columns: 1; column-gap: clamp(8px, 1.4vw, 20px); padding: 0 var(--gutter); max-width: 1800px; margin: 0 auto; }
.section .masonry { padding: 0; }
@media (min-width: 560px) { .masonry { columns: 2; } }
@media (min-width: 1000px) { .masonry { columns: 3; } }
@media (min-width: 1400px) { .masonry--archive { columns: 4; } }
.masonry__item { display: block; break-inside: avoid; margin-bottom: clamp(8px, 1.4vw, 20px); cursor: zoom-in; }
.masonry__item .ph img { transition: opacity 0.9s var(--ease), transform var(--slow) var(--ease); }
.masonry__item:hover .ph img { transform: scale(1.02); }
.load-more { display: flex; justify-content: center; padding: 48px var(--gutter) var(--space-section); }

/* ---------- Página de foto ---------- */
.photo-page { display: grid; gap: 32px; padding: var(--header-h) 0 var(--space-section); }
.photo-page__stage { padding: 24px var(--gutter) 0; display: grid; place-items: center; }
.photo-page__stage a { display: block; cursor: zoom-in; }
.photo-page__stage .ph--contain img { opacity: 1; }
.photo-page__info { padding: 0 var(--gutter); max-width: 760px; width: 100%; margin: 0 auto; }
.photo-page__info header { margin-bottom: 24px; }
.photo-page__info .display { font-size: clamp(28px, 4vw, 44px); margin-bottom: 8px; }
.exif { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin: 32px 0; padding: 24px 0; border-block: 1px solid var(--line); }
.exif dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.exif dd { margin: 4px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; margin-top: 40px; font-size: 15px; }
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--fg); }

/* ---------- Sobre mí ---------- */
.about { display: grid; gap: clamp(32px, 6vw, 96px); padding: calc(var(--header-h) + 32px) var(--gutter) var(--space-section); max-width: var(--max); margin: 0 auto; }
@media (min-width: 900px) {
  .about { grid-template-columns: 5fr 6fr; align-items: start; }
  .about__portrait { position: sticky; top: calc(var(--header-h) + 24px); }
}
.about__text .display { margin-bottom: 2rem; }
.credits { margin: 2.5rem 0; }
.credits ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.credits li { padding: 6px 0; break-inside: avoid; }

/* ---------- Servicios ---------- */
.services { display: grid; gap: clamp(48px, 7vw, 120px); padding: 0 var(--gutter) var(--space-section); max-width: var(--max); margin: 0 auto; }
.service { display: grid; gap: clamp(24px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .service { grid-template-columns: 1fr 1fr; }
  .service:nth-child(even) .service__media { order: 2; }
}
.service__title { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 12px; }
.service__price { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 20px 0; }
.checklist { list-style: none; margin: 0 0 32px; padding: 0; }
.checklist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; color: var(--muted); margin-right: 12px; }

/* ---------- Contacto / formularios ---------- */
.contact { display: grid; gap: clamp(32px, 6vw, 96px); padding: calc(var(--header-h) + clamp(24px, 6vw, 96px)) var(--gutter) var(--space-section); max-width: var(--max); margin: 0 auto; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; } }
.contact__intro .lead { margin: 1.25rem 0 2rem; }
.contact__channels { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 8px; font-size: 18px; }
.form { display: grid; gap: 20px; align-content: start; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg);
  font: inherit; font-size: 16px; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.field--error input, .field--error textarea, .field--error select { border-color: #ff453a; }
.field__error, .form__errors { color: #ff6961; font-size: 14px; margin: 6px 0 0; }
.form__errors ul { margin: 0; padding-left: 1.2em; }
.form .button { justify-self: start; }
.notice { padding: 32px; border: 1px solid var(--line); border-radius: 18px; align-self: start; }
.notice h2 { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px var(--gutter) 40px; }
.site-footer__inner { max-width: var(--max); margin: 0 auto; }
.site-footer__name { font-weight: 600; margin-bottom: 4px; }
.social { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.social a { text-decoration: none; color: var(--muted); }
.social a:hover { color: var(--fg); }

/* ---------- Visor inmersivo ---------- */
.viewer {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; color: #f5f5f7; overflow: hidden;
  opacity: 0; transition: opacity 0.45s var(--ease), display 0.45s allow-discrete, overlay 0.45s allow-discrete;
}
.viewer[open] { opacity: 1; }
@starting-style { .viewer[open] { opacity: 0; } }
.viewer::backdrop { background: #000; }
.viewer__stage {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: max(env(safe-area-inset-top), 56px) 0 max(env(safe-area-inset-bottom), 64px);
  touch-action: pan-y pinch-zoom;
}
.viewer__img {
  max-width: 100vw; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  -webkit-touch-callout: none; user-select: none;
}
@media (min-width: 800px) { .viewer__img { max-width: calc(100vw - 160px); } }
.viewer__img.is-entering { opacity: 0; }
.viewer__shield { position: absolute; inset: 0; }
.viewer__bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter) max(16px, env(safe-area-inset-bottom)); font-size: 14px; color: #a1a1a6;
}
.viewer__bar p { margin: 0; }
.viewer__count { font-variant-numeric: tabular-nums; }
.viewer__btn {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, 0.08); color: #f5f5f7; cursor: pointer;
  transition: background 0.3s;
}
.viewer__btn:hover { background: rgba(255, 255, 255, 0.18); }
.viewer__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viewer__close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.viewer__prev, .viewer__next { top: 50%; transform: translateY(-50%); }
.viewer__prev { left: 16px; }
.viewer__next { right: 16px; }
@media (hover: none) and (max-width: 799px) { .viewer__prev, .viewer__next { display: none; } }

/* ---------- Revelado al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__slide .ph img { transform: none !important; }
}

/* Página de galería de cliente */
.gallery-head { padding: calc(var(--header-h) + clamp(24px, 6vw, 80px)) var(--gutter) 32px; max-width: var(--max); margin: 0 auto; }
.gallery-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: none; text-decoration: none; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.client-item { position: relative; break-inside: avoid; margin-bottom: clamp(8px, 1.4vw, 20px); }
.client-item > a { display: block; cursor: zoom-in; }
.client-item__actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer; text-decoration: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform 0.2s, background 0.2s;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.7); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.icon-btn[aria-pressed="true"] svg { fill: #ff375f; stroke: #ff375f; }
.gate { min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); }
.gate__box { width: min(100%, 420px); }
.gate__box .display { margin-bottom: 12px; }
.gate__box .form { margin-top: 32px; }

/* Aviso de privacidad */
.legal .prose { margin-top: 2.5rem; }
.legal .prose p { margin-bottom: 1.4em; }
.legal .prose strong { display: block; font-size: 19px; margin-bottom: 0.3em; }
.site-footer a { color: var(--muted); }
.legal .prose strong + br { display: none; }
