/* ============================================================
   MAPA LÓPEZ · Archive Cinematique
   Two fonts: JetBrains Mono + Instrument Serif
   ============================================================ */

:root {
  --bg:        oklch(0.97 0.003 80);
  --bg-2:      oklch(0.94 0.004 80);
  --ink:       oklch(0.15 0.005 80);
  --ink-2:     oklch(0.35 0.005 80);
  --muted:     oklch(0.55 0.005 80);
  --line:      oklch(0.85 0.005 80);
  --accent:    #c0392b;

  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-serif:'Instrument Serif', 'Times New Roman', serif;
  --font-sans: 'JetBrains Mono', ui-monospace, monospace; /* enforced two-font rule */

  --px-edge: 36px;
  --tracking-label: 0.16em;
}

/* ---- TYPOGRAPHY PAIRINGS (tweakable) ----
   Each pairing overrides the three font vars. The display font is chosen
   via [data-display="serif|sans|mono"] and reads from the pairing's vars. */
[data-typography="archive"] {
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-sans:  'Archivo', 'Helvetica Neue', sans-serif;
}
[data-typography="editorial"] {
  --font-serif: 'Fraunces', 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --font-sans:  'Inter', 'Helvetica Neue', sans-serif;
}
[data-typography="studio"] {
  --font-serif: 'Newsreader', 'Times New Roman', serif;
  --font-mono:  'Space Mono', ui-monospace, Menlo, monospace;
  --font-sans:  'Space Grotesk', 'Helvetica Neue', sans-serif;
}
[data-typography="documentary"] {
  --font-serif: 'Newsreader', 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --font-sans:  'IBM Plex Sans', 'Helvetica Neue', sans-serif;
}

/* ---- LIGHT BACKGROUND PRESETS (tweakable) ----
   Applied only when theme is light/warm. Dark theme overrides below still win. */
[data-bg="paper"] {
  --bg:   oklch(0.97 0.003 80);
  --bg-2: oklch(0.94 0.004 80);
  --line: oklch(0.85 0.005 80);
}
[data-bg="bone"] {
  --bg:   oklch(0.95 0.015 80);
  --bg-2: oklch(0.92 0.018 80);
  --line: oklch(0.83 0.015 80);
}
[data-bg="gallery"] {
  --bg:   oklch(0.97 0.003 240);
  --bg-2: oklch(0.94 0.005 240);
  --line: oklch(0.85 0.006 240);
}
[data-bg="mat"] {
  --bg:   oklch(0.87 0.005 80);
  --bg-2: oklch(0.83 0.006 80);
  --line: oklch(0.73 0.008 80);
}
[data-bg="sand"] {
  --bg:   oklch(0.94 0.025 75);
  --bg-2: oklch(0.91 0.028 75);
  --line: oklch(0.82 0.025 75);
}
[data-bg="olive"] {
  --bg:   oklch(0.94 0.020 120);
  --bg-2: oklch(0.91 0.022 120);
  --line: oklch(0.82 0.020 120);
}

[data-theme="dark"] {
  --bg:      oklch(0.12 0.003 260);
  --bg-2:    oklch(0.16 0.004 260);
  --ink:     oklch(0.96 0.003 80);
  --ink-2:   oklch(0.75 0.005 80);
  --muted:   oklch(0.55 0.005 80);
  --line:    oklch(0.25 0.005 260);
}

[data-theme="warm"] {
  --bg:      oklch(0.95 0.018 70);
  --bg-2:    oklch(0.91 0.022 70);
  --ink:     oklch(0.22 0.02 40);
  --ink-2:   oklch(0.4 0.02 40);
  --muted:   oklch(0.55 0.015 60);
  --line:    oklch(0.82 0.02 60);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  /* faint grain texture */
  background-image:
    radial-gradient(circle at 0 0, transparent 98%, rgba(0,0,0,0.015) 100%),
    radial-gradient(circle at 100% 100%, transparent 98%, rgba(0,0,0,0.015) 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ------------- SCROLLBAR ------------- */
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-2) transparent;
}
/* WebKit */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--ink) 35%, transparent);
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklab, var(--ink) 60%, transparent);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
.muted { color: var(--muted); }
.mono  { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.02em; }
.serif { font-family: var(--font-serif); font-weight: 400; }
.link  { border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: color .2s, border-color .2s; }
.link:hover { color: var(--accent); border-color: var(--accent); }

/* ------------- NAV ------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px var(--px-edge) 24px;
  z-index: 50;
  color: var(--ink);
  pointer-events: none;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav > * { pointer-events: auto; }

/* ---- NAV CHROME VARIANTS ---- */
[data-nav-chrome="gradient"] .nav {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--bg) 96%, transparent) 0%,
    color-mix(in oklab, var(--bg) 80%, transparent) 80%,
    transparent 100%);
}
[data-nav-chrome="solid"] .nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
[data-nav-chrome="blur"] .nav {
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
[data-nav-chrome="rule"] .nav {
  background: transparent;
}
[data-nav-chrome="rule"][data-nav-scrolled="true"] .nav {
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
[data-nav-chrome="none"] .nav {
  background: transparent;
}
.nav__mark {
  font-size: 12px; letter-spacing: var(--tracking-label);
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
}
.nav__mark-bullet {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.nav__mark-sub { margin-left: 6px; }
.nav__links {
  display: flex; gap: 22px; list-style: none; margin: 0; padding: 0;
  font-size: 11px; letter-spacing: var(--tracking-label);
}

/* ---- SOCIAL ICONS ---- */
.nav__social {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink);
}
.nav__social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  opacity: 0.6;
  transition: opacity .2s, color .2s, transform .2s;
}
.nav__social-link:hover { opacity: 1; color: var(--accent); }
.nav__social-link svg { display: block; }

/* Layout: INLINE (default) — mark on left, links + social grouped on right */
[data-social="inline"] .nav {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  column-gap: 22px;
}
[data-social="inline"] .nav__mark { grid-column: 1; }
[data-social="inline"] .nav__links {
  grid-column: 2;
  display: flex; align-items: center;
}
[data-social="inline"] .nav__social {
  grid-column: 3;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

/* Layout: EDGE — social floats to the far right, nav becomes 3-col */
[data-social="edge"] .nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}
[data-social="edge"] .nav__mark { justify-self: start; }
[data-social="edge"] .nav__links { justify-self: center; }
[data-social="edge"] .nav__social { justify-self: end; align-self: center; }

/* Layout: STACK — social sits beneath the text links, right-aligned */
[data-social="stack"] .nav {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 24px;
  row-gap: 12px;
  align-items: start;
}
[data-social="stack"] .nav__mark { grid-column: 1; grid-row: 1; }
[data-social="stack"] .nav__links { grid-column: 2; grid-row: 1; }
[data-social="stack"] .nav__social {
  grid-column: 2; grid-row: 2;
  justify-self: end;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  width: fit-content;
  padding-left: 20px;
}

/* Layout: HIDDEN */
[data-social="hidden"] .nav__social { display: none; }

.nav__links a {
  position: relative;
  padding-bottom: 2px;
  transition: opacity .2s;
  opacity: 0.7;
}
.nav__links a:hover { opacity: 1; }
.nav__links a.is-active,
.nav__dropdown-trigger.is-active {
  opacity: 1;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.nav__links a:hover { color: var(--accent); opacity: 1; }
.nav__dropdown-trigger:hover { color: var(--accent); opacity: 1; }

/* dropdown */
.nav__dropdown { position: relative; }
.nav__dropdown-trigger {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  opacity: 0.7;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 0 2px;
  color: inherit;
  transition: opacity .2s;
}
.nav__dropdown-trigger:hover { opacity: 1; }
.nav__caret { font-size: 8px; opacity: 0.7; }

.nav__menu {
  position: fixed;
  /* positioned via inline style from JS — top/left set by trigger rect */
  min-width: 240px;
  padding: 12px 0;
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  color: var(--ink);
  border: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: menuIn .2s ease;
  z-index: 60;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav__menu-label {
  font-size: 9.5px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 6px 16px 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
  margin-bottom: 4px;
}
.nav__menu-item {
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 11px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.85;
  transition: background .2s, opacity .2s, color .2s;
  text-decoration: none !important;
}
.nav__menu-item:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  opacity: 1;
  color: var(--accent);
}
.nav__menu-item:hover .nav__menu-arrow { transform: translateX(3px); }
.nav__menu-item.is-active { color: var(--accent); opacity: 1; }
.nav__menu-n { color: var(--muted); font-size: 9.5px; }
.nav__menu-arrow { justify-self: end; font-size: 12px; transition: transform .2s; }

/* ------------- MAIN ------------- */
.main { padding-top: 120px; }

/* ------------- STRIP / GALLERY ------------- */
.strip { margin: 0 0 160px; }
.strip__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--px-edge) 40px;
}
.strip__meta {
  display: flex; gap: 18px; align-items: baseline;
  font-size: 11px; letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.strip__num { color: var(--muted); }
.strip__label { font-weight: 600; }
.strip__progress { display: flex; align-items: center; gap: 12px; font-size: 10px; }
[data-strip-counter="false"] .strip__progress { display: none; }
.strip__progress-track {
  width: 120px; height: 1px; background: var(--line); position: relative; overflow: hidden;
}
.strip__progress-fill {
  position: absolute; inset: 0;
  background: var(--accent); transform-origin: left;
  transform: scaleX(0);
  transition: transform .1s linear;
}

.strip__track {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  padding: 0;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  will-change: scroll-position;
}
.strip__track::-webkit-scrollbar { display: none; }
.strip--dragging { cursor: grabbing; user-select: none; scroll-behavior: auto; }
.strip--dragging img { pointer-events: none; }
.strip--dragging .tile img { transition: none !important; }
.strip--dragging .tile__cap { transition: none !important; }

.strip__inner {
  display: flex; gap: 0; align-items: flex-start;
  padding: 0 var(--px-edge) 48px;
  min-height: 420px;
}

.tile {
  flex: 0 0 auto;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0) contrast(1);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s;
}
.tile:hover img { transform: scale(1.03); }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  display: flex; gap: 12px; align-items: baseline;
  font-size: 9.5px; letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0) 100%);
  opacity: 0; transition: opacity .3s;
  text-transform: uppercase;
}
.tile:hover .tile__cap { opacity: 1; }
.tile__cap .muted { color: rgba(255,255,255,0.65); }

.strip__end {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 120px 0 60px;
  font-size: 10px;
  letter-spacing: var(--tracking-label);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ------------- ABOUT ------------- */
.about { padding: 80px var(--px-edge) 160px; }
.about__head {
  display: flex; gap: 18px; align-items: baseline;
  font-size: 11px; letter-spacing: var(--tracking-label); text-transform: uppercase;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
}
.about__body {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 120px;
  align-items: start;
}
.about__lead {
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 18ch;
}
.about__cols {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  font-size: 12px;
}
.about__cols .muted {
  font-size: 10px; letter-spacing: var(--tracking-label);
  text-transform: uppercase; margin-bottom: 10px;
  display: block;
}
.about__cols p { margin: 0; max-width: 38ch; line-height: 1.6; }

/* ---- BIO VARIANTS ---- */
.bio { max-width: 44ch; font-size: 12px; }
.bio p { margin: 0; line-height: 1.75; color: var(--ink-2); }

/* prose — two flowing paragraphs */
.bio--prose p + p { margin-top: 1.1em; }

/* fragments — manifesto-style lines separated by rules */
.bio--fragments .bio__frag {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  line-height: 1.55;
  color: var(--ink);
  font-size: 12.5px;
}
.bio--fragments .bio__frag:last-child { border-bottom: 1px solid var(--line); }

/* index — numbered entries, press-kit feel */
.bio--index .bio__item + .bio__item { margin-top: 28px; }
.bio--index .bio__n {
  display: block;
  font-size: 9.5px;
  letter-spacing: var(--tracking-label);
  margin-bottom: 10px;
}

/* dropcap — serif lede with capital, mono follow-up */
.bio--dropcap .bio__lede {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.005em;
  margin: 0 0 1.1em;
}
.bio--dropcap .bio__cap {
  float: left;
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.bio--dropcap .bio__body {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0;
}
.about__list {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 30px;
}
.about__list li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  break-inside: avoid;
}

/* ------------- MOTION ------------- */
.motion { padding: 0 var(--px-edge); margin-bottom: 160px; }
.motion > .strip__head { padding-left: 0; padding-right: 0; }
.motion__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 48px 30px;
}
.motion__card { cursor: pointer; }
.motion__thumb {
  position: relative; aspect-ratio: 16/9;
  background: var(--bg-2); overflow: hidden;
}
.motion__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s;
}
.motion__card:hover .motion__thumb img { transform: scale(1.03); filter: brightness(0.7); }
.motion__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--tracking-label);
  color: #fff;
  background: rgba(0,0,0,0.3);
  opacity: 0; transition: opacity .3s;
}
.motion__card:hover .motion__play { opacity: 1; }
.motion__dur {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; letter-spacing: var(--tracking-label);
  color: #fff;
  padding: 4px 8px;
  background: rgba(0,0,0,0.5);
}
.motion__meta {
  display: flex; justify-content: space-between;
  padding: 14px 0 0;
  font-size: 11px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.motion__player {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 60px;
}
.motion__player-inner {
  position: relative; width: 100%; max-width: 1280px; aspect-ratio: 16/9;
}
.motion__player-inner iframe { width: 100%; height: 100%; border: 0; }

/* ------------- SERVICES ------------- */
.services { padding: 0 var(--px-edge); margin-bottom: 160px; }
.services__list { border-top: 1px solid var(--line); }
.services__row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 60px;
  gap: 30px;
  align-items: baseline;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .3s, background .3s;
  cursor: pointer;
}
.services__row:hover { padding-left: 16px; background: var(--bg-2); }
.services__row:hover .services__arrow { transform: translateX(8px); color: var(--accent); }
.services__n { font-size: 11px; letter-spacing: var(--tracking-label); }
.services__t {
  font-size: clamp(22px, 2.6vw, 36px);
  margin: 0; line-height: 1.1;
  letter-spacing: -0.005em;
}
.services__d { font-size: 12px; color: var(--ink-2); max-width: 46ch; line-height: 1.6; }
.services__arrow { justify-self: end; font-size: 18px; transition: transform .3s, color .3s; }

/* ------------- SHOP ------------- */
.shop { padding: 0 var(--px-edge); margin-bottom: 160px; }
.shop__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
}
.shop__img {
  aspect-ratio: 3/4; overflow: hidden; background: var(--bg-2);
}
.shop__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.shop__card:hover .shop__img img { transform: scale(1.04); }
.shop__meta {
  padding: 12px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shop__row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
}

/* ------------- FOOTER ------------- */
.footer {
  padding: 120px var(--px-edge) 40px;
}
.footer__head {
  display: flex; gap: 18px; align-items: baseline;
  font-size: 11px; letter-spacing: var(--tracking-label); text-transform: uppercase;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 80px;
}
.footer__grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px;
  align-items: end;
}
.footer__big {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.96;
  margin: 0;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.footer__big em {
  font-style: italic;
  color: var(--accent);
}
.footer__cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px;
  font-size: 11px;
}
.footer__cols p { margin: 0; line-height: 1.7; }
.footer__cols .muted {
  font-size: 9.5px; letter-spacing: var(--tracking-label);
  margin-bottom: 6px; display: block;
}
.footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 80px;
  border-top: 1px solid var(--line);
  margin-top: 120px;
  font-size: 10px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ------------- CURSOR PREVIEW ------------- */
.cursor-preview {
  position: fixed; top: 0; left: 0;
  width: 220px; height: 280px;
  pointer-events: none;
  z-index: 80;
  transition: opacity .2s;
  will-change: transform;
  margin: -140px 0 0 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.cursor-preview * { pointer-events: none; }
.cursor-preview img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ------------- LIGHTBOX ------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  color: #fff;
  display: flex; flex-direction: column;
  cursor: default;
  opacity: 0;
  transition: opacity .26s ease;
}
.lightbox.is-visible { opacity: 1; }

/* Entry image animation — only the very FIRST image of the session.
   Once the user navigates, the per-image fade-in below takes over. */
.lightbox.is-visible .lightbox__stage img {
  transition: opacity .24s ease;
}
.lightbox__stage.is-loading img { opacity: 0; }
.lightbox__stage.is-loaded  img { opacity: 1; }

/* Spinner (appears only after LB_SLOW_MS if still loading) */
.lightbox__spinner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1;
}
.lightbox__stage.is-slow .lightbox__spinner { opacity: 1; }
.lightbox__spinner-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.85);
  animation: lbSpin 0.9s linear infinite;
}
@keyframes lbSpin {
  to { transform: rotate(360deg); }
}
.lightbox__spinner-label {
  font-size: 9.5px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.lightbox.is-visible .lightbox__caption,
.lightbox.is-visible .lightbox__counter,
.lightbox.is-visible .lightbox__close {
  animation: lbChromeIn .38s ease .08s both;
}
@keyframes lbChromeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==== BACKGROUND variants via [data-lightbox-bg] ==== */
[data-lightbox-bg="cinema"] .lightbox {
  background:
    radial-gradient(ellipse at center, oklch(0.14 0.006 70) 0%, oklch(0.07 0.004 70) 70%, oklch(0.04 0.003 70) 100%);
}
[data-lightbox-bg="ink"] .lightbox {
  background: oklch(0.12 0.01 260);
}
[data-lightbox-bg="vignette"] .lightbox {
  background:
    radial-gradient(ellipse 90% 80% at center, oklch(0.18 0.008 70) 0%, oklch(0.08 0.005 70) 55%, oklch(0.02 0.002 70) 100%);
}
[data-lightbox-bg="paper"] .lightbox {
  background: oklch(0.92 0.018 75);
  color: oklch(0.18 0.015 40);
}
[data-lightbox-bg="spotlight"] .lightbox {
  background:
    radial-gradient(circle 60vh at 50% 45%, oklch(0.22 0.015 70) 0%, oklch(0.06 0.005 70) 60%, oklch(0.02 0 0) 100%);
}

/* Paper variant — invert contrast on overlay text/controls so they read on light bg */
[data-lightbox-bg="paper"] .lightbox__counter { color: oklch(0.35 0.015 40); }
[data-lightbox-bg="paper"] .lightbox__close { color: oklch(0.25 0.015 40); }
[data-lightbox-bg="paper"] .lightbox__close { border-color: oklch(0.7 0.02 60); background: transparent; }
[data-lightbox-bg="paper"] .lightbox__close:hover { background: color-mix(in oklab, oklch(0.25 0.015 40) 8%, transparent); }
[data-lightbox-bg="paper"] .lightbox__caption { color: oklch(0.2 0.015 40); border-top-color: oklch(0.78 0.02 60); }
[data-lightbox-bg="paper"] .lightbox__caption-title { color: oklch(0.15 0.015 40); }
[data-lightbox-bg="paper"] .lightbox__caption-index,
[data-lightbox-bg="paper"] .lightbox__caption-meta { color: oklch(0.42 0.015 40); }
[data-lightbox-bg="paper"] .lightbox__nav { color: oklch(0.25 0.015 40); }
[data-lightbox-bg="paper"] .lightbox__cursor { color: oklch(0.2 0.015 40); }
[data-lightbox-bg="paper"] [data-lightbox-cursor="disc"] .lightbox__cursor,
[data-lightbox-bg="paper"] [data-lightbox-cursor="chip"] .lightbox__cursor {
  background: color-mix(in oklab, oklch(0.2 0.015 40) 8%, transparent);
  border-color: color-mix(in oklab, oklch(0.2 0.015 40) 25%, transparent);
}
[data-lightbox-bg="paper"] [data-lightbox-cursor="ring"] .lightbox__cursor {
  border-color: oklch(0.2 0.015 40);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Hide native cursor when over the backdrop (we draw our own).
   Restore default cursor over interactive/content areas. */
.lightbox[data-cursor="prev"],
.lightbox[data-cursor="next"] { cursor: none; }
.lightbox[data-cursor="prev"] .lightbox__stage img,
.lightbox[data-cursor="next"] .lightbox__stage img,
.lightbox[data-cursor="prev"] .lightbox__caption,
.lightbox[data-cursor="next"] .lightbox__caption,
.lightbox[data-cursor="prev"] .lightbox__counter,
.lightbox[data-cursor="next"] .lightbox__counter { cursor: default; }
.lightbox[data-cursor="prev"] .lightbox__close,
.lightbox[data-cursor="next"] .lightbox__close,
.lightbox[data-cursor="prev"] .lightbox__nav,
.lightbox[data-cursor="next"] .lightbox__nav { cursor: pointer; }

.lightbox__counter {
  position: absolute; top: 20px; left: var(--px-edge);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  z-index: 3;
}

/* --- CLOSE button base + variants --- */
.lightbox__close {
  position: absolute; top: 20px; right: var(--px-edge);
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  background: transparent; border: 0;
  padding: 6px 8px;
  cursor: pointer;
  z-index: 3;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.lightbox__close:hover { color: var(--accent); }
.lightbox__close-label,
.lightbox__close-glyph,
.lightbox__close-esc { display: none; }

/* LABEL — "CERRAR ✕" (default) */
[data-lightbox-close="label"] .lightbox__close-label,
[data-lightbox-close="label"] .lightbox__close-glyph { display: inline; }

/* GLYPH — thin × inside a circle */
[data-lightbox-close="glyph"] .lightbox__close {
  width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  justify-content: center;
  font-size: 16px;
  top: 16px; right: 16px;
}
[data-lightbox-close="glyph"] .lightbox__close-glyph { display: inline; }
[data-lightbox-close="glyph"] .lightbox__close:hover {
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* CORNER — tiny × top-right, no background */
[data-lightbox-close="corner"] .lightbox__close {
  font-size: 22px; font-weight: 300;
  opacity: 0.7; padding: 4px 6px;
}
[data-lightbox-close="corner"] .lightbox__close-glyph { display: inline; }
[data-lightbox-close="corner"] .lightbox__close:hover { opacity: 1; }

/* KEYBOARD — "ESC" hint in a keycap */
[data-lightbox-close="keyboard"] .lightbox__close {
  border: 1px solid rgba(255,255,255,0.3);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 9.5px;
  background: rgba(255,255,255,0.04);
}
[data-lightbox-close="keyboard"] .lightbox__close-esc { display: inline; }
[data-lightbox-close="keyboard"] .lightbox__close:hover {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

/* --- STAGE --- */
.lightbox__stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px var(--px-edge) 20px;
  position: relative;
  min-height: 0;
}
.lightbox__stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.lightbox__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: #fff;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 16px;
  background: transparent; border: 0;
  cursor: pointer;
  opacity: 0; transition: opacity .2s, color .2s;
  z-index: 2;
}
/* Hide inline nav buttons by default — the backdrop-click area handles nav. */
/* Show them on variants where the backdrop isn't clickable. */
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__nav:disabled { cursor: not-allowed; }

/* --- CAPTION base + variants --- */
.lightbox__caption {
  color: rgba(255,255,255,0.9);
  z-index: 2;
}
.lightbox__caption-index {
  display: none !important;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.lightbox__caption-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: #fff;
  margin-bottom: 8px;
}
.lightbox__caption-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: inline-flex; gap: 8px; align-items: center;
}
.lightbox__caption-sep { opacity: 0.4; }

/* ==== LAYOUT: MINIMAL (default) ==== */
[data-lightbox-layout="minimal"] .lightbox__caption,
.lightbox:not([data-lightbox-layout]) .lightbox__caption {
  padding: 20px var(--px-edge) 32px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}
[data-lightbox-layout="minimal"] .lightbox__caption-index { display: none; }
[data-lightbox-layout="minimal"] .lightbox__caption-title { font-size: 18px; margin-bottom: 4px; }

/* ==== LAYOUT: FILMSTRIP — caption aligned left with index number ==== */
[data-lightbox-layout="filmstrip"] .lightbox__stage {
  padding: 60px var(--px-edge) 20px;
}
[data-lightbox-layout="filmstrip"] .lightbox__caption {
  padding: 24px var(--px-edge) 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
[data-lightbox-layout="filmstrip"] .lightbox__caption-title { margin: 0 auto 6px; }
[data-lightbox-layout="filmstrip"] .lightbox__caption-meta {
  position: absolute;
  right: var(--px-edge);
  bottom: 40px;
}
[data-lightbox-layout="filmstrip"] .lightbox__caption-index {
  display: none;
}

/* ==== LAYOUT: FOCUS — caption overlays bottom-left of image, blurred chip ==== */
[data-lightbox-layout="focus"] .lightbox__stage {
  padding: 40px var(--px-edge);
  position: relative;
}
[data-lightbox-layout="focus"] .lightbox__caption {
  position: absolute;
  left: var(--px-edge);
  bottom: 32px;
  max-width: 440px;
  padding: 16px 20px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  text-align: left;
  z-index: 3;
}
[data-lightbox-layout="focus"] .lightbox__caption-title { font-size: 18px; margin-bottom: 6px; }

/* ==== LAYOUT: MUSEUM — image left, caption column right ==== */
[data-lightbox-layout="museum"] {
  display: grid !important;
  grid-template-columns: 1fr 320px;
  grid-template-rows: 1fr;
}
[data-lightbox-layout="museum"] .lightbox__stage {
  padding: 80px 40px 40px 60px;
  grid-column: 1;
}
[data-lightbox-layout="museum"] .lightbox__caption {
  grid-column: 2;
  padding: 80px 40px 40px;
  border-left: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  align-self: stretch;
  display: flex; flex-direction: column; gap: 10px;
}
[data-lightbox-layout="museum"] .lightbox__caption-title {
  font-size: 28px; margin: 0 0 4px; line-height: 1.15;
}
[data-lightbox-layout="museum"] .lightbox__caption-meta {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
}
[data-lightbox-layout="museum"] .lightbox__caption-sep { display: none; }
[data-lightbox-layout="museum"] .lightbox__nav { display: none; }

/* --- Custom cursor arrow (on backdrop) — variants via [data-lightbox-cursor] --- */
.lightbox__cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 400;
  will-change: transform;
  color: #fff;
  font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.lightbox__cursor-arrow { font-size: 18px; line-height: 1; }
.lightbox__cursor-label {
  font-size: 9px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  display: none;
}

/* DISC (default) — filled translucent circle */
[data-lightbox-cursor="disc"] .lightbox__cursor,
:root:not([data-lightbox-cursor]) .lightbox__cursor {
  margin: -22px 0 0 -22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* RING — empty outline circle, larger and lighter */
[data-lightbox-cursor="ring"] .lightbox__cursor {
  margin: -28px 0 0 -28px;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.9);
  background: transparent;
}
[data-lightbox-cursor="ring"] .lightbox__cursor-arrow { font-size: 20px; font-weight: 300; }

/* CHIP — horizontal pill with arrow + label ("ANT" / "SIG") */
[data-lightbox-cursor="chip"] .lightbox__cursor {
  margin: -16px 0 0 -40px;
  padding: 8px 14px;
  min-width: 80px;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-lightbox-cursor="chip"] .lightbox__cursor-arrow { font-size: 13px; }
[data-lightbox-cursor="chip"] .lightbox__cursor-label { display: inline; }
[data-lightbox-cursor="chip"] .lightbox__cursor[data-side="prev"] { flex-direction: row; }
[data-lightbox-cursor="chip"] .lightbox__cursor[data-side="next"] { flex-direction: row-reverse; }

/* ARROW — minimal: just a large glyph, no container, with soft drop-shadow */
[data-lightbox-cursor="arrow"] .lightbox__cursor {
  margin: -16px 0 0 -16px;
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
}
[data-lightbox-cursor="arrow"] .lightbox__cursor-arrow {
  font-size: 34px; font-weight: 200;
  text-shadow: 0 2px 14px rgba(0,0,0,0.8);
}

/* DOT — tiny accent-colored dot with the arrow to its side */
[data-lightbox-cursor="dot"] .lightbox__cursor {
  margin: -6px 0 0 -6px;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06);
}
[data-lightbox-cursor="dot"] .lightbox__cursor-arrow {
  position: absolute; top: 50%;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  letter-spacing: var(--tracking-label);
}
[data-lightbox-cursor="dot"] .lightbox__cursor[data-side="prev"] .lightbox__cursor-arrow {
  right: 20px; transform: translateY(-50%);
}
[data-lightbox-cursor="dot"] .lightbox__cursor[data-side="next"] .lightbox__cursor-arrow {
  left: 20px; transform: translateY(-50%);
}

/* ------------- INTRO ------------- */
.intro {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  color: var(--ink);
  transition: opacity .6s ease, transform .6s ease;
}
.intro--out { opacity: 0; pointer-events: none; }
.intro__grid {
  position: absolute; inset: 0;
  padding: var(--px-edge);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  font-size: 11px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.intro__tl { grid-column: 1; grid-row: 1; }
.intro__tr { grid-column: 2; grid-row: 1; text-align: right; }
.intro__bl { grid-column: 1; grid-row: 3; }
.intro__br { grid-column: 2; grid-row: 3; text-align: right; }
.intro__center {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
}
.intro__bar-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: min(560px, 70vw);
}
.intro__bar {
  width: 100%; height: 1px; background: var(--line); position: relative; overflow: hidden;
}
.intro__bar-fill {
  position: absolute; inset: 0;
  background: var(--ink);
  transform-origin: left;
  width: 0;
  transition: width .05s linear;
}
.intro__bar-meta {
  display: flex; gap: 24px; width: 100%; justify-content: space-between;
  font-size: 10px; color: var(--muted);
}
.intro__name {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-serif);
  font-size: clamp(64px, 12vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  animation: riseIn .6s cubic-bezier(.2,.8,.2,1);
}
.intro__name-line { display: block; }
.intro__name-line:nth-child(2) { font-style: italic; margin-left: 1em; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------- TWEAKS PANEL ------------- */
.tweaks {
  position: fixed; bottom: 20px; right: 20px;
  width: 280px; z-index: 400;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.tweaks__body { padding: 6px 14px 14px; }
.tweaks__group { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tweaks__group:last-child { border-bottom: 0; }
.tweaks__label {
  font-size: 9.5px; letter-spacing: var(--tracking-label);
  color: var(--muted); margin-bottom: 10px;
}
.tweaks__row { display: flex; gap: 6px; }
.tweaks__row--wrap { flex-wrap: wrap; }
.tweaks__row button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s, border-color .2s;
}
.tweaks__row button:hover { border-color: var(--ink); }
.tweaks__row button.is-active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.tweaks__swatch {
  width: 10px; height: 10px; background: var(--swatch);
  border: 1px solid rgba(0,0,0,0.2);
}

/* ------------- DISPLAY FONT VARIANTS ------------- */
[data-display="serif"] .about__lead,
[data-display="serif"] .services__t,
[data-display="serif"] .footer__big,
[data-display="serif"] .intro__name { font-family: var(--font-serif); }

[data-display="sans"] .about__lead,
[data-display="sans"] .services__t,
[data-display="sans"] .footer__big,
[data-display="sans"] .intro__name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.03em;
}
[data-display="sans"] .intro__name-line:nth-child(2) { font-style: normal; }
[data-display="sans"] .footer__big em { font-style: normal; }

[data-display="mono"] .about__lead,
[data-display="mono"] .services__t,
[data-display="mono"] .footer__big,
[data-display="mono"] .intro__name {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-style: normal;
}
[data-display="mono"] .intro__name-line:nth-child(2) { font-style: normal; }
[data-display="mono"] .footer__big em { font-style: normal; }

/* ------------- RESPONSIVE ------------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .about__body { grid-template-columns: 1fr; gap: 60px; }
  .motion__grid { grid-template-columns: 1fr; }
  .services__row { grid-template-columns: 40px 1fr 40px; }
  .services__d { grid-column: 2; }
  .shop__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__cols { grid-template-columns: 1fr; }
  .cursor-preview { display: none; }
}
