/*
Theme Name: Stand By Life
Theme URI: https://www.stand-by-life.com/
Author: Stand By Life
Description: 株式会社スタンドバイライフ オフィシャルテーマ
Version: 1.0.0
License: Private
Text Domain: standbylife
*/

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

:root {
  --white: #ffffff;
  --off-white: #f8f6f3;
  --light-beige: #ede9e3;
  --warm-gray: #9e9189;
  --dark: #2a2420;
  --accent: #8b6f5e;
  --accent-light: #c4a898;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

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

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
}

.site-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}
.logo-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--dark);
}
.logo-ja {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--warm-gray);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--dark);
  transition: color 0.2s;
}
.site-nav li a:hover { color: var(--accent); }

.nav-contact-btn {
  padding: 10px 24px !important;
  border: 1px solid var(--dark) !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
  transition: all 0.25s !important;
}
.nav-contact-btn:hover {
  background: var(--dark) !important;
  color: var(--white) !important;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--dark);
  transition: all 0.3s;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.0); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.18) 50%,
    rgba(0,0,0,0.55) 100%
  );
}
.hero-content {
  position: relative;
  padding: 0 80px 80px;
  color: var(--white);
}
.hero-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(30px, 4.5vw, 62px);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 36px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.22em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s;
}
.hero-cta:hover { background: rgba(255,255,255,0.28); color: var(--white); }
.hero-cta::after { content: '→'; font-size: 14px; }

.hero-scroll {
  position: absolute;
  right: 48px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  letter-spacing: 0.25em;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.4);
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── SECTION COMMON ─── */
.section-wrap { padding: 100px 80px; }
.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.55;
  margin-bottom: 56px;
}

/* ─── ABOUT ─── */
.about-section {
  background: var(--off-white);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-body {
  font-size: 15px;
  line-height: 2.0;
  color: #4a4040;
  margin-bottom: 36px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dark);
  border-bottom: 1px solid var(--dark);
  padding-bottom: 4px;
  transition: opacity 0.2s;
}
.text-link::after { content: '→'; }
.text-link:hover { opacity: 0.6; color: var(--dark); }

/* ─── SERVICES ─── */
.services-section { background: var(--white); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--light-beige);
}
.service-card {
  background: var(--white);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.service-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.08); }
.service-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.service-card:hover img { transform: scale(1.05); }
.service-body { padding: 28px 30px 36px; }
.service-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: block;
}
.service-ja {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  line-height: 1.5;
}
.service-desc {
  font-size: 13px;
  line-height: 1.85;
  color: #6a5e58;
  margin-bottom: 0;
}
.service-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.service-more::after { content: '→'; }

/* ─── FLOW ─── */
.flow-section {
  background: var(--dark);
  color: var(--white);
}
.flow-section .section-title { color: var(--white); }
.flow-section .section-label { color: var(--accent-light); }
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
}
.flow-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.flow-step { text-align: center; }
.step-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--accent-light);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 20px;
}
.step-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 12px;
}
.step-desc {
  font-size: 12px;
  line-height: 1.9;
  color: rgba(255,255,255,0.6);
}

/* ─── TESTIMONIALS ─── */
.testimonials-section { background: var(--off-white); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.testi-card {
  background: var(--white);
  padding: 36px 40px;
}
.testi-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 16px;
}
.testi-text {
  font-size: 14px;
  line-height: 2.0;
  color: #4a4040;
  margin-bottom: 24px;
}
.testi-author {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--warm-gray);
}

/* ─── CTA BANNER ─── */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
}
.cta-inner {
  position: relative;
  text-align: center;
  padding: 120px 80px;
  color: var(--white);
}
.cta-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent-light);
  margin-bottom: 20px;
  display: block;
}
.cta-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 3.5vw, 44px);
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.cta-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.15em;
  margin-bottom: 48px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 48px;
  background: var(--white);
  color: var(--dark);
  font-size: 13px;
  letter-spacing: 0.2em;
  font-weight: 500;
  transition: background 0.25s;
}
.cta-btn:hover { background: var(--off-white); color: var(--dark); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  padding: 60px 80px 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: start;
  margin-bottom: 40px;
}
.footer-logo .logo-en { color: rgba(255,255,255,0.85); }
.footer-logo .logo-ja { color: rgba(255,255,255,0.4); }
.footer-desc {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.9;
  color: rgba(255,255,255,0.45);
}
.footer-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-nav li a {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: color 0.2s;
}
.footer-nav li a:hover { color: rgba(255,255,255,0.9); }
.footer-copy {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .section-wrap { padding: 80px 48px; }
  .hero-content { padding: 0 48px 60px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .flow-steps::before { display: none; }
}

@media (max-width: 768px) {
  .site-header { padding: 18px 24px; }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white);
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 200;
  }
  .site-nav.open li a { font-size: 18px; }
  .section-wrap { padding: 64px 24px; }
  .hero-content { padding: 0 24px 60px; }
  .hero-scroll { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; gap: 32px; }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { gap: 20px; }
  .cta-inner { padding: 80px 24px; }
}


/* ─── 施工事例ギャラリー ─── */
.cases-section { background: var(--off-white); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--light-beige);
  margin-bottom: 48px;
}

.case-card {
  background: var(--white);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.case-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
  z-index: 1;
  position: relative;
}

.case-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.case-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--light-beige);
}
.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.case-card:hover .case-img { transform: scale(1.05); }

.case-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--light-beige);
}

.case-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 4px 12px;
  font-family: 'Noto Sans JP', sans-serif;
}

.case-body {
  padding: 20px 24px 28px;
}

.case-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  line-height: 1.5;
}

.case-area {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--warm-gray);
  margin-bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
}

.case-comment {
  font-size: 12px;
  line-height: 1.75;
  color: #6a5e58;
}

.cases-more {
  text-align: center;
}

.cases-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 48px;
  border: 1px solid var(--dark);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dark);
  text-decoration: none;
  transition: all 0.25s;
}
.cases-more-btn:hover {
  background: var(--dark);
  color: var(--white);
}

.cases-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--warm-gray);
  font-size: 14px;
}

/* ─── 施工事例 レスポンシブ ─── */
@media (max-width: 1024px) {
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cases-grid { grid-template-columns: 1fr; }
}


/* ============================================
   施工事例 詳細ページ (single-sbl_case.php)
   ============================================ */

.case-detail-page {
  min-height: 100vh;
  background: var(--white);
}

/* ----- Swiper ----- */
.case-swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--dark);
  aspect-ratio: 16 / 9;
  max-height: 80vh;
}

.case-swiper-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.case-swiper-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.case-swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prev / Next buttons */
.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.swiper-btn:hover { background: rgba(255,255,255,1); }
.swiper-prev { left: 16px; }
.swiper-next { right: 16px; }

/* Dot indicators */
.swiper-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.swiper-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.swiper-dot.active {
  background: var(--white);
  transform: scale(1.3);
}

/* ----- Detail Body ----- */
.case-detail-body {
  padding: 60px 24px 80px;
}
.case-detail-inner {
  max-width: 760px;
  margin: 0 auto;
}
.case-detail-cat {
  display: inline-block;
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.case-detail-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--dark);
}
.case-detail-area {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 32px;
  letter-spacing: 0.06em;
}
.case-detail-comment {
  border-left: 3px solid var(--dark);
  padding-left: 20px;
  margin-bottom: 48px;
}
.case-detail-comment p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text);
}
.case-back-link {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid var(--dark);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.case-back-link:hover { opacity: 0.6; }

/* Responsive */
@media (max-width: 768px) {
  .case-swiper { aspect-ratio: 4/3; max-height: 70vw; }
  .case-detail-body { padding: 40px 20px 60px; }
  .swiper-btn { width: 36px; height: 36px; font-size: 20px; }
}

/* ===== Cases Horizontal Slider ===== */
.cases-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding: 0 var(--space-lg, 40px) 28px;
  scrollbar-width: none;
  cursor: grab;
}
.cases-slider::-webkit-scrollbar { display: none; }
.cases-slider.grabbing { cursor: grabbing; }
.cases-slider .case-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  max-width: 320px;
}
@media (max-width: 767px) {
  .cases-slider .case-card {
    flex: 0 0 76vw;
    max-width: 76vw;
  }
}
/* ===== End Cases Slider ===== */

/* === Hide comment on top page slider === */
.cases-slider .case-comment { display: none; }

/* === Photo Grid (thumbnail) === */
.case-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin: 2rem 0;
}
.case-photo-grid-item {
    cursor: pointer;
    overflow: hidden;
}
.case-photo-grid-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.case-photo-grid-item:hover img { transform: scale(1.05); }

/* === Lightbox === */
.sbl-lightbox { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.85); z-index:9999; align-items:center; justify-content:center; }
.sbl-lightbox.is-open { display:flex; }
.sbl-lightbox img { max-width:90vw; max-height:90vh; object-fit:contain; border-radius:4px; }
.sbl-lightbox-close { position:absolute; top:1rem; right:1.5rem; font-size:2.5rem; color:#fff; cursor:pointer; line-height:1; user-select:none; }