:root {
  color-scheme: dark;
  --night: #0c0f1a;
  --ink: #f7f4ee;
  --muted: #c7c8d1;
  --accent: #f4c99d;
  --line: #353745;
  font-family: "Noto Sans CJK JP", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--night);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip { position: absolute; top: -70px; z-index: 5; padding: .8rem; background: var(--night); }
.skip:focus { top: 8px; }
.site-header, footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 5vw; min-height: 74px; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: .65em; align-items: center; white-space: nowrap; font-size: .87rem; letter-spacing: .19em; font-weight: 700; }
.brand span { color: var(--accent); font-size: 1.3em; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.8rem); font-size: .83rem; }
nav a { color: var(--muted); }
nav a:hover, nav a[aria-current="location"] { color: var(--accent); }
.language { display: flex; gap: .15rem; border: 1px solid var(--line); padding: .2rem; border-radius: 2px; }
.language button, .language a { min-height: 34px; min-width: 39px; cursor: pointer; color: var(--muted); background: none; border: 0; font-size: .69rem; letter-spacing: .08em; }
.language button[aria-pressed="true"], .language a[aria-current="page"] { background: var(--accent); color: var(--night); font-weight: 700; }
.language a { display: grid; place-items: center; }
.hero {
  position: relative; display: grid; align-items: center; min-height: clamp(32rem, 48vw, 47rem);
  background: #101626; overflow: hidden; isolation: isolate;
}
.hero-art { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 65%; height: 100%; object-fit: cover; object-position: center 29%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#101626 20%,#101626 35%,#101626b3 43%,#10162614 65%),linear-gradient(0deg,#0c0f1a88,transparent 28%); }
.hero-copy { padding: 5rem max(7vw,calc((100vw - 1260px) / 2)); }
.label { display: flex; align-items: center; gap: .75rem; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .15em; }
.label > span:first-child { width: 1.9rem; height: 1px; background: var(--accent); }
h1,h2,h3,p { margin: 0; }
.hero h1, .detail h1, h2, .inner h1 { font-family: "Georgia", "Noto Serif CJK JP", serif; font-weight: 400; letter-spacing: -.045em; }
.hero h1 { font-size: clamp(5rem, 10vw, 9.7rem); line-height: .8; margin: 1.65rem 0; }
.hero h1 span { color: var(--accent); }
.hero-description { color: var(--ink); font-size: clamp(.95rem, 1.45vw, 1.18rem); letter-spacing: .045em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.primary, .secondary {
  display: inline-flex; justify-content: center; align-items: center; min-height: 47px; padding: .65rem 1.18rem;
  border: 1px solid transparent; font-size: .79rem; font-weight: 600; white-space: normal;
}
.primary { color: #181523; background: var(--accent); }
.primary:hover { background: #ffe0c0; }
.secondary { color: var(--ink); border-color: #a8a6b5; background: #0c0f1a40; }
.secondary:hover { border-color: var(--accent); color: var(--accent); }
.content-section { width: min(86%,1260px); margin-inline: auto; }
.catalogue { padding: 4rem 0 4.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2.5rem,4vw,4rem); line-height: 1; }
.section-head span { font-size: .82rem; color: var(--muted); }
.work-list { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.7rem, 2vw, 1.8rem); }
.work-image { height: clamp(9rem, 25vw, 22rem); overflow: hidden; background: #171b29; }
.work-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.work-card:hover img { transform: scale(1.035); }
.work-name { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .9rem .05rem; border-bottom: 1px solid var(--line); }
.work-name h3 { font-weight: 500; font-size: clamp(.88rem,2vw,1.2rem); overflow-wrap:anywhere; }
.work-name span { color: var(--accent); }
.story, .about { padding: 3rem 0; border-top: 1px solid var(--line); }
.story { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.story p, .about p, .work-story p { margin-top: .85rem; color: var(--muted); line-height: 1.75; }
footer { border-top: 1px solid var(--line); border-bottom: 0; min-height: 95px; }
.detail { background: radial-gradient(ellipse at 17% 18%, #1c2543 0, #0c0f1a 65%); }
.detail-wrap { width: min(86%,1260px); margin: auto; padding: 2.5rem 0 4rem; }
.back-link { color: var(--muted); font-size: .83rem; }
.back-link:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); align-items: center; gap: clamp(2.5rem,7vw,6rem); margin: 1.6rem 0 3.2rem; }
.detail-art { display: block; width: 100%; height:auto; aspect-ratio: 1; object-fit: cover; object-position: center 35%; border: 1px solid #ffffff21; }
.detail h1 { margin: 1.05rem 0; font-size: clamp(2.8rem,6.9vw,6.3rem); line-height: 1; font-feature-settings: "kern"; overflow-wrap:anywhere; }
.detail h1.japanese-title { font-family: "Noto Serif CJK JP", "Yu Mincho", serif; font-size: clamp(2rem,4vw,4.25rem); letter-spacing: -.06em; }
.detail-note { color: var(--muted); line-height: 1.7; }
.credits { margin: 2rem 0 0; }
.credits div { display: flex; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--line); padding: .75rem 0; font-size: .8rem; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
.work-story { border-top: 1px solid var(--line); padding-top: 2rem; }
.work-story h2 { font-size: clamp(1.65rem,3.5vw,2.8rem); letter-spacing: -.04em; }
/* Stage 4: full catalogue, story pairs, prose pages and accessible language links. */
main { min-height:65vh; }
.inner { padding: 3.8rem 0 4.5rem; }
.inner h1 { font-size:clamp(2.7rem,5vw,4.9rem); line-height:1.12; overflow-wrap:anywhere; }
.inner .back-link { display:block; margin-bottom:1.2rem; }
.catalogue-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.catalogue-grid .work-image, .related-grid .work-image { height:auto; aspect-ratio:1; }
.recent { padding-top:0; }
.recent .catalogue-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.intro,.pair p,.prose p { color:var(--muted); line-height:1.85; max-width:76ch; margin:1.2rem 0 1.8rem; }
.pair { padding:2.5rem 0; border-top:1px solid var(--line); }
.pair h2,.prose h2,.related h2 { font-size:clamp(1.6rem,3vw,2.5rem); line-height:1.25; }
.prose h2 { margin-top:2.5rem; }
.related { margin-top:3rem; border-top:1px solid var(--line); padding-top:2rem; }
.related-grid { max-width:540px; grid-template-columns:minmax(0,1fr); margin-top:1.4rem; }
.small-note { color:var(--muted); font-size:.85rem; line-height:1.7; }
.inline-link { text-decoration:underline; text-underline-offset:.2em; color:var(--accent); }
footer nav { flex-wrap:wrap; }
@media (max-width: 700px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand language" "nav nav"; min-height: 0; row-gap: 0; padding: .65rem 5vw 0; }
  .site-header .brand { grid-area: brand; }
  .site-header nav { grid-area: nav; justify-content: space-between; min-height: 44px; }
  .language { grid-area: language; }
  .hero { min-height: min(41rem, 148vw); align-items: end; }
  .hero-art { width: 100%; height: 100%; object-position: center 30%; }
  .hero::after { background: linear-gradient(0deg,#0c0f1a 0%,#0c0f1aeb 25%,#0c0f1a50 58%,transparent 82%); }
  .hero-copy { padding: 2rem 6vw 2.3rem; }
  .hero h1 { font-size: clamp(3.6rem,16vw,6rem); margin: .9rem 0 1.05rem; }
  .hero .actions { margin-top: 1.1rem; }
  .catalogue { padding: 2.65rem 0 3rem; }
  .content-section, .detail-wrap { width: 88%; }
  .work-image { height: auto; aspect-ratio: 1.1; }
  .story { flex-direction: column; align-items: flex-start; }
  .story,.about { padding: 2.3rem 0; }
  footer { align-items: flex-start; justify-content: center; flex-direction: column; padding: 1.15rem 6vw; }
  footer nav { flex-wrap: wrap; }
  .detail-wrap { padding-top: 1.8rem; }
  .detail-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .detail h1 { margin: .7rem 0; }
  .catalogue-grid,.recent .catalogue-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .section-head { flex-wrap:wrap; }
  .recent { padding-top:0; }
  .inner { padding:2.5rem 0 3.5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
