@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;700&family=Noto+Sans+JP:wght@300;400;500;700&family=Montserrat:wght@400;700&display=swap');

:root {
  --primary-color: #B8A008;
  --bg-color: #F9F8F4;
  --text-color: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --border-color: #e0ddd5;

  --font-serif: 'Shippori Mincho', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-en: 'Montserrat', sans-serif;

  --fz-section-title: 28px;
  --fz-heading: 24px;
  --fz-catch: 20px;
  --fz-body: 16px;

  --padding-section: 120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fz-body);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

li {
  list-style: none;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
}

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: var(--padding-section) 0;
}

.bg-light {
  background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
.serif {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.4;
}

.en-title {
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--primary-color);
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: var(--fz-section-title);
  position: relative;
  display: inline-block;
}

.section-title.center {
  text-align: center;
}

p,
.body-text {
  font-size: var(--fz-body);
}

.catch {
  font-size: var(--fz-catch);
  font-family: var(--font-serif);
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

/* Loading Animation */
.loader-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--primary-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1);
}

.loader-wrap.loaded {
  transform: translateY(-100%);
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  height: auto;
  width: 200px;
  filter: brightness(0) invert(1);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInLogo 0.8s ease forwards 0.2s;
}

.loader-text {
  color: var(--white);
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  opacity: 0;
  animation: fadeInLogo 0.8s ease forwards 0.4s;
}

.loader-text span {
  animation: bounceDot 1.4s infinite ease-in-out both;
  display: inline-block;
}

.loader-text span:nth-child(1) { animation-delay: -0.32s; }
.loader-text span:nth-child(2) { animation-delay: -0.16s; }

@keyframes fadeInLogo {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(15px); }
}

@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

header.scrolled {
  padding: 15px 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

header .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.btn {
  display: inline-block;
  padding: 18px 45px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--text-color);
  transform: translateY(-5px);
}

/* FV Section */
.fv {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-color);
}

.fv-content {
  width: 50%;
  padding-left: 10%;
  z-index: 2;
  position: relative;
}

.fv-content h1 {
  font-size: 3.5rem;
  margin-bottom: 30px;
  color: var(--text-color);
  line-height: 1.25;
}

.fv-content .subcopy {
  font-size: var(--fz-body);
  color: var(--text-light);
  margin-bottom: 40px;
  border-left: 2px solid var(--primary-color);
  padding-left: 20px;
}

.fv-image-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  z-index: 1;
}

.fv-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.fv-image.active {
  opacity: 1;
}

.fv-image-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  width: 25%;
  height: 100%;
  background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}

/* Trouble Section Marquee */
.trouble-marquee {
  position: absolute;
  top: 0;
  left: 20%;
  height: 200%;
  display: flex;
  writing-mode: vertical-rl;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  font-size: 16vh;
  line-height: 1;
  color: #f9f8f4;
  -webkit-text-stroke: 1.5px var(--primary-color);
  z-index: 0;
  pointer-events: none;
}

.marquee-inner {
  display: flex;
  animation: slide-vertical 50s linear infinite;
}

.trouble-marquee span {
  display: inline-block;
  white-space: nowrap;
  padding-bottom: 20vh;
}

@keyframes slide-vertical {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

.trouble-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 60px;
  border: 1px solid var(--border-color);
}

.trouble-title h2 {
  font-size: 32px;
  margin-bottom: 40px;
  text-align: center;
}

.trouble-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.trouble-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--fz-body);
}

.trouble-item::before {
  content: '✓';
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.trouble-footer {
  text-align: center;
  margin-top: 40px;
  font-size: var(--fz-heading);
  color: var(--primary-color);
  font-weight: 700;
}

/* About Section */
.about {
  display: flex;
  align-items: stretch;
  background-color: #ead14b;
}

.about-img {
  width: 50%;
  position: relative;
  overflow: hidden;
}

.slides-inner {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease-in-out;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.about-content {
  width: 50%;
  padding: 100px 5%;
}

.about-content .section-title h2 {
  color: var(--white);
  text-align: left;
  font-size: calc(var(--fz-section-title) + 2px);
}

.about-content .section-title h2 span {
  color: var(--text-color);
}

.about-content p.about-text-scroll {
  font-size: calc(var(--fz-body) + 2px);
  font-weight: 700;
  line-height: 2;
  color: #d1b934;
  /* JSで1文字ずつ変更 */
}

/* Service Section */
#service {
  background-color: var(--white);
  background-image: linear-gradient(var(--border-color) 1px, transparent 1px), linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
}

.service-row {
  display: flex;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  background-color: var(--white);
  padding: 40px;
  border: 1px solid var(--border-color);
}

.service-row:nth-child(even) {
  flex-direction: row-reverse;
}

.service-txt {
  width: 45%;
}

.service-img {
  width: 55%;
}

.service-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.service-txt .num {
  font-family: var(--font-en);
  font-size: 3rem;
  font-weight: 300;
  color: #eee;
  display: block;
  margin-bottom: -15px;
}

.service-txt h3 {
  font-size: var(--fz-heading);
  margin-bottom: 20px;
}

.labs-section-title h2 {
  font-size: 20px !important;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.lab-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
}

.lab-photo {
  width: 200px;
  height: 150px;
  flex-shrink: 0;
}

.lab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-info h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-top: 5px;
  margin-bottom: 20px;
}

.lab-info .catch {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 2px;
}

/* Recommend Menu */
#recommend-menu {
  position: relative;
  background-image: url('../img/sample1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 1;
}

#recommend-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(184, 160, 8, 0.88);
  z-index: 1;
}

#recommend-menu .container {
  position: relative;
  z-index: 2;
}

#recommend-menu .section-title h2,
#recommend-menu .section-title .en-title {
  color: var(--white);
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.recommend-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  height: 100%;
}

.recommend-img {
  height: 200px;
}

.recommend-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommend-txt {
  padding: 30px;
}

.recommend-txt h3 {
  font-size: var(--fz-heading);
  margin-bottom: 15px;
}

/* Pricing */
#menu {
  position: relative;
  background-image: url('../img/menubg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 1;
}

#menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: -1;
}

#menu .container {
  position: relative;
  z-index: 2;
}

.price-box {
  background: var(--bg-color);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.price-list {
  display: flex;
  flex-direction: column;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.price-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.price-val {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 700;
}

/* Message Section */
.message-section {
  position: relative;
  overflow: hidden;
}

.message-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.message-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-image: url('../img/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
}

.message-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.message-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.message-text {
  font-size: var(--fz-body);
  line-height: 2.2;
  font-family: var(--font-serif);
  margin-bottom: 30px;
}

.representative-name {
  font-size: 16px !important;
  font-weight: 700;
  font-family: var(--font-serif);
}

/* Access */
.access-section {
  display: flex;
  background-color: #f9f8f4;
}

.access-info {
  width: 40%;
  padding: 80px;
  color: var(--text-color);
}

.access-map {
  width: 60%;
  filter: grayscale(1);
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex; /* PCでも表示 */
  z-index: 1001;
}

.cta-item {
  flex: 1;
  padding: 15px 10px; /* 18pxから縮小 */
  text-align: center;
  font-weight: 700;
  font-size: 14px; /* 1rem(16px)から2px縮小 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* iPhone等のセーフエリアを考慮し、スクロール時の隙間を防止 */
  padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

.cta-item.tel {
  background-color: var(--primary-color);
  color: var(--white);
}

.cta-item.web {
  background-color: var(--text-color);
  color: var(--white);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.sp-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(249, 248, 244, 0.98);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sp-nav.active {
  opacity: 1;
  visibility: visible;
}

.sp-nav ul {
  text-align: center;
  padding: 0;
}

.sp-nav ul li {
  margin-bottom: 30px;
}

.sp-nav ul li a {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-en);
  letter-spacing: 0.1em;
  color: var(--text-color);
}

.sp-nav-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 3rem;
  color: var(--text-color);
  cursor: pointer;
  line-height: 1;
  z-index: 1003;
}

.hamburger {
  display: none;
}

.sp-br {
  display: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .fv {
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    min-height: auto;
    padding-top: 65px;
    padding-bottom: 0;
  }

  .fv-image-wrap {
    position: relative;
    width: 100%;
    height: 50vh;
    opacity: 1;
    order: 1;
    margin-bottom: 0;
  }

  .fv-image-wrap::after {
    display: none;
  }

  .fv-content {
    background-color: var(--bg-color);
    position: relative;
    width: 100%;
    flex: 1;
    padding: 0 5% 40px;
    margin-top: -1px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    order: 2;
    z-index: 2;
  }

  .fv-content::before {
    content: '';
    display: block;
    position: absolute;
    top: -10vh;
    left: 0;
    width: 100%;
    height: 10vh;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-color) 100%);
    pointer-events: none;
  }

  .fv-content h1 {
    font-size: min(6vw, 2.8rem);
    margin-bottom: 15px;
    white-space: nowrap;
    line-height: 1.4;
    color: var(--text-color);
  }

  .fv-content .subcopy {
    font-size: 1rem;
    margin-bottom: 30px;
    border-left: 2px solid var(--primary-color);
    padding-left: 15px;
    text-align: left;
  }
  
  .sp-br {
    display: block;
  }

  .about,
  .service-row,
  .access-section,
  .lab-grid,
  .recommend-grid,
  .message-grid,
  .trouble-list {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .about-img,
  .about-content,
  .service-txt,
  .service-img,
  .access-info,
  .access-map {
    width: 100%;
  }

  .about-img {
    height: 400px;
  }

  .about-img img {
    height: 100%;
  }

  .service-row:nth-child(even) {
    flex-direction: column;
  }

  .service-row {
    margin-bottom: 60px;
    padding: 20px;
  }

  .message-grid {
    gap: 40px;
  }

  #recommend-menu {
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  :root {
    --padding-section: 80px;
  }

  .sp-br {
    display: block;
  }

  .pc-nav {
    display: none;
  }

  .hamburger {
    display: block;
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1002;
  }

  .hamburger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    left: 0;
  }

  .hamburger span:nth-child(1) {
    top: 0;
  }

  .hamburger span:nth-child(2) {
    top: 9px;
  }

  .hamburger span:nth-child(3) {
    top: 18px;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .fv-image-wrap {
    height: 40vh;
  }

  .fv-content h1 {
    font-size: min(8vw, 2.2rem);
  }

  .fv-content .subcopy {
    font-size: 0.95rem;
  }

  .trouble-container {
    padding: 40px 20px;
  }

  nav {
    display: none;
  }

  .price-box {
    padding: 20px;
  }

  .price-item {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px dashed var(--border-color);
    padding: 15px 0;
  }

  .price-name {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  .price-val {
    font-size: 1.25rem;
    align-self: flex-end;
  }

  .lab-card {
    flex-direction: column-reverse;
  }

  .lab-photo {
    width: 100%;
    height: 200px;
  }

  .access-info {
    padding: 40px;
  }
}