:root {
  --paper: #fafafa;
  --ink: #1d1d1b;
  --brand-color: #1d1d1b;
  --site-gutter-left: 8rem;
  --site-gutter-right: 8rem;
  --muted: rgba(29, 29, 27, 0.72);
  --strip-gap: 2px;
  --outer-gutter: 12px;
  --meta-side-margin: 38px;
  --page-side-margin: 180px;
  --meta-size: 12.6px;
  --meta-track: 0.08em;
  --edge-band: 42px;
  --hover-scale: 1.08;
  --lateral-gap: 4px;
  --miolo-grid-scale: 0.25;
  --row-gap: 4px;
  --lateral-tile-size: calc((100vh - (var(--edge-band) * 2)) * var(--miolo-grid-scale));
}

* {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--paper);
  overflow: hidden;
}

body {
  position: relative;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.edge-meta {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: flex-start;
  padding: 12px calc(var(--outer-gutter) + var(--meta-side-margin));
  font-size: var(--meta-size);
  font-weight: 700;
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.edge-meta a,
.edge-meta button {
  pointer-events: auto;
}

.edge-meta--top {
  top: 0;
  align-items: center;
  z-index: 200;
}

.edge-meta--bottom {
  bottom: 0;
  align-items: flex-end;
  z-index: 3;
}

.edge-meta__center,
.edge-meta__right,
.edge-meta__left {
  display: flex;
  gap: 14px;
  align-items: center;
  white-space: nowrap;
}

.edge-meta__center {
  justify-content: center;
  justify-self: center;
}

.edge-meta__left {
  justify-self: start;
}

.edge-meta__right {
  justify-self: end;
}

.edge-meta__home {
  display: block;
  pointer-events: auto;
}

.edge-meta__brand {
  width: clamp(116px, 15vw, 210px);
  height: auto;
  filter: brightness(0) saturate(100%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.edge-meta__left,
.edge-meta__right {
  flex: 0 0 auto;
}

.edge-meta__bottom-note {
  max-width: 180px;
  white-space: normal;
  line-height: 1.16;
  text-align: left;
  transform: translateX(-58px);
}

.edge-meta__right a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

#nav-about-btn,
#nav-close-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

#nav-close-btn {
  display: none;
}

#about-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#about-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#about-text {
  max-width: 800px;
  width: calc(100% - var(--site-gutter-left) - var(--site-gutter-right));
  text-align: justify;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.24;
  color: var(--brand-color);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

#about-text p {
  margin: 0 0 1.45em 0;
}

#about-text p:last-child {
  margin-bottom: 0;
  letter-spacing: 0.08em;
  text-align: justify;
}

#about-text .about-contact {
  padding-top: 1.2em;
  font-size: 0.85em;
  letter-spacing: 0.03em;
  text-align: right;
}

#about-text p.about-contact:last-child {
  text-align: right;
  letter-spacing: 0.03em;
}

#about-text .about-contact::before {
  content: "";
  display: block;
  width: 100%;
  border-top: 1px solid currentColor;
  opacity: 0.35;
  margin-bottom: 1.2em;
}

#about-text .about-contact .contact-separator {
  display: inline-block;
  margin: 0 0.45em;
  opacity: 0.5;
}

#about-text .about-contact-label {
  font-weight: 700;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--edge-band) 0;
  overflow: hidden;
}

.strip-shell {
  width: calc(100vw - (var(--page-side-margin) * 2));
  min-height: calc(100vh - (var(--edge-band) * 2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  clip-path: inset(-100vh 0 -100vh 0);
}

.strip-rows {
  position: relative;
  width: 100%;
  height: calc((var(--lateral-tile-size) * 2) + var(--row-gap));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--row-gap);
  overflow: visible;
  cursor: ew-resize;
  user-select: none;
}

.lateral-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: var(--lateral-tile-size);
  width: max-content;
  min-width: 100%;
  overflow: visible;
}

.lateral-row-track {
  display: flex;
  align-items: stretch;
  gap: var(--lateral-gap);
  height: 100%;
  width: max-content;
  overflow: visible;
  will-change: transform;
}

.lateral-segment {
  display: flex;
  align-items: stretch;
  gap: var(--lateral-gap);
  height: 100%;
  width: max-content;
  flex: none;
  overflow: visible;
}

.strip-item {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ecece8;
  width: var(--item-width, 120px);
  height: 100%;
  flex-basis: var(--item-width, 120px);
  transform-origin: center center;
  isolation: isolate;
  will-change: transform;
  transition: transform 0.55s ease;
  cursor: pointer;
}

.strip-item img {
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  filter: grayscale(1) brightness(0.98) contrast(1.02);
  transform: scale(1.002);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.strip-item:hover img {
  filter: grayscale(0) brightness(1) contrast(1);
  transform: scale(1.06);
}

.strip-item:focus-visible img {
  filter: grayscale(0) brightness(1) contrast(1);
  transform: scale(1.06);
}

.strip-item:focus {
  outline: none;
}

.strip-item:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.hover-title {
  position: fixed;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(-50%, 8px, 0);
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-align: center;
  overflow: visible;
}

.hover-title.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.hover-title__word {
  flex: 1 1 auto;
  letter-spacing: 0.42em;
}

#home-lightbox {
  --lightbox-main-height: 84vh;
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  opacity: 0;
  cursor: zoom-out;
  transition: opacity 0.32s ease, background-color 0.42s ease;
}

#home-lightbox.active {
  display: flex;
  opacity: 1;
}

#home-lightbox.is-opening {
  background: rgba(255, 255, 255, 0.95);
  pointer-events: none;
}

#home-lightbox.is-opening .home-lightbox__track {
  opacity: 1;
  transform: scale(1);
}

#home-lightbox.is-opening #home-lightbox-close,
#home-lightbox.is-opening #home-lightbox-prev,
#home-lightbox.is-opening #home-lightbox-next {
  opacity: 0;
  pointer-events: none;
}

.home-lightbox__track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2.4rem;
  width: 100%;
  max-width: min(94vw, 1800px);
  padding: 0 8rem;
  pointer-events: auto;
  touch-action: pan-y;
  transform: scale(1);
  transform-origin: center center;
  opacity: 1;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

#home-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  pointer-events: none;
}

.home-lightbox__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 0;
}

#home-lightbox-img {
  width: auto;
  height: var(--lightbox-main-height);
  max-width: 84vw;
  pointer-events: auto;
  cursor: default;
  transform: scale(1);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

#home-lightbox.is-opening #home-lightbox-img {
  transform: scale(0.992);
}

.home-lightbox__side-image {
  width: auto;
  height: var(--lightbox-main-height);
  max-width: min(26vw, 420px);
  opacity: 0.42;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.home-lightbox__side-image:hover {
  opacity: 0.68;
  transform: scale(1.01);
}

.home-lightbox__side-image.is-hidden {
  opacity: 0;
  pointer-events: none;
}

#home-lightbox.is-opening .home-lightbox__side-image {
  opacity: 0;
  transform: none;
}

#home-lightbox-prev-preview {
  justify-self: end;
}

#home-lightbox-next-preview {
  justify-self: start;
}

#home-lightbox-caption {
  position: absolute;
  top: calc(100% + 24px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 70vw;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.42em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

#home-lightbox-close,
#home-lightbox-prev,
#home-lightbox-next {
  position: fixed;
  z-index: 21;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.18s ease;
}

#home-lightbox-close {
  top: auto;
  right: 2rem;
  bottom: 2rem;
  line-height: 1;
}

#home-lightbox-prev,
#home-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  line-height: 1;
  padding: 1rem;
  user-select: none;
}

#home-lightbox-prev {
  left: 2rem;
}

#home-lightbox-next {
  right: 2rem;
}

.home-lightbox__zoom-proxy {
  position: fixed;
  z-index: 22;
  margin: 0;
  object-fit: contain;
  pointer-events: none;
  transform-origin: center center;
  will-change: top, left, width, height;
  transition:
    top 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease;
}

.home-lightbox__zoom-proxy.is-fading {
  opacity: 0;
  transition-delay: 0s, 0s, 0s, 0s, 0.28s;
}

@media (max-width: 960px) {
  :root {
    --outer-gutter: 10px;
    --meta-side-margin: 18px;
    --page-side-margin: 14px;
    --edge-band: 40px;
    --lateral-gap: 0px;
  }

  .edge-meta__right,
  .edge-meta__left {
    gap: 10px;
  }

  .edge-meta__brand {
    width: clamp(108px, 20vw, 176px);
  }

  #home-lightbox {
    --lightbox-main-height: 58vh;
  }

  .home-lightbox__track {
    gap: 1.2rem;
    padding: 0 4.8rem;
  }

  .home-lightbox__side-image {
    max-width: min(26vw, 180px);
  }

  #home-lightbox-img {
    max-width: 84vw;
  }
}

@media (max-width: 640px) {
  :root {
    --outer-gutter: 8px;
    --meta-side-margin: 0px;
    --page-side-margin: 10px;
    --meta-size: 11.2px;
    --edge-band: 82px;
    --lateral-gap: 0px;
    --miolo-grid-scale: 0.62;
  }

  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .edge-meta {
    mix-blend-mode: normal;
  }

  .edge-meta--top {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand brand"
      "left right";
    row-gap: 6px;
    align-items: center;
    padding: 8px var(--outer-gutter) 6px;
    background: rgba(250, 250, 250, 0.92);
  }

  .edge-meta--top .edge-meta__left {
    grid-area: left;
  }

  .edge-meta--top .edge-meta__center {
    grid-area: brand;
  }

  .edge-meta--top .edge-meta__right {
    grid-area: right;
    gap: 8px;
  }

  .edge-meta--top a,
  .edge-meta--top button {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  .edge-meta--bottom {
    position: static;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 0 var(--outer-gutter) 28px;
    background: var(--paper);
  }

  .edge-meta--bottom .edge-meta__left {
    display: none;
  }

  .edge-meta--bottom .edge-meta__center {
    justify-content: flex-start;
    white-space: normal;
  }

  .edge-meta--bottom .edge-meta__right {
    justify-content: flex-end;
  }

  #about-overlay {
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(var(--edge-band) + 18px) 20px 40px;
  }

  #about-text {
    width: min(100%, 34rem);
    max-width: none;
    font-size: 1.6rem;
    line-height: 1.38;
    text-align: left;
    letter-spacing: 0;
  }

  #about-text p:last-child,
  #about-text p.about-contact:last-child {
    text-align: left;
    letter-spacing: 0;
  }

  #about-text .about-contact {
    font-size: 1.4rem;
    text-align: left;
    overflow-wrap: anywhere;
  }

  #about-text .about-contact a {
    display: block;
    margin-top: 0.35em;
  }

  #about-text .about-contact .contact-separator {
    display: none;
  }

  .edge-meta__bottom-note {
    max-width: 124px;
    transform: none;
  }

  .edge-meta__brand {
    width: clamp(98px, 28vw, 124px);
  }

  .stage {
    height: auto;
    min-height: 100svh;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--edge-band) 0 28px;
    overflow: visible;
  }

  .strip-shell {
    width: calc(100vw - (var(--page-side-margin) * 2));
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    clip-path: none;
  }

  .strip-rows {
    cursor: default;
    overflow: visible;
    width: min(92vw, 520px);
    height: auto;
    display: block;
  }

  .lateral-track,
  .lateral-row-track,
  .lateral-segment {
    display: block;
    width: 100%;
    height: auto;
  }

  .strip-item {
    width: 100%;
    height: auto;
    aspect-ratio: var(--item-ratio, 4 / 5);
    margin-bottom: 20px;
  }

  .strip-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #home-lightbox {
    --lightbox-main-height: 50vh;
  }

  .home-lightbox__track {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    gap: 0;
    padding: 0 5.6rem;
  }

  .home-lightbox__side-image {
    display: none;
  }

  #home-lightbox-img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 11.2rem);
    max-height: 62svh;
  }

  #home-lightbox-caption {
    top: calc(100% + 18px);
    max-width: 86vw;
    font-size: 11px;
    letter-spacing: 0.24em;
  }

  #home-lightbox-prev,
  #home-lightbox-next,
  #home-lightbox-close {
    min-width: 44px;
    min-height: 44px;
  }

  #home-lightbox-prev {
    left: 8px;
  }

  #home-lightbox-next {
    right: 8px;
  }

  #home-lightbox-close {
    right: 16px;
    bottom: 16px;
  }
}
