:root {
  --color-text: #292d33;
  --color-sub: #5d636b;
  --color-bg: #f8f9fb;
  --color-surface: #fff;
  /* 小さい文字にも使える濃い青。淡い水色は装飾（背景・線・グラデーション）専用 */
  --color-main: #2c74a8;
  --color-main-light: #7bb8de;
  --color-main-soft: #a6cce6;
  --color-main-tint: #eaf2f8;
  --gradient-main: linear-gradient(90deg, #a6cce6 0%, #7bb8de 51%, #9dc9e3 100%);
  --color-footer: #25292f;
  /* 白文字とのコントラストは 2.43（基準 4.5 未満）。デザイン優先で採用（2026-09-30 確認済み） */
  --color-accent: #f18e1e;
  --color-button: #fff34f;
  --color-border: #d9dee4;
  --font-base:
    Questrial, 'Noto Sans JP', yakuhanjp, -apple-system, blinkmacsystemfont, 'Helvetica Neue', 'hiragino sans',
    'ヒラギノ角ゴ ProN W3', 'hiragino kaku gothic pron', 'Yu Gothic', yugothic, verdana, meiryo, 'M+ 1p', sans-serif;
  --container: 1080px;
  --gutter: 16px;
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.05em;
  font-feature-settings: 'palt';
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

h1,
h2,
h3,
p,
dl,
dd,
figure,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ---------- lenis ---------- */
/* lenis.css（1.3.26）のうち本サイトで使う規則だけを取り込み。外部CSSの読み込み待ちを無くすため */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* ---------- header ---------- */
.l-header__visual {
  position: relative;
  aspect-ratio: 1920 / 970;
}

/* スライド進捗バー（参考: tosou.nishizaki.co.jp）。細い線が左から伸び、満ちたら右へ縮んで次へ。
   写真の明暗に関わらず見えるよう白線＋薄い影。JS でスライド切替ごとに再生し直す */
.l-header__progress {
  position: absolute;
  right: 1rem;
  bottom: 16px;
  left: 1rem;
  z-index: 4;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.35));
  opacity: 0;
  transition: opacity 0.6s;
}

/* スライド開始（JS が .is-sliding を付与）後に表示・進行 */
.is-sliding .l-header__progress {
  opacity: 1;
}

.l-header__progress-bar {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

.is-sliding .l-header__progress-bar {
  animation: header-progress 5s linear forwards;
}

.l-header__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.l-header__slide {
  position: absolute;
  inset: 0;
}

/* 表示中・次のスライド以外は描画しない（JS が準備できるまで2枚目も非表示） */
.l-header__slide:not(.is-active, .is-next) {
  display: none;
}

.l-header__slide.is-active {
  z-index: 2;
}

/* 次のスライドは前面でマスク位置を動かし、現在のスライドを覆っていく */
.l-header__slide.is-next {
  z-index: 3;
}

.l-header__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  -webkit-mask: url('../images/mask.svg') 90% 50% / auto 100% no-repeat;
  mask: url('../images/mask.svg') 90% 50% / auto 100% no-repeat;
}

.l-header__slide.is-next img {
  animation: header-slide 5s cubic-bezier(0.89, 0.04, 0.86, 0.4) forwards;
}

.l-header {
  position: relative;
  --catch-size: clamp(1.375rem, 3.7333vw + 0.325rem, 3.125rem);
}

.l-header__catch {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  color: #fff;
  font-size: var(--catch-size);
  font-weight: 700;
  line-height: 1.3;
  mix-blend-mode: difference;
}

.l-header__title {
  margin: 1.5rem var(--gutter) 0;
  font-size: clamp(1.25rem, 2.6667vw + 0.5rem, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
}

.l-header__banners {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem var(--gutter) 0;
}

.l-header__banners li {
  width: calc(50% - 0.25rem);
  overflow: hidden;
}

.l-header__banners .l-header__banner-wide {
  width: 100%;
}

.l-header__banners img {
  width: 100%;
  transition: transform 0.5s var(--ease);
}

.l-header__banners img:hover {
  transform: scale(1.04);
}

.l-header__tenant {
  display: grid;
  aspect-ratio: 275 / 135;
  padding: 0.25rem;
  background: var(--color-accent);
  transition: background-color 0.5s var(--ease);
}

.l-header__tenant:hover,
.l-header__tenant:focus-visible {
  background: color-mix(in srgb, var(--color-accent) 85%, #000);
}

.l-header__tenant span {
  display: grid;
  place-items: center;
  padding: 0.25rem;
  border: 1px solid #fff;
  color: #fff;
  font-size: clamp(1rem, 2.4vw + 0.325rem, 2.125rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
}

@media (min-width: 769px) {
  .l-header__catch {
    top: 3.5rem;
    left: 3.5rem;
  }

  .l-header__progress {
    right: 3.5rem;
    bottom: 24px;
    left: 3.5rem;
  }

  /* キャッチ3行の下に配置。画像上で読めるよう difference 合成 */
  .l-header__title {
    position: absolute;
    top: calc(3.5rem + var(--catch-size) * 1.3 * 3 + 3rem);
    left: 3.5rem;
    z-index: 3;
    margin: 0;
    color: #fff;
    mix-blend-mode: difference;
  }

  .l-header__banners {
    position: fixed;
    right: 1rem;
    bottom: 2rem;
    z-index: 10;
    gap: 0.5rem 0;
    width: 300px;
    padding: 0;
    transition:
      opacity 0.4s var(--ease),
      transform 0.4s var(--ease),
      visibility 0.4s;
  }

  /* フッター表示中は隠す（JS で付与）。visibility でフォーカス対象からも外す */
  .l-header__banners.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
  }

  .l-header__tenant span {
    font-size: 0.9375rem;
  }
}

@keyframes header-slide {
  from {
    -webkit-mask-position: -100% 50%;
    mask-position: -100% 50%;
  }
  to {
    -webkit-mask-position: 100% 50%;
    mask-position: 100% 50%;
  }
}

/* 0〜90%（4.5秒）は一定速度で伸び、残り0.5秒で右へ縮む */
@keyframes header-progress {
  0% {
    transform: scaleX(0);
    transform-origin: left center;
  }
  90% {
    transform: scaleX(1);
    transform-origin: left center;
  }
  90.01% {
    transform: scaleX(1);
    transform-origin: right center;
    animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  100% {
    transform: scaleX(0);
    transform-origin: right center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .l-header__slide.is-next img {
    animation: none;
  }

  .l-header__progress {
    display: none;
  }

  .l-header__slide.is-next {
    display: none;
  }
}

/* ---------- main ---------- */
/* cqw（main の幅基準）で「画面端まで伸ばす写真」を扱う。100vw だとスクロールバー分はみ出すため */
.l-main {
  --side: max(var(--gutter), (100cqw - var(--container)) / 2);
  container-type: inline-size;
}

.l-main > section {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin: 0 auto;
  padding-top: clamp(80px, 12vw, 160px);
}

/* 写真を画面端まで伸ばすセクションは全幅にし、テキスト側だけ --side で揃える */
.l-main > .s-about,
.l-main > .s-clinics {
  width: 100%;
}

/* 単独で置く小さな欧文ラベル（About / Tenant） */
.p-heading__en {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-main);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.p-heading__en::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--color-main-light);
}

/* セクション見出し：大きな欧文＋小さな和文 */
.p-heading {
  display: grid;
  gap: 12px;
  font-weight: 400;
}

.p-heading .p-heading__en {
  display: block;
  color: var(--color-text);
  font-size: clamp(44px, 5vw + 1rem, 76px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.p-heading .p-heading__en::before {
  content: none;
}

.p-heading__ja {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

/* about */
.s-about {
  display: grid;
  gap: 48px;
}

.s-about__content {
  display: grid;
  gap: 48px;
  padding-inline: var(--gutter);
}

.s-about__img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

/* ヒーローと同じ外観写真を、エントランスと看板に寄せて使う */
.s-about__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.6);
  transform-origin: 30% 100%;
}

/* 日付＋細線＋文言のみの組版（枠・背景は使わない） */
.s-about__open {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  line-height: 1;
}

.s-about__open-date {
  color: var(--color-main);
  font-size: clamp(24px, 2vw + 0.5rem, 30px);
  letter-spacing: 0.04em;
}

.s-about__open-text {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.s-about__open-text::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-text);
}

.s-about__title {
  margin-top: 20px;
  font-size: clamp(30px, 4vw + 0.5rem, 50px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.06em;
}

.s-about__text {
  max-width: 34em;
  margin-top: 28px;
  color: var(--color-sub);
  line-height: 2.2;
}

.s-about__floors {
  padding: 32px;
  border-radius: 12px;
  background: var(--color-surface);
}

.s-about__floors-title {
  color: var(--color-main);
  font-size: 18px;
  letter-spacing: 0.06em;
}

.s-about__floors ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.s-about__floors li + li {
  border-top: 1px solid var(--color-border);
}

.s-about__floors a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  font-size: 15px;
  transition: color 0.3s;
}

.s-about__floors a:hover,
.s-about__floors a:focus-visible {
  color: var(--color-main);
}

.s-about__floor {
  width: 2.2em;
  color: var(--color-main);
  font-size: 22px;
  line-height: 1;
}

@media (min-width: 1025px) {
  .s-about {
    grid-template-columns: 1fr 50cqw;
    align-items: center;
    gap: 0;
    padding-left: var(--side);
  }

  .s-about__content {
    padding: 0 80px 0 0;
  }

  .s-about__img {
    aspect-ratio: 1 / 1;
  }
}

/* clinic cards */
.s-clinics .p-heading {
  margin-bottom: clamp(40px, 6vw, 72px);
  padding-inline: var(--side);
}

.p-card {
  display: grid;
  gap: 28px;
}

.p-card + .p-card {
  margin-top: clamp(56px, 8vw, 104px);
}

.p-card__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.p-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.p-card:hover .p-card__img img {
  transform: scale(1.04);
}

.p-card__img--soon {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: var(--color-main-tint);
}

.p-card__img--soon img {
  width: 44%;
  height: auto;
  object-fit: contain;
  opacity: 0.35;
  filter: grayscale(1);
}

.p-card__img--soon figcaption {
  color: var(--color-sub);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.p-card__body {
  display: flex;
  flex-direction: column;
  padding-inline: var(--gutter);
}

.p-card__floor {
  color: var(--color-main);
  font-size: clamp(24px, 2.5vw + 0.5rem, 40px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.p-card__logo {
  margin-top: 20px;
}

.p-card__logo img {
  width: auto;
  height: clamp(44px, 4vw + 1rem, 60px);
}

.p-card__logo--ichifuji img {
  height: clamp(56px, 5vw + 1rem, 72px);
}

.p-card__info {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  line-height: 1.8;
}

.p-card__info dt,
.p-card__info dd {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.p-card__info dt {
  color: var(--color-sub);
  font-size: 13px;
}

.p-card__tel {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.p-card__more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  margin-top: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-text);
  font-size: 17px;
}

/* 濃色ピルの矢印。ホバーで水色に（矢印の動きは .c-arrow） */
.p-card__more .c-arrow {
  width: 36px;
  height: 24px;
  margin-left: 40px;
  border-radius: 999px;
  background: var(--color-text);
  color: #fff;
  font-size: 14px;
  transition: background-color 0.4s;
}

.p-card:hover .p-card__more .c-arrow,
.p-card:focus-visible .p-card__more .c-arrow {
  background: var(--color-main-light);
}

.p-card:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: -2px;
}

/* 写真は画面端から中央まで（50cqw）。テキストはコンテンツ幅の端に揃える */
@media (min-width: 769px) {
  .p-card {
    grid-template-columns: 50cqw 1fr;
    align-items: center;
    gap: 0;
  }

  .p-card__img {
    aspect-ratio: 4 / 3;
  }

  .p-card__body {
    padding: 0 var(--side) 0 clamp(40px, 5vw, 80px);
  }

  .p-card:nth-of-type(even) {
    grid-template-columns: 1fr 50cqw;
  }

  .p-card:nth-of-type(even) .p-card__img {
    order: 2;
  }

  .p-card:nth-of-type(even) .p-card__body {
    padding: 0 clamp(40px, 5vw, 80px) 0 var(--side);
  }
}

/* tenant */
.s-tenant__inner {
  display: grid;
  gap: 32px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 16px;
  background: var(--color-accent);
  color: #fff;
}

.s-tenant .p-heading__en {
  color: #fff;
}

.s-tenant .p-heading__en::before {
  background: currentColor;
}

.s-tenant__title {
  margin-top: 16px;
  font-size: clamp(26px, 3vw + 0.5rem, 38px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.s-tenant__spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  margin-top: 24px;
  font-size: 15px;
}

.s-tenant__spec dd {
  font-weight: 700;
}

.s-tenant__text {
  max-width: 36em;
  margin-top: 20px;
  font-size: 14px;
}

.s-tenant__illust {
  justify-self: center;
  width: 220px;
}

.s-tenant__buttons {
  display: grid;
  gap: 12px;
}

.s-tenant__buttons a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--color-button);
  color: var(--color-text);
  font-weight: 700;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.s-tenant__buttons a:hover,
.s-tenant__buttons a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 769px) {
  .s-tenant__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .s-tenant__buttons {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* access */
.s-access__grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.s-access__info {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  align-content: start;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
}

.s-access__info dt,
.s-access__info dd {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.s-access__info dt {
  color: var(--color-sub);
  font-size: 13px;
}

.s-access__train {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
}

.s-access__train svg {
  flex-shrink: 0;
  color: var(--color-main);
}

.s-access__map {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: var(--color-main-tint);
}

.s-access__map-canvas {
  width: 100%;
  height: 100%;
}

.s-access__map-canvas.is-error {
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--color-sub);
  font-size: 14px;
  text-align: center;
}

.s-access__maplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  color: var(--color-main);
  font-size: 14px;
  transition: opacity 0.3s;
}

.s-access__maplink:hover,
.s-access__maplink:focus-visible {
  opacity: 0.7;
}

/* 地図のオリジナルピン：建物（ラベル＋アイコン）と駅 */
.c-map-pin {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.c-map-pin__label {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: 0 6px 20px rgba(41, 45, 51, 0.18);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.c-map-pin__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--color-main);
  box-shadow: 0 6px 16px rgba(44, 116, 168, 0.4);
  color: #fff;
  transform: rotate(-45deg);
}

.c-map-pin__icon svg {
  transform: rotate(45deg);
}

.c-map-station {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: var(--color-text);
  box-shadow: 0 4px 12px rgba(41, 45, 51, 0.25);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.c-map-station__jr {
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-size: 11px;
}


@media (min-width: 769px) {
  .s-access__map {
    aspect-ratio: 4 / 3;
  }

  .s-access__grid {
    grid-template-columns: 1fr 1.6fr;
    gap: 56px;
  }
}

/* ---------- footer ---------- */
.l-footer {
  margin-top: clamp(96px, 14vw, 180px);
  padding: 72px var(--gutter) 32px;
  background: var(--color-footer);
  color: #fff;
}

.l-footer__inner {
  display: grid;
  gap: 32px;
  width: min(100%, var(--container));
  margin: 0 auto;
}

.l-footer__name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.l-footer__about address {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.l-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: 14px;
}

.l-footer__nav a {
  transition: color 0.3s;
}

.l-footer__nav a:hover,
.l-footer__nav a:focus-visible {
  color: var(--color-main-light);
}

.l-footer__copy {
  width: min(100%, var(--container));
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

@media (min-width: 769px) {
  .l-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* ---------- arrow ---------- */
/* ホバーで矢印が抜けて入れ替わる（参考: tosou.nishizaki.co.jp の linelink）。
   同じ矢印を2つ並べ、右（外部リンクは右上）へ 100% ずらして入れ替える */
.c-arrow {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.c-arrow > span {
  display: block;
  position: relative;
  overflow: hidden;
  width: 1.2em;
  height: 1.5em;
}

.c-arrow > span::before,
.c-arrow > span::after {
  content: '→';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  line-height: 1.5;
  text-align: center;
}

.c-arrow > span::after {
  left: -100%;
}

.c-arrow--external > span::before {
  transform: rotate(-45deg);
}

.c-arrow--external > span::after {
  left: 0;
  transform: rotate(-45deg) translateX(calc(-100% - 0.3em));
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a:hover .c-arrow > span::before,
  a:hover .c-arrow > span::after {
    animation: arrow-slide 1s cubic-bezier(0.19, 1, 0.22, 1) both;
  }

  a:hover .c-arrow--external > span::before {
    animation-name: arrow-slide-external-out;
  }

  a:hover .c-arrow--external > span::after {
    animation-name: arrow-slide-external-in;
  }
}

@keyframes arrow-slide {
  to {
    transform: translateX(100%);
  }
}

@keyframes arrow-slide-external-out {
  from {
    transform: rotate(-45deg) translateX(0);
  }
  to {
    transform: rotate(-45deg) translateX(calc(100% + 0.3em));
  }
}

@keyframes arrow-slide-external-in {
  from {
    transform: rotate(-45deg) translateX(calc(-100% - 0.3em));
  }
  to {
    transform: rotate(-45deg) translateX(0);
  }
}

/* ---------- utility ---------- */
.u-nowrap {
  display: inline-block;
}

/* ---------- scroll reveal ---------- */
/* JS が動く環境かつ動きを減らす設定でない場合のみ、表示前を隠す */
@media (prefers-reduced-motion: no-preference) {
  .has-js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 1s var(--ease),
      transform 1s var(--ease);
  }

  .has-js [data-reveal].is-inview {
    opacity: 1;
    transform: none;
  }
}
