/* Corporate top page, 2026-11 renewal. Loaded only by content/corporate/index.html.
   Design: Figma "1905コーポレートサイト", PC frame 8003:7800 (1100 px), SP frame 8072:7732 (390 px).
   The KV animation is the designer's kv-contour.css; this file only places it.
   Header and footer are the site's shared ones and are not styled here. */

.p-top {
  --p-top-text: #555656;
  --p-top-ink: #3a3e49;
  --p-top-lead: #545555;
  --p-top-muted: #888;
  --p-top-shadow: 12px 12px 12px rgba(30, 55, 100, 0.3);
  --p-top-header: 0px;
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--p-top-text);
  font-family: "Noto Sans JP", sans-serif;
}
.p-top *,
.p-top *::before,
.p-top *::after { box-sizing: border-box; }
.p-top :where(h1, h2, h3, p, ul) { margin: 0; padding: 0; }
.p-top :where(ul) { list-style: none; }
.p-top :where(img) { display: block; max-width: 100%; height: auto; }
.p-top :where(a) { color: inherit; text-decoration: none; }
.p-top a:focus-visible { outline: 2px solid #2c7cd3; outline-offset: 3px; }
.p-top-container { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; }

/* Header on this page only: it overlays the KV (transparent on PC, so the contour reaches the top
   of the screen) until the page has scrolled about 650 px. Then the shared .fixed following header
   takes over: site.js fixes the header once scrollY > .l-firstview__visual height - 140 px, so the
   invisible trigger below is 790 px tall. */
.p-top-page .l-header:not(.fixed) { position: absolute; top: 0; left: 0; right: 0; z-index: 4; }
.p-top > .p-top-header-trigger {
  position: absolute;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: 1px;
  height: 790px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
/* 769 px, not 768: up to 768 px this page uses its smartphone layout (see the end of this file),
   so the header stays the plain shared one there. */
@media (min-width: 769px) {
  .p-top-page .l-header:not(.fixed) { background: transparent; box-shadow: none; }
  /* The L of the "LabBase" lettering lines up with 研, with the mark to its left (Figma, 1100 px:
     研 at 74, lettering L at 77, mark at 39). 研 is 59 px into .main-nav's content box, whose 100%
     is the page width minus its 15 px + 24 px padding. The lettering's L is 27.22 px into the
     24 px tall logo (x 81.668 of the 400 x 72 artwork), so 59 + 3 - 27.22 = 34.78. */
  .p-top-page .main-nav .nav-brand { margin-left: calc(max(0px, (100% - 1061px) / 2) + 34.78px); }
  /* Over the KV the logo is drawn at the KV's own, larger size (Figma logo 8003:7947: mark
     33.19 px tall, top 31.3 px) and drops back to the 24 px header size once the header follows.
     The image is the same artwork as the header logo, so it is scaled around the lettering's L:
     the header's layout does not move and the L stays on 研 in both sizes. 1.3963 = 33.19 / 23.77. */
  .p-top-page .l-header:not(.fixed) .nav-brand-logo { transform-origin: 27.22px 0; transform: translateY(10.3px) scale(1.3963); }
}

/* KV: purpose and message over the contour animation */
.p-top-hero { position: relative; }
.p-top-hero__kv {
  position: absolute;
  left: -27.545%;
  top: calc(-69px - var(--p-top-header));
  width: 137.091%;
  aspect-ratio: 1508 / 848;
  pointer-events: none;
}
.p-top-hero .kv-contour { --kv-contour-spin: 140s; }
/* Figma 8003:7800 after Kamo-san's message (Odagiri-san, 11-27): the purpose sits at y 219.9 and the
   message still starts at y 585, so the gap between them grew from 138 to 143.1 px; paragraphs are
   20 px apart at every width. */
.p-top-hero__inner {
  position: relative;
  z-index: 1;
  padding: calc(219.9px - var(--p-top-header)) 24px 0 74px;
}
.p-top-hero__purpose { width: 537px; }
.p-top-hero__message {
  max-width: 800px;
  margin-top: 143.1px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 1px;
}
.p-top-hero__message p + p { margin-top: 20px; }

/* The Research Empowerment Platform */
.p-top-platform { margin-top: 80px; padding: 0 39.5px 0 72px; }
.p-top-platform__label {
  margin-left: 2.5px;
  font-family: "Roboto", sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 3.6px;
  color: var(--p-top-text);
}
.p-top-platform__rule {
  height: 56px;
  margin-top: 20px;
  border-top: 1px solid var(--p-top-text);
  border-left: 1px solid var(--p-top-text);
}

/* Services */
.p-top-services { display: grid; gap: 80px; margin-top: 32px; padding: 0 40px; }
.p-top-service {
  display: flex;
  min-height: 258px;
  background: #fff;
  box-shadow: 0 0 0 1px #e9eef2, var(--p-top-shadow);
}
.p-top-service--photo-right { flex-direction: row-reverse; }
.p-top-service__photo { position: relative; flex: 1 1 572px; min-width: 0; overflow: hidden; }
.p-top-service__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.p-top-service__body {
  display: flex;
  flex: 0 0 448px;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 32px 32px;
}
.p-top-service__name { margin-left: -11px; }
.p-top-service__name img { height: 55px; width: auto; }
/* The 博士・ポスドク logo is a tight SVG (350 x 32, the logo 31.71 tall), not a padded PNG like the
   others. Figma 8003:8277: its top is 29.63 px into the row, 0.59 px right of the lead, which
   starts 78 px into the row (16.37 px below the logo box, of which the lead's own margin is 4). */
.p-top-service__name--phd { margin: 9.63px 0 12.37px 0.59px; }
.p-top-service__name--phd img { display: block; width: 350px; height: 32px; }
.p-top-service__lead {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 1px;
  color: var(--p-top-lead);
}
.p-top-service__links { display: grid; gap: 15px; margin-top: auto; padding-top: 22px; }
.p-top-button {
  display: block;
  width: 200px;
  padding: 8px;
  border-radius: 4px;
  background-image: linear-gradient(78.89deg, #1244a9 0%, #2c7cd3 100%);
  box-shadow: 0 1px 7.5px rgba(0, 0, 0, 0.15);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 17px;
  letter-spacing: 1px;
  text-align: center;
  transition: opacity 0.2s;
}
.p-top-button:hover { opacity: 0.85; }

/* News */
.p-top-news { position: relative; margin-top: 72px; }
.p-top-news__art {
  position: absolute;
  top: 0;
  left: -24px;
  width: 440px;
  height: 680px;
  overflow: hidden;
  pointer-events: none;
}
.p-top-news__art img { position: absolute; max-width: none; }
.p-top-news__art-color { left: 62px; top: 1.5px; width: 335.34px; }
.p-top-news__art-line-a { left: 61.8px; top: 1.3px; width: 232.351px; }
.p-top-news__art-line-b { left: 132.97px; top: 313.05px; width: 264.568px; }
.p-top-news__inner {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  padding: 108px 70px 56px;
}
.p-top-news__title {
  font-family: "Roboto", sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 38px;
  color: var(--p-top-ink);
}
.p-top-news__title-ja {
  display: block;
  margin-top: 4px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 1px;
}
.p-top-news__item + .p-top-news__item { margin-top: 20px; }
.p-top-news__link {
  display: grid;
  grid-template-areas: "date tag" ". title";
  grid-template-columns: 94px minmax(0, 1fr);
  padding: 0 16px 20px;
  border-bottom: 1px solid #cbcbcb;
  color: var(--p-top-ink);
}
.p-top-news__date {
  grid-area: date;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 1px;
  color: var(--p-top-muted);
}
.p-top-news__tag {
  grid-area: tag;
  justify-self: start;
  margin-left: 3px;
  padding: 5.5px 8px;
  border-radius: 2px;
  background: #a1abc1;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 1px;
}
.p-top-news__headline {
  grid-area: title;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: 1px;
}
.p-top-news__link:hover .p-top-news__headline { text-decoration: underline; }
.p-top-news__more { display: flex; justify-content: flex-end; margin-top: 16px; }
.p-top-news__more a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 1px;
  color: var(--p-top-ink);
}
.p-top-news__more img { width: 7.07px; transform: rotate(-135deg); }

/* Smartphone (390 px design) */
@media (max-width: 768px) {
  .p-top { --p-top-header: 66px; padding-top: 66px; }
  /* Until the header follows, it is only the logo, as on PC (Odagiri-san, 11-27; Figma 8072:7732,
     logo 8254:8323): no bar, no menu button, and the logo a little larger, 134.6 px wide at x 28,
     y 28. The shared header draws the logo at 124 x 24, slightly squeezed; here it keeps the
     artwork's own proportions, which makes it 24 px tall, as in Figma. Figma moved the page up
     12 px at the same time (purpose and KV below). */
  .p-top-page .l-header:not(.fixed) { background: transparent; box-shadow: none; }
  .p-top-page .l-header:not(.fixed) .main-menu-btn { visibility: hidden; }
  .p-top-page .l-header:not(.fixed) .nav-brand-logo { width: 134.6px; height: auto; transform: translate(8px, 7px); }
  .p-top-pc { display: none; }
  .p-top-hero__kv { left: -93.846%; top: 158px; width: 199.487%; aspect-ratio: 778 / 437.5; }
  .p-top-hero__inner { padding: 79px 20px 0; }
  /* Centred (Odagiri-san, 11-16). Figma's 390 px frame has it 2.9 px right of centre, which a fixed
     left offset kept on small phones and turned into up to 17 px left of centre on wider ones. */
  .p-top-hero__purpose { width: min(326px, calc(100% - 24px)); margin: 0 auto; }
  /* Figma 8254:7988: 318 px wide at 390, 36 px in from each edge. */
  .p-top-hero__message { margin: 93px 16px 0; font-size: 14px; line-height: 20px; }

  .p-top-platform { margin-top: 52px; padding: 0 20px; }
  .p-top-platform__label { margin-left: 0.5px; font-size: 15px; letter-spacing: 1.8px; }
  .p-top-platform__rule { height: 26px; margin-top: 7.5px; }

  .p-top-services { gap: 32px; margin-top: 16px; padding: 0 20px; }
  .p-top-service,
  .p-top-service--photo-right { flex-direction: column; min-height: 442px; }
  .p-top-service__photo { flex: 0 0 auto; aspect-ratio: 350 / 184; }
  .p-top-service__body { flex: 1 1 auto; padding: 20px 28px 28px; }
  .p-top-service__name { margin-left: -9px; }
  .p-top-service__name img { height: 46px; }
  /* Figma 8189:8219: the logo is 284 px wide, 214.14 px into the card (30.14 below the photo),
     0.5 px left of the lead, which starts 250 px into the card. */
  .p-top-service__name--phd { margin: 10.14px 0 9.9px -0.5px; }
  .p-top-service__name--phd img { width: 284px; height: auto; }
  .p-top-service__lead { margin-top: 0; }
  .p-top-service__links { width: 100%; }
  .p-top-button { width: 100%; background-image: linear-gradient(73.9deg, #1244a9 0%, #2c7cd3 100%); }

  /* Figma 8072:7732 as of 11-27: the news title is 84 px below the last service card (was 101). */
  .p-top-news { margin-top: 84px; }
  .p-top-news__art { top: 7px; left: 13px; width: 268px; height: 469px; }
  .p-top-news__art-color { left: 1px; top: 10px; width: 245.461px; }
  .p-top-news__art-line-a { left: 0.8px; top: 10px; width: 170.181px; }
  .p-top-news__art-line-b { left: 52.9px; top: 238.2px; width: 193.763px; }
  .p-top-news__inner { display: block; padding: 0 20px 56px; }
  .p-top-news__title { font-size: 30px; line-height: 35px; text-align: center; }
  .p-top-news__title-ja { margin-top: 2px; font-weight: 700; }
  .p-top-news__list { margin-top: 49px; }
  .p-top-news__item + .p-top-news__item { margin-top: 25px; }
  .p-top-news__link {
    grid-template-areas: "tag date" "title title";
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 0 24px;
    border-bottom-color: #dbdbdb;
  }
  .p-top-news__date {
    justify-self: end;
    font-family: "Roboto", sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
  }
  .p-top-news__tag {
    margin-left: 0;
    padding: 6.5px 16px;
    font-family: "Roboto", "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 800;
    line-height: 15px;
    letter-spacing: 0;
    text-align: center;
  }
  .p-top-news__headline { margin-top: 12px; font-size: 14px; font-weight: 700; line-height: 20px; letter-spacing: 2px; }
  .p-top-news__more { margin-top: 33px; }
  .p-top-news__more a { gap: 9px; font-size: 13px; line-height: 19px; }
}

/* Tablet (Figma top_768px, 8082:8013; Odagiri-san, 11-16): from 500 to 768 px the KV keeps the PC
   composition (the purpose large and left-aligned, the contour to the upper right) instead of the
   smartphone one, scaled with the width so that 768 px matches the frame: purpose 537 px wide at
   x 74, y 219.9; message 143.1 px below it; contour from y -69 (11-27 values, as on PC). vw values
   are those px / 768. The header stays the smartphone one, so --p-top-header is still 66 px here.
   The message text keeps at least the smartphone size and reaches the PC size at the top of the
   range. */
@media (min-width: 500px) and (max-width: 768px) {
  .p-top-hero__kv { left: -27.545%; top: calc(-8.984vw - var(--p-top-header)); width: 137.091%; aspect-ratio: 1508 / 848; }
  .p-top-hero__inner { padding: calc(28.633vw - var(--p-top-header)) max(20px, 3.125vw) 0 9.635vw; }
  .p-top-hero__purpose { width: 69.922vw; margin: 0; }
  .p-top-hero__message {
    margin: 18.633vw 0 0;
    font-size: clamp(14px, 2.083vw, 16px);
    line-height: clamp(20px, 3.125vw, 24px);
  }
}
/* The message's PC line breaks (as in top_768px) need at least 640 px: below that its longest
   lines wrap again, so narrower tablets wrap it like the smartphone frame does. */
@media (min-width: 640px) and (max-width: 768px) {
  .p-top-pc { display: inline; }
}
