/* More Than the Edit — local gallery draft */
.mte-page { background: var(--bg); }
.mte-page .site-header { z-index: 80; }
.mte-main { padding-top: 0 !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mte-hero {
  padding-top: clamp(42px, 6vw, 76px);
  padding-bottom: clamp(58px, 8vw, 108px);
}

.mte-back {
  display: inline-flex;
  margin-bottom: clamp(34px, 5vw, 64px);
  color: var(--muted);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: .78rem;
  transition: color .18s ease, transform .18s ease;
}
.mte-back:hover { color: var(--blue); transform: translateX(-3px); }

.mte-hero .eyebrow { margin: 0 0 18px; }
.mte-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  font-size: clamp(4rem, 10vw, 9.3rem);
  line-height: .82;
  font-weight: 600;
  letter-spacing: -.075em;
}
.mte-hero h1 span { color: var(--blue); }

.mte-hero-meta {
  margin-top: clamp(30px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 680px) auto;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
}
.mte-hero-meta p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.65;
}
.mte-random-note {
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: right;
}

.mte-work { border-top: 1px solid var(--line); }
.mte-controls-wrap {
  position: sticky;
  top: 78px;
  z-index: 50;
  background: rgba(244,242,237,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.mte-controls {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.mte-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mte-filter,
.mte-shuffle,
.mte-load-more {
  appearance: none;
  border: 1px solid rgba(32,37,43,.16);
  background: rgba(255,255,255,.52);
  color: var(--text);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: .75rem;
  padding: 10px 15px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.mte-filter:hover,
.mte-shuffle:hover,
.mte-load-more:hover { border-color: var(--blue); color: var(--blue); }
.mte-filter.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.mte-shuffle { white-space: nowrap; background: transparent; }

.mte-gallery {
  --mte-gap: 16px;
  --mte-row: 6px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: var(--mte-row);
  grid-auto-flow: dense;
  gap: var(--mte-gap);
  padding: 34px 0 8px;
}

.mte-item {
  grid-column: span var(--mte-span, 4);
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e8e5df;
  border: 1px solid rgba(32,37,43,.08);
  box-shadow: 0 7px 24px rgba(31,39,47,.055);
  cursor: zoom-in;
  min-width: 0;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mte-item:hover {
  transform: translateY(-3px);
  border-color: rgba(63,111,145,.34);
  box-shadow: 0 18px 44px rgba(31,39,47,.12);
}
.mte-item-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e7e4de;
}
.mte-item img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.mte-item:hover img { transform: scale(1.018); }
.mte-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, transparent 62%, rgba(17,23,29,.55) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.mte-item:hover .mte-item-overlay,
.mte-item:focus-visible .mte-item-overlay { opacity: 1; }
.mte-item-overlay span {
  font-family: "Space Grotesk", sans-serif;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.mte-more-wrap { display: flex; justify-content: center; padding: 34px 0 84px; }
.mte-load-more { background: #fff; padding: 12px 20px; }
.mte-load-more[hidden] { display: none; }

.mte-outro {
  border-top: 1px solid var(--line);
  padding: clamp(72px, 9vw, 120px) 0 clamp(24px, 4vw, 56px);
}
.mte-outro .eyebrow { margin: 0 0 14px; }
.mte-outro > a {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 5.6vw, 5.6rem);
  line-height: .95;
  letter-spacing: -.055em;
  transition: color .18s ease;
}
.mte-outro > a span { color: var(--blue); }
.mte-outro > a:hover { color: var(--blue); }

.mte-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
}
.mte-lightbox.is-open { display: flex; }
.mte-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,25,31,.90);
  backdrop-filter: blur(12px);
}
.mte-lightbox-panel {
  position: relative;
  z-index: 2;
  width: min(96vw, 1500px);
  height: min(92vh, 980px);
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 54px;
  align-items: center;
  gap: 18px;
}
.mte-lightbox-figure {
  margin: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  gap: 12px;
}
.mte-lightbox-media {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mte-lightbox-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.mte-lightbox-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255,255,255,.7);
  font-family: "Space Grotesk", sans-serif;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.mte-lightbox-close,
.mte-lightbox-nav {
  appearance: none;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background .18s ease, transform .18s ease;
}
.mte-lightbox-nav:hover,
.mte-lightbox-close:hover { background: rgba(255,255,255,.18); transform: scale(1.04); }
.mte-lightbox-close { position: absolute; right: 0; top: 0; z-index: 3; font-size: 1.65rem; }
body.mte-lightbox-open { overflow: hidden; }

@media (max-width: 980px) {
  .mte-hero-meta { grid-template-columns: 1fr; }
  .mte-random-note { text-align: left; }
  .mte-item { --mte-span: 6 !important; }
  .mte-item[data-span="8"], .mte-item[data-span="7"] { --mte-span: 12 !important; }
}

@media (max-width: 760px) {
  .mte-hero { padding-top: 30px; padding-bottom: 56px; }
  .mte-back { margin-bottom: 38px; }
  .mte-hero h1 { font-size: clamp(3.25rem, 18vw, 6rem); line-height: .84; }
  .mte-controls-wrap { top: 68px; }
  .mte-controls { min-height: auto; padding-top: 12px; padding-bottom: 12px; align-items: flex-start; }
  .mte-filters { gap: 6px; }
  .mte-filter, .mte-shuffle { font-size: .68rem; padding: 8px 11px; }
  .mte-shuffle { margin-left: auto; }
  .mte-gallery { grid-template-columns: 1fr; grid-auto-rows: auto; display: block; padding-top: 22px; }
  .mte-item { margin-bottom: 14px; border-radius: 12px; }
  .mte-item-overlay { opacity: 1; background: linear-gradient(180deg, transparent 76%, rgba(17,23,29,.48) 100%); padding: 13px; }
  .mte-item-overlay span:last-child { display: none; }
  .mte-more-wrap { padding: 24px 0 64px; }
  .mte-lightbox { padding: 12px; }
  .mte-lightbox-panel { width: 100%; height: 94vh; grid-template-columns: 1fr; gap: 0; }
  .mte-lightbox-nav { position: absolute; bottom: 40px; z-index: 4; }
  .mte-lightbox-prev { left: 4px; }
  .mte-lightbox-next { right: 4px; }
  .mte-lightbox-close { top: 4px; right: 4px; }
  .mte-lightbox-figure { padding: 58px 0 88px; }
  .mte-lightbox-figure figcaption { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .mte-item, .mte-item img, .mte-filter, .mte-shuffle, .mte-back { transition: none !important; }
}
