/* =========================================================
   Light & Silence — Photography
   ========================================================= */

:root {
  --bg: #f6f4f0;
  --bg-elev: #ffffff;
  --text: #1c1b19;
  --muted: #8a867f;
  --line: rgba(28, 27, 25, 0.12);
  --accent: #a4805a;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --gap: clamp(12px, 1.6vw, 24px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-elev: #1a1a18;
  --text: #ecebe7;
  --muted: #8f8c86;
  --line: rgba(236, 235, 231, 0.12);
  --accent: #c9a77f;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 写真の保存をしにくくする（ドラッグ・長押し保存・選択を無効化） */
.photo img,
.lightbox__img,
.hero__image,
.about__photo {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  color: #fff;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), padding 0.5s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.logo span { font-style: italic; color: var(--accent); }

.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.theme-toggle {
  width: 34px; height: 18px;
  border: 1px solid currentColor;
  border-radius: 20px;
  position: relative;
  opacity: 0.8;
}
.theme-toggle__dot {
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
[data-theme="dark"] .theme-toggle__dot { transform: translateX(16px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 64vh;
  height: 64svh;
  min-height: 420px;
  max-height: 720px;
  overflow: hidden;
  color: #fff;
}
.hero__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 62%;
  transform: scale(1.08);
  animation: heroZoom 2.8s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.5) 100%);
}
.hero__content {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(48px, 9vh, 96px);
  max-width: 1000px;
}
.hero__eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeUp 1.2s var(--ease) 0.6s forwards;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 12px 0 20px;
  opacity: 0;
  animation: fadeUp 1.4s var(--ease) 0.8s forwards;
}
.hero__lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeUp 1.4s var(--ease) 1.1s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}
.hero__scroll i {
  display: block;
  width: 1px; height: 44px;
  background: rgba(255,255,255,0.35);
  position: relative;
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ---------- Section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 18px;
}
.section-head__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  letter-spacing: 0.02em;
}
.section-head__sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.24em;
}

/* ---------- Works ---------- */
.works { padding: clamp(56px, 7vw, 100px) var(--gutter) clamp(80px, 10vw, 140px); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: clamp(32px, 4vw, 56px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.filter {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.3s;
}
.filter sup {
  font-size: 10px;
  margin-left: 3px;
  letter-spacing: 0;
}
.filter:hover,
.filter.is-active { color: var(--text); }
.filter.is-active { font-style: italic; }

.gallery {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}
.gallery__col { flex: 1; min-width: 0; }

.photo {
  break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.photo.is-visible { opacity: 1; transform: none; }
.photo.is-hidden  { display: none; }

.photo__frame {
  position: relative;
  overflow: hidden;
  background: var(--line);
}
.photo__frame img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 1.4s var(--ease), filter 0.8s var(--ease);
}
.photo__frame img.is-loaded { opacity: 1; }
.photo:hover .photo__frame img { transform: scale(1.04); }

.photo__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 2px 0;
  font-size: 12px;
  line-height: 1.6;
}
.photo__title { letter-spacing: 0.12em; }
.photo__no {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  margin-right: 10px;
  font-size: 14px;
}
.photo__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- About ---------- */
.about {
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  border-top: 1px solid var(--line);
}
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: center;
}
@media (max-width: 800px) { .about__inner { grid-template-columns: 1fr; } }

.about__photo {
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  background-color: var(--line);
}
.about__text { max-width: 520px; }
.about__text p + p { margin-top: 1.4em; }
.about__name {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 1.2em;
}
.about__name span { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.about__meta {
  margin-top: 2.4em;
  border-top: 1px solid var(--line);
}
.about__meta div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.about__meta dt {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(96px, 12vw, 160px) var(--gutter) 40px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-footer__lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.2;
}
.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0 96px;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.14em;
}
.site-footer__links a { color: var(--muted); transition: color 0.3s; }
.site-footer__links a:hover { color: var(--text); }
.site-footer__copy { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0c0c0b;
  color: #ecebe7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px clamp(16px, 7vw, 120px) 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.lightbox__img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.lightbox__img.is-loaded { opacity: 1; transform: none; }

.lightbox__caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: 20px;
  font-size: 12px;
  line-height: 1.8;
}
.lightbox__title { font-size: 15px; letter-spacing: 0.14em; }
.lightbox__desc { color: #8f8c86; }
.lightbox__info { text-align: right; color: #8f8c86; font-family: var(--serif); font-size: 14px; letter-spacing: 0.06em; }
.lightbox__count { color: #ecebe7; font-style: italic; }
.lightbox__copy { font-size: 12px; letter-spacing: 0.1em; opacity: 0.7; }

.lightbox__close {
  position: absolute;
  top: 20px; right: clamp(16px, 3vw, 40px);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 20px;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.lightbox__nav--prev { left: clamp(4px, 2vw, 32px); }
.lightbox__nav--next { right: clamp(4px, 2vw, 32px); }
.lightbox__close:hover,
.lightbox__nav:hover { opacity: 1; }

@media (max-width: 640px) {
  .nav a { display: none; }
  .lightbox__nav { display: none; }
  .lightbox__caption { flex-direction: column; align-items: flex-start; }
  .lightbox__info { text-align: left; }
}

body.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .photo { opacity: 1; transform: none; }
}
