/* Researchから開く研究ページのリボンメニュー。 */
#header { position: relative; z-index: 20; }

#header > .site-title,
#header > nav {
  width: min(100%, 1100px);
}

#header .site-title a {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  column-gap: 16px;
  white-space: normal;
  padding-inline: 14px;
}
#header .site-title-en {
  font-size: .65em;
  font-weight: normal;
  white-space: nowrap;
}

@media (max-width: 600px) {
  #header .site-title { font-size: clamp(18px, 4.5vw, 26px); }
  #header .site-title a { column-gap: 10px; padding-inline: 10px; }
}

#header > nav > ul {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 20px;
}
#header > nav > ul > li { margin-left: 0; }

#header > nav > ul > li > a,
.research-menu summary {
  display: block;
  padding: 8px 14px;
}

@media (max-width: 600px) {
  #header > nav > ul { gap: 4px 8px; }
  #header > nav > ul > li > a,
  .research-menu summary { padding: 6px 10px; }
}

.research-menu { padding-bottom: 25px; margin-bottom: -25px; }
.research-menu summary {
  color: #aaa;
  cursor: pointer;
  list-style: none;
}
.research-menu summary::-webkit-details-marker { display: none; }
.research-menu summary:hover,
.research-menu[open] summary { color: #fff; }
.research-menu summary:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

.research-ribbon {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #10263a;
  border-top: 1px solid #ffffff24;
  border-bottom: 1px solid #ffffff24;
  box-shadow: 0 18px 32px #06111f35;
  white-space: normal;
  opacity: 0;
}
.research-menu[open] .research-ribbon { opacity: 1; }
#header .research-ribbon ul {
  display: grid;
  grid-template-columns: .9fr repeat(2, 1fr);
  align-items: stretch;
  gap: 24px;
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 32px 24px;
  list-style: none;
}
#header .research-ribbon li { min-width: 0; margin: 0; line-height: 1.5; }
#header .research-ribbon a {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 2px solid transparent;
  color: #fff;
  text-align: left;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.ribbon-image { display: block; height: 112px; overflow: hidden; background: #fff; }
.ribbon-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ribbon-image-diagram img { object-fit: contain; padding: 8px; }
.ribbon-label { display: flex; align-items: baseline; gap: 10px; }
.ribbon-number { color: #92b6d6; font-size: .7rem; letter-spacing: .08em; }
.ribbon-title { font-size: .95rem; font-weight: 600; line-height: 1.5; }
.ribbon-arrow { margin-left: auto; color: #a5c8e5; }
.ribbon-description { display: block; color: #b4c6d7; font-size: .8rem; line-height: 1.8; }
#header .research-ribbon .research-ribbon-overview { border-right: 1px solid #ffffff26; padding-right: 24px; }
.ribbon-eyebrow { color: #92b6d6; font-size: .65rem; letter-spacing: .18em; }
.research-ribbon-overview .ribbon-title { font-size: 1.4rem; }
.ribbon-overview-cta { margin-top: auto; padding-top: 16px; font-size: .8rem; }
#header .research-ribbon a:hover,
#header .research-ribbon a[aria-current="page"] { border-bottom-color: #9bc7ec; color: #fff; }
#header .research-ribbon a:hover .ribbon-image img { transform: scale(1.035); }
#header .research-ribbon a:focus-visible { outline: 2px solid #9bc7ec; outline-offset: 6px; }
@media (max-width: 800px) {
  #header .research-ribbon ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 24px 20px; }
  #header .research-ribbon .research-ribbon-overview { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid #ffffff26; padding: 0 0 12px; }
  #header .research-ribbon .research-ribbon-overview a { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
  .research-ribbon-overview .ribbon-eyebrow, .research-ribbon-overview .ribbon-description { display: none; }
  .ribbon-overview-cta { padding: 0; align-self: center; }
}
@media (max-width: 520px) {
  .research-ribbon { max-height: 75vh; max-height: 75svh; overflow-y: auto; overscroll-behavior: contain; }
  #header .research-ribbon ul { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
  #header .research-ribbon a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 14px; }
  .ribbon-image { grid-row: 1 / 3; height: 72px; }
  .ribbon-title { font-size: .9rem; }
  .ribbon-label { gap: 6px; }
  .ribbon-description { grid-column: 2; font-size: .7rem; }
  .research-ribbon-overview .ribbon-title { font-size: 1.15rem; }

  #header > nav > ul:has(.research-menu[open]) > .research-menu-item { flex: 0 0 100%; }
  #header .research-menu { padding-bottom: 0; margin-bottom: 0; }
  #header .research-ribbon { position: static; width: auto; }
  #header .research-ribbon ul { box-sizing: border-box; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-image img, #header .research-ribbon a { transition: none; }
}

.research-detail {
  padding-top: clamp(40px, 6vw, 64px);
}

.research-cards {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  margin: clamp(48px, 7vw, 88px) 0;
}
.research-theme {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 2px;
}
.research-theme-image {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f2f5f8;
}
.research-theme-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.research-theme:first-child .research-theme-image img {
  width: 90%;
  object-fit: contain;
  object-position: left center;
}
.research-theme-illustration img { object-fit: contain; padding: 16px; }
.research-theme-illustration--crsbr img {
  transform: translateX(12px);
}
.research-theme-link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  margin-left: -28px;
  padding: clamp(24px, 3.5vw, 44px);
  background: #142c43;
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 12px 28px #10253818;
  text-decoration: none;
  transition: background .25s, box-shadow .25s;
}
.research-theme:nth-child(even) {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.research-theme:nth-child(even) .research-theme-image { grid-column: 2; grid-row: 1; }
.research-theme:nth-child(even) .research-theme-link {
  grid-column: 1;
  grid-row: 1;
  margin-left: 0;
  margin-right: -28px;
}
.research-theme-number {
  color: #a9c5df;
  font-size: .9rem;
  letter-spacing: .16em;
}
.research-theme-link h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.5;
}
.research-theme-link p { margin: 0; color: #d5e1ed; font-size: .9rem; line-height: 1.8; }
.research-theme-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #ffffff40;
  font-size: .95rem;
  letter-spacing: .04em;
}
.research-theme-arrow { font-size: 1.45rem; line-height: 1; transition: transform .25s; }
.research-theme-link:hover,
.research-theme-link:focus-visible {
  color: #fff;
  background: #214665;
  box-shadow: 0 16px 32px #10253826;
  text-decoration: none;
}
.research-theme-link:hover .research-theme-arrow { transform: translate(3px, -3px); }
.research-theme-link:focus-visible { outline: 3px solid #517fa6; outline-offset: 5px; }
@media (max-width: 640px) {
  .research-theme,
  .research-theme:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .research-theme .research-theme-image,
  .research-theme:nth-child(even) .research-theme-image {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 16 / 10;
    margin-right: 24px;
  }
  .research-theme:first-child .research-theme-image img {
    width: 100%;
    object-fit: cover;
    object-position: center;
  }
  .research-theme .research-theme-link,
  .research-theme:nth-child(even) .research-theme-link {
    grid-column: 1;
    grid-row: 2;
    margin: -24px 0 0 24px;
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .research-theme-link, .research-theme-arrow { transition: none; }
}
.research-back {
  margin: 40px 0 24px;
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.6;
}
.research-back a {
  display: inline-block;
  padding: 8px 0;
  color: #65717d;
  text-decoration: none;
  text-underline-offset: 4px;
}
.research-back a::before { content: "←"; margin-right: 8px; }
.research-back a:hover { color: #23466a; text-decoration: underline; }
.research-back a:focus-visible { outline: 2px solid #517fa6; outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 全ページ共通のヘッダー書体。 */
#header .site-title { font-weight: 600; letter-spacing: .025em; line-height: 1.4; }
#header .site-title-en { font-weight: 500; letter-spacing: .02em; }
#header > nav { font-weight: 500; letter-spacing: .025em; line-height: 1.5; }

/* 現在のページのメニュー項目 */
#header > nav > ul > li > a[aria-current="page"] { color: #fff; }

/* ページ見出し帯(研究各ページ・Equipments共通) */
.page-head {
  background: linear-gradient(100deg, var(--navy-deep), var(--navy) 55%, #1c3d5c);
  color: #fff;
  padding: clamp(36px, 6vw, 72px) 4%;
}
.page-head-inner { max-width: 1080px; margin: 0 auto; }
.page-head-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 10px;
  color: var(--navy-accent);
  font-size: .85rem;
  letter-spacing: .2em;
  line-height: 1.5;
}
.page-head-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.75rem, 3.8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
  text-align: left;
}
.page-head-lead {
  margin: 14px 0 0;
  color: #c9d9e8;
  font-size: 1rem;
  line-height: 1.9;
}

/* トップページでは、2つの研究テーマの関係を矢印で示す。 */
#header .research-ribbon-home { background: var(--navy); }
#header .research-ribbon-home ul {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) 96px minmax(0, 1fr);
  gap: 0;
}
#header .research-ribbon-home .research-ribbon-flow {
  display: flex;
  align-items: center;
  justify-content: center;
}
#header .research-ribbon-flow img {
  display: block;
  width: 96px;
  height: auto;
}
#header .research-ribbon-home .research-ribbon-method .ribbon-image img {
  object-position: 40% center;
}
@media (max-width: 800px) {
  #header .research-ribbon-home ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #header .research-ribbon-home .research-ribbon-flow { display: none; }
}
@media (max-width: 520px) {
  #header .research-ribbon-home ul { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 801px) {
  #header .research-ribbon-home .ribbon-image { height: 112px; }
  #header .research-ribbon-home .research-ribbon-method { margin-left: 12px; }
  #header .research-ribbon-home .research-ribbon-method .ribbon-image {
    width: 92%;
    margin-inline: auto;
  }
  #header .research-ribbon-home .ribbon-image-diagram img { padding: 0; }
}
