/* Neutral Frame — base stylesheet
   Editorial minimalism, paper gray, Oswald + Noto Sans JP.
   Responsive: PC / tablet (iPad mini優先) / SP。
*/

:root {
  --paper: #f4f4f2;
  --paper-deep: #ebe8e2;
  --ink: #111111;
  --ink-85: rgba(17,17,17,0.85);
  --ink-70: rgba(17,17,17,0.70);
  --ink-55: rgba(17,17,17,0.55);
  --ink-40: rgba(17,17,17,0.40);
  --ink-20: rgba(17,17,17,0.20);
  --ink-12: rgba(17,17,17,0.12);
  --font-en: 'Oswald', Impact, 'Arial Narrow', sans-serif;
  --font-ja: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ja);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity .18s; }
a:hover { opacity: 0.55; }

/* Page transition fade */
body { animation: nf-fadein 280ms ease-out both; }
@keyframes nf-fadein { from { opacity: 0; } to { opacity: 1; } }

/* Paper texture — used on TOP & section doors */
.nf-paper {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* Typography primitives */
.en { font-family: var(--font-en); font-weight: 400; letter-spacing: 0.06em; }
.en-meta { font-family: var(--font-en); font-size: 11px; letter-spacing: 0.26em; color: var(--ink-55); font-weight: 400; }
.en-display { font-family: var(--font-en); font-weight: 700; letter-spacing: -0.018em; line-height: 0.88; }
.ja-small { font-size: 12px; letter-spacing: 0.2em; color: var(--ink-55); }
.rule { height: 1px; background: var(--ink-20); }

/* Dot — used after English display titles */
.dot { color: rgba(17,17,17,0.3); }

/* ── Global layout ──────────────────────────────────── */
.nf-page {
  position: relative;
  min-height: 100vh;
  padding: 36px 48px 48px;
}

/* Top bar — appears on every page except TOP */
.nf-bar {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.28em; color: var(--ink-55);
  margin-bottom: 56px;
}
.nf-bar a { color: var(--ink-55); }
.nf-bar .logo {
  font-family: var(--font-en); font-weight: 700; letter-spacing: 0.02em; font-size: 18px; color: var(--ink);
  text-transform: none;
}

/* Bottom nav */
.nf-nav {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--ink-20);
  padding-top: 18px;
  margin-top: 160px;
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.3em;
  color: var(--ink-85);
}
.nf-nav .left { font-size: 10px; letter-spacing: 0.24em; color: var(--ink-55); }
.nf-nav .links { display: flex; gap: 44px; }
.nf-nav .links a.current { color: var(--ink); font-weight: 500; }
.nf-nav .links a { color: var(--ink-70); }
.nf-page > .nf-nav:has(> .links:first-child:last-child) { justify-content: flex-end; }

/* ── TOP page ───────────────────────────────────────── */
.top-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 48px 42px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
}

.top-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  column-gap: 56px;
  row-gap: 0;
  align-items: start;
  width: 100%;
  padding-top: 32px;
}

/* PC / タブレット縦 — 当初の余白バランス（メイン全幅・上寄せ・フッター下固定） */
@media (min-width: 768px) {
  .top-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: auto;
    padding: 36px 40px 48px;
  }
  .top-grid {
    grid-column: 1 / -1;
    justify-self: stretch;
    align-self: stretch;
    grid-template-columns: 1.2fr 1fr;
    column-gap: 84px;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding-top: 36px;
  }
  .top-logo-block { padding-top: 12px; }
  .top-logo { font-size: clamp(84px, 13.5vw, 188px); }
  .top-overline { font-size: 12px; letter-spacing: 0.38em; margin-bottom: 18px; }
  .top-blurb { margin-top: 32px; font-size: 15px; max-width: 400px; line-height: 1.9; }
  .top-photo-caption { margin-top: 14px; font-size: 11px; letter-spacing: 0.24em; }
  .top-shell > .nf-nav {
    margin-top: 96px;
    justify-content: flex-end;
  }
}

.top-photo-wrap {
  width: 100%;
}
.top-photo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: none;
}
.top-photo-link:hover,
.top-photo-link:focus {
  opacity: 1;
}
.top-photo-link:focus-visible {
  outline: 1px solid var(--ink-40);
  outline-offset: 4px;
}
.top-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #e2dfd8 0%, #d5d2cb 30%, #c2bfb8 48%, #8e8c86 52%, #6a6863 75%, #4e4c48 100%);
  position: relative;
  overflow: hidden;
}
.top-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
}
.top-photo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
  opacity: 0;
  transition: opacity 4400ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: opacity;
}
.top-photo-layer.is-active {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .top-photo-layer { transition: opacity 0ms; }
}
.top-photo::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
  z-index: 1;
}
.top-photo-caption {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font-family: var(--font-en); font-size: 10px; letter-spacing: 0.22em; color: var(--ink-55);
}

.top-logo-block { padding-top: 18px; }
.top-overline { font-size: 11px; letter-spacing: 0.38em; color: var(--ink-55); margin-bottom: 16px; }
.top-logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.8925;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.top-blurb {
  margin-top: 28px;
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-85);
  font-weight: 350;
}

/* ── INDEX (PHOTOGRAPH list) ────────────────────────── */
.idx-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 44px;
}
.idx-title-row {
  display: flex; align-items: baseline; gap: 20px; margin-top: 18px;
}
.idx-count {
  font-family: var(--font-en); font-weight: 700; font-size: 86px; line-height: 0.88; letter-spacing: -0.02em;
}
.idx-label { font-size: 13px; letter-spacing: 0.18em; color: var(--ink-70); padding-bottom: 10px; }
.idx-brand-stack {
  font-size: 11px; letter-spacing: 0.35em; color: var(--ink-55); text-align: right; line-height: 2;
}

.idx-list {
  border-top: 1px solid var(--ink-20);
  padding-top: 16px;
}
.idx-list { position: relative; }
.idx-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: start; /* title stack hugs the row top; keeps .idx-no at the same top line */
  gap: 36px;
  padding: 14px 0;
  padding-right: 180px; /* reserves space for the inline thumbnail on the right */
  border-bottom: 1px solid var(--ink-12);
  transition: background .2s;
  position: relative;
}
.idx-row:hover { background: rgba(17,17,17,0.02); }
.idx-no { font-family: var(--font-en); font-weight: 500; font-size: 38px; letter-spacing: -0.01em; line-height: 1; }
.idx-title { font-weight: 500; font-size: 17px; letter-spacing: 0.02em; line-height: 1.2; }
.idx-sub {
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink-55); margin-top: 4px; font-style: italic; font-weight: 300;
  line-height: 1.25;
}
.idx-date {
  grid-column: 2;
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.1em;
  color: var(--ink-70); white-space: nowrap;
  margin-top: 2px;
  line-height: 1.25;
}

/* Inline row thumbnail — anchored to the row's text content height so the row
   height is driven by text, not by the image. On desktop the image fades in on
   row hover; on mobile it is always visible. Rows without a resolvable image
   keep an empty slot (no placeholder, no noimage). */
.idx-row-thumb {
  display: block;
  position: absolute;
  top: 14px;
  bottom: 14px;
  right: 0;
  width: auto;
  aspect-ratio: 4/3;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.idx-row-thumb.has-image { background: var(--paper-deep); }
.idx-row-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.02);
  display: block;
}
.idx-row:hover .idx-row-thumb.has-image,
.idx-row:focus-within .idx-row-thumb.has-image { opacity: 1; }

@media (max-width: 720px) {
  /* Always visible on mobile: touch devices have no hover. */
  .idx-row-thumb { opacity: 1; transition: none; }
  .idx-row-thumb.has-image {
    top: 14px;
    bottom: auto;
    width: var(--idx-thumb-w, 112px);
    height: var(--idx-thumb-h, 84px);
  }
  .idx-row.idx-row--no-thumb { padding-right: 0; }
  .idx-row.idx-row--no-thumb .idx-row-thumb { display: none; }
}

/* ── ABOUT ──────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 90px;
  align-items: start;
  margin-top: 30px;
}
.about-hero {
  font-family: var(--font-en); font-weight: 700; font-size: clamp(64px, 9vw, 104px);
  line-height: 0.88; letter-spacing: -0.02em; margin-bottom: 32px;
}
.about-body {
  font-size: 14px; line-height: 2.2; color: var(--ink-85); max-width: 440px;
}
.about-body--spacer {
  min-height: calc(2 * 1em * 2.2);
  margin: 0;
}
.about-records { padding-top: 10px; }
.about-row {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 24px; padding: 13px 0;
  border-bottom: 1px solid var(--ink-12);
  align-items: baseline;
}
.about-row .lbl {
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.22em; color: var(--ink-55);
}
.about-row .val {
  font-family: var(--font-en); font-weight: 400; font-size: 16px; letter-spacing: 0.04em;
}
.about-row .sub {
  font-family: var(--font-ja); font-size: 12px; color: var(--ink-55); margin-left: 14px;
}
.about-contact { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--ink-20); }
.about-sns { display: flex; flex-direction: column; gap: 6px; }
.about-sns a.val { display: inline-block; }

@media (min-width: 721px) {
  .about-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 52px;
  }
  .about-body,
  .about-body--spacer {
    max-width: min(380px, 100%);
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 0.78fr 1.22fr;
    gap: 36px;
  }
}

/* ── Article pages (Single & Split) ─────────────────── */
.art-shell { position: relative; min-height: 100vh; padding: 36px 88px 48px; max-width: 1280px; margin-left: auto; margin-right: auto; }

.art-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.28em; color: var(--ink-55);
}
/* Japanese = primary hero; English = small subtitle. Same hierarchy as the
   index page (.idx-title over .idx-sub). */
.art-title-ja {
  font-family: var(--font-ja);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-top: 28px; margin-bottom: 12px;
}
.art-title-en {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: 0.22em;
  color: var(--ink-55);
  margin-top: 0; margin-bottom: 44px;
}

/* Pattern 1: Single */
.p1-figure { margin-bottom: 52px; }
.p1-figure .top-photo { width: 100%; aspect-ratio: 4/3; }
.p1-fig-caption {
  display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin-top: 28px;
}
.p1-fig-meta {
  font-family: var(--font-en); font-size: 10px; letter-spacing: 0.22em;
  color: var(--ink-55); line-height: 2;
}
.p1-body {
  font-size: 14.5px; line-height: 2.1; color: var(--ink-85); font-weight: 400;
  max-width: 68ch;
}
.p1-body p + p { margin-top: 1.4em; }

/* Pattern 2: Split — 横書きに修正、装飾無し */
.p2-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  align-items: start;
}
.p2-photo { width: 100%; }
.p2-text {
  padding-top: 0;
}
/* Japanese = primary hero; English = small subtitle. */
.p2-title-ja {
  font-family: var(--font-ja);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-top: 0; margin-bottom: 10px;
}
.p2-title-en {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: 0.22em;
  color: var(--ink-55);
  margin-top: 0; margin-bottom: 36px;
}
.p2-body { font-size: 14.5px; line-height: 2.1; color: var(--ink-85); font-weight: 400; }
.p2-body p + p { margin-top: 1.3em; }

/* ── LAB ───────────────────────────────────────────── */
.lab-hero {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(64px, 9vw, 104px);
  line-height: 0.88; letter-spacing: -0.02em;
}
.lab-lede {
  font-size: 14px; line-height: 2.1; color: var(--ink-85);
  max-width: 540px; margin-top: 30px;
}
.lab-list {
  margin-top: 64px; border-top: 1px solid var(--ink-20);
}
.lab-row {
  display: grid;
  grid-template-columns: 70px 180px 1fr auto;
  align-items: baseline; gap: 36px;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-12);
}
.lab-row .no { font-family: var(--font-en); font-weight: 500; font-size: 20px; letter-spacing: 0.04em; }
.lab-row .kind { font-family: var(--font-en); font-size: 10px; letter-spacing: 0.26em; color: var(--ink-55); }
.lab-row .ttl { font-weight: 500; font-size: 17px; }
.lab-row .ttl small { display: block; font-family: var(--font-en); font-weight: 300; font-size: 11px; letter-spacing: 0.22em; color: var(--ink-55); margin-top: 6px; }
.lab-row .date { font-family: var(--font-en); font-size: 12px; letter-spacing: 0.1em; color: var(--ink-70); }

/* ── ESSAY (link page) ─────────────────────────────── */
.note-wrap {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 90px;
  align-items: start;
}
.note-body { font-size: 14px; line-height: 2.1; color: var(--ink-85); max-width: 440px; margin-top: 24px; }
.note-link-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 124px;
}
.note-link {
  display: inline-flex; align-items: baseline; gap: 16px;
  margin-top: 0;
  padding: 18px 24px 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-en); font-size: 18px; letter-spacing: 0.14em;
}
.note-link .arrow { font-size: 22px; }
.note-log {
  padding-top: 10px;
}
.note-log .entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-12);
}
.note-log .entry .d { font-family: var(--font-en); font-size: 11px; letter-spacing: 0.22em; color: var(--ink-55); margin-bottom: 6px; }
.note-log .entry .t { font-size: 14px; color: var(--ink-85); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Tablet — iPad mini優先（TOP以外） */
  .nf-page { padding: 32px 40px 40px; }

  .art-shell { padding: 30px 56px 40px; }
  .p2-wrap { gap: 48px; }

  .idx-row {
    grid-template-columns: 80px 1fr;
    gap: 22px;
    padding-right: 150px;
  }
  .idx-no { font-size: 30px; }

  .lab-row { grid-template-columns: 60px 140px 1fr auto; gap: 24px; }
}

@media (max-width: 767px) {
  /* TOP — 767px以下は単列（スマートフォン） */
  .top-shell {
    padding: 24px 40px 48px;
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
    min-height: auto;
    display: grid;
    grid-template-rows: auto auto auto;
  }
  .top-shell > .nf-bar { margin-bottom: 20px; }
  .top-shell > .nf-nav {
    margin-top: 72px;
    padding-top: 14px;
    justify-content: flex-end;
  }
  .top-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
    width: 100%;
  }
  .top-logo-block { padding-top: 0; }
  .top-logo { font-size: clamp(52px, 12vw, 90px); }
  .top-overline { font-size: 10px; letter-spacing: 0.32em; margin-bottom: 12px; }
  .top-blurb { margin-top: 20px; font-size: 13px; max-width: none; }
}

@media (max-width: 720px) {
  /* Smartphone */
  .nf-page { padding: 24px 22px 32px; }
  .top-shell {
    padding: 22px 22px 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
    min-height: auto;
  }
  .top-shell > .nf-bar { margin-bottom: 16px; }
  .top-shell > .nf-nav {
    padding-top: 14px;
    margin-top: 32px;
    justify-content: flex-end;
  }

  .nf-bar { margin-bottom: 28px; font-size: 10px; letter-spacing: 0.22em; }
  .nf-bar .logo { font-size: 15px; }

  .top-logo { font-size: clamp(52px, 18vw, 90px); }
  .top-overline { letter-spacing: 0.3em; }

  .nf-nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 112px;
    padding-top: 18px;
  }
  .nf-nav .links {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 24px;
    row-gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    letter-spacing: 0.22em;
  }
  .nf-nav .left {
    font-size: 10px;
    letter-spacing: 0.26em;
    flex-shrink: 0;
  }
  .nf-page > .nf-nav:has(> .links:first-child:last-child) { justify-content: flex-end; }
  .nf-nav--compact-sp .left { display: none; }
  .nf-nav--compact-sp { justify-content: flex-end; }
  .nf-nav--compact-sp .links { margin-left: 0; }

  .idx-header { flex-direction: column; gap: 16px; margin-bottom: 28px; }
  .idx-brand-stack { display: none; }
  .idx-count { font-size: 56px; }
  .idx-row {
    grid-template-columns: 54px 1fr;
    gap: 16px;
    padding: 14px 0;
    --idx-thumb-w: 112px;
    --idx-thumb-h: 84px;
    padding-right: var(--idx-thumb-w);
    position: relative;
  }
  .idx-row > div:not(.idx-no) { min-width: 0; }
  .idx-no { font-size: 22px; }
  .idx-title { font-size: 15px; }
  .idx-date { font-size: 11px; margin-top: 3px; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-hero {
    font-size: clamp(52px, 14vw, 72px);
    margin-bottom: 16px;
  }
  .about-body--spacer { min-height: 0; }
  .about-contact {
    margin-top: 24px;
    padding-top: 16px;
  }
  .about-row { grid-template-columns: 90px 1fr; gap: 16px; }
  .about-row .val { font-size: 14px; }

  .art-shell { padding: 24px 22px 32px; }
  .art-title-ja { font-size: clamp(28px, 7.5vw, 42px); margin-top: 20px; }
  .art-title-en { font-size: 12px; margin-bottom: 32px; }

  .p1-fig-caption { grid-template-columns: 1fr; gap: 20px; }
  .p1-figure { margin-bottom: 36px; }
  .p1-body { font-size: 14px; }

  .p2-wrap { grid-template-columns: 1fr; gap: 32px; }
  .p2-title-ja { font-size: clamp(24px, 6.5vw, 36px); }
  .p2-title-en { font-size: 12px; margin-bottom: 28px; }

  .lab-hero { font-size: clamp(56px, 15vw, 82px); }
  .lab-list { margin-top: 36px; }
  .lab-row {
    grid-template-columns: 48px 1fr;
    gap: 16px; padding: 18px 0;
  }
  .lab-row .no { font-size: 16px; }
  .lab-row .kind { grid-column: 2; margin-bottom: 4px; }
  .lab-row .ttl { grid-column: 2; font-size: 15px; }
  .lab-row .date { grid-column: 2; margin-top: 4px; }

  .note-wrap { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .note-link-col { padding-top: 0; }
  .note-link { font-size: 15px; letter-spacing: 0.12em; margin-top: 8px; }
}
