/* Shared base: reset, lightbox, reveal. Variants set the custom properties. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* Gallery trigger */
[data-gallery] { cursor: zoom-in; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  background: var(--lb-bg, oklch(16% .005 70 / .97)); color: var(--lb-fg, oklch(92% .01 80)); }
.lb__fig { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 56px 8px 24px; height: 100dvh; grid-template-rows: 1fr auto; }
.lb__fig img { max-height: calc(100dvh - 120px); width: auto; object-fit: contain; }
.lb__fig figcaption { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.lb__nav, .lb__close { background: none; border: 0; cursor: pointer; padding: 18px; font-size: 22px; opacity: .8; }
.lb__nav:hover, .lb__close:hover { opacity: 1; }
.lb__close { position: absolute; top: 8px; right: 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; z-index: 1; }
@media (max-width: 640px) { .lb { grid-template-columns: 1fr; } .lb__nav { position: absolute; bottom: 12px; } .lb__prev { left: 12px; } .lb__next { right: 12px; } }
