@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #262524;
  --bg-deep: #1a1918;
  --ink: #d4cfc6;
  --ink-strong: #f6f3ee;
  --ink-soft: #8f8a82;
  --line: rgb(255 255 255 / 0.07);
  --font: "Archivo", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(8px, 3vw, 40px) var(--gutter) clamp(48px, 10vw, 140px);
}

/* ---------- one record ---------- */

.record {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  padding-block: clamp(48px, 8vw, 112px);
}
.record:first-child { padding-top: clamp(24px, 5vw, 64px); }
.record + .record { border-top: 1px solid var(--line); }
.record.no-photos { grid-template-columns: minmax(0, 1fr); }

.record h2 {
  margin: 0 0 0.85em;
  font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.9rem);
  line-height: 1.02;
  font-weight: 800;
  font-stretch: 70%;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.record h2 strong { font-weight: inherit; }

.text { max-width: 60ch; padding-top: 0.2em; }
.text p { margin: 0; text-wrap: pretty; }
.text .para + .para { margin-top: 1.1em; }
.text strong { font-weight: 650; color: var(--ink-strong); }

/* ---------- in-page gallery ---------- */

.gallery { min-width: 0; }

.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  align-items: center;
}
.strip::-webkit-scrollbar { display: none; }

.shot {
  all: unset;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  min-height: 12rem;
  display: grid;
  place-items: center;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.shot img {
  display: block;
  max-width: 100%;
  max-height: min(82vh, 860px);
  width: auto;
  height: auto;
  transition: transform 0.5s var(--ease-out);
}
@media (hover: hover) {
  .shot:hover img { transform: scale(1.012); }
}
.shot:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 4px; }

.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.thumbs button {
  all: unset;
  width: 56px;
  height: 56px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbs button[aria-current="true"] { opacity: 1; transform: translateY(-2px); }
.thumbs button[aria-current="true"]::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 6px;
  background: var(--ink-strong);
}
@media (hover: hover) {
  .thumbs button:hover { opacity: 0.8; }
}
.thumbs button:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; }

/* ---------- phones ---------- */

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .record:first-child { padding-top: 0; }
  .record { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 44px 52px; }
  .gallery { margin-inline: calc(var(--gutter) * -1); }
  .thumbs { margin-top: 12px; }
  .thumbs button { width: 48px; height: 48px; }
}

/* ---------- lightbox ---------- */

#lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg-deep);
  color: var(--ink-strong);
  overflow: hidden;
}
#lightbox::backdrop { background: transparent; }
#lightbox[open] { animation: lb-in 0.25s ease both; }
@keyframes lb-in { from { opacity: 0; } }

.lb-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-cell {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  --pad-y: clamp(12px, 4vh, 48px);
  --pad-x: clamp(0px, 5vw, 96px);
  padding: var(--pad-y) var(--pad-x);
  min-width: 0;
  min-height: 0;
  cursor: zoom-out;
}
.lb-cell img {
  display: block;
  max-width: calc(100vw - 2 * var(--pad-x));
  max-height: calc(100dvh - 2 * var(--pad-y));
  width: auto;
  height: auto;
  cursor: default;
}

.lb-btn {
  all: unset;
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink-strong);
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { background: rgb(255 255 255 / 0.16); }
.lb-btn:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 2px; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 14px; right: 14px; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-btn[hidden] { display: none; }

.lb-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: flex;
  gap: 8px;
}
.lb-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-strong);
  opacity: 0.3;
  transition: opacity 0.2s ease;
}
.lb-dots span.on { opacity: 1; }

@media (max-width: 760px) {
  .lb-prev, .lb-next { display: none; }
}

/* ---------- zoom transition (browsers with View Transitions) ---------- */

::view-transition-group(lb-photo) {
  animation-duration: 0.42s;
  animation-timing-function: var(--ease-out);
}
::view-transition-old(lb-photo),
::view-transition-new(lb-photo) {
  height: 100%;
  animation-duration: 0.42s;
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.3s; }

.load-error { color: var(--ink-soft); padding-top: 20vh; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
