/* style.css — トップページ */
:root {
  --header_height: 5rem;
  --hero_shape_width: clamp(10rem, 32vw, 29rem);
  --hero_shape_right: clamp(0.5rem, 4vw, 4rem);
  /* S 形の配置（板の穴・抜き出し片・ヒーローで共通） */
  --hero_shape_height: calc(var(--hero_shape_width) * 778 / 464);

  @media (max-width: 1024px) {
    --hero_shape_width: clamp(8rem, 42vw, 14rem);
  }
}

/* ヒーロー上の S 形グラデーション */
.hero_shape_gradation {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  background-image: url("../img/gradation.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-mask-image: url("../img/shape_s.svg");
  mask-image: url("../img/shape_s.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* ----- top page layout ----- */
body.page_top {
  display: block;
  min-height: 100dvh;
}

body.page_top main {
  flex: none;
}

.page_top .hero {
  height: calc(100dvh - var(--header_height));
}

.page_top .hero_content {
  padding-top: calc(var(--header_height) + clamp(2rem, 6vh, 4rem));
}

/* ----- hero ----- */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero_inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero_bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero_bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.25) 45%,
      rgba(0, 0, 0, 0.05) 70%,
      transparent 100%);
  pointer-events: none;
}

.hero_bg_image,
.hero_bg_video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.hero_decor {
  position: absolute;
  top: 50%;
  right: var(--hero_shape_right);
  z-index: 2;
  width: var(--hero_shape_width);
  height: var(--hero_shape_height);
  transform: translateY(-50%);
  pointer-events: none;

  @media (max-width: 1024px) {
    display: none;
  }
}

.hero_shape {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.hero_content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 3rem;
  color: var(--text_white);

  @media (max-width: 1024px) {
    padding: 3rem 1rem;
  }
}

.hero_lead {
  font-weight: var(--font_bold);
  line-height: 1.5;
}

.hero_lead_line {
  display: block;
  font-size: clamp(1rem, 0.523rem + 2.04vw, 1.5rem);
  letter-spacing: 0.04em;
}

.hero_lead_line--emphasis {
  font-size: clamp(1.125rem, 0.29rem + 3.56vw, 2rem);
}

.hero_title {
  font-size: var(--font_pagetitle-sp);
  font-weight: 900;
  line-height: 1;
  margin-bottom: .5rem;
  letter-spacing: 0.02em;
}

.hero_sub {
  font-family: "Roboto", sans-serif;
}

.hero_sub_en {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: var(--font_bold);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.hero_sub_text {
  margin: 0.5rem 0 0;
  font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  font-weight: var(--font_medium);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.hero_scroll {
  position: absolute;
  right: 1rem;
  bottom: 3rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text_white);
  font-family: "Roboto", sans-serif;
  font-size: var(--font_base);

  @media (max-width: 1024px) {
    display: none;
  }
}

.hero_scroll_text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.hero_scroll_line {
  display: block;
  width: 1px;
  height: 5rem;
  background: var(--base_color);
  position: relative;
}

.hero_scroll_line::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 6px solid var(--base_color);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transform: translateX(-50%);
}

/* ----- top page sections ----- */
.section_heading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
}

.section_heading--left {
  align-items: flex-start;
  text-align: left;
}

.section_heading--right {
  align-items: flex-end;
  text-align: right;

  @media (max-width: 1024px) {
    align-items: flex-start;
    text-align: left;

    .section_heading_ja {
      border-right: none;
      border-left: solid 8px var(--main_color);
      padding: 0.25rem 0 0.25rem 1rem;
    }
  }
}

.section_heading_en {
  font-family: "Roboto", sans-serif;
  font-size: var(--font_pagetitle);
  font-weight: var(--font_bold);
  line-height: 1;

  @media (max-width: 1024px) {
    font-size: var(--font_pagetitle-sp);
  }
}

.section_heading_ja {
  font-size: var(--font_text-2xl);
  font-weight: var(--font_bold);
  color: var(--main_color);
  padding: 0.25rem 0 0.25rem .75rem;
  border-left: solid 8px var(--main_color);
  line-height: 1.3;
}

.section_number {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 3;
  font-family: "Roboto", sans-serif;

  @media (max-width: 1024px) {
    position: static;
    text-align: left;
  }
}

.section_number--left {
  left: 0;
  text-align: left;
}

.section_number--right {
  right: var(--top_edge_x);
  text-align: right;

  @media (max-width: 1024px) {
    left: var(--top_edge_x);
    right: auto;
    text-align: left;
  }
}

.section_number_count {
  font-size: var(--font_text-xl);
}

.section_number_text {
  padding-top: 0.5rem;
  border-top: 1px solid var(--text_black);
  font-size: var(--font_text-xs);
  line-height: 1.5;
}

/* ----- POLICY ----- */
.policy {
  position: relative;
  width: 100%;
  color: var(--text_white);
  background: url(../img/gradation.svg) center / cover no-repeat;
  overflow: hidden;
  padding: 3rem 0 8rem;

  @media (max-width: 1024px) {
    min-height: auto;
    padding: 4rem var(--pad_side-sp);
  }
}

.policy::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 50%;
  height: 100%;
  background: url(../img/shape_s_02.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;

  @media (max-width: 1024px) {
    width: 100%;
    opacity: 0.1;
  }
}

.policy .section_heading {
  position: relative;
  z-index: 2;
  margin-top: 3rem;
  margin-left: 1rem;

  @media (max-width: 1024px) {
    margin-top: .5rem;
    margin-left: 0;
  }
}

.policy .section_heading_en {
  color: var(--text_white);

  @media (max-width: 1024px) {
    font-size: var(--font_pagetitle-sp);
  }
}

.policy_contents {
  position: relative;
  z-index: 2;
  width: 50%;
  margin-top: 3rem;
  padding-left: clamp(1rem, -5.508rem + 13.56vw, 5rem);

  @media (max-width: 1024px) {
    width: 100%;
    margin-top: 2rem;
    padding: 0;
  }
}

.policy_catch {
  font-size: var(--font_h3title);
  font-weight: var(--font_bold);
  line-height: 1.45;
  word-break: keep-all;

  @media (max-width: 1024px) {
    word-break: auto-phrase;
  }
}

.policy_text {
  margin-top: 2rem;
  width: 100%;
  max-width: 448px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: var(--font_text-md);
  line-height: 2;

  @media (max-width: 1024px) {
    max-width: 40rem;
    line-height: 1.9;
  }
}

.policy .section_number {
  bottom: 1rem;
  right: 1rem;

  @media (max-width: 1024px) {
    position: static;
    left: auto;
    right: auto;
    text-align: left;
  }
}

.policy .section_number_text {
  border-top-color: var(--text_white);
  color: var(--text_white);
}

/* ----- STRENGTH ----- */
.strength {
  position: relative;
  padding: 8rem 0 0;
  background-color: var(--base_color-pale);

  @media (max-width: 1024px) {
    padding: 4rem var(--pad_side-sp);
  }
}

.strength .section_number {
  top: 8rem;
  left: 1rem;
}

.strength .section_heading {
  padding-right: 1rem;

  @media (max-width: 1024px) {
    padding-right: 0;
    margin-top: .5rem;
  }
}

.strength_contents_wrapper {
  margin-top: 3rem;
  min-height: calc(100svh - var(--header_height));
  min-height: calc(100dvh - var(--header_height));
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg,
      var(--base_color) 0%,
      var(--base_color) 40%,
      transparent 40%,
      transparent 100%);

  @media (max-width: 1024px) {
    min-height: auto;
    overflow: visible;
    background: none;
  }
}

.strength_contents_track {
  display: flex;
  width: max-content;
  will-change: transform;

  @media (max-width: 1024px) {
    flex-direction: column;
    width: 100%;
    will-change: auto;
    gap: clamp(2.5rem, 6vw, 4rem);
  }
}

.strength_contents {
  display: grid;
  flex: 0 0 100vw;
  height: calc(100vh - var(--header_height));
  max-width: none;
  margin: 0;
  padding: clamp(1rem, -3.898rem + 10.19vw, 4rem);
  box-sizing: border-box;
  justify-content: center;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem 0;

  @media (max-width: 1024px) {
    flex: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: auto;
    justify-content: flex-start;
    background: var(--base_color);
    padding: 1rem clamp(1rem, 0.422rem + 2.47vw, 2rem) clamp(1rem, 0.422rem + 2.47vw, 2rem);
  }
}

.strength_contents_container {
  display: flex;
  flex-direction: column;
  grid-column: 1/3;

  @media (max-width: 1024px) {
    max-width: none;
    padding-right: 0;
  }
}

.strength_contents_number {
  font-family: "Roboto", sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: var(--font_bold);
  line-height: 1;
  color: var(--main_color);
}

.strength_contents_title {
  padding: 1rem;
  background: var(--main_color);
  font-size: clamp(2rem, 0.367rem + 3.4vw, 3rem);
  font-weight: var(--font_bold);
  line-height: 1.2;
  color: var(--text_white);
  word-break: keep-all;
  overflow-wrap: break-word;

  @media (max-width: 1024px) {
    padding: 0.75rem;

    & > br {
      display: none;
    }
  }
}

.strength_contents_text {
  margin-top: 2rem;
  font-size: var(--font_text-xl);
  line-height: 1.8;
  color: var(--text_black);
  word-break: keep-all;
  padding-right: 2rem;

  @media (max-width: 1024px) {
    margin-top: 1.25rem;
    padding-right: 0;
    line-height: 1.75;
  }
}

.strength_contents_link {
  grid-column: 1 / 3;
  grid-row: 2;
  align-self: start;
  margin-top: auto;
  max-width: 392px;

  @media (max-width: 1024px) {
    grid-column: auto;
    grid-row: auto;
    max-width: 100%;
  }
}

.strength_figure {
  margin: 0;
  min-height: 0;
  grid-column: 3/ 6;
  grid-row: 1/3;
  overflow: hidden;

  @media (max-width: 1024px) {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: none;
    aspect-ratio: 3/2;
  }
}

.strength_figure_image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.strength_contents_wrapper.is_native_scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;

  @media (max-width: 1024px) {
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

.strength_contents_wrapper.is_native_scroll::-webkit-scrollbar {
  display: none;
}

.strength_contents_wrapper.is_native_scroll .strength_contents {
  scroll-snap-align: start;
}

.decoration_bg {
  position: relative;
  overflow: hidden;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

.decoration_bg_track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.decoration_bg_text {
  font-size: clamp(2.25rem, 12vw, 8rem);
  font-family: "Roboto", sans-serif;
  line-height: 1;
  font-weight: var(--font_bold);
  white-space: nowrap;
  color: var(--text_white);
  -webkit-text-stroke: 0;
  text-shadow:
    1px 0 0 var(--main_color-light),
    -1px 0 0 var(--main_color-light),
    0 1px 0 var(--main_color-light),
    0 -1px 0 var(--main_color-light),
    1px 1px 0 var(--main_color-light),
    1px -1px 0 var(--main_color-light),
    -1px 1px 0 var(--main_color-light),
    -1px -1px 0 var(--main_color-light);
}

/* ----- PRODUCTS ----- */
.products {
  position: relative;
  background: var(--base_color);
  padding: 0 1rem;
  margin-top: clamp(4rem, 8vw, 8rem);

  @media (max-width: 1024px) {
    margin-top: 0;
    padding: 4rem var(--pad_side-sp);
  }
}

.products_inner {
  width: 100%;
  max-width: 1280px;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
}

.products_intro {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  align-items: end;

  @media (max-width: 1024px) {
    grid-template-columns: 1fr;
    margin-left: 0;
    padding-right: 0;
    gap: 1.5rem;
  }
}

.products_intro_text {
  font-size: var(--font_text-md);
  line-height: 1.8;
  color: var(--text_black);
  grid-column: span 4;

  @media (max-width: 1024px) {
    grid-column: auto;
  }
}

.products_intro .primary_link {
  grid-column: span 2;

  @media (max-width: 1024px) {
    grid-column: auto;
  }
}

.products_list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  padding: 0;

  @media (max-width: 1024px) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
  }
}

.products_card {
  grid-column: span 2;

  @media (max-width: 1024px) {
    grid-column: auto;
  }
}

.products_card:nth-child(4) {
  grid-column: 2 / span 2;

  @media (max-width: 1024px) {
    grid-column: auto;
  }
}

.products_card:nth-child(5) {
  grid-column: 4 / span 2;

  @media (max-width: 1024px) {
    grid-column: auto;
  }
}

.products_card_link {
  display: block;
}

.products_card_link:hover .products_card_image {
  transform: scale(1.05);
}

.products_card_figure {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.products_card_badge {
  display: flex;
  position: absolute;
  bottom: 40px;
  left: .5rem;
  z-index: 1;
  color: var(--text_white);
  align-items: flex-end;
  gap: 4px;
  font-family: "Roboto", sans-serif;
}

.products_card_badge_number {
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: .8;
  font-weight: 100;

  @media (max-width: 1024px) {
    font-size: clamp(3.5rem, 3.023rem + 2.04vw, 4rem);
  }
}

.products_card_badge_text {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  line-height: 1.1;
  font-weight: 400;
}

.products_card_image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.products_card_label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: .5rem;
  background: var(--main_color);
  font-size: var(--font_text-lg);
  color: var(--text_white);
  line-height: 1;
}

.products .section_number {
  top: 0;
  right: 1rem;
}

/* ----- TECHNOLOGY ----- */
.technology {
  position: relative;
  margin-top: clamp(4rem, 8vw, 8rem);
  padding: clamp(4rem, 8vw, 8rem) 0;
  background: linear-gradient(90deg,
      var(--base_color-pale) 0%,
      var(--base_color-pale) 20%,
      transparent 20%,
      transparent 100%);

  @media (max-width: 1024px) {
    margin-top: 0;
    background: var(--base_color-pale);
    padding: 4rem var(--pad_side-sp);
  }
}

.technology .section_heading {
  padding-right: 1rem;

  @media (max-width: 1024px) {
    padding-right: 0;
    margin-top: .5rem;
  }
}

.technology_body {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0;
  isolation: isolate;
  padding: 0 1rem;
  margin-top: 4rem;

  @media (max-width: 1024px) {
    grid-template-columns: 1fr;
    margin-top: clamp(2rem, 5vw, 3rem);
    padding: 0;
  }
}

.technology_contents {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  margin-right: 1rem;
  margin-left: clamp(0rem, -8.163rem + 16.99vw, 5rem);
  padding: 3rem 0;
  min-width: 0;

  @media (max-width: 1024px) {
    margin: 0 auto;
    padding: 1.5rem 0 0;
  }
}

.technology_catch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  width: max-content;
  max-width: none;
  margin: 0;

  @media (max-width: 1024px) {
    width: 100%;
    max-width: 100%;
  }
}

.technology_catch_line {
  display: inline-block;
  width: max-content;
  max-width: none;
  padding: 0.25rem;
  background: var(--main_color);
  font-size: var(--font_h3title);
  font-weight: var(--font_bold);
  line-height: 1.2;
  color: var(--text_white);
  white-space: nowrap;

  @media (max-width: 1024px) {
    font-size: clamp(1.5rem, 0.069rem + 6.11vw, 3rem)
  }
}

.technology_text {
  margin-top: 3rem;
  font-size: var(--font_text-md);
  line-height: 1.8;

  @media (max-width: 1024px) {
    margin-top: 1.5rem;
    line-height: 1.75;
  }

  @media (max-width: 1024px) {
    & > br {
      display: none;
    }
  }
}

.technology_contents .primary_link {
  margin-top: 3rem;

  @media (max-width: 1024px) {
    margin-top: 1.5rem;
  }
}

.technology_figure {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;

  @media (max-width: 1024px) {
    order: -1;
  }
}

.technology_figure_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;

  @media (max-width: 1024px) {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }
}

.technology .section_number {
  top: 8rem;
  left: 1rem;
}

/* ----- NEWS ----- */
.news {
  position: relative;
  background: var(--base_color);
  padding: 4rem clamp(1rem, -0.908rem + 8.14vw, 3rem);
}

@media (max-width: 1024px) {
  .news .section_heading {
    margin-top: .5rem;
  }
}

.news_body {
  width: 100%;
  max-width: 1040px;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
}

.top_news_list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: solid 1px var(--base_color-border);
}

.top_news_item {
  border-bottom: solid 1px var(--base_color-border);
}

.top_news_link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  text-decoration: none;

  @media (max-width: 1024px) {
    gap: 0.375rem 1rem;
    padding: 1.25rem 0;
  }
}

.top_news_link .link_icon {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  color: var(--main_color);
}

.top_news_date {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--font_text-sm);
  font-weight: var(--font_regular);
  color: var(--main_color);
  line-height: 1;
}

.top_news_title {
  grid-column: 1;
  grid-row: 2;
  font-size: var(--font_text-lg);
  font-weight: var(--font_bold);
  line-height: 1.6;
  color: var(--text_black);

  @media (max-width: 1024px) {
    line-height: 1.55;
  }
}

.news_body .primary_link {
  margin-top: 2rem;
  margin-left: auto;

  @media (max-width: 1024px) {
    margin-left: 0;
  }
}

.news .section_number {
  top: 0;
  right: 1rem;
}

/* ----- CONTACT ----- */
.contact {
  padding: clamp(4rem, 8vw, 8rem) 1rem clamp(8rem, 14vw, 16rem);
  position: relative;
  background: linear-gradient(var(--base_color-pale) 0%,
      var(--base_color-pale) 50%,
      transparent 50%,
      transparent 100%);

  @media (max-width: 1024px) {
    background: linear-gradient(180deg,
        var(--base_color-pale) 0%,
        var(--base_color-pale) 45%,
        transparent 45%,
        transparent 100%);
    padding: 4rem var(--pad_side-sp) 8rem;
  }
}

.contact_body {
  display: flex;
  align-items: stretch;
  margin-top: clamp(2rem, 5vw, 4rem);

  @media (max-width: 1024px) {
    flex-direction: column;
    gap: 2rem;
  }
}

.contact_contents {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 clamp(1rem, -7.163rem + 16.99vw, 6rem);
  justify-content: space-between;

  @media (max-width: 1024px) {
    order: 2;
    padding: 0;
    gap: 1.5rem;
  }
}

.contact_lead {
  font-size: var(--font_text-lg);

  @media (max-width: 1024px) {
    line-height: 1.75;
  }
}

.contact_address {
  font-size: var(--font_text-lg);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact_address_company {
  font-weight: bold;
  font-size: var(--font_text-xl);
}

.contact_figure {
  position: relative;
  flex: 2 1 0;
  align-self: stretch;
  min-width: 0;
  margin: 0;
  overflow: hidden;

  @media (max-width: 1024px) {
    order: -1;
    flex: none;
    width: 100%;
    aspect-ratio: 3/2;
  }
}

.contact_figure_image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(16rem, 32vw, 24rem);
  object-fit: cover;

  @media (max-width: 1024px) {
    min-height: auto;
    aspect-ratio: 3/2;
  }
}

.contact .section_number {
  top: 8rem;
  left: 1rem;
}