/* --- Design System: Perpetual x Refluck Machida --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;700&family=Outfit:wght@300;400;700&display=swap');

:root {
  --primary-color: #C9A063;
  --secondary-color: #8D7B68;
  --dark-color: #3D3D3D;
  --bg-color: #FAF9F6;
  --accent-color: #E5D6C5;
  --text-color: #4A4A4A;
  --font-main: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.9;
  letter-spacing: 0.06em;
  font-size: 16px;
  background-color: var(--bg-color);
  overflow-x: hidden;
  width: 100%;
}

/* --- Typography --- */
.font-serif {
  font-family: var(--font-serif);
}

.editorial-title {
  font-family: var(--font-serif);
  color: var(--dark-color);
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 2rem;
  position: relative;
}

.editorial-title .en-accent {
  display: block;
  font-family: var(--font-en);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* --- Section Padding & Container --- */
.section-cover {
  padding-top: 100px;
  padding-bottom: 100px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .section-cover {
    padding: 60px 0;
  }

  .container {
    padding: 0 15px !important;
  }

  .editorial-title {
    font-size: 2rem;
  }
}

/* --- Background Creative Palette --- */
.bg-warm-dark {
  background-color: var(--dark-color);
}

.bg-bone {
  background-color: #F4EFEA;
}

.bg-split-elegant {
  background: linear-gradient(to right, #FAF9F6 50%, #F4EFEA 50%);
}

/* --- FV Hero --- */
.header-spacer {
  height: 70px;
}

@media (min-width: 1024px) {
  .header-spacer {
    height: 90px;
  }
}

.fv-swiper {
  width: 100%;
  aspect-ratio: 16 / 7;
  position: relative;
  background-color: var(--bg-color);
  padding: 20px;
}

@media (max-width: 768px) {
  .fv-swiper {
    min-height: 850px; /* Further increased height */
    height: 95vh;
    padding: 10px;
  }
}

.fv-slide {
  overflow: hidden;
  border-radius: 40px 100px 40px 100px;
  /* Unique organic frame */
  box-shadow: 0 15px 40px rgba(61, 46, 40, 0.15);
  border: 4px solid #fff;
}

.fv-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

.fv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  /* Align to the bottom */
  justify-content: flex-start;
  /* Align to the left limit */
  padding-bottom: 60px;
  padding-left: 5%;
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .fv-overlay {
    padding-bottom: 80px;
    padding-left: 10%;
  }
}

.fv-content {
  background: rgba(250, 249, 246, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px 50px;
  border-radius: 0 40px 0 40px;
  /* Asymmetric elegant curve */
  border-left: 6px solid var(--primary-color);
  text-align: left;
  box-shadow: 0 25px 50px rgba(61, 46, 40, 0.15);
  color: var(--dark-color);
  position: relative;
}

@media (max-width: 768px) {
  .fv-overlay {
    justify-content: center;
    padding-left: 0;
    padding-bottom: 40px;
  }

  .fv-content {
    padding: 30px 25px;
    margin: 0 auto;
    border-radius: 0 30px 0 30px;
    border-left: 4px solid var(--primary-color);
  }
}

.fv-catchphrase {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--dark-color);
  margin-bottom: 0px;
}

@media (min-width: 768px) {
  .fv-catchphrase {
    font-size: 1.6rem;
  }
}

@media (min-width: 1024px) {
  .fv-catchphrase {
    font-size: 2.2rem;
  }
}

/* Glass & Editorial Elements */
.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 50px;
  box-shadow: 0 15px 35px rgba(61, 46, 40, 0.05);
}

@media (max-width: 768px) {
  .glass-card {
    padding: 30px;
    border-radius: 20px;
  }
}

.organic-img {
  border-radius: 100px 30px 100px 30px;
  box-shadow: 20px 20px 0px rgba(249, 166, 63, 0.15);
  transition: all 0.5s ease;
}

.organic-img:hover {
  transform: translateY(-10px);
  box-shadow: 10px 10px 0px rgba(191, 127, 68, 0.2);
}

/* Navigation Overlay */
#nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(20px);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

#nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  height: 70px;
}

.nav-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

.nav-overlay-link {
  font-size: 1.25rem;
  font-weight: 500;
  font-family: var(--font-serif);
  color: var(--dark-color);
  margin: 15px 0;
  text-decoration: none;
}

/* Service Badges */
.service-number-badge {
  position: absolute;
  top: -20px;
  left: -20px;
  background: var(--primary-color);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(249, 166, 63, 0.3);
  z-index: 5;
}

/* Animations */
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Content Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* SP CTA */
.sp-fixed-cta {
  display: none;
}

@media (max-width: 768px) {
  .bg-split-elegant {
    background: #FAF9F6;
  }

  .sp-fixed-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(61, 46, 40, 0.1);
  }

  .sp-cta-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: filter 0.3s;
  }

  .sp-cta-tel {
    background-color: var(--secondary-color);
  }

  .sp-cta-web {
    background-color: var(--primary-color);
  }

  .sp-cta-sns {
    background-color: var(--dark-color);
  }
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(249, 166, 63, 0.3);
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(249, 166, 63, 0.4);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(191, 127, 68, 0.3);
  transition: all 0.3s;
}

.btn-sns {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  border-radius: 50px;
}

.btn-sns:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Staff Element */
.staff-avatar {
  background-color: var(--bg-color);
  border: 4px solid var(--primary-color);
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Decorative Background element */
.bg-texture {
  background-image: radial-gradient(rgba(191, 127, 68, 0.1) 2px, transparent 2px);
  background-size: 30px 30px;
}

/* Map override */
.map-container {
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .map-container {
    height: 300px;
  }
}

/* --- TV Section (Problems List) --- */
.problem-list-item {
  background: #fff;
  border-left: 5px solid var(--primary-color);
  border-radius: 12px;
  width: 100%;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(61, 46, 40, 0.05);
}

.problem-list-item:hover {
  transform: translateX(10px);
  box-shadow: 0 8px 20px rgba(191, 127, 68, 0.15);
}

.accent-right-box {
  background: var(--primary-color);
  color: #fff !important;
  border-right: 5px solid #fff;
  padding: 20px 40px;
  border-radius: 10px;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(249, 166, 63, 0.3);
}

/* --- Message Section Specific --- */
#message .lg\:gap-20 {
  gap: 40px;
}

#message .editorial-title {
  font-size: 36px;
}

/* --- SP overrides for specific sections -- */
@media (max-width: 768px) {
  .p-8 {
    padding: 40px 10px !important;
  }

  .max-w-4xl.mx-auto.glass-card.flex.flex-col.md\:flex-row.gap-10.items-center.border.border-gray-200.\!bg-white.reveal-up {
    padding: 40px 10px !important;
  }

  /* Optional fallback including .is-visible state just in case */
  .max-w-4xl.mx-auto.glass-card.flex.flex-col.md\:flex-row.gap-10.items-center.border.border-gray-200.\!bg-white.reveal-up.is-visible {
    padding: 40px 10px !important;
  }

  .px-4 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* About Us section override */
  #about .editorial-title {
    font-size: 30px;
  }
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 15px rgba(201, 160, 99, 0.4);
  transition: all 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(141, 123, 104, 0.4);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 95px; /* Above the SP fixed CTA */
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}

/* --- Seamless Marquee Gallery --- */
.marquee-container {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  position: relative;
  padding: 40px 0;
}

.marquee-wrapper {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
  /* animation-play-state: paused;  <- Removed to ensure it never stops */
}

.bg-voice-custom {
  background-color: #fcf9f2; /* Creamy light gold tone */
}

.marquee-item {
  flex-shrink: 0;
  width: 500px;
  height: 350px;
  margin: 0 20px;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.marquee-item:hover img {
  transform: scale(1.1);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .marquee-item {
    width: 320px;
    height: 220px;
    margin: 0 12px;
  }
  .marquee-wrapper {
    animation-duration: 30s;
  }
}

/* --- Gallery Modal (Lightbox) --- */
#gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  backdrop-filter: blur(5px);
}

#gallery-modal.show {
  opacity: 1;
  visibility: visible;
}

#modal-container {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  border: 4px solid #fff;
  border-radius: 10px;
}

#modal-close {
  position: absolute;
  top: -50px;
  right: -20px;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  transition: transform 0.3s;
}

#modal-close:hover {
  transform: rotate(90deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-nav:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.modal-prev { left: -80px; }
.modal-next { right: -80px; }

@media (max-width: 1100px) {
  .modal-nav {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
  .modal-prev { left: -55px; }
  .modal-next { right: -55px; }
}

@media (max-width: 768px) {
  #modal-container {
    max-width: 95%;
  }
  .modal-nav {
    position: fixed;
    bottom: 20px;
    top: auto;
    transform: none;
  }
  .modal-prev { left: 20%; }
  .modal-next { right: 20%; }
  #modal-close {
    top: -50px;
    right: 0;
  }
}