/* =========================================================
   ILLUSTRATION PAGE
   TOPページの style.css を読み込んだ後に使用します。
   ========================================================= */

.illust-page .desktop-nav .is-current::after { right: 0; }

.illust-hero {
  min-height: 100svh;
  padding-top: 128px;
  padding-bottom: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  position: relative;
}

.illust-hero-copy { position: relative; z-index: 3; }
.illust-hero h1 {
  margin: 0;
  font-family: var(--sans-en);
  font-size: clamp(86px, 11vw, 166px);
  font-weight: 600;
  line-height: .74;
  letter-spacing: -.105em;
}
.illust-hero h1::first-line { color: var(--ink); }

.illust-intro {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  max-width: 650px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}
.illust-intro p { margin: 0; }
.illust-intro > p:first-child {
  font-size: clamp(18px, 1.65vw, 24px);
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: -.025em;
}
.illust-intro-en {
  font-family: var(--sans-en);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .11em;
  color: var(--muted);
}

.illust-hero-art {
  position: relative;
  min-height: min(58vw, 720px);
}
.illust-hero-art figure {
  margin: 0;
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper-2);
}
.illust-hero-main {
  width: 72%;
  aspect-ratio: .76;
  right: 3%;
  top: 3%;
  transform: rotate(2deg);
  z-index: 2;
}
.illust-hero-sub {
  width: 42%;
  aspect-ratio: 1.15;
  left: 0;
  bottom: 4%;
  transform: rotate(-4deg);
  z-index: 4;
}
.illust-hero-art img { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.illust-hero-art figure:hover img { transform: scale(1.025); }
.illust-hero-badge {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 7%;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--acid);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--sans-en);
  font-size: 12px;
  line-height: 1.05;
  font-weight: 700;
  transform: rotate(8deg);
}
.hero-down {
  position: absolute;
  bottom: 36px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans-en);
  font-size: 9px;
  letter-spacing: .14em;
}
.hero-down i { width: 64px; height: 1px; background: var(--ink); transition: width .2s ease; }
.hero-down:hover i { width: 90px; }

.gallery-section {
  padding: clamp(110px, 14vw, 210px) 0 clamp(130px, 17vw, 250px);
  background: var(--ink);
  color: var(--paper);
}
.gallery-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 50px;
  margin-bottom: clamp(80px, 10vw, 140px);
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(243,240,232,.34);
}
.gallery-heading h2 {
  margin: 0;
  font-size: clamp(54px, 7vw, 108px);
  line-height: .95;
  letter-spacing: -.07em;
}
.gallery-tools { text-align: right; }
.gallery-tools p { margin: 0 0 16px; font-size: 12px; color: #aaa59c; }
.shuffle-button {
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  font-family: var(--sans-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.shuffle-button:hover { background: var(--acid); color: var(--ink); transform: rotate(-1deg); }

.editorial-gallery {
  /*
     実画像は縦横比がばらばらなので、固定行ではなく
     JSで高さに合わせて row-span を計算する masonry 風グリッドにします。
  */
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  column-gap: clamp(16px, 2.4vw, 36px);
  row-gap: 18px;
  align-items: start;
}
.gallery-item {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  text-align: left;
  cursor: zoom-in;
  align-self: start;
}
.gallery-image {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(243,240,232,.5);
  background: #282828;
  position: relative;
}
.gallery-image::after {
  content: "VIEW";
  position: absolute;
  inset: auto 12px 12px auto;
  background: var(--acid);
  color: var(--ink);
  padding: 5px 8px;
  font-family: var(--sans-en);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .2s ease, transform .2s ease;
}
.gallery-image img {
  /* style.css の img { height:100%; object-fit:cover; } をここだけ解除 */
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .35s ease;
}
.gallery-item:hover .gallery-image img { transform: scale(1.018); filter: brightness(.92); }
.gallery-item:hover .gallery-image::after { opacity: 1; transform: translateY(0); }
.gallery-caption {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(243,240,232,.24);
  padding-top: 8px;
  font-family: var(--sans-en);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .11em;
}
.gallery-caption b { font-weight: 600; }
.gallery-caption em { font-style: normal; color: #99948c; }

/*
   クラス名はHTML互換のため残していますが、画像比率は固定しません。
   幅だけ変えて雑誌っぽい大小のリズムを作ります。
*/
.item-tall { grid-column: span 4; }
.item-square { grid-column: span 4; }
.item-wide { grid-column: span 7; }
.item-small { grid-column: span 3; }
.item-portrait { grid-column: span 5; }
.item-lift { margin-top: 0; }
.item-push { grid-column-start: auto; }
.item-shift { grid-column-start: auto; }

.old-archive-section { padding: var(--space) 0; }
.old-archive-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(50px, 9vw, 150px);
  align-items: center;
}
.old-archive-copy h2 {
  margin: 0;
  font-size: clamp(46px, 6vw, 88px);
  line-height: 1.12;
  letter-spacing: -.065em;
}
.old-archive-copy > p:last-child { margin: 34px 0 0; max-width: 460px; color: var(--muted); }
.archive-door {
  min-height: 430px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  padding: clamp(28px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.archive-door::before {
  content: "ARCHIVE";
  position: absolute;
  right: -35px;
  bottom: -45px;
  font-family: var(--sans-en);
  font-size: clamp(90px, 11vw, 170px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.11em;
  color: var(--line);
  z-index: 0;
}
.archive-door:hover {
  transform: translate(-6px,-6px) rotate(-.5deg);
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--acid);
}
.archive-door-no {
  position: relative; z-index: 1;
  font-family: var(--sans-en);
  font-size: 10px;
  letter-spacing: .12em;
}
.archive-door strong {
  position: relative; z-index: 1;
  margin-top: auto;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.35;
  letter-spacing: -.05em;
}
.archive-door-arrow {
  position: absolute;
  right: 28px;
  top: 24px;
  z-index: 1;
  font-size: 30px;
}

.next-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.next-pages a {
  min-height: 360px;
  padding: clamp(30px, 5vw, 70px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ink);
  transition: background .2s ease;
}
.next-pages a:last-child { border-right: 0; }
.next-pages a:hover { background: var(--acid); }
.next-pages span,
.next-pages em {
  font-family: var(--sans-en);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .12em;
}
.next-pages strong {
  margin: auto 0;
  font-family: var(--sans-en);
  font-size: clamp(64px, 9vw, 138px);
  line-height: .82;
  letter-spacing: -.08em;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15,15,15,.97);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
body.lightbox-open { overflow: hidden; }
.lightbox-bar {
  height: 64px;
  flex: 0 0 64px;
  padding: 0 clamp(18px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(243,240,232,.25);
  font-family: var(--sans-en);
  font-size: 10px;
  letter-spacing: .12em;
}
.lightbox-bar p { margin: 0; }
.lightbox-close {
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
  padding: 10px 0 10px 18px;
  font-family: var(--sans-en);
  font-size: 10px;
  letter-spacing: .1em;
}
.lightbox-close span { display: inline-block; margin-left: 8px; font-size: 22px; vertical-align: -2px; }
.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
}
.lightbox-figure {
  margin: 0 auto;
  width: min(100%, 1220px);
  height: min(76vh, 900px);
  padding: 22px;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  gap: 12px;
}
.lightbox-figure img { object-fit: contain; }
.lightbox-figure figcaption { min-height: 18px; text-align: center; font-size: 12px; color: #b7b2a9; }
.lightbox-nav {
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
  align-self: stretch;
  font-family: var(--sans-en);
  font-size: 9px;
  letter-spacing: .12em;
  transition: background .2s ease, color .2s ease;
}
.lightbox-nav:hover { background: var(--acid); color: var(--ink); }
.lightbox-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0 18px;
  text-align: center;
  font-family: var(--sans-en);
  font-size: 8px;
  letter-spacing: .13em;
  color: #77736d;
}

@media (max-width: 980px) {
  .illust-hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 120px;
    grid-template-columns: 1fr;
  }
  .illust-hero h1 { font-size: clamp(84px, 19vw, 148px); }
  .illust-hero-art { min-height: min(106vw, 680px); width: min(90%, 620px); margin-left: auto; }
  .illust-intro { width: min(78%, 620px); }
  .hero-down { bottom: 40px; }

  .editorial-gallery { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .item-tall, .item-square { grid-column: span 3; }
  .item-wide { grid-column: span 4; }
  .item-small { grid-column: span 2; }
  .item-portrait { grid-column: span 3; }
  .item-push { grid-column-start: auto; }
  .item-shift { grid-column-start: auto; }

  .old-archive-grid { grid-template-columns: 1fr; }
  .archive-door { min-height: 360px; }
}

@media (max-width: 640px) {
  .illust-hero {
    padding-top: 94px;
    padding-bottom: 98px;
    display: block;
    min-height: 720px;
  }
  .illust-hero-copy { width: 68%; }
  .illust-hero h1 { font-size: clamp(66px, 21vw, 94px); line-height: .77; }
  .illust-intro { width: 100%; grid-template-columns: 1fr; margin-top: 36px; gap: 18px; }
  .illust-intro > p:first-child { font-size: 17px; }
  .illust-intro-en { display: none; }
  .illust-hero-art {
    position: absolute;
    width: 58%;
    min-height: 445px;
    top: 135px;
    right: -18px;
  }
  .illust-hero-main { width: 90%; right: 0; }
  .illust-hero-sub { width: 57%; left: -8%; bottom: 5%; }
  .illust-hero-badge { display: none; }
  .hero-down { left: 20px; bottom: 30px; }

  .gallery-section { padding-top: 96px; padding-bottom: 120px; }
  .gallery-heading { display: block; margin-bottom: 66px; }
  .gallery-heading h2 { font-size: 58px; }
  .gallery-tools { margin-top: 32px; text-align: left; }
  .gallery-tools p { display: none; }

  .editorial-gallery {
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-rows: 6px;
    column-gap: 14px;
    row-gap: 14px;
  }
  .gallery-item,
  .item-tall,
  .item-square,
  .item-wide,
  .item-small,
  .item-portrait,
  .item-shift {
    grid-column: span 1;
    margin-top: 0;
  }
  .gallery-item:nth-child(3n) { grid-column: 1 / -1; width: 86%; margin-left: auto; }
  .gallery-item:nth-child(5n) { transform: none; }
  .gallery-caption { margin-top: 9px; font-size: 8px; }
  .gallery-image::after { display: none; }

  .old-archive-section { padding-top: 108px; padding-bottom: 108px; }
  .old-archive-copy h2 { font-size: 52px; }
  .archive-door { min-height: 300px; padding: 24px; }
  .archive-door strong { font-size: 31px; }

  .next-pages { grid-template-columns: 1fr; }
  .next-pages a { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--ink); padding: 28px 20px; }
  .next-pages a:last-child { border-bottom: 0; }
  .next-pages strong { font-size: 76px; }

  .lightbox-bar { height: 54px; flex-basis: 54px; }
  .lightbox-stage { display: block; position: relative; }
  .lightbox-figure { width: 100%; height: calc(100% - 70px); padding: 18px 16px; }
  .lightbox-nav {
    position: absolute;
    bottom: 12px;
    width: 48%;
    height: 50px;
    z-index: 2;
    border-top: 1px solid rgba(243,240,232,.25);
  }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; border-left: 1px solid rgba(243,240,232,.25); }
  .lightbox-hint { display: none; }
}


/* =========================================================
   STABLE REAL-IMAGE GALLERY OVERRIDE
   ---------------------------------------------------------
   仮画像の形を前提にした item-wide / item-small などの
   横幅指定を無効化し、実画像では「3列を基本」に固定します。
   これによりクラス指定が抜けても1列幅まで縮みません。
   また dense を使わず、作品番号の視覚順を維持します。
   ========================================================= */
.editorial-gallery {
  grid-auto-flow: row;
}

.gallery-item,
.item-tall,
.item-square,
.item-wide,
.item-small,
.item-portrait,
.item-push,
.item-shift {
  grid-column: span 4;
  grid-column-start: auto;
  min-width: 0;
  max-width: none;
  margin-top: 0;
}

.gallery-image,
.gallery-image img {
  min-width: 0;
  max-width: 100%;
}

.gallery-caption {
  min-width: 0;
}
.gallery-caption em {
  white-space: nowrap;
}

@media (max-width: 980px) and (min-width: 641px) {
  .editorial-gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: row;
  }
  .gallery-item,
  .item-tall,
  .item-square,
  .item-wide,
  .item-small,
  .item-portrait,
  .item-push,
  .item-shift {
    grid-column: span 3;
    grid-column-start: auto;
  }
}

@media (max-width: 640px) {
  .editorial-gallery {
    grid-auto-flow: row;
  }
  .gallery-item,
  .item-tall,
  .item-square,
  .item-wide,
  .item-small,
  .item-portrait,
  .item-push,
  .item-shift {
    grid-column: span 1;
    grid-column-start: auto;
    width: 100%;
    margin-left: 0;
  }

  /* スマホでは3枚ごとに横幅いっぱいにして、単調さだけ崩します。 */
  .gallery-item:nth-child(3n) {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }
}
