/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #FFFFFB;   /* 胡粉色 / Off-White */
  --ink:         #1D1D1F;
  --ink-mid:     #1D1D1F;
  --ink-light:   #1D1D1F;
  --font:        "Helvetica Neue", Helvetica, "Raleway", Arial, sans-serif;
  --fade-in:     1.1s;
  --fade-out:    1.0s;
  --header-h:    72px;      /* ヘッダー高さ（padding 32px × 2 ≈ 72px） */
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 100;
  letter-spacing: 0.08em;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════
   SITE HEADER / NAV
═══════════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  padding: 0 44px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#site-nav {
  display: flex;
  gap: 36px;
  pointer-events: auto;
}

.nav-link {
  font-size: 11px;
  font-weight: 100;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

/* Hide nav during focus mode */
#site-header.hidden-in-focus {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* ═══════════════════════════════════════════════
   STAGE — full viewport canvas
═══════════════════════════════════════════════ */
#stage {
  position: fixed;
  top: var(--header-h);   /* ヘッダー領域を除外 */
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════
   PHOTO CARD
═══════════════════════════════════════════════ */
.card {
  position: absolute;
  cursor: pointer;
  opacity: 0;
  will-change: opacity, transform;
  /* transition is set dynamically in JS */
}

/* Older (dimmed) cards get a subtle reveal cursor */
.card:not(.focused):hover {
  cursor: zoom-in;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.13);
}

/* active / fade-out classes are legacy; opacity is JS-driven */
.card.active  { }
.card.fade-out { }

/* ═══════════════════════════════════════════════
   FOCUS MODE
═══════════════════════════════════════════════ */
#stage.has-focus .card:not(.focused) {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.6s ease !important;
}

.card.focused {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw  !important;
  height: 100vh !important;
  z-index: 150  !important;
  cursor: zoom-out;
}

.card.focused img {
  box-shadow: none;
}

/* ═══════════════════════════════════════════════
   OVERLAY
═══════════════════════════════════════════════ */
#overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  z-index: 140;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#overlay.visible {
  opacity: 0.92;
  pointer-events: auto;
  cursor: zoom-out;
}

/* ═══════════════════════════════════════════════
   CLOSE HINT  (top-center, focus mode only)
═══════════════════════════════════════════════ */
#close-hint {
  position: fixed;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  font-size: 10px;
  font-weight: 100;
  letter-spacing: 0.26em;
  color: var(--ink-mid);
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#close-hint.visible {
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════
   SCROLL HINT  (bottom-right)
═══════════════════════════════════════════════ */
#scroll-hint {
  position: fixed;
  bottom: 34px;
  right: 44px;
  z-index: 200;
  font-size: 10px;
  font-weight: 100;
  letter-spacing: 0.18em;
  color: var(--ink-light);
  text-transform: uppercase;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 1.4s ease;
}

#scroll-hint.hidden {
  opacity: 0;
}

/* ═══════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s ease;
}

#loader span {
  font-size: 12px;
  font-weight: 100;
  letter-spacing: 0.38em;
  color: var(--ink-light);
  text-transform: uppercase;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

#loader.gone {
  display: none;
}

/* ═══════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  #scroll-hint { display: none; }
  #close-hint  { top: 26px; }
}
