/*
Theme Name: STAIRS PRESS
Author: STAIRS PRESS
Version: 1.0
Description: A quiet publication archive theme for STAIRS PRESS.
*/

:root {
  color: #111;
  background: #fff;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: #111;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 220px;
  min-height: 100vh;
  padding: 34px 32px;
  background: #fff;
}

.site-title,
.site-nav {
  font-size: 0.875rem;
  letter-spacing: 0;
}

.site-title {
  display: inline-block;
  margin-bottom: 72px;
  font-weight: 500;
}

.site-nav {
  display: grid;
  gap: 0.5rem;
  color: #333;
}

.site-nav [aria-current="page"] {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer-marks {
  position: absolute;
  left: 32px;
  bottom: 34px;
  display: grid;
  gap: 22px;
  justify-items: start;
}

.instagram-link {
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: #111;
}

.instagram-link svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.about-instagram {
  margin-top: 8px;
}

.site-logo-mark {
  display: block;
  width: 84px;
  height: auto;
}

.site-copyright {
  display: block;
  color: #777;
  font-size: 0.6875rem;
  line-height: 1.4;
}

.mobile-site-footer {
  display: none;
}

.page {
  width: calc(100% - 280px);
  max-width: none;
  margin: 0 0 0 280px;
  padding-top: 34px;
  padding-right: 42px;
  padding-bottom: 96px;
}

.published-column,
.publication-detail,
.content-column {
  animation: textSlideIn 860ms ease-out both;
}

@keyframes textSlideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

h1 {
  margin: 0 0 42px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.published-column {
  width: min(100%, 280px);
}

.publication-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.publication-list a {
  display: inline-block;
}

.publication-list [aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.text-page {
  max-width: 680px;
}

.text-block {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 58px;
  color: #111;
}

.text-block p {
  margin: 0;
}

.text-block.japanese {
  color: #777;
}

.japanese-primary {
  color: #111;
}

.english-secondary {
  color: #777;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.contact-link svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.publication-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 640px) minmax(320px, 520px);
  gap: clamp(46px, 5.5vw, 84px);
  align-items: start;
}

.ambient-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 500px) minmax(360px, 560px);
  gap: clamp(52px, 7vw, 96px);
  align-items: start;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 620px);
  gap: clamp(52px, 7vw, 96px);
  align-items: start;
}

.content-column {
  max-width: 620px;
}

.publication-page {
  display: contents;
}

.content-column {
}

.cover {
  max-width: 360px;
  width: 100%;
  margin: 0 0 42px;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.cover-stack {
  position: sticky;
  top: 34px;
  min-height: 720px;
  grid-column: 3;
  opacity: 1;
}

.ambient-layout .cover-stack {
  grid-column: 2 / 4;
  transform: translateX(24px);
}

.mobile-current-cover {
  display: none;
}

.cover-stack-item {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z);
  display: block;
  width: min(100%, 150px);
  transform: translate(var(--x), var(--y)) rotate(var(--rotate));
  transform-origin: center center;
}

.cover-stack-item-landscape {
  width: min(100%, 260px);
}

.cover-stack-item-panorama {
  width: min(100%, 360px);
}

.cover-stack-item-river {
  width: min(100%, 476px);
}

.cover-stack-item-huangpu {
  width: min(100%, 411px);
}

.cover-stack-item-portrait {
  width: min(100%, 150px);
}

.cover-stack-item-invisible {
  width: min(100%, 300px);
}

.cover-stack-item-etude {
  width: min(100%, 128px);
}

.cover-stack-item-happening {
  width: min(100%, 128px);
}

.cover-stack-item-long-hug-town {
  width: min(100%, 150px);
}

.cover-stack-item-aoyama {
  width: min(100%, 210px);
}

.cover-stack-item-current {
  width: min(100%, 245px);
}

.cover-stack-item-current.cover-stack-item-landscape {
  width: min(100%, 330px);
}

.cover-stack-item-current.cover-stack-item-panorama {
  width: min(100%, 420px);
}

.cover-stack-item-current.cover-stack-item-river {
  width: min(100%, 511px);
}

.cover-stack-item-current.cover-stack-item-huangpu {
  width: min(100%, 460px);
}

.cover-stack-item-current.cover-stack-item-invisible {
  width: min(100%, 405px);
}

.cover-stack-item-current.cover-stack-item-long-hug-town {
  width: min(100%, 309px);
}

.cover-stack-item-current.cover-stack-item-aoyama {
  width: min(100%, 343px);
}

.cover-stack-item img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  animation: coverReveal 780ms ease-out calc(var(--delay) + 360ms) both;
}

.cover-stack:has(.cover-stack-item-current) .cover-stack-item:not(.cover-stack-item-current) img {
  display: none;
}

.cover-stack-item-current img {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

@keyframes coverRevealMuted {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 0.34;
    transform: translateY(0);
  }
}

@keyframes coverReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.publication-detail h1 {
  margin-bottom: 24px;
  font-size: clamp(1.15rem, 1.45vw, 1.35rem);
  line-height: 1.4;
  animation: textSlideIn 760ms ease-out both;
}

.publication-flow-secondary {
  animation: textSlideIn 860ms ease-out 260ms both;
}

.publication-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 42px;
  color: #555;
  font-size: 0.9375rem;
}

.publication-meta div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
}

.publication-meta dt,
.publication-meta dd {
  margin: 0;
}

.publication-meta dt {
  color: #999;
}

.publication-description,
.publication-credits {
  max-width: 640px;
  color: #333;
}

.publication-credits {
  margin-top: 56px;
}

.publication-credits h2 {
  margin: 0 0 18px;
  color: #999;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}

.publication-description p,
.publication-credits p {
  margin: 0 0 1rem;
}

.back-link {
  display: inline-block;
  margin-top: 54px;
  color: #777;
  font-size: 0.875rem;
}

.empty-publications {
  max-width: 520px;
  color: #777;
}

@media (min-width: 721px) and (max-width: 1500px) {
  .publication-layout {
    grid-template-columns: 280px minmax(360px, 640px);
    gap: clamp(42px, 5vw, 72px);
  }

  .publication-page {
    display: grid;
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
  }

  .publication-page .cover-stack {
    position: relative;
    top: auto;
    grid-column: 1;
    grid-row: 1;
    min-height: auto;
    margin: 0 0 46px;
  }

  .publication-page .cover-stack:has(.cover-stack-item-current) .cover-stack-item:not(.cover-stack-item-current) {
    display: none;
  }

  .publication-page .cover-stack:has(.cover-stack-item-current) .cover-stack-item-current {
    position: relative;
    transform: none;
  }

  .publication-page .publication-detail {
    grid-column: 1;
    grid-row: 2;
    max-width: 640px;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    width: min(100% - 32px, 1080px);
    min-height: auto;
    margin: 0 auto;
    padding: 24px 0 64px;
    display: block;
  }

  .page {
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 72px;
  }

  .site-header,
  .site-nav {
    gap: 1rem;
  }

  .site-title {
    margin-bottom: 20px;
  }

  .site-nav {
    display: flex;
    gap: 1rem;
  }

  .site-footer-marks {
    position: static;
    margin-top: 72px;
  }

  .site-logo-mark {
    width: 68px;
  }

  .site-copyright {
    display: none;
  }

  .mobile-site-footer {
    display: block;
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
    padding: 28px 0 24px;
    color: #777;
    font-size: 0.6875rem;
    line-height: 1.4;
  }

  .publication-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .ambient-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .publication-page {
    display: block;
  }

  .cover-stack {
    display: none;
  }

  .mobile-current-cover {
    display: block;
    width: min(100%, 300px);
    margin: 36px 0 42px;
  }

  .mobile-current-cover-etude {
    width: min(70%, 210px);
  }

  .mobile-current-cover img {
    display: block;
    width: 100%;
    height: auto;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .secondary-column {
    display: none;
  }

  .cover {
    max-width: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .published-column,
  .publication-detail,
  .content-column,
  .cover-stack-item img {
    animation: none;
    opacity: 1;
  }
}
