/* ===== BACKDOOR NAKAMEGURO PHOTO GALLERY =====
   設計: JOPT系トーナメントサイトの文法 (白基調 / 写真主導 / 大きなタイポ / 装飾なし)
   アクセント: ブランド赤 #C4272E は要所のみ */
:root {
  --ink: #17181a;
  --gray: #6e6e6e;
  --hairline: #e8e6e2;
  --bg: #ffffff;
  --bg-soft: #f6f5f2;
  --red: #c4272e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.en { font-family: "Inter Tight", "Noto Sans JP", sans-serif; letter-spacing: -.01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 64px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo { height: 34px; width: auto; }
.nav-logo-link { margin-right: auto; display: flex; align-items: center; }
.nav a.nav-link {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a.nav-link:hover { border-bottom-color: var(--red); }
.nav .nav-ext { color: var(--gray); font-size: 13px; text-decoration: none; }
.nav .nav-ext:hover { color: var(--red); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 88dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 64px;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 14, .38) 0%, rgba(12, 12, 14, .30) 55%, rgba(12, 12, 14, .62) 100%);
}
.hero-inner { position: relative; padding: 64px 24px; color: #fff; }
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: .22em;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 18px;
}
.hero-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 10vw, 118px);
  line-height: .98;
  letter-spacing: -.02em;
}
.hero-copy {
  margin-top: 26px;
  font-size: clamp(14.5px, 2vw, 16.5px);
  color: rgba(255, 255, 255, .92);
}
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: #ececec; }
.btn-outline-white { border: 1.5px solid rgba(255, 255, 255, .8); color: #fff; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .14); }

/* ---------- sections ---------- */
section { padding: 104px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.sec-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 650;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.sec-sub { color: var(--gray); font-size: 14px; margin-bottom: 48px; }

/* ---------- event cards (JOPT型) ---------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px 32px;
}
.ev-card { text-decoration: none; display: block; }
.ev-photo {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-soft);
}
.ev-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.ev-card:hover .ev-photo img { transform: scale(1.04); }
.ev-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 16, .34);
}
.ev-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}
.ev-overlay .year { font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: clamp(20px, 3vw, 28px); opacity: .95; }
.ev-overlay .name { font-weight: 900; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.25; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.ev-body { display: block; padding: 18px 2px 0; }
.ev-title { display: block; font-size: 18px; font-weight: 700; }
.ev-meta { color: var(--gray); font-size: 14px; margin-top: 2px; }
.ev-status { font-size: 13px; font-weight: 700; color: var(--red); margin-top: 8px; letter-spacing: .04em; }

/* ---------- how it works ---------- */
.band-soft { background: var(--bg-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { border-top: 2px solid var(--ink); padding-top: 20px; }
.step .num { font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: 15px; color: var(--red); letter-spacing: .06em; }
.step h3 { font-size: 17px; font-weight: 700; margin: 6px 0 8px; }
.step p { color: var(--gray); font-size: 14px; line-height: 1.9; }

/* ---------- access ---------- */
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.access-map {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #fff;
}
.access-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.access-info p { font-size: 15px; margin-bottom: 14px; }
.access-info .small { color: var(--gray); font-size: 13.5px; }
.btn-line {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 28px;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.btn-line:hover { background: var(--ink); color: #fff; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: rgba(255, 255, 255, .82); padding: 56px 0 64px; text-align: center; }
.foot-brand { font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .04em; color: #fff; margin-bottom: 22px; }
.sns { display: flex; gap: 14px; justify-content: center; margin-bottom: 26px; }
.sns a {
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  text-decoration: none;
}
.sns a:hover { border-color: #fff; color: #fff; }
.copy { font-size: 12px; color: rgba(255, 255, 255, .55); }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .ev-photo img, .ev-card:hover .ev-photo img { transition: none; transform: none; }
}

@media (max-width: 767px) {
  section { padding: 72px 0; }
  .nav .wrap { gap: 14px; }
  .nav-logo { height: 28px; }
  .nav a.nav-link { font-size: 13px; }
  .nav .nav-hide-sp { display: none; }
  .nav .nav-ext { font-size: 12.5px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .access-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- gallery page ---------- */
.gal-main { margin-top: 64px; }
.gal-header { padding: 56px 0 0; }
.gal-ev-latin { font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .14em; color: var(--red); }
.gal-ev-title { font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.3; margin: 4px 0 6px; }
.gal-ev-meta { color: var(--gray); font-size: 14.5px; }
.gal-filterbar {
  position: sticky;
  top: 64px;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  margin-top: 28px;
}
.gal-filterbar .wrap {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.gal-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 28px 0 96px;
}
.gal-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-soft);
  cursor: pointer;
  border: 0;
  padding: 0;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.gal-item:hover img { transform: scale(1.03); }
.gal-item .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(160deg, #2a2b2e, #131417);
}
.gal-item .day-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  background: rgba(14, 14, 16, .68);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.gal-empty { text-align: center; color: var(--gray); padding: 110px 20px 140px; font-size: 14px; line-height: 2.1; }
.gal-empty .en { display: block; font-weight: 650; font-size: 30px; color: var(--ink); margin-bottom: 10px; letter-spacing: -.01em; }

/* lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 10, 12, .96);
  display: none;
  flex-direction: column;
}
.lb.on { display: flex; }
.lb-top { display: flex; justify-content: flex-end; padding: 14px 16px; gap: 10px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 4px; }
.lb-bottom { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; flex-wrap: wrap; }
.lb-btn {
  border: 1px solid rgba(255, 255, 255, .4);
  background: none;
  color: #fff;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.lb-btn:hover { border-color: #fff; }
.lb-btn.primary { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }
.lb-btn.primary:hover { background: #d8353c; }
.lb-hint { width: 100%; text-align: center; color: rgba(255, 255, 255, .55); font-size: 11.5px; }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 44px;
  height: 64px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
}
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
