/* ==========================================================================
   Simon Bernakiewicz — Photography
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg-2: #131315;
  --bg-3: #1b1b1e;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f3efe8;
  --muted: #9b968d;
  --dim: #6c6862;
  --accent: #ffb547;          /* golden hour - changes with the photo you hover */
  --accent-ink: #1a1206;
  --radius: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --header-h: 68px;
  --pad: clamp(16px, 4vw, 56px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; overflow-x: hidden; overflow-x: clip; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  transition: background-color .8s var(--ease-out);
}
body.lb-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; flex: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* film grain overlay — subtle, but makes the dark UI feel tactile */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { background-position: 0 0; }
  20% { background-position: -32px 24px; } 40% { background-position: 24px -36px; }
  60% { background-position: -24px -16px; } 80% { background-position: 36px 28px; }
}

/* ============================== Header ============================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; max-width: 100vw; z-index: 50;
  height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) var(--pad) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background-color .4s, backdrop-filter .4s, border-color .4s, transform .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 12, .72);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; height: 40px;
  font-family: var(--font-display); font-size: 18px; line-height: 1; letter-spacing: -.01em;
  font-optical-sizing: auto; font-variation-settings: "opsz" 18;
  padding: 5px 14px 5px 5px; margin-left: -5px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .45s var(--ease-out), border-color .45s var(--ease-out), transform .4s var(--ease-spring), box-shadow .45s var(--ease-out);
}
.brand__mark {
  position: relative; display: block; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--text); color: var(--bg); font-size: 17px;
  transition: transform .6s var(--ease-spring), background-color .4s, color .4s;
}
.brand__icon {
  position: absolute; inset: 0; margin: auto; display: block;
  width: 1em; height: 1em; transform-origin: 50% 50%;
  transition: transform .6s var(--ease-spring), opacity .35s var(--ease-out);
}
.brand__icon--aperture { width: 78%; height: 78%; }
.brand__icon--up { opacity: 0; transform: translateY(6px) scale(.5) rotate(-90deg); }
.brand__text {
  display: inline-grid; align-items: center; overflow: hidden; line-height: 1.2; padding: 2px 0;
}
.brand__name, .brand__top {
  grid-area: 1 / 1; white-space: nowrap;
  transition: transform .55s var(--ease-spring), opacity .38s var(--ease-out);
}
.brand__name b, .brand__top b { font-weight: 700; }
.brand__top {
  opacity: 0; transform: translateY(115%); color: var(--text);
}

.site-header.no-anim, .site-header.no-anim * {
  transition: none !important;
}

.site-header.in-gallery .brand {
  background: rgba(255, 255, 255, .06); border-color: var(--line-2);
}
.site-header.in-gallery .brand__mark {
  background: var(--accent); color: var(--accent-ink);
}
.site-header.in-gallery .brand__icon--aperture {
  opacity: 0; transform: scale(.4) rotate(180deg);
}
.site-header.in-gallery .brand__icon--up {
  opacity: 1; transform: translateY(0) scale(1) rotate(0deg);
}
.site-header.in-gallery .brand__name {
  opacity: 0; transform: translateY(-115%); pointer-events: none;
}
.site-header.in-gallery .brand__top {
  opacity: 1; transform: translateY(0);
}
@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand__icon--aperture { transform: rotate(120deg); }
  .brand:hover .brand__mark { background: var(--accent); color: var(--accent-ink); }
  .site-header.in-gallery .brand:hover {
    background: rgba(255, 255, 255, .11); transform: translateY(-2px);
    box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .6);
  }
  .site-header.in-gallery .brand:hover .brand__mark {
    transform: scale(1.08);
  }
  .site-header.in-gallery .brand:hover .brand__icon--up {
    transform: translateY(-2px) scale(1) rotate(0deg);
  }
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 999px; font-size: 14px; line-height: 1; font-weight: 500; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.menu-btn { display: none; }

/* ============================== Hero ============================== */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; }
.hero__slides { position: absolute; inset: 0; z-index: -2; background: var(--bg-2); }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease;
  background-size: cover; background-position: center;
}
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero__slide.is-active { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 20% 100%, rgba(11, 11, 12, .85) 0%, rgba(11, 11, 12, 0) 60%),
    linear-gradient(to bottom, rgba(11, 11, 12, .55) 0%, rgba(11, 11, 12, 0) 22%, rgba(11, 11, 12, 0) 55%, var(--bg) 100%);
}
.hero__content {
  position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(70px, 13vh, 140px);
  max-width: 1100px;
}
.hero__title {
  margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -.045em; line-height: .86;
  font-size: clamp(38px, 12vw, 200px); font-variation-settings: "opsz" 96;
  text-shadow: 0 6px 24px rgba(0, 0, 0, .4);
}
.hero__title .line { display: block; overflow: hidden; padding: .16em 0 .06em; margin-top: -.16em; }
.hero__title .char {
  display: inline-block; transform: translateY(105%);
  animation: rise .85s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 28ms + 120ms);
  cursor: default; user-select: none;
}
.hero__title .line:nth-child(2) .char { animation-delay: calc(var(--i) * 24ms + 260ms); }
.hero__title .char.is-ready { transform: none; animation: none !important; }
@keyframes rise { to { transform: translateY(0); } }
.hero__tagline {
  margin: 22px 0 0; font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 34px); font-weight: 500; letter-spacing: -.02em;
  color: rgba(243, 239, 232, .85); display: flex; flex-wrap: wrap; gap: .35em; align-items: baseline;
  opacity: 0; animation: fadeUp .9s var(--ease-out) .9s forwards;
}
.rotator { position: relative; display: inline-grid; color: var(--accent); transition: color .6s; }
.rotator__word {
  grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(60%) rotateX(-70deg); transform-origin: 50% 100%;
  transition: opacity .5s var(--ease-out), transform .7s var(--ease-out);
}
.rotator__word.is-active { opacity: 1; transform: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-60%) rotateX(70deg); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; opacity: 0; animation: fadeUp .9s var(--ease-out) 1.1s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: transform .35s var(--ease-spring), background-color .3s, color .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 40px -10px var(--accent); }
.btn--primary svg { transition: transform .4s var(--ease-spring); }
.btn--primary:hover svg { transform: translateY(3px); }
.btn--ghost { border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--text); }

.hero__meta {
  position: absolute; right: var(--pad); bottom: clamp(70px, 13vh, 140px); text-align: right;
  font: 500 12px/1.7 var(--font-mono); color: rgba(243, 239, 232, .7); letter-spacing: .04em;
  transition: opacity .5s; pointer-events: none;
}
.hero__meta strong { display: block; color: var(--text); font-size: 13px; }
.hero__progress { position: absolute; left: var(--pad); right: var(--pad); bottom: 36px; display: flex; gap: 6px; }
.hero__progress button { flex: 1; height: 14px; position: relative; }
.hero__progress button::before, .hero__progress button::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; }
.hero__progress button::before { background: rgba(255, 255, 255, .2); }
.hero__progress button::after { background: var(--text); transform-origin: left; transform: scaleX(0); }
.hero__progress button.is-done::after { transform: scaleX(1); }
.hero__progress button.is-active::after { animation: progress var(--dur, 7s) linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================== Sections ============================== */
.gallery-section, .gear-section, .numbers, .copyright { padding: clamp(60px, 9vw, 120px) var(--pad) 0; max-width: 1800px; margin: 0 auto; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 6vw, 78px); letter-spacing: -.04em; line-height: .95; }
.section-title em { font-style: normal; color: var(--accent); transition: color .6s; }
.section-sub { margin: 0; color: var(--muted); max-width: 40ch; }
.section-sub span { color: var(--text); font-family: var(--font-mono); font-weight: 700; }
.section-sub__sort { font-weight: inherit; }

/* ============================== Toolbar ============================== */
.toolbar {
  position: sticky; top: calc(var(--header-h) + var(--safe-t) - 1px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(var(--pad) * -1) 8px; padding: 12px var(--pad);
  transition: background-color .3s, top .5s var(--ease-out);
}
.toolbar.is-stuck { background: rgba(11, 11, 12, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.filters-wrap { display: contents; }
.filters__hint { display: none; }
.filters {
  position: relative; display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.filters::-webkit-scrollbar { display: none; }
.filters__indicator {
  position: absolute; top: 5px; left: 0; height: calc(100% - 10px); width: 0; border-radius: 999px;
  background: var(--text); transition: transform .55s var(--ease-spring), width .55s var(--ease-spring), background-color .5s; z-index: 0;
}
.filter {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px;
  border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap;
  transition: color .3s;
}
.filter svg { font-size: 18px; transition: transform .5s var(--ease-spring); }
.filter:hover { color: var(--text); }
.filter:hover svg { transform: rotate(-12deg) scale(1.15); }
.filter.is-active { color: var(--bg); }
.filter .count { font: 700 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); transition: background-color .3s; }
.filter.is-active .count { background: rgba(0, 0, 0, .12); }
.filter.bump svg { animation: bump .6s var(--ease-spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-14deg); } 100% { transform: scale(1); } }

.toolbar__actions { display: flex; gap: 8px; flex: none; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: border-color .25s, transform .35s var(--ease-spring), background-color .3s, color .3s;
}
.chip-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-btn svg { font-size: 18px; transition: transform .5s var(--ease-spring); }
.chip-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.chip-btn:active { transform: scale(.95); }
.chip-btn.flip svg { transform: rotate(180deg); }
.chip-btn--accent:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-btn.is-filtered {
  background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); color: var(--text);
}
.chip-btn.is-filtered svg:first-child { color: var(--text); }
.chip-btn .dice.roll { animation: roll .7s var(--ease-spring); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(270deg) scale(1.3); } 100% { transform: rotate(360deg) scale(1); } }

.sort-dropdown { position: relative; display: flex; }
.sort-dropdown.is-open > .chip-btn { border-color: rgba(255, 255, 255, .28); color: var(--text); }
.sort-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 45;
  width: min(392px, calc(100vw - 24px)); padding: 8px; border-radius: 18px;
  background: rgba(18, 19, 23, .98); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line-2); box-shadow: 0 24px 56px -14px rgba(0, 0, 0, .86);
  display: flex; flex-direction: column; gap: 4px;
  transform-origin: top right;
  animation: sortMenuIn .24s var(--ease-spring);
}
.lens-menu { left: 0; right: auto; width: min(340px, calc(100vw - 24px)); transform-origin: top left; }
.sort-menu[hidden] { display: none; }
@keyframes sortMenuIn {
  from { opacity: 0; transform: translateY(-8px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sort-menu__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 5px 6px 5px 10px; border-radius: 12px;
  transition: background-color .2s;
}
.sort-menu__row:hover { background: rgba(255, 255, 255, .04); }
.sort-menu__row.is-active { background: rgba(255, 255, 255, .06); }
.sort-menu__field {
  display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden;
  font-size: 13.5px; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap;
  padding: 4px 0; transition: color .2s;
}
.sort-menu__field span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-menu__field svg { font-size: 16px; color: var(--muted); transition: color .2s; }
.sort-menu__row:hover .sort-menu__field,
.sort-menu__row.is-active .sort-menu__field { color: var(--text); }
.sort-menu__row.is-active .sort-menu__field svg { color: var(--accent); }
.sort-menu__dirs {
  display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); flex: none;
}
.sort-dir {
  height: 26px; padding: 0 9px; border-radius: 999px;
  font: 600 11px/1 var(--font-mono); color: var(--muted); white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.sort-dir:hover { color: var(--text); }
.sort-dir.is-active { background: var(--accent); color: var(--accent-ink); }

.lens-menu__option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 12px; text-align: left;
  transition: background-color .2s, color .2s;
}
.lens-menu__option:hover { background: rgba(255, 255, 255, .05); }
.lens-menu__option.is-active { background: rgba(255, 255, 255, .08); }
.lens-menu__dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none; opacity: .65;
  transition: transform .25s var(--ease-spring), opacity .2s;
}
.lens-menu__option.is-active .lens-menu__dot { opacity: 1; transform: scale(1.2); }
.lens-menu__info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; overflow: hidden; }
.lens-menu__name {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.lens-menu__option:hover .lens-menu__name,
.lens-menu__option.is-active .lens-menu__name { color: var(--text); }
.lens-menu__pro {
  font: 700 9px/1 var(--font-mono); letter-spacing: .06em; padding: 2px 5px; border-radius: 4px;
  background: rgba(56, 168, 255, .16); color: #5eb8ff; border: 1px solid rgba(56, 168, 255, .32);
}
.lens-menu__sub {
  font: 500 11px/1.25 var(--font-mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lens-menu__count {
  font: 700 11px/1 var(--font-mono); padding: 4px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--muted); flex: none;
}
.lens-menu__option.is-active .lens-menu__count {
  background: var(--accent); color: var(--accent-ink);
}

/* ============================== Timeline grid ============================== */
.timeline { position: relative; min-height: 60vh; transition: opacity .25s ease, transform .35s var(--ease-out); }
.timeline.is-switching { opacity: 0; transform: translateY(10px); }
.month { margin-top: clamp(28px, 4vw, 52px); }
.month:first-child { margin-top: 16px; }
.month__head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; }
.month__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.03em; }
.month__year { font: 500 14px var(--font-mono); color: var(--muted); }
.month__line { flex: 1; height: 1px; background: linear-gradient(to right, var(--line-2), transparent); align-self: center; }
.month__count { font: 500 12px var(--font-mono); color: var(--dim); }
.month__grid { position: relative; }

.tile {
  position: absolute; display: block; overflow: hidden; border-radius: var(--radius-sm);
  background: var(--c, #222) var(--lq) center / cover no-repeat;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
  cursor: zoom-in;
}
.tile.pre { opacity: 0; }
.tile.reveal { animation: tileIn .8s var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.tile img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06);
  transition: opacity .7s ease, transform 1.1s var(--ease-out), filter .5s;
  pointer-events: none;
}
.tile img.is-loaded { opacity: 1; transform: scale(1); }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background-image:
    linear-gradient(125deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .035) 18%,
      rgba(255, 255, 255, .09) 35%,
      rgba(255, 255, 255, .13) 50%,
      rgba(255, 255, 255, .09) 65%,
      rgba(255, 255, 255, .035) 82%,
      rgba(255, 255, 255, 0) 100%),
    linear-gradient(160deg,
      rgba(255, 255, 255, .085) 0%,
      rgba(255, 255, 255, .035) 50%,
      rgba(255, 255, 255, 0) 100%);
  background-size: 220% 220%, 100% 100%;
  background-position: var(--sx, 45%) var(--sy, 45%), 0 0;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .11);
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, 0) 45%);
  opacity: 0; transition: opacity .4s;
}
.tile__meta {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 8px;
  font: 500 11px/1.4 var(--font-mono); color: rgba(255, 255, 255, .92); letter-spacing: .02em;
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--ease-out);
  pointer-events: none;
}
.tile__meta .t { font: 600 14px/1.25 var(--font-body); letter-spacing: 0; }
.tile__meta .c { opacity: .7; white-space: nowrap; }
.tile__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); font-size: 15px; color: #fff;
  opacity: 0; transform: scale(.6) rotate(-30deg); transition: opacity .3s, transform .5s var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { z-index: 3; box-shadow: 0 24px 52px -20px rgba(0, 0, 0, .82), 0 0 0 1px rgba(255, 255, 255, .07); }
  .tile:hover img.is-loaded { transform: scale(1.045); }
  .tile:hover::before, .tile:focus-visible::before { opacity: 1; }
  .tile:hover::after, .tile:focus-visible::after { opacity: 1; }
  .tile:hover .tile__meta, .tile:focus-visible .tile__meta { opacity: 1; transform: none; }
  .tile:hover .tile__badge { opacity: 1; transform: none; }
}
.tile:active { transform: scale(.98); }

.empty { padding: 80px 0; text-align: center; color: var(--muted); }

/* ============================== Numbers ============================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat {
  position: relative; overflow: hidden; padding: 24px 22px 22px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
  transition: transform .5s var(--ease-spring), border-color .3s;
}
.stat > * { position: relative; z-index: 1; }
.stat:hover { transform: translateY(-4px) rotate(-.6deg); border-color: var(--line-2); }
.stat::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 110% at 20% 20%, var(--accent) 0%, transparent 78%),
    radial-gradient(120% 110% at 85% 80%, var(--accent) 0%, transparent 78%),
    var(--accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='n' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='1' seed='9'/%3E%3CfeGaussianBlur stdDeviation='12'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 3.4 -1.05'/%3E%3C/filter%3E%3Crect x='-20%25' y='-20%25' width='140%25' height='140%25' transform='rotate(23 250 250)' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='n' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='1' seed='9'/%3E%3CfeGaussianBlur stdDeviation='12'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 3.4 -1.05'/%3E%3C/filter%3E%3Crect x='-20%25' y='-20%25' width='140%25' height='140%25' transform='rotate(23 250 250)' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-size: 260% 260%;
  mask-size: 260% 260%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 18% 22%;
  mask-position: 18% 22%;
  opacity: .22;
  transition: opacity .45s var(--ease-out), background .6s;
}
.stat:nth-child(2n)::before { -webkit-mask-position: 78% 26%; mask-position: 78% 26%; }
.stat:nth-child(3n)::before { -webkit-mask-position: 34% 78%; mask-position: 34% 78%; }
.stat:nth-child(4n)::before { -webkit-mask-position: 82% 74%; mask-position: 82% 74%; }
.stat:nth-child(5n)::before { -webkit-mask-position: 52% 46%; mask-position: 52% 46%; }
.stat:nth-child(7n)::before { -webkit-mask-position: 22% 64%; mask-position: 22% 64%; }
.stat:hover::before { opacity: .40; }
.stat__icon { font-size: 22px; color: var(--accent); transition: color .6s; }
.stat__value {
  margin-top: 18px; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -.04em; line-height: 1.05;
  white-space: nowrap; font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.stat__value small { font-size: .45em; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 2px; }
.stat__label { margin-top: 8px; color: var(--muted); font-size: 14px; }
.stat__link { margin-top: 12px; display: inline-flex; font: 600 12px var(--font-mono); color: var(--text); opacity: .7; border-bottom: 1px dashed currentColor; }
.stat__link:hover { opacity: 1; color: var(--accent); }

/* ============================== Copyright ============================== */
.copyright { padding-bottom: clamp(60px, 8vw, 110px); }
.copyright__card {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); align-items: start;
  padding: clamp(24px, 4vw, 56px); border-radius: calc(var(--radius) * 1.6);
  background: linear-gradient(140deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line);
}
.copyright__icon { font-size: clamp(44px, 6vw, 72px); color: var(--accent); transition: color .6s; }
.copyright__icon svg { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.copyright p { color: #c9c4bb; max-width: 70ch; }
.copyright .section-title { font-size: clamp(30px, 4.5vw, 54px); margin-bottom: 14px; }
.copyright strong { color: var(--text); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px var(--pad) calc(28px + var(--safe-b));
  border-top: 1px solid var(--line); color: var(--dim); font-size: 13px;
}
.site-footer p { margin: 0; }
.to-top:hover { color: var(--text); }
.noscript { padding: 40px; text-align: center; }

/* ============================== Lightbox ============================== */
.lightbox { position: fixed; inset: 0; z-index: 200; overflow: hidden; touch-action: none; color: #fff; }
.lightbox[hidden] { display: none; }
.lb__backdrop { position: absolute; inset: 0; background: #050505; opacity: 0; transition: opacity .45s ease; }
.lb__ambient {
  position: absolute; inset: -10%; background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.5) brightness(.45); opacity: 0; transform: scale(1.1);
  transition: opacity .8s ease, background-image .6s;
}
.lightbox.is-open .lb__backdrop { opacity: .94; }
.lightbox.is-open .lb__ambient { opacity: .85; }

.lb__stage { position: absolute; inset: 0; overflow: hidden; cursor: zoom-in; }
.lb__stage.is-zoomed { cursor: grab; }
.lb__stage.is-dragging { cursor: grabbing; }
.lb__img {
  position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 50% 50%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  background: var(--c, #111) var(--lq) center / cover no-repeat;
}
.lb__spinner {
  position: absolute; right: 22px; bottom: calc(96px + var(--safe-b)); width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .8s linear infinite;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.lb__spinner.is-on { opacity: 1; }

.lb__top, .lb__bottom, .lb__nav, .lb__strip { transition: opacity .35s, transform .45s var(--ease-out); }
.lb__top {
  position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--safe-t)) clamp(12px, 2vw, 22px) 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent);
  opacity: 0; transform: translateY(-10px);
}
.lb__counter { font: 700 14px var(--font-mono); letter-spacing: .02em; }
.lb__counter .sep { opacity: .4; margin: 0 4px; }
.lb__cat { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.lb__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lb__zoomlevel { min-width: 52px; text-align: center; font: 600 12px var(--font-mono); opacity: .75; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 21px;
  transition: background-color .2s, transform .35s var(--ease-spring), color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn:active { transform: scale(.88); }
.icon-btn--sm { width: 36px; height: 36px; font-size: 18px; }
.icon-btn--info { position: relative; }
.icon-btn--info[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); }
.icon-btn--info::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0;
}
.icon-btn--info.pulse::after { animation: ping 1.4s var(--ease-out) 2; }
@keyframes ping { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.6); } }

.lb__nav {
  position: absolute; top: 50%; z-index: 6; display: grid; place-items: center; width: 56px; height: 56px; margin-top: -28px;
  border-radius: 50%; font-size: 26px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .1);
  opacity: 0; transition: opacity .35s, right .55s var(--ease-spring), background-color .2s, scale .15s;
}
.lb__nav:hover { background: rgba(255, 255, 255, .16); }
.lb__nav:active { scale: .9; }
.lb__nav--prev { left: clamp(10px, 2vw, 26px); }
.lb__nav--next { right: clamp(10px, 2vw, 26px); }
.lightbox.info-open .lb__nav--next {
  right: calc(min(360px, 100vw - 20px) + clamp(10px, 1.5vw, 20px) + clamp(10px, 2vw, 26px));
}
.lb__nav[disabled] { opacity: 0 !important; pointer-events: none; }

.lb__bottom {
  position: absolute; inset: auto 0 0 0; z-index: 5; display: flex; align-items: end; justify-content: space-between; gap: 16px;
  padding: 40px clamp(14px, 2vw, 24px) calc(16px + var(--safe-b));
  background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent);
  opacity: 0; transform: translateY(10px); pointer-events: none;
}
.lb__bottom > * { pointer-events: auto; }
.lightbox.has-strip .lb__bottom { bottom: 76px; background: none; padding-bottom: 10px; }
.lb__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 2vw, 22px); letter-spacing: -.02em; line-height: 1.2; }
.lb__sub { font: 500 12px/1.6 var(--font-mono); color: rgba(255, 255, 255, .7); }
.lb__sub .cr { color: rgba(255, 255, 255, .9); }
.lb__quick { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.lb__quick span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font: 600 12px/1 var(--font-mono); background: rgba(255, 255, 255, .1); backdrop-filter: blur(8px); white-space: nowrap;
}
.lb__quick svg { font-size: 14px; opacity: .8; }

.lb__strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 6px; height: calc(76px + var(--safe-b));
  padding: 10px clamp(14px, 2vw, 24px) calc(10px + var(--safe-b)); overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .35));
  opacity: 0; transform: translateY(10px);
  scroll-behavior: smooth;
}
.lb__strip::-webkit-scrollbar { display: none; }
.lb__strip button {
  flex: none; height: 56px; border-radius: 6px; overflow: hidden; opacity: .45;
  background: var(--c, #222) center / cover no-repeat; outline: 2px solid transparent; outline-offset: 2px;
  transition: opacity .25s, outline-color .25s, transform .35s var(--ease-spring);
}
.lb__strip button:hover { opacity: .85; transform: translateY(-2px); }
.lb__strip button.is-active { opacity: 1; outline-color: #fff; }
.lb__strip img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.lightbox.is-open .lb__top, .lightbox.is-open .lb__bottom, .lightbox.is-open .lb__strip { opacity: 1; transform: none; }
.lightbox.is-open .lb__nav { opacity: 1; }
.lightbox.ui-hidden .lb__top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.lightbox.ui-hidden .lb__bottom, .lightbox.ui-hidden .lb__strip { opacity: 0; transform: translateY(10px); pointer-events: none; }
.lightbox.ui-hidden .lb__nav { opacity: 0; pointer-events: none; }

/* info panel */
.lb__info {
  position: absolute; z-index: 8; top: calc(70px + var(--safe-t)); right: clamp(10px, 1.5vw, 20px); bottom: calc(90px + var(--safe-b));
  width: min(360px, calc(100vw - 20px)); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px; border-radius: 20px;
  background: rgba(18, 18, 20, .82); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  transform: translateX(calc(100% + 40px)) rotate(2deg); opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease-spring), opacity .3s;
  touch-action: pan-y;
}
.lb__info.is-open { transform: none; opacity: 1; pointer-events: auto; }
.lb__info-handle { display: none; }
.lb__info-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lb__info-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-card {
  position: relative; overflow: hidden; padding: 14px 14px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  opacity: 0; transform: translateY(12px) scale(.96);
}
.lb__info.is-open .info-card { animation: cardIn .55s var(--ease-spring) forwards; animation-delay: calc(var(--i) * 55ms + 80ms); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.info-card__icon { font-size: 18px; color: var(--accent); }
.info-card__value { margin-top: 10px; font: 700 22px/1.1 var(--font-mono); letter-spacing: -.02em; white-space: nowrap; }
.info-card__value small { font-size: 12px; opacity: .6; font-weight: 500; margin-left: 2px; }
.info-card__label { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .55); }
.info-card__extra { margin-top: 2px; font: 500 11px var(--font-mono); color: rgba(255, 255, 255, .45); }
.info-card .meter { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; transition: width 1s var(--ease-out) .25s; }
.lb__info.is-open .info-card .meter { width: var(--m, 0%); }
.info-list { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .08); }
.info-list li { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 14px; }
.info-list svg { font-size: 18px; opacity: .55; }
.info-list .k { color: rgba(255, 255, 255, .5); font-size: 12px; display: block; }
.info-copy { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 12px; color: rgba(255, 255, 255, .6); display: flex; gap: 10px; }
.info-copy svg { font-size: 16px; flex: none; margin-top: 1px; color: var(--accent); }

/* ============================== Gear Section & Lightbox Gear Preview ============================== */
.gear-bench {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .95fr); gap: 18px; align-items: start;
}
.gear-stage-card {
  position: relative; overflow: hidden; min-width: 0; max-width: 100%; border-radius: calc(var(--radius) * 1.4);
  background: radial-gradient(120% 90% at 50% 35%, rgba(255, 255, 255, .055) 0%, rgba(16, 17, 20, .95) 68%), var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .75);
}
.gear-stage__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
}
.gear-stage__body-badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px;
}
.gear-stage__body-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  transition: background-color .4s;
}
.gear-stage__body-badge strong { font-family: var(--font-display); font-size: 15px; letter-spacing: -.01em; }
.gear-stage__body-badge .sub { font: 500 11.5px var(--font-mono); color: var(--muted); }
.gear-stage__toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.gear-toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2);
  font: 600 12px/1 var(--font-mono); color: var(--muted);
  transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--ease-spring);
}
.gear-toggle:hover {
  color: var(--text); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22);
}
.gear-toggle:active { transform: scale(.94); }
.gear-toggle[hidden] { display: none; }
.gear-toggle__led {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22);
  transition: background-color .2s;
}
.gear-toggle.is-on {
  color: var(--text);
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 255, 255, .28);
}
.gear-toggle.is-on .gear-toggle__led {
  background: var(--text);
}
.gear-toggle--action { color: var(--text); }
.gear-toggle--action svg { font-size: 14px; color: var(--accent); transition: transform .4s var(--ease-spring); }
.gear-toggle--action:hover svg { transform: rotate(90deg) scale(1.1); }

.gear-viewport {
  position: relative; width: 100%; min-width: 0; height: clamp(310px, 42vw, 450px); user-select: none; -webkit-user-select: none;
  cursor: grab; touch-action: pan-y; overflow: hidden;
}
.gear-viewport:active { cursor: grabbing; }
.gear-viewport canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; }
.gear-viewport__hud {
  position: absolute; top: 14px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.gear-hud-pill {
  padding: 6px 12px; border-radius: 999px; background: rgba(10, 11, 13, .72); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); font: 600 12px/1.2 var(--font-mono); color: var(--text);
}
.gear-hud-drag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: rgba(10, 11, 13, .55); font: 500 11.5px var(--font-mono); color: var(--muted);
}
.gear-hud-drag svg { font-size: 14px; color: var(--accent); }

.gear-scale {
  position: absolute; left: 20px; right: 20px; bottom: 12px; pointer-events: none;
}
.gear-scale__bar {
  height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden;
}
.gear-scale__bar span {
  display: block; height: 100%; width: 65%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, .85));
  transition: width .45s var(--ease-spring), background-color .4s;
}
.gear-scale__meta {
  display: flex; justify-content: space-between; margin-top: 6px; font: 500 11px var(--font-mono); color: var(--muted);
}

.gear-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  padding: 12px 18px 16px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .22);
}
.gear-angles {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.gear-angle {
  height: 32px; padding: 0 13px; border-radius: 999px; font: 600 12px var(--font-body); color: var(--muted);
  transition: background-color .25s, color .25s, transform .25s var(--ease-spring);
}
.gear-angle:hover { color: var(--text); }
.gear-angle.is-active { background: var(--text); color: var(--bg); }

.gear-scrubber {
  display: flex; align-items: center; gap: 10px; flex: 1 1 240px; justify-content: flex-end;
  font: 600 12px var(--font-mono);
}
.gear-scrubber label { color: var(--muted); white-space: nowrap; }
.gear-scrubber input[type="range"] {
  flex: 1; max-width: 170px; accent-color: var(--accent); cursor: pointer; height: 5px;
}
.gear-scrubber output {
  min-width: 112px; text-align: right; color: var(--text); white-space: nowrap;
}
.gear-scrubber output small { color: var(--muted); font-weight: 500; }

.gear-sidebar { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-width: 100%; }
.gear-lenses-head {
  display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px;
  font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.gear-lenses-head small { font-size: 11px; color: var(--dim); text-transform: none; letter-spacing: 0; }
.gear-lenses { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.gear-lens-btn {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-width: 0; padding: 12px 14px; border-radius: 16px; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s, transform .35s var(--ease-spring);
}
.gear-lens-btn:hover {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .18);
  transform: translateX(3px);
}
.gear-lens-btn.is-active {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .28);
}
.gear-lens-btn__viz {
  width: 58px; height: 34px; border-radius: 10px; background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: flex-start;
  padding: 0 6px; overflow: hidden;
}
.gear-lens-btn__silhouette {
  display: block; height: 16px; border-radius: 3px; position: relative;
  transition: transform .4s var(--ease-spring);
}
.gear-lens-btn:hover .gear-lens-btn__silhouette,
.gear-lens-btn.is-active .gear-lens-btn__silhouette { transform: scaleX(1.06); }
.gear-lens-btn__title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.gear-lens-btn__pro {
  font: 700 9.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 5px;
  background: rgba(56, 168, 255, .16); color: #5ec2ff; border: 1px solid rgba(94, 194, 255, .35);
}
.gear-lens-btn__sub {
  margin-top: 2px; font: 500 12px var(--font-mono); color: var(--muted);
}
.gear-lens-btn__count {
  font: 700 11px/1 var(--font-mono); padding: 5px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--muted); white-space: nowrap;
}
.gear-lens-btn.is-active .gear-lens-btn__count {
  background: var(--accent); color: var(--accent-ink);
}

.gear-detail {
  min-width: 0; max-width: 100%; overflow: hidden;
  padding: 18px 18px 16px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line);
}
.gear-detail__head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.gear-detail__name { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.gear-detail__equiv { font: 600 12px var(--font-mono); color: var(--accent); margin-top: 3px; }
.gear-detail__desc { margin: 10px 0 14px; font-size: 13.5px; line-height: 1.55; color: #c9c4bb; }
.gear-specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.gear-spec {
  padding: 9px 10px; border-radius: 11px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06);
}
.gear-spec .k { display: block; font: 500 10.5px var(--font-mono); color: var(--muted); }
.gear-spec .v { display: block; margin-top: 3px; font: 700 13px var(--font-mono); color: var(--text); }

.gear-samples { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.gear-samples__top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px;
  font: 600 11.5px var(--font-mono); color: var(--muted);
}
.gear-samples__filter {
  font: 600 11.5px var(--font-mono); color: var(--accent); border-bottom: 1px dashed currentColor;
}
.gear-samples__filter:hover { opacity: .85; }
.gear-samples__strip {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.gear-samples__strip::-webkit-scrollbar { display: none; }
.gear-sample-thumb {
  position: relative; flex: 0 0 66px; height: 48px; border-radius: 8px; overflow: hidden;
  background: var(--c, #222) center / cover no-repeat; border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .3s var(--ease-spring), border-color .25s;
}
.gear-sample-thumb:hover { transform: translateY(-2px) scale(1.04); border-color: rgba(255, 255, 255, .32); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32); }
.gear-sample-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gear-sample-thumb span {
  position: absolute; right: 3px; bottom: 2px; padding: 1px 4px; border-radius: 4px;
  background: rgba(0, 0, 0, .7); font: 600 9px var(--font-mono); color: #fff;
}

/* Lightbox Per-Photo Gear Preview */
.lb__quick .lb-gear-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  font: 600 12px/1 var(--font-mono); background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(8px); white-space: nowrap;
  transition: background-color .25s, border-color .25s, transform .25s var(--ease-spring);
}
.lb__quick .lb-gear-chip:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-1px); }
.lb__quick .lb-gear-chip svg { font-size: 14px; opacity: .9; }

.lb-gear-card {
  margin-top: 12px; padding: 12px; border-radius: 16px;
  background: radial-gradient(120% 100% at 50% 25%, rgba(255, 255, 255, .07) 0%, rgba(10, 11, 14, .88) 75%);
  border: 1px solid rgba(255, 255, 255, .1);
}
.lb-gear-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.lb-gear-card__title {
  font: 700 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent);
}
.lb-gear-card__sub {
  font: 600 11px var(--font-mono); color: rgba(255, 255, 255, .6);
}
.lb-gear-canvas-wrap {
  position: relative; width: 100%; min-width: 0; height: 168px; border-radius: 12px; overflow: hidden;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .06);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.lb-gear-canvas-wrap:active { cursor: grabbing; }
.lb-gear-canvas-wrap canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; }
.lb-gear-card__bar {
  display: flex; align-items: center; margin-top: 8px;
}
.lb-gear-angles { display: flex; gap: 4px; width: 100%; }
.lb-gear-angle {
  flex: 1; height: 26px; padding: 0 8px; border-radius: 999px; font: 600 10.5px var(--font-mono);
  color: rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .06);
  transition: background-color .2s, color .2s;
}
.lb-gear-angle:hover { color: #fff; }
.lb-gear-angle.is-active { background: #fff; color: #0b0b0c; }

.lb__hint {
  position: absolute; left: 50%; top: calc(76px + var(--safe-t)); z-index: 6; transform: translate(-50%, -6px);
  display: flex; gap: 16px; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px);
  font-size: 12px; color: rgba(255, 255, 255, .8); opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s var(--ease-out);
  white-space: nowrap;
}
.lb__hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.lb__hint kbd { font: 600 11px var(--font-mono); padding: 2px 6px; margin-right: 3px; border-radius: 5px; background: rgba(255, 255, 255, .14); }

/* ============================== Responsive ============================== */
@media (max-width: 1120px) {
  .gear-bench { grid-template-columns: minmax(0, 1fr); }
  .gear-lenses { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
}
@media (max-width: 960px) {
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .toolbar__actions { justify-content: flex-end; }
}
@media (max-width: 900px) {
  .hero__meta { display: none; }
  .lb__zoomlevel, #lbZoomIn, #lbZoomOut { display: none; }
}
@media (max-width: 720px) {
  :root { --header-h: 58px; }
  .brand { font-size: 16px; gap: 10px; }
  .brand__mark { width: 32px; height: 32px; font-size: 18px; }

  /* Mobile burger menu */
  .menu-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); color: var(--text);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: background-color .25s, border-color .25s, transform .3s var(--ease-spring);
  }
  .menu-btn:active { transform: scale(.93); }
  .menu-btn__bars { position: relative; display: block; width: 17px; height: 12px; }
  .menu-btn__bars span {
    position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .38s var(--ease-spring), opacity .2s, top .38s var(--ease-spring), background-color .25s;
  }
  .menu-btn__bars span:nth-child(1) { top: 0; }
  .menu-btn__bars span:nth-child(2) { top: 5px; }
  .menu-btn__bars span:nth-child(3) { top: 10px; }
  .site-header.menu-open .menu-btn { background: var(--text); color: var(--bg); border-color: var(--text); }
  .site-header.menu-open .menu-btn__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .site-header.menu-open .menu-btn__bars span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .site-header.menu-open .menu-btn__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

  .site-nav {
    position: absolute; top: calc(var(--header-h) + var(--safe-t) + 6px); right: var(--pad);
    flex-direction: column; gap: 4px; min-width: 192px; padding: 8px; border-radius: 18px;
    background: rgba(16, 17, 20, .94); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid var(--line-2); box-shadow: 0 22px 48px -12px rgba(0, 0, 0, .78);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-10px) scale(.94); transform-origin: top right;
    transition: opacity .24s var(--ease-out), transform .36s var(--ease-spring), visibility .24s;
  }
  .site-header.menu-open .site-nav {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1);
  }
  .site-nav a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text);
  }
  .site-nav a::after {
    content: "→"; font-family: var(--font-mono); font-size: 12px; color: var(--muted);
    transition: transform .25s var(--ease-spring), color .25s;
  }
  .site-nav a:hover, .site-nav a:active { background: rgba(255, 255, 255, .08); color: var(--accent); }
  .site-nav a:hover::after, .site-nav a:active::after { transform: translateX(3px); color: var(--accent); }

  .hero__content { bottom: 70px; }
  .hero__cta .btn { height: 46px; padding: 0 18px; font-size: 14px; }
  .gallery-section, .gear-section, .numbers, .copyright { padding-top: 44px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; padding-bottom: 10px; }

  /* Mobile category filter strip: tighter spacing + intuitive scroll affordances */
  .filters-wrap {
    position: relative; display: flex; align-items: center; align-self: stretch; min-width: 0;
  }
  .filters-wrap.is-scrollable { padding-bottom: 6px; }
  .filters-wrap.is-scrollable::after {
    content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px;
    background: rgba(255, 255, 255, .09);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-size: var(--scroll-w, 45%) 100%;
    background-position: var(--scroll-x, 0%) 0;
    transition: background-position .1s linear, background-size .2s ease;
  }
  .filters {
    flex: 1; align-self: stretch; gap: 2px; padding: 4px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .filters-wrap.has-scroll-right:not(.has-scroll-left) .filters {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 42px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 42px), transparent 100%);
  }
  .filters-wrap.has-scroll-left:not(.has-scroll-right) .filters {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42px);
    mask-image: linear-gradient(to right, transparent 0%, #000 42px);
  }
  .filters-wrap.has-scroll-left.has-scroll-right .filters {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38px, #000 calc(100% - 38px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 38px, #000 calc(100% - 38px), transparent 100%);
  }
  .filters__indicator { top: 4px; height: calc(100% - 8px); }
  .filter {
    height: 34px; padding: 0 9px 0 8px; gap: 5px; font-size: 12.5px;
    flex: 0 0 auto; justify-content: center; scroll-snap-align: center;
  }
  .filter svg { font-size: 15px; }
  .filter .count { font-size: 10px; padding: 3px 5px; }

  .filters__hint {
    position: absolute; top: 50%; z-index: 4; display: grid; place-items: center;
    width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
    background: rgba(24, 25, 29, .95); border: 1px solid var(--line-2); color: var(--text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .65); font-size: 14px;
    opacity: 0; pointer-events: none; transform: scale(.75);
    transition: opacity .25s var(--ease-out), transform .3s var(--ease-spring), background-color .2s;
  }
  .filters-wrap.is-scrollable .filters__hint { margin-top: -17px; }
  .filters__hint--left { left: 5px; }
  .filters__hint--right { right: 5px; }
  .filters-wrap.has-scroll-left .filters__hint--left,
  .filters-wrap.has-scroll-right .filters__hint--right {
    opacity: 1; pointer-events: auto; transform: scale(1);
  }
  .filters-wrap.has-scroll-right .filters__hint--right svg {
    animation: hintNudge 1.8s ease-in-out infinite;
  }
  @keyframes hintNudge {
    0%, 100% { transform: translateX(-1px); }
    50% { transform: translateX(2.5px); }
  }

  .toolbar__actions { position: relative; justify-content: stretch; flex-wrap: nowrap; gap: 6px; width: 100%; min-width: 0; }
  .sort-dropdown { position: static; flex: 1 1 0; min-width: 0; }
  .sort-dropdown > .chip-btn { width: 100%; min-width: 0; }
  .sort-menu, .lens-menu { left: 0; right: 0; width: 100%; transform-origin: top center; }
  .sort-menu__row { gap: 8px; padding: 5px 6px 5px 8px; }
  .sort-menu__field { font-size: 12.5px; gap: 6px; }
  .sort-dir { height: 25px; padding: 0 7.5px; font-size: 10.5px; }
  .chip-btn { justify-content: center; height: 38px; padding: 0 12px; gap: 6px; font-size: 12.5px; min-width: 0; }
  #surpriseBtn { flex: 0 0 auto; }
  .month__head { margin-bottom: 10px; }
  .tile { border-radius: 6px; }

  .gear-stage__top { padding: 12px 14px 10px; }
  .gear-stage__body-badge .sub { display: none; }
  .gear-toggle { height: 30px; padding: 0 10px; font-size: 11px; }
  .gear-viewport { height: 280px; }
  .gear-viewport__hud { top: 10px; left: 12px; right: 12px; }
  .gear-hud-drag span { display: none; }
  .gear-controls { flex-direction: column; align-items: stretch; padding: 10px 12px 14px; gap: 10px; min-width: 0; }
  .gear-angles { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; max-width: 100%; }
  .gear-angles::-webkit-scrollbar { display: none; }
  .gear-angle { flex: 1 0 auto; padding: 0 10px; font-size: 11.5px; height: 30px; }
  .gear-scrubber { flex: 1 1 auto; justify-content: space-between; min-width: 0; width: 100%; gap: 8px; }
  .gear-scrubber input[type="range"] { max-width: none; min-width: 0; flex: 1; }
  .gear-scrubber output { min-width: auto; }
  .gear-lenses { grid-template-columns: minmax(0, 1fr); }
  .gear-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .copyright__card { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 18px 16px 16px; min-width: 0; }

  .lb__nav { display: none; }
  .lb__strip { display: none; }
  .lightbox.has-strip .lb__bottom { bottom: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent); padding-bottom: calc(16px + var(--safe-b)); }
  .lb__bottom { flex-direction: column; align-items: stretch; gap: 10px; }
  .lb__quick { justify-content: flex-start; }
  .lb__hint { display: none; }
  /* info panel becomes a bottom sheet */
  .lb__info {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; max-height: 72dvh;
    border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + var(--safe-b));
    transform: translateY(105%); border-left: 0; border-right: 0; border-bottom: 0;
  }
  .lb__info.is-open { transform: translateY(var(--sheet-y, 0)); }
  .lb__info.is-dragging { transition: none; }
  .lb__info-handle { display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); margin: 2px auto 10px; }
}
@media (max-width: 480px) {
  #surpriseBtn { width: 38px; padding: 0; flex: 0 0 38px; }
  #surpriseBtn span { display: none; }
  .sort-menu__row { flex-direction: column; align-items: stretch; gap: 6px; padding: 7px 8px; }
  .sort-menu__field { padding: 0 2px; font-size: 13px; }
  .sort-menu__dirs { display: grid; grid-template-columns: 1fr 1fr; }
  .sort-dir { text-align: center; height: 28px; font-size: 11px; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
}
