/* ===== Also medical support — FV ===== */
:root {
  --white: #ffffff;
  --bg-1: #ffffff;
  --bg-2: #f7f9f9;
  --bg-3: #eef5f5;
  --text: #2f3436;
  --sub: #6f7779;
  --accent: #2f6e73;
  --line: rgba(47, 110, 115, 0.35);
  --serif-en: "Cormorant Garamond", serif;
  --serif-jp: "Noto Serif JP", serif;
  --sans-jp: "Noto Sans JP", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans-jp);
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===== Loader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  transition: opacity 1s ease 0.2s, visibility 1s ease 0.2s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; }
.loader__logo {
  display: block;
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1;
  opacity: 0;
  animation: loaderIn 1.2s ease forwards;
}
.loader__sub {
  display: block;
  margin-top: 0.4em;
  font-family: var(--sans-jp);
  font-weight: 300;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--sub);
  opacity: 0;
  animation: loaderIn 1.2s ease 0.2s forwards;
}
.loader__bar {
  display: block;
  width: 120px;
  height: 1px;
  margin: 2.2em auto 0;
  background: var(--line);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: loaderIn 1s ease 0.4s forwards;
}
.loader__bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: loaderBar 1.6s ease 0.5s forwards;
}
@keyframes loaderIn { to { opacity: 1; } }
@keyframes loaderBar { to { transform: scaleX(1); } }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: stretch;
  height: 96px;
  padding-left: 48px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 1s ease, transform 1s ease, background 0.4s ease, height 0.4s ease;
}
.header.is-ready { opacity: 1; transform: none; }
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(47, 110, 115, 0.08);
}

.header__logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}
.header__logo-main {
  font-family: var(--serif-en);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: var(--white);           /* white on FV */
  transition: color 0.5s ease;
}
.header__logo-sub {
  font-size: 10px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
  font-weight: 300;
  transition: color 0.5s ease;
}

/* After FV: restore dark colours */
.header.is-scrolled .header__logo-main { color: var(--accent); }
.header.is-scrolled .header__logo-sub  { color: var(--sub); }

.nav { display: flex; align-items: center; margin-left: auto; }
.nav__list { display: flex; gap: 40px; list-style: none; }
.nav__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  padding: 6px 0;
}
.nav__ja {
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--white);           /* white on FV */
  font-weight: 400;
  transition: color 0.5s ease;
}
.nav__en {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.65);
  transition: color 0.5s ease;
}

/* After FV: restore dark colours */
.header.is-scrolled .nav__ja { color: var(--text); }
.header.is-scrolled .nav__en { color: var(--sub); }
.nav__item a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: rgba(255,255,255,0.7);
  transition: width 0.4s ease, left 0.4s ease, background 0.5s ease;
}
.header.is-scrolled .nav__item a::after { background: var(--accent); }
.nav__item a:hover::after { width: 100%; left: 0; }

.header__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 168px;
  margin-left: 44px;
  align-self: stretch;   /* always fills the full header height */
  background: var(--accent);
  color: var(--white);
  transition: background 0.4s ease;
  flex-shrink: 0;
}
.header__cta:hover { background: #3a8389; }
.header__cta-icon svg { width: 26px; height: 26px; }
.header__cta-ja { font-size: 14px; letter-spacing: 0.12em; }
.header__cta-en { font-family: var(--serif-en); font-size: 10px; letter-spacing: 0.22em; opacity: 0.85; }

.hamburger { display: none; }

/* ===== Hero FV ===== */
.hero {
  position: relative;
  width: 100%;
  height: 200vh; /* spacer for scroll-locking room */
  background: transparent;
}
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #1a1a1a;
}
body.hero-locked { overflow: hidden; }

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__canvas.is-ready { opacity: 1; }

/* subtle dark gradient bottom — makes white copy readable */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.08) 35%, rgba(0,0,0,0) 60%),
    linear-gradient(90deg, rgba(0,0,0,0.14) 0%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}

/* ===== FV copy — lower left ===== */
.fv__copy {
  position: absolute;
  left: clamp(132px, 12vw, 200px);
  bottom: clamp(40px, 7vh, 80px);
  z-index: 5;
}
.fv__tagline {
  font-family: var(--sans-jp);
  font-weight: 300;
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.8;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.9em;
}
.fv__ja {
  font-family: var(--serif-jp);
  font-weight: 300;
  font-size: clamp(13px, 1.15vw, 17px);
  letter-spacing: 0.26em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5em;
}
.fv__title {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(68px, 11.5vw, 180px);
  line-height: 0.88;
  letter-spacing: 0.03em;
  color: #ffffff;
}

/* staggered fade-up */
.fv__tagline, .fv__ja, .fv__title {
  opacity: 0;
  transform: translateY(22px);
}
body.is-loaded .fv__tagline { animation: fadeUp 1s cubic-bezier(.2,.7,.2,1) 1.0s forwards; }
body.is-loaded .fv__ja      { animation: fadeUp 1s cubic-bezier(.2,.7,.2,1) 1.2s forwards; }
body.is-loaded .fv__title   { animation: fadeUp 1.1s cubic-bezier(.2,.7,.2,1) 1.4s forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ===== Scroll indicator — left side vertical ===== */
.fv__scroll {
  position: absolute;
  left: clamp(100px, 8vw, 140px);
  bottom: clamp(32px, 5vh, 60px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}
.fv__scroll-text {
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.7);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.fv__scroll-arrow {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  animation: arrowBounce 1.8s ease-in-out infinite;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ===== PROMISE ===== */
.promise {
  position: relative;
  background: var(--white);
  padding: 130px clamp(24px, 6vw, 80px) 130px;
  text-align: center;
  overflow: hidden;
}
.promise__head { position: relative; z-index: 3; margin-bottom: clamp(36px, 5vh, 60px); }
.promise__en {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(52px, 7vw, 88px); /* OUR VALUE と統一 */
  line-height: 1;
  letter-spacing: 0.12em;
  color: #54646c;
}
.promise__ja-sub {
  margin-top: 0.6em;
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: var(--sub);
}

.promise__visual {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}
.promise__visual img {
  display: block;
  width: 100%;
  height: auto;
}
.promise__visual-fade {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 42%;
  background: linear-gradient(0deg, var(--white) 12%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.promise__body { position: relative; z-index: 3; margin-top: clamp(36px, 5vh, 56px); }
.promise__lead {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.9;
  letter-spacing: 0.16em;
  color: #3f4c53;
}
.promise__text {
  margin-top: 2em;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 2.4;
  letter-spacing: 0.12em;
  color: var(--sub);
}

/* ===== BUSINESS — horizontal scroll section ===== */
.business {
  position: relative;
  /* height set by JS to match scroll distance */
  background: var(--bg-2);
}
.business__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f6f7 0%, #ffffff 50%, #eef5f5 100%);
}

/* subtle water-ripple bg */
.business__sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 600px 400px at 20% 60%, rgba(47,110,115,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 80% 30%, rgba(47,110,115,0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Left panel ───────────────────────────────── */
.business__left {
  flex-shrink: 0;
  width: clamp(240px, 22vw, 320px);
  padding: 0 clamp(24px, 4vw, 60px) 0 clamp(40px, 5vw, 80px);
  z-index: 2;
}
.business__en {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(36px, 4vw, 54px);
  letter-spacing: 0.12em;
  color: var(--text);
  line-height: 1;
}
.business__ja-label {
  font-family: var(--serif-jp);
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: 0.28em;
  color: var(--sub);
  margin-top: 0.6em;
}
.business__rule {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin: 1.6em 0;
}
.business__lead {
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 2.1;
  letter-spacing: 0.1em;
  color: var(--sub);
}

/* reveal for business left */
.reveal-biz {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal-biz.is-in { opacity: 1; transform: none; }

/* ── Cards track ─────────────────────────────── */
.business__track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}
.business__cards {
  display: flex;
  gap: 24px;
  padding: 40px clamp(20px, 3vw, 48px) 40px clamp(40px, 6vw, 100px);
  will-change: transform;
  align-items: stretch;
}

/* ── Card ────────────────────────────────────── */
.biz-card {
  flex-shrink: 0;
  width: clamp(280px, 28vw, 380px);
  background: #ffffff;
  border: 1px solid rgba(47, 110, 115, 0.12);
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(47, 110, 115, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.4s ease;
}
.biz-card:hover {
  box-shadow: 0 16px 56px rgba(47, 110, 115, 0.14);
}

/* card image area */
.biz-card__img {
  height: 200px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.biz-card__img--01 { background-image: url("assets/business/493ab6f9-e806-4926-9275-6199f10537c3.png"); background-color: #e8f4f5; }
.biz-card__img--02 { background-image: url("assets/business/02.jpg"); background-color: #e8f4f5; }
.biz-card__img--03 { background-image: url("assets/business/03.jpg"); background-color: #e8f4f5; }
.biz-card__img--04 { background-image: url("assets/business/04.jpg"); background-color: #e8f4f5; }
.biz-card__img--05 { background-image: url("assets/business/05.jpg"); background-color: #e8f4f5; }

/* card body */
.biz-card__body {
  flex: 1;
  padding: clamp(22px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  position: relative;
}
.biz-card__num {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(32px, 3.5vw, 48px);
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.biz-card__title {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: clamp(14px, 1.3vw, 17px);
  letter-spacing: 0.14em;
  color: var(--text);
  margin-top: 0.6em;
}
.biz-card__rule {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--line);
  margin: 1em 0;
  flex-shrink: 0;
}
.biz-card__text {
  font-size: clamp(11.5px, 0.85vw, 13px);
  line-height: 1.95;
  letter-spacing: 0.08em;
  color: var(--sub);
  flex: 1;
}
.biz-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  margin-top: 1.6em;
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.biz-card__btn:hover { background: #3a8389; transform: scale(1.08); }
.biz-card__btn svg { width: 18px; height: 18px; }

/* ── Progress bar ────────────────────────────── */
.business__progress {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 4;
}
.business__progress-nums {
  display: flex;
  gap: 60px;
}
.business__progress-nums span {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--line);
  transition: color 0.4s ease;
}
.business__progress-nums span.is-active {
  color: var(--accent);
}
.business__progress-rail {
  width: 340px;
  height: 1px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.business__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.05s linear;
}

/* ── Mobile: vertical ───────────────────────── */
@media (max-width: 768px) {
  .business { height: auto !important; }
  .business__sticky {
    position: relative;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 22px 60px;
    gap: 48px;
  }
  .business__left { width: 100%; padding: 0; }
  .business__track { overflow: visible; width: 100%; }
  .business__cards {
    flex-direction: column;
    padding: 0;
    gap: 20px;
  }
  .biz-card { width: 100%; }
  .business__progress { display: none; }
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.2s cubic-bezier(.2,.7,.2,1), transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .header { padding-left: 22px; height: 72px; }
  .header__logo-main { font-size: 26px; }
  .nav, .header__cta { display: none; }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 64px;
    margin-left: auto;
    background: var(--accent);
    border: none;
    cursor: pointer;
  }
  .hamburger span { display: block; width: 26px; height: 1.5px; background: #fff; margin: 0 auto; }

  .fv__title { font-size: clamp(52px, 17vw, 100px); }
  .fv__copy { left: 24px; bottom: 32px; }

  .promise { padding: 100px 32px 90px; }
  .promise__lead { font-size: clamp(18px, 4.6vw, 26px); }
  .promise__text { font-size: 12.5px; }
  .promise__text br { display: none; }
}

/* ===== モバイルFV：スクロール連動（sticky維持）＆ SCROLLを右へ ===== */
@media (max-width: 768px) {
  /* 切替完了後のスクロール余白に2枚目画像を敷く（黒背景を防ぐ） */
  .hero {
    height: 200vh;
    background: #eef4f4 url("assets/fv/scene2.jpg") center bottom / cover no-repeat;
  }
  .hero__sticky { position: sticky; top: 0; height: 100vh; min-height: 560px; background: transparent; }
  /* SCROLL表記を右端へ（コピーとの重なり回避） */
  .fv__scroll { left: auto; right: 22px; }
}

/* ===== モバイル ドロワーメニュー ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 36px 48px;
  background: rgba(247, 250, 250, 0.98);
  backdrop-filter: blur(8px);
  transform: translateX(100%);
  visibility: hidden;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), opacity 0.4s ease, visibility 0.4s;
}
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { transform: none; visibility: visible; opacity: 1; }
.mobile-menu__list { list-style: none; }
.mobile-menu__list li { border-bottom: 1px solid rgba(47,110,115,0.14); }
.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 4px;
}
.mobile-menu .mm-ja {
  font-family: var(--serif-jp);
  font-size: 19px;
  letter-spacing: 0.1em;
  color: var(--text);
}
.mobile-menu .mm-en {
  font-family: var(--serif-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.mobile-menu__foot { margin-top: 40px; }
.mobile-menu__tel {
  font-family: var(--serif-en);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.mobile-menu__co {
  font-family: var(--serif-jp);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--sub);
  margin-top: 10px;
}

/* ハンバーガー → ×（開いた時） */
@media (max-width: 900px) {
  .hamburger span { transition: transform 0.35s ease, opacity 0.3s ease; }
  .hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  /* メニュー展開中はヘッダーを白地に */
  body.menu-open .header { background: rgba(247,250,250,0.98); }
  body.menu-open .header__logo-main { color: var(--accent); }
  body.menu-open .header__logo-sub { color: var(--sub); }
}

/* ===== モバイル 余白最適化（左右 約32px） ===== */
@media (max-width: 768px) {
  .page-hero { padding-left: 32px; padding-right: 32px; min-height: clamp(220px, 38vh, 320px); }
  .page-main { padding-left: 32px; padding-right: 32px; }
  .home-news { padding-left: 32px; padding-right: 32px; }
  .contact-cta { padding-left: 32px; padding-right: 32px; }
  .footer { padding-left: 32px; padding-right: 32px; }
  .business__sticky { padding-left: 32px; padding-right: 32px; }
  .promise { padding-left: 32px; padding-right: 32px; }
}
