@charset "utf-8";

/* ================= TOKENS ================= */
:root{
  --nx-text:#fff;
  --nx-muted:#cbd5e1;
  --nx-accent:#f97316;
  --nx-bg-dark:rgba(0,0,0,0.6);

  --off-gap:6px;
  --off-img-max-h:500px;
  --off-img-max-h-sp:360px;
}

/* ================= WRAPPER ================= */
.offfield{
  background:url("../images/background-002.jpg") repeat-y center top fixed;
  position:relative;
  padding:100px 20px;
  font-family:"Noto Sans JP",sans-serif;
}
.offfield::before{
  content:"";
  position:absolute; inset:0;
  background:rgba(0,0,0,0.55);
  z-index:0;
}
.offfield .wrap{
  max-width:1400px;
  margin:0 auto;
  position:relative;
  z-index:1;
  color:var(--nx-text);
}

/* ================= HEADER ================= */
.head{text-align:center; margin-bottom:80px;}
.kicker{
  font-size:16px;
  letter-spacing:0.25em;
  font-weight:700;
  color:var(--nx-accent);
  margin-bottom:14px;
}
.title{
  font-size:clamp(26px,4vw,40px);
  font-weight:900;
  line-height:1.2;
  margin:0 0 24px;
}
.lead{
  font-size:clamp(16px,1.8vw,20px);
  color:var(--nx-muted);
  max-width:900px;
  margin:0 auto;
  line-height:1.6;
}

/* ================= BLOCK TITLE ================= */
.block{
  padding-top:28px;
  margin-bottom:56px;
}
.block-title{ 
  margin:0 0 40px;
  text-align:left;
}
.block-title span{
  display:inline-block;
  font-weight:800;
  font-size: clamp(16px, 2.5vw, 30px);
  line-height:1.35;
  letter-spacing:.01em;
  color:#fff;
  padding:4px 0;
  position:relative;
}

.block-title span small{
  font-size: 0.5em;
  font-weight: 600;
  color: var(--nx-muted);
  margin-left: 8px;
}

/* 下線グラデーション */
.block-title span::after{
  content:"";
  position:absolute; left:0; bottom:-10px;
  width:clamp(110px,22vw,200px); height:4px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--nx-accent), rgba(249,115,22,.18));
}

/* ================= GRID ================= */
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--off-gap);
  margin:0;
  padding:0;
}

/* ================= CARD ================= */
.card{
  margin:0;
  padding:0;
  border-radius:6px;
  overflow:hidden;
  background:#000;
  box-shadow:0 6px 14px rgba(0,0,0,0.5);
  position:relative;
}
.card img{
  display:block;
  width:100%;
  height:auto;
  max-height:var(--off-img-max-h);
  object-fit:contain;
  background:#000;
  margin:0; padding:0; border:0;
}
.card figcaption{
  margin: 20px 0 20px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--nx-muted);
  text-align: center;
  line-height: 1.4;
}

/* ================= RESPONSIVE ================= */
@media (max-width:820px){
  .offfield{ 
    padding: 30px 8px !important;
  }
  .offfield .wrap{
    padding: 0 !important;
  }
  .grid{ 
    grid-template-columns:1fr; 
    gap: 8px; 
  }
  .card img{ max-height:var(--off-img-max-h-sp); }
  .block{ 
    padding-top:22px; 
    margin-bottom:40px;
    padding-left: 0;
    padding-right: 0;
  }
  .block-title{ 
    margin-left: 0;
    margin-right: 0;
  }
  .block-title span{
    font-size:clamp(18px,2.5vw,28px);
    line-height:1.35;
  }
  .block-title span::after{ bottom:-8px; height:3px; }
  .head{
    margin-bottom: 40px;
    padding-left: 0;
    padding-right: 0;
  }
}

/* さらに小さいスマホ用 */
@media (max-width:480px){
  .offfield{ 
    padding: 30px 6px !important;
  }
  .gallery-wrap{
    padding: 0 6px !important;
  }
  .grid{
    gap: 6px;
  }
}

/* ===== GALLERY WRAP ===== */
.gallery-wrap{
  max-width:1200px;
  margin:40px auto;
  padding:0 20px;
  color:#fff;
}
.gallery-title{
  font-weight:900;
  font-size:clamp(26px,4vw,40px);
  margin:0 0 28px;
  text-align:center;
  letter-spacing:.05em;
}

/* ===== MASONRY LAYOUT ===== */
.gallery{
  column-count:3;
  column-gap:14px;
}
.gallery img{
  width:100%;
  margin-bottom:14px;
  border-radius:8px;
  display:block;
  box-shadow:0 4px 12px rgba(0,0,0,.35);
  transition:transform .3s ease, box-shadow .3s ease;
}
.gallery img:hover{
  transform:scale(1.03);
  box-shadow:0 8px 18px rgba(0,0,0,.5);
}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px){
  .gallery{ column-count:2; }
}
@media(max-width:640px){
  .gallery{ column-count:1; }
}

.ball-gallery{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  max-width:1200px;
  margin:0 auto;
}

.ball-gallery figure{
  margin:0;
  text-align:center;
}

.ball-gallery img{
  width:100%;
  border-radius:5px;
  display:block;
}

.ball-gallery figcaption{
  margin-top:8px;
  font-size:15px;
  font-weight:600;
  color:#cbd5e1;
}

/* モーダルのベース */
#modal{
  position:fixed;
  top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,0.6);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:1000;
  animation: fadeInBg .3s ease;
}

.modal-content{
  background:#111;
  padding:10px;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.6);
  max-width:80%;
  max-height:80%;
  display:flex;
  flex-direction:column;
  align-items:center;
  transform:scale(0.9);
  opacity:0;
  animation: zoomIn .35s ease forwards;
}

.modal-content img{
  max-width:100%;
  max-height:70vh;
  border-radius:8px;
}

.close{
  align-self:flex-end;
  font-size:28px;
  color:#fff;
  cursor:pointer;
  margin-bottom:8px;
}

/* アニメーション定義 */
@keyframes fadeInBg{
  from{ background:rgba(0,0,0,0); }
  to{ background:rgba(0,0,0,0.6); }
}
@keyframes zoomIn{
  from{ transform:scale(0.9); opacity:0; }
  to{ transform:scale(1); opacity:1; }
}