/* ==========================================================================
   Top page（Figma: pc / 1:7）
   ========================================================================== */
.p-top {
  --kv-gutter: clamp(1.25rem, 2.78vw, 2.5rem); /* 1440で40px */
}

/* 背景写真（Figma 1:8 / opacity .2 / ページ全体で sticky） */
.p-top__bg {
  /* bg-room.webp は Figma の opacity .2 を焼き込み済みで書き出しているため、CSS 側で透明度はかけない */
  position: sticky;
  top: 0;
  z-index: calc(var(--z-bg) - 1);
  height: 62.5rem; /* 1000px */
  margin-bottom: -62.5rem;
  overflow: hidden;
  pointer-events: none;
}

.p-top__bg img {
  position: absolute;
  top: -0.21%;
  left: -5.52%;
  width: 111.04%;
  max-width: none;
  height: 136.01%;
  object-fit: cover;
  object-position: center top;
}

/* KV 上部の白グラデーション（Figma 1:9） */
.p-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bg);
  height: 30.0625rem; /* 481px */
  background-image: linear-gradient(to bottom, var(--color-kv-fade-start), var(--color-kv-fade-end));
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Intro（KV + Message）
   -------------------------------------------------------------------------- */
.p-top-intro {
  position: relative;
  max-width: var(--page-max-width);
  margin-inline: auto;
}

.p-top-kv {
  position: relative;
  z-index: var(--z-base);
  padding: 13.875rem var(--kv-gutter) 0; /* top 222px */
}

.p-top-kv__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
  max-width: 40rem; /* 640px */
}

.p-top-kv__title {
  color: var(--color-main);
  font-family: var(--font-ja);
  font-size: var(--fs-80);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}

.p-top-kv__lead {
  font-family: var(--font-ja);
  font-size: var(--fs-18);
  font-weight: var(--fw-medium);
  line-height: var(--lh-loose);
}

.p-top-kv__en {
  margin-top: 12.25rem; /* y754 */
  color: var(--color-deco-kv);
  font-family: var(--font-base);
  font-size: var(--fs-86);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-deco);
  white-space: nowrap;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

/* KV写真（Figma Group 91：x809〜1400 / y0〜747.6、Message 終わりまで sticky） */
.p-top-intro__photos {
  position: absolute;
  top: 0;
  right: var(--kv-gutter);
  bottom: 0;
  width: min(36.9375rem, 41vw); /* 591px */
  pointer-events: none;
}

.p-top-intro__photos-sticky {
  position: sticky;
  top: 0;
}

.p-top-intro__photos-inner {
  position: relative;
  aspect-ratio: 591 / 747.6;
}

.p-top-intro__photo {
  position: absolute;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.p-top-intro__photo--01 {
  top: 41.734%;
  left: 39.474%;
  width: 60.526%;
  aspect-ratio: 357.71 / 238.73;
}

.p-top-intro__photo--02 {
  top: 55.672%;
  left: 0;
  width: 28.948%;
  aspect-ratio: 171.08 / 227.85;
}

.p-top-intro__photo--03 {
  top: 81.988%;
  left: 47.894%;
  width: 34.178%;
  aspect-ratio: 201.99 / 134.66;
}

.p-top-message {
  position: relative;
  padding-top: var(--space-160);
}

.p-top-message__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-80);
  max-width: 32.9375rem; /* 527px */
}

.p-top-message__heading {
  gap: var(--space-32);
}

.p-top-message__heading .c-heading__ja {
  font-size: var(--fs-48);
  letter-spacing: 0;
}

.p-top-message__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  max-width: 28.75rem; /* 460px */
  font-family: var(--font-ja);
  font-size: var(--fs-18);
  font-weight: var(--fw-medium);
  line-height: var(--lh-loose);
}

/* --------------------------------------------------------------------------
   Contents（イマスを知る）
   -------------------------------------------------------------------------- */
.p-top-contents {
  position: relative;
  isolation: isolate;
  margin-top: var(--space-160);
  padding-bottom: var(--space-240);
}

/* 水色テクスチャ（Figma Subtract 1:10：左上 362×261 / 左下 870×75 の切り欠き） */
.p-top-contents__bg {
  --notch-top: min(16.3125rem, 18.125vw);
  --notch-bottom: min(4.6875rem, 5.208vw);
  position: absolute;
  top: var(--space-120);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-bg);
  clip-path: polygon(
    25.139% 0,
    100% 0,
    100% 100%,
    60.417% 100%,
    60.417% calc(100% - var(--notch-bottom)),
    0 calc(100% - var(--notch-bottom)),
    0 var(--notch-top),
    25.139% var(--notch-top)
  );
}

.p-top-contents__inner {
  position: relative;
}

.p-top-contents__deco {
  position: absolute;
  top: 8.5625rem; /* 137px */
  left: calc(var(--container-gutter) * 0.5); /* 基準はパディングボックス左端 → 1440で x40 */
  z-index: var(--z-base);
  color: var(--color-deco-contents);
  font-family: var(--font-base);
  font-size: var(--fs-140);
  font-weight: var(--fw-medium);
  line-height: var(--lh-deco);
  white-space: nowrap;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.p-top-contents__deco span {
  display: block;
  white-space: pre;
}

.p-top-contents__photo {
  width: 51.5625%; /* 660 / 1280 */
  margin-left: auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.p-top-contents__photo img {
  width: 100%;
  aspect-ratio: 660 / 440;
  object-fit: cover;
}

.p-top-contents__heading {
  margin-top: 2.3125rem; /* 37px */
}

.p-top-contents__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-80);
  row-gap: 5.0625rem; /* 81px */
  margin-top: var(--space-80);
}

/* 十字の罫線（Figma Rectangle 10 / 11） */
.p-top-contents__list::before,
.p-top-contents__list::after {
  content: "";
  position: absolute;
  background-color: var(--color-line);
  pointer-events: none;
}

.p-top-contents__list::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.p-top-contents__list::after {
  top: calc(50% - 0.5px);
  left: 0;
  right: 0;
  height: 1px;
}

.p-top-contents-card {
  display: flex;
  justify-content: space-between;
  gap: var(--space-16);
  height: 100%;
}

.p-top-contents-card__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-20);
  min-width: 0;
}

.p-top-contents-card__en {
  color: var(--color-navy);
  font-family: var(--font-base);
  font-size: var(--fs-25);
  font-weight: var(--fw-medium);
  line-height: var(--lh-none);
  opacity: 0.3;
}

.p-top-contents-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  line-height: var(--lh-relaxed);
}

.p-top-contents-card__title {
  color: var(--color-main);
  font-family: var(--font-ja);
  font-size: var(--fs-32);
  font-weight: var(--fw-bold);
  line-height: inherit;
}

.p-top-contents-card__desc {
  max-width: 17.5rem; /* 280px */
  font-family: var(--font-ja);
  font-size: var(--fs-16);
}

.p-top-contents-card__img {
  flex-shrink: 0;
  width: 46.667%; /* 280 / 600 */
  overflow: hidden;
  border-radius: var(--radius-md);
}

.p-top-contents-card__img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 280 / 380;
  object-fit: cover;
  transition: transform var(--duration-fade) var(--ease);
}

@media (hover: hover) {
  .p-top-contents-card:hover .p-top-contents-card__img img {
    transform: scale(1.05);
  }
}

/* --------------------------------------------------------------------------
   People（人を知る）
   -------------------------------------------------------------------------- */
.p-top-people {
  padding-top: var(--space-48);
}

.p-top-people__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-24);
}

.p-top-people__list {
  margin-top: var(--space-64);
}

/* --------------------------------------------------------------------------
   News（イマスの今を知る）
   -------------------------------------------------------------------------- */
.p-top-news {
  padding-top: var(--space-240);
  padding-bottom: var(--space-160);
}

.p-top-news__inner {
  display: grid;
  grid-template-columns: minmax(0, 24rem) minmax(0, 50rem); /* 384px / 800px */
  justify-content: space-between;
  column-gap: var(--space-40);
}

.p-top-news__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-64);
}

.p-top-news__list {
  margin-top: var(--space-160);
}

.p-top-news__item + .p-top-news__item {
  margin-top: var(--space-40);
  padding-top: var(--space-40);
  border-top: 1px solid var(--color-border);
}

.p-top-news-card {
  display: flex;
  align-items: center;
  gap: var(--space-32);
  padding-inline: var(--space-12);
}

.p-top-news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-16);
  min-width: 0;
  max-width: 44.5rem; /* 712px */
}

.p-top-news-card__title {
  font-family: var(--font-ja);
  font-size: var(--fs-20);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  transition: color var(--duration-fast) var(--ease);
}

.p-top-news-card--large {
  gap: var(--space-40);
}

.p-top-news-card--large .p-top-news-card__body {
  gap: var(--space-20);
}

.p-top-news-card--large .p-top-news-card__title {
  font-size: var(--fs-40);
  line-height: var(--lh-snug);
}

.p-top-news-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-32);
}

.p-top-news-card__date {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-label);
}

.p-top-news-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space-8) - 1px) calc(var(--space-16) - 1px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-white);
  font-family: var(--font-ja);
  font-size: var(--fs-14);
  line-height: var(--lh-none);
  white-space: nowrap;
}

.p-top-news-card__arrow {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: auto;
  color: var(--color-main);
  transition: transform var(--duration-fast) var(--ease);
}

@media (hover: hover) {
  .p-top-news-card:hover .p-top-news-card__title {
    color: var(--color-main);
  }

  .p-top-news-card:hover .p-top-news-card__arrow {
    transform: translateX(4px);
  }
}

/* --------------------------------------------------------------------------
   Tablet（769〜1024px）
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) and (min-width: 769px) {
  .p-top-intro__photos {
    width: 36vw;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .p-top-news__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-top-news__list {
    margin-top: var(--space-64);
  }
}

/* --------------------------------------------------------------------------
   SP（〜768px）
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .p-top-kv {
    padding-top: 7.5rem;
  }

  .p-top-kv__en {
    margin-top: var(--space-40);
    white-space: normal;
  }

  .p-top-intro__photos {
    position: relative;
    right: auto;
    width: auto;
    margin-top: var(--space-32);
    padding-inline: var(--container-gutter);
  }

  .p-top-intro__photos-sticky {
    position: static;
  }

  /* PCの上部空白（y0〜312）を詰めた比率に組み替え */
  .p-top-intro__photos-inner {
    aspect-ratio: 591 / 435.6;
  }

  .p-top-intro__photo--01 {
    top: 0;
  }

  .p-top-intro__photo--02 {
    top: 23.922%;
  }

  .p-top-intro__photo--03 {
    top: 69.086%;
  }

  .p-top-message {
    padding-top: var(--space-96);
  }

  .p-top-message__inner {
    gap: var(--space-48);
  }

  .p-top-message__heading {
    gap: var(--space-20);
  }

  /* PC用の改行位置はSPでは中途半端な折り返しになるため解除 */
  .p-top-message__body br {
    display: none;
  }

  .p-top-contents {
    margin-top: var(--space-96);
    padding-bottom: 9rem;
  }

  .p-top-contents__bg {
    top: var(--space-64);
  }

  .p-top-contents__deco {
    position: relative;
    top: auto;
    left: 0;
    margin-bottom: -0.3em;
  }

  .p-top-contents__photo {
    width: 100%;
  }

  .p-top-contents__heading {
    margin-top: var(--space-48);
  }

  .p-top-contents__list {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
    margin-top: var(--space-40);
  }

  .p-top-contents__list::before,
  .p-top-contents__list::after {
    display: none;
  }

  .p-top-contents__item + .p-top-contents__item {
    margin-top: var(--space-32);
    padding-top: var(--space-32);
    border-top: 1px solid var(--color-line);
  }

  .p-top-contents-card__img {
    width: 40%;
  }

  .p-top-contents-card__body {
    gap: var(--space-8);
  }

  .p-top-contents-card__desc {
    font-size: var(--fs-14);
  }

  .p-top-people__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .p-top-people__list {
    margin-top: var(--space-40);
  }

  .p-top-news {
    padding-top: 9rem;
    padding-bottom: var(--space-96);
  }

  .p-top-news__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-top-news__head {
    gap: var(--space-32);
  }

  .p-top-news__list {
    margin-top: var(--space-40);
  }

  .p-top-news__item + .p-top-news__item {
    margin-top: var(--space-24);
    padding-top: var(--space-24);
  }

  .p-top-news-card,
  .p-top-news-card--large {
    gap: var(--space-16);
    padding-inline: 0;
  }

  .p-top-news-card__meta {
    gap: var(--space-16);
  }
}
