/* ============================================================
   THE WALL · 写真 — page styles. Layered on /styles.css globals.
   Minimal chrome. Photos do the talking.
   ============================================================ */

.page-wall {
  background: var(--bone);
  color: var(--sumi);
  position: relative;
  overflow-x: clip;
}

/* ---------- SUBPAGE CHROME ---------- */
.sp-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: rgba(239, 231, 214, 0.86);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 0.5px solid var(--rule-soft);
}
.sp-top__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-style: italic; font-weight: 700; font-size: 19px;
  letter-spacing: -0.01em; color: var(--sumi);
}
.sp-top__brand a {
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
  transition: opacity .25s ease;
}
.sp-top__brand a:hover { opacity: 0.7; }
.sp-top__cat { width: 30px; height: 30px; object-fit: contain; display: block; }
.sp-top__back {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--pencil); text-decoration: none;
  transition: color .2s ease;
}
.sp-top__back:hover { color: var(--akane); }
@media (max-width: 600px) {
  .sp-top { padding: 12px var(--gutter); }
  .sp-top__brand { font-size: 16px; }
  .sp-top__cat { width: 26px; height: 26px; }
  .sp-top__back { font-size: 10px; letter-spacing: 0.2em; }
}

/* ---------- PAGE SHELL ---------- */
.wall-page {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) clamp(14px, 2vw, 28px) clamp(80px, 12vh, 140px);
}

/* ---------- DATELINE ----------
   Single hairline of metadata — no instructions, no copy. Photos
   speak for themselves. The 写真 kanji is the only chrome below
   the brand bar.  */
.wall-dateline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 clamp(28px, 4vh, 48px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sumi-soft);
}
.wall-dateline__title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--sumi);
}
.wall-dateline__sep { color: var(--rule); }
.wall-dateline__jp {
  font-family: var(--jp);
  color: var(--akane);
  letter-spacing: 0.14em;
  text-transform: none;
  font-size: 14px;
}
.wall-dateline__count {
  font-variant-numeric: tabular-nums;
}

/* ---------- GRID ----------
   Responsive auto-fill grid. Each tile is locked to a 4:3 aspect
   ratio to prevent CLS while images load — Notion files don't
   ship width/height metadata, so we can't use the standard
   <img width="..." height="..."> trick. Object-fit: cover trims
   off-aspect crops so a wall of mixed-orientation photos still
   reads as a uniform grid. */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(4px, 0.6vw, 10px);
}
@media (min-width: 900px) {
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
}
@media (min-width: 1280px) {
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); }
}

.wall-tile {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--bone-soft);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.wall-tile--loaded { opacity: 1; }
.wall-tile--failed {
  opacity: 1;
  background: repeating-linear-gradient(
    45deg,
    var(--bone-soft),
    var(--bone-soft) 10px,
    rgba(20, 17, 13, 0.04) 10px,
    rgba(20, 17, 13, 0.04) 20px
  );
}
.wall-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.wall-tile:hover img {
  /* tiny editorial cue — restrained, no scale-shift, no overlay text */
  filter: brightness(1.02);
}

/* ---------- EMPTY / LOADING / ERROR ----------
   No spinner, no skeletons, no progress bars. A single italic line. */
.wall-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40vh;
  padding: 40px 20px;
  text-align: center;
}
.wall-empty__label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--sumi-soft);
}
.wall-empty--error .wall-empty__label {
  color: var(--akane);
}
.wall-empty__hint {
  font-family: var(--serif, 'Source Serif 4', serif);
  font-size: 14px;
  color: var(--sumi-soft);
}
.wall-empty__hint a {
  color: var(--akane);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

/* ---------- A11Y — reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .wall-page * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
