/* ================================================================
   JAPAN MEMORIES — Usureru / Akaneiro
   extends style.css · adds Shippori Mincho kanji ghosts,
   crane curtain hero, vellum-layered works gallery
   ================================================================ */

:root {
  --akane: #b7282e;            /* madder red, slightly warmer than brand red */
  --vellum: rgba(255, 253, 247, 0.65);
  --font-jp: "Shippori Mincho", serif;
}

.jm { background: var(--paper); }

/* language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.lang-switch > span,
.lang-switch > a { padding: 0.1em 0.1em; }
.lang-switch .is-active { color: var(--red); }
.lang-switch a { opacity: 0.55; transition: opacity 0.25s, color 0.25s; }
.lang-switch a:hover { opacity: 1; color: var(--red); }
.lang-switch::before {
  content: "";
  width: 1px; height: 0.9em;
  background: currentColor;
  opacity: 0.25;
  margin-right: 0.5em;
}
.lang-switch-menu {
  margin-top: 2.4rem;
  gap: 0.7em;
}
.lang-switch-menu::before { display: none; }
/* keep the switch small — override the large mobile-menu anchor styling */
.menu-overlay .lang-switch-menu span,
.menu-overlay .lang-switch-menu a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  border: 0;
  padding: 0;
}

/* memory dust overlay */
.dust {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

/* ================= HERO ================= */
.jm-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
#curtain {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
}
.jm-kanji {
  position: absolute;
  top: 6rem; right: clamp(0.5rem, 4vw, 4rem);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: clamp(5rem, 16vw, 15rem);
  line-height: 1;
  color: var(--ink);
  opacity: 0.07;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}
.jm-hero-text {
  position: relative; z-index: 2;
  padding: 0 var(--pad) clamp(4rem, 10vh, 7rem);
}
.jm-eyebrow { color: var(--red); }
.jm-title {
  text-transform: uppercase;
  font-weight: 560;
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  letter-spacing: -0.025em;
  line-height: 0.9;
  margin-top: 1.2rem;
}
.jm-title-line { display: block; overflow: hidden; }
.jm-title-line-2 { margin-left: clamp(1.5rem, 7vw, 7rem); color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.jm-title-word { display: inline-block; }
.jm-sub {
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  margin-top: 1.6rem;
  max-width: 30ch;
}
.jm-sub em { color: var(--red); }
.jm-hint { margin-top: 2rem; color: var(--ink-soft); }

/* ================= SERIES STATEMENT ================= */
.jm-series {
  position: relative;
  padding: clamp(6rem, 14vh, 11rem) var(--pad);
  max-width: 1250px;
  overflow: visible;
}
.jm-kanji-right { top: 4rem; right: 0; opacity: 0.05; }
.jm-statement {
  font-size: clamp(1.9rem, 4.4vw, 3.7rem);
  font-weight: 410;
  line-height: 1.15;
  max-width: 24ch;
}
.jm-series-cols {
  columns: 2;
  column-gap: 3.5rem;
  margin-top: 3.4rem;
  max-width: 70rem;
}
.jm-series-cols p {
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
  break-inside: avoid;
}
.jm-series-cols em { color: var(--red); font-style: italic; }
.jm-hanko {
  margin-top: 3rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--akane);
  transform: rotate(-3deg);
}
.jm-hanko svg { width: 58px; opacity: 0.85; }
.jm-hanko .mono { font-size: 0.6rem; color: var(--akane); }

/* ================= WORKS ================= */
.jm-works { padding: clamp(5rem, 12vh, 9rem) var(--pad); }
.jm-works-head h2 { font-size: clamp(2.4rem, 6.5vw, 5.4rem); font-weight: 430; }
.jm-works-sub { max-width: 56ch; margin-top: 1.6rem; color: var(--ink-soft); }

.jm-grid {
  list-style: none;
  margin-top: clamp(3rem, 8vh, 6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vh, 8rem);
}
.jm-work {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.8rem, 4.5vw, 4.5rem);
  align-items: center;
}
.jm-work:nth-child(even) .jm-work-media { order: 2; }
.jm-work-media {
  position: relative;
  display: block;
}
.jm-work-media > img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
  background: var(--paper-deep);
}
.jm-work-media:hover > img { transform: scale(1.03); }
.jm-work-media .jm-thread {
  position: absolute;
  top: -3rem; left: 50%;
  width: 1.5px; height: 3rem;
  background: var(--red);
  opacity: 0.7;
}
/* placeholder for works without photos yet */
.jm-ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--akane);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  color: var(--paper);
  border: 1px solid var(--hair);
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}
.jm-work-media:hover .jm-ph { transform: scale(1.03); }
.jm-ph svg { width: clamp(70px, 9vw, 110px); opacity: 0.92; }
.jm-ph .jm-ph-crane { width: clamp(90px, 12vw, 150px); height: auto; opacity: 0.96; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.22)); }
.jm-ph .mono { font-size: 0.62rem; opacity: 0.8; letter-spacing: 0.2em; }
.jm-ph .jm-ph-kanji {
  font-family: var(--font-jp);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  opacity: 0.9;
}

.jm-work-info { min-width: 0; }
.jm-work-n {
  font-family: var(--font-jp);
  color: var(--red);
  font-size: 1rem;
  letter-spacing: 0.3em;
  display: block;
}
.jm-work-info h3 {
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  font-weight: 440;
  margin: 0.7rem 0 0.9rem;
}
.jm-work-info h3 a { border-bottom: 2px solid transparent; transition: border-color 0.3s; }
.jm-work-info h3 a:hover { border-color: var(--red); }
.jm-work-medium { color: var(--ink-soft); display: block; margin-bottom: 1.2rem; }
.jm-work-excerpt { color: var(--ink-soft); max-width: 48ch; }
.jm-work-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--red);
  border-bottom: 1px solid var(--red);
  padding-bottom: 0.25em;
}
.jm-nfs { color: var(--akane); margin-top: 1rem; display: inline-block; }

/* divider between 2D and 3D chapters */
.jm-divider {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  color: var(--ink-soft);
  margin: 1rem 0;
}
.jm-divider::before,
.jm-divider::after {
  content: "";
  height: 1px;
  background: var(--hair);
  flex: 1;
}
.jm-divider span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; color: var(--red); text-align: center; }

/* ================= EXHIBITIONS ================= */
.jm-exhibit {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
}
.jm-exhibit-title { font-size: clamp(2.2rem, 5.5vw, 4.6rem); font-weight: 420; }
.jm-exhibit-rows { margin-top: clamp(2.5rem, 6vh, 4rem); }
.jm-exhibit-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) 1fr minmax(110px, 0.25fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.6rem 0.4rem;
  border-top: 1px solid rgba(245, 241, 232, 0.18);
  transition: background 0.3s, padding-left 0.3s;
}
.jm-exhibit-row:last-of-type { border-bottom: 1px solid rgba(245, 241, 232, 0.18); }
.jm-exhibit-row:hover { background: rgba(194, 32, 38, 0.1); padding-left: 1.2rem; }
.jm-ex-date { color: var(--red); }
.jm-ex-venue { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-style: italic; }
.jm-ex-city { color: #b3ab99; text-align: right; }
.jm-exhibit-note { max-width: 52ch; margin-top: 2.6rem; color: #b3ab99; }

/* ================= FOOTER ================= */
.jm-foot {
  padding: clamp(3rem, 7vh, 5rem) var(--pad) 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}
.jm-foot-back {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
}
.jm-foot-back:hover { color: var(--red); }
.jm-foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hair);
  padding-top: 1.3rem;
  color: var(--ink-soft);
}
.jm-foot-meta a:hover { color: var(--red); }

/* ================= WORK DETAIL PAGE ================= */
.wk {
  min-height: 100svh;
  padding: clamp(7rem, 16vh, 10rem) var(--pad) clamp(3rem, 8vh, 5rem);
  position: relative;
  overflow: hidden;
}
.wk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: 1350px;
  position: relative;
  z-index: 2;
}
.wk-media { position: relative; }
.wk-media > img {
  width: 100%;
  background: var(--paper-deep);
}
.wk-media .jm-ph { aspect-ratio: 4 / 5; }
.wk-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.wk-panels img { width: 100%; border: 1px solid var(--hair); cursor: pointer; transition: transform 0.4s; }
.wk-panels img:hover { transform: translateY(-4px); }
.wk-info { min-width: 0; }
.wk-count { color: var(--red); }
.wk-title {
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 450;
  margin: 0.9rem 0 1rem;
}
.wk-medium { color: var(--ink-soft); display: block; margin-bottom: 1.8rem; }
.wk-about p { color: var(--ink-soft); margin-bottom: 1.2rem; max-width: 56ch; }
.wk-nfs { color: var(--akane); margin: 1.4rem 0; display: inline-block; }
.wk-nfs[hidden] { display: none; }
.wk-exhibit-note {
  border-left: 3px solid var(--red);
  padding: 0.5rem 0 0.5rem 1.4rem;
  margin: 2.2rem 0;
}
.wk-exhibit-note .mono { color: var(--red); margin-bottom: 0.5rem; display: block; }
.wk-exhibit-note p:last-child { color: var(--ink-soft); max-width: 44ch; }
.wk-exhibit-note a { color: var(--red); border-bottom: 1px solid var(--red); }
.wk-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--hair);
  padding-top: 1.4rem;
  margin-top: 2.4rem;
}
.wk-nav a { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.wk-nav a:hover { color: var(--red); }
.wk-nav .wk-all { font-family: var(--font-mono); font-style: normal; font-size: 0.72rem; letter-spacing: 0.16em; border: 1px solid var(--ink); border-radius: 999px; padding: 0.5em 1.2em; }
.wk-nav .wk-all:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.wk-kanji { top: auto; bottom: 2rem; right: 2rem; opacity: 0.05; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .jm-work,
  .jm-work:nth-child(even) { grid-template-columns: 1fr; }
  .jm-work:nth-child(even) .jm-work-media { order: 0; }
  .jm-series-cols { columns: 1; }
  .wk-grid { grid-template-columns: 1fr; }
  .jm-exhibit-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .jm-ex-city { text-align: left; }
}
