* {
  box-sizing: border-box;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: #fff;
  color: #000;
  font-family: var(--font-jp);
}

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

img {
  display: block;
}

.site {
  position: relative;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  overflow: visible;
  background: #fff;
  padding: 0;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 78px;
  padding: 16px 32px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: #fff;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.brand-logo {
  position: relative;
  display: block;
  width: 213.401px;
  height: 32px;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo__mark,
.brand-logo__text {
  position: absolute;
}

.brand-logo__mark {
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
}

.brand-logo__text {
  left: 39.3px;
  top: 0.9px;
  width: 174.136px;
  height: 30.176px;
}

.site-header .brand-logo__mark--black,
.site-header .brand-logo__text--black {
  opacity: 0;
}

.site-header--scrolled {
  background: #fff;
  color: var(--text);
}

.site-header--scrolled .brand-logo__mark--white,
.site-header--scrolled .brand-logo__text--white {
  opacity: 0;
}

.site-header--scrolled .brand-logo__mark--black,
.site-header--scrolled .brand-logo__text--black {
  opacity: 1;
}

.site-header:not(.site-header--scrolled) .menu-button {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
}

.site-header--scrolled .menu-icon {
  filter: brightness(0);
}

@media (max-width: 1024px) {
  .site-header .header-contact {
    display: none;
  }
}

.site-header.is-open .header-contact {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  border-color: #000;
  background: #000;
  color: #fff;
  backdrop-filter: none;
}

.site-header.is-open .brand-logo__mark--white,
.site-header.is-open .brand-logo__text--white {
  opacity: 0;
}

.site-header.is-open .brand-logo__mark--black,
.site-header.is-open .brand-logo__text--black {
  opacity: 1;
}

.global-nav > a,
.footer-nav a {
  padding: 0 16px;
  border-right: 1px solid currentColor;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.global-nav > a:nth-last-child(2),
.footer-nav a:nth-last-child(2) {
  border-right: 0;
}

.global-nav > a:last-child,
.footer-nav a:last-child {
  border-right: 0;
  border-left: 1px solid currentColor;
}

.global-nav > a {
  border-right-color: #fff;
  color: #fff;
}

.global-nav > a:last-child {
  border-left-color: #fff;
}

.site-header--scrolled .global-nav > a {
  border-right-color: var(--text);
}

.site-header--scrolled .global-nav > a:not(:hover) {
  color: #333;
}

.site-header--scrolled .global-nav > a:last-child {
  border-left-color: var(--text);
}

.button {
  min-height: 46px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.button--ghost {
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(2px);
}

.button--ghost:hover {
  border-color: rgba(74, 74, 74, 0.8);
  background: rgba(74, 74, 74, 0.5);
}

.site-header--scrolled .header-contact {
  border-color: #000;
  background: #000;
  color: #fff;
  backdrop-filter: none;
}

.site-header--scrolled .header-contact:hover {
  border-color: #4a4a4a;
  background: #4a4a4a;
}

.header-subnav {
  top: 86px;
}

.button--black {
  width: 150px;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font-en);
  background: #000;
  color: #fff;
}

.button--black:hover {
  background: #4a4a4a;
}

.button__label {
  width: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button__arrow {
  width: 29px;
  height: 9px;
  display: block;
  position: relative;
  flex: 0 0 auto;
  border: 0;
  transform: none;
}

.button__arrow::before,
.button__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.button__arrow::before {
  left: 0;
}

.button__arrow::after {
  width: 13px;
  transform: rotate(45deg);
  transform-origin: right center;
}

.hero {
  position: relative;
  height: 768px;
  overflow: visible;
  border-bottom: 0;
  background: none;
}

/* 画像の置き場。.site（1280px）より広い100vwで敷くため .hero は overflow: visible のままにし、
   パララックスで下にずれた画像のはみ出しはこのラッパで切り抜く */
.hero__visual {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 767.99994px;
  margin-left: -50vw;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* transform は assets/script.js（[data-parallax]）がスクロール量に応じて書き換える */
  will-change: transform;
}

.hero__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__copy {
  position: absolute;
  left: 642px;
  top: 225px;
  width: 576px;
  color: #fff;
  filter: drop-shadow(0 0 22px rgba(0, 0, 0, 0.7));
  font-size: 48px;
  font-weight: 700;
  line-height: 1.5;
}

.hero__copy p,
.hero__type p {
  margin: 0;
}

.hero__type {
  position: absolute;
  left: 0;
  top: 602.59px;
  width: 100%;
  height: 231px;
}

.hero__en {
  width: 100%;
  height: 231px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-family: var(--font-en);
  font-size: 179.328px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(12px);
}

.hero__ja {
  position: absolute;
  right: 70px;
  top: 93.2px;
  color: #fff;
  font-size: 20.081px;
  font-weight: 700;
  font-family: var(--font-jp);
}

.news-section {
  height: 592px;
  padding-top: 80px;
  display: flex;
  gap: 24px;
  justify-content: center;
}

.news-box {
  background: var(--bg);
  height: 244px;
}

.news-box--latest {
  width: 622px;
  height: 374px;
  padding: 32px;
}

.news-box--important {
  width: 526px;
}

.section-title,
.section-title--small,
.important-title {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.section-title h2,
.section-title--small h2,
.important-title h2 {
  margin: 0;
}

.section-title h2 {
  font-family: var(--font-jp);
  font-size: 64px;
  line-height: normal;
}

.section-title span {
  color: var(--text);
  font-size: 14px;
}

.section-title--small h2 {
  color: #000;
  font-size: 40px;
  line-height: 1;
}

.section-title--small span,
.important-title span {
  color: var(--text);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.news-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  min-height: 52px;
  padding: 16px 8px 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
}

.news-list time {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.4288px;
  line-height: 16.08px;
}

.news-tag {
  width: 94px;
  min-width: 44px;
  flex-shrink: 0;
  border-radius: 20px;
  padding: 2px 10px;
  background: #4a4a4a;
  color: #fff;
  font-size: 12px;
  line-height: 14.88px;
  text-align: center;
}

.news-tag--red {
  background: var(--red);
}

.news-tag--important {
  width: 48px;
}

.news-list a {
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  text-decoration: underline;
  white-space: nowrap;
}

.important-title {
  height: 56px;
  padding: 16px 32px;
  background: #000;
  color: #fff;
}

.important-title h2 {
  font-size: 24px;
  line-height: 1;
}

.important-title span {
  color: #fff;
}

/* 高さは件数に追従させ、5件以上になったらスクロールさせる。
   上限（4件ぶんの高さ）は行の高さがブレークポイントや折り返しで変わるため、
   assets/script.js が実測して max-height に入れる。
   min-height はデザイン上の最小の箱の高さ。 */
.news-list--important {
  margin-top: 0;
  padding: 16px 32px;
  min-height: 200px;
  overflow-y: auto;
  background: var(--bg);
}

.news-list--important li {
  padding-right: 8px;
}

.vision-section {
  position: relative;
  height: 612px;
}

.vision__base {
  position: absolute;
  top: 0;
  left: 434px;
  width: calc(846px + (100vw - var(--page)) / 2);
  height: 612px;
  background: #efefef;
}

.vision__media {
  position: absolute;
  top: 0;
  left: calc((var(--page) - 100vw) / 2);
  width: calc(550px + (100vw - var(--page)) / 2);
  height: 587px;
  overflow: hidden;
  z-index: 1;
}

.vision__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.vision__large-text {
  position: absolute;
  z-index: 2;
  left: -17px;
  top: 140px;
  display: flex;
  align-items: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-en);
  font-size: 202px;
  font-weight: 700;
  line-height: 0.85;
  white-space: nowrap;
  height: 431.46px;
}

.ring {
  position: absolute;
  pointer-events: none;
}

.ring--red {
  z-index: 2;
  left: 994.69px;
  top: -157.2px;
  width: 400px;
  height: 400px;
  transform: rotate(-40.05deg);
  transform-origin: center;
}

.vision__content {
  position: absolute;
  z-index: 3;
  left: 618px;
  top: 114px;
  width: 558px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.lead {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}

.lead__break--sp {
  display: none;
}

.body-copy,
.service-content p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 2;
}

.photo-band {
  position: relative;
  height: 694px;
  background: #fff;
}

.photo-card {
  position: absolute;
  object-fit: cover;
}

.photo-band--first .photo-card--large {
  left: 379px;
  top: 103px;
  width: 545px;
  height: 324px;
}

.photo-band--first .photo-card--small {
  left: 786px;
  top: 327px;
  width: 350px;
  height: 204px;
}

.works-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 811px;
  padding: 176px 104px 128px;
  background: var(--bg);
}

.works-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  left: calc(50% - 50vw);
  z-index: -1;
  background: var(--bg);
}

.ring--orange {
  left: -87px;
  top: -288px;
  width: 400px;
  height: 400px;
}

.section-heading-large {
  position: absolute;
  top: -125px;
  left: 61px;
  margin: 0;
  font-family: var(--font-en);
  font-size: 152px;
  font-weight: 700;
  line-height: normal;
  height: 196px;
  width: 442px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-inner {
  position: relative;
  z-index: 2;
}

.works-inner h3 {
  margin: 0 0 32px;
  color: var(--text);
  font-size: 40px;
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  height: 235px;
  padding: 40px 32px;
  background: #fff;
  overflow: hidden;
}

.stat-card h4 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-card__icon {
  flex: 0 0 auto;
  object-fit: contain;
}

.stat-card__icon--construction {
  width: 22px;
  height: 32px;
}

.stat-card__icon--history {
  width: 36px;
  height: 32px;
}

.stat-card__icon--staff {
  width: 37px;
  height: 32px;
}

.stat-card__icon--partner {
  width: 50px;
  height: 32px;
}

.stat-card p {
  margin: 0 0 16px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.stat-card strong {
  font-family: var(--font-en);
  font-size: 56px;
  line-height: 1;
}

.stat-card span {
  padding-bottom: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 25.2px;
}

.stat-card small {
  display: block;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.clients-title {
  padding-top: 64px;
}

.clients-title span {
  font-size: 24px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.client-grid div {
  height: 64px;
  padding: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-grid img {
  max-width: 155px;
  max-height: 36px;
  object-fit: contain;
}

.client-grid div:nth-child(3) img {
  width: 95.171px;
  height: 36px;
  max-width: 95.171px;
  max-height: 36px;
}

.client-grid div:nth-child(4) img {
  width: 162px;
  height: 42.816px;
  max-width: 162px;
  max-height: 42.816px;
  object-fit: cover;
}

.service-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 604px;
  margin-top: 258px;
  padding: 176px 104px 128px;
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 40px;
}

.service-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  left: calc(50% - 50vw);
  z-index: -1;
  background: var(--bg);
}

.service-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ring--blue {
  right: -80px;
  top: auto;
  bottom: 484px;
  width: 400px;
  height: 400px;
  transform: rotate(28deg);
}

.service-heading {
  left: auto;
  right: 66px;
  top: -117px;
}

.service-carousel {
  position: absolute;
  z-index: 1;
  left: -948px;
  top: 176px;
  width: 1594px;
  height: 300px;
  overflow: visible;
}

.service-viewport {
  width: 1594px;
  height: 300px;
  overflow: hidden;
}

.service-track {
  display: flex;
  gap: 32px;
  will-change: transform;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-slide {
  flex: 0 0 510px;
  height: 300px;
  margin: 0;
  overflow: hidden;
}

.service-slide img {
  width: 536px;
  height: 367px;
  object-fit: cover;
  transform: translate(-1px, -30px);
}

#service-slide-1:checked ~ .service-carousel .service-track {
  transform: translateX(-542px);
}

#service-slide-2:checked ~ .service-carousel .service-track {
  transform: translateX(0);
}

#service-slide-3:checked ~ .service-carousel .service-track {
  transform: translateX(542px);
}

.carousel-dots {
  position: absolute;
  z-index: 3;
  left: 315px;
  top: 448px;
  height: 56px;
  padding: 8px;
  border: 1px solid #fff;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  gap: 8px;
  backdrop-filter: blur(2px);
}

.carousel-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dcdcdc;
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#service-slide-1:checked ~ .carousel-dots .carousel-dot--1,
#service-slide-2:checked ~ .carousel-dots .carousel-dot--2,
#service-slide-3:checked ~ .carousel-dots .carousel-dot--3 {
  background: #000;
  color: #fff;
}

.service-content {
  position: relative;
  z-index: 2;
  width: 490px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.service-panel {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  min-height: 250px;
}

#service-slide-1:checked ~ .service-content .service-panel--1,
#service-slide-2:checked ~ .service-content .service-panel--2,
#service-slide-3:checked ~ .service-content .service-panel--3 {
  display: flex;
}

.service-panel .button {
  margin-top: auto;
}

.service-content h3 {
  margin: 0;
  color: var(--text);
  font-size: 40px;
  line-height: 1.4;
}

.recruit-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 454px;
  margin-top: 272px;
  padding: 176px 104px 128px;
  background: url("./images/recruit.jpg") center 44% / cover no-repeat;
}

.recruit-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  left: calc(50% - 50vw);
  z-index: -1;
  background: rgba(0, 0, 0, 0.3);
}

.recruit-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  left: calc(50% - 50vw);
  z-index: -2;
  background: url("./images/recruit.jpg") center 44% / cover no-repeat;
}

.ring--green {
  z-index: 2;
  left: -100px;
  top: -280px;
  width: 400px;
  height: 400px;
  transform: rotate(-21deg);
}

.recruit-heading {
  z-index: 3;
  left: 53px;
  top: -109px;
}

.recruit-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.recruit-content p {
  margin: 0;
  color: #fff;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.photo-band--second {
  height: 843px;
}

.photo-band--second .photo-card--large {
  left: 113px;
  top: 237px;
  width: 545px;
  height: 324px;
}

.photo-band--second .photo-card--upper {
  left: 787px;
  top: 87px;
  width: 350px;
  height: 208px;
}

.photo-band--second
  .photo-card:not(.photo-card--large):not(.photo-card--upper) {
  left: 473px;
  top: 497px;
  width: 350px;
  height: 208px;
}

.cta-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 508px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cta-card {
  position: relative;
  isolation: isolate;
  padding: 128px 104px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  overflow: visible;
}

.cta-card::before,
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cta-card::before {
  z-index: -2;
  background: center / cover no-repeat;
}

.cta-card::after {
  z-index: -1;
  background: rgba(0, 0, 0, 0.6);
}

.cta-card--recruit::before {
  background-image: url("./images/cta-recruit.jpg");
}

.cta-card--recruit::before,
.cta-card--recruit::after {
  left: calc((var(--page) - 100vw) / 2);
}

.cta-card--recruit strong,
.cta-card--recruit > span,
.cta-card--recruit em {
  transform: translateX(calc((var(--page) - 100vw) / 4));
}

.cta-card--contact::before {
  background-image: url("./images/cta-contact.png");
}

.cta-card--contact::before,
.cta-card--contact::after {
  right: calc((var(--page) - 100vw) / 2);
}

.cta-card--contact strong,
.cta-card--contact > span,
.cta-card--contact em {
  transform: translateX(calc((100vw - var(--page)) / 4));
}

.cta-card strong,
.cta-card > span,
.cta-card em {
  position: relative;
  z-index: 1;
}

.cta-card strong {
  font-family: var(--font-en);
  font-size: 64px;
  line-height: 1;
}

.cta-card > span {
  font-size: 14px;
  line-height: 1;
}

.cta-card em {
  min-height: 46px;
  padding: 16px 32px;
  border: 1px solid #fff;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.cta-card:hover em {
  border-color: rgba(160, 160, 160, 0.8);
  background: rgba(128, 128, 128, 0.5);
}

.site-footer {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  color: var(--text);
}

.footer-box {
  min-height: 277px;
  padding: 40px 32px;
  background: #efefef;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-nav {
  color: #000;
}

/* 区切り線は currentColor 指定なので、ホバーで一緒に赤くならないよう色を固定する
   （ヘッダーの .global-nav > a で border-right-color を固定しているのと同じ考え方） */
.footer-nav a {
  border-right-color: #000;
}

.footer-nav a:last-child {
  border-left-color: #000;
}

/* Figmaの住所ブロックは 14px / 行の高さ28px（= line-height 2）が
   PC・SPとも1行ぶんの単位。段落間に追加の余白は持たない */
.footer-address {
  margin: 0;
  font-style: normal;
  font-size: 14px;
  line-height: 2;
}

.footer-address p {
  margin: 0;
}

.footer-copyright {
  height: 108px;
  padding: 40px 121px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
}

/* 1280px超では .site（1280px）が中央寄せになり、セクション背景だけが左右に
   ブリードする。装飾リングはデザイン通り「画面端で見切れる」状態を保ちたいので、
   .site の端ではなくビューポートの端を基準に置き直す（1280pxちょうどでは差分0） */
@media (min-width: 1280px) {
  .ring--red {
    left: auto;
    right: calc((var(--page) - 100vw) / 2 - 114.69px); /* 994.69 + 400 - 1280 */
  }

  .ring--orange {
    left: calc((var(--page) - 100vw) / 2 - 87px);
  }

  .ring--blue {
    right: calc((var(--page) - 100vw) / 2 - 80px);
  }

  .ring--green {
    left: calc((var(--page) - 100vw) / 2 - 100px);
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .site {
    max-width: var(--page);
    overflow: hidden;
  }

  .works-section::before,
  .service-section::before,
  .recruit-section::after {
    content: none;
  }

  .recruit-section::before {
    inset: 0;
    z-index: auto;
  }

  .site-header {
    padding-inline: clamp(20px, 2.5vw, 32px);
  }

  .header-actions {
    gap: clamp(12px, 1.8vw, 23px);
    color: #fff;
  }

  .global-nav > a,
  .footer-nav a {
    padding-inline: clamp(8px, 1.25vw, 16px);
    font-size: clamp(12px, 1.09375vw, 14px);
  }

  .button {
    padding-inline: clamp(20px, 2.5vw, 32px);
  }

  .hero__copy {
    left: 50.15625%;
    width: 45%;
    font-size: clamp(36px, 3.75vw, 48px);
  }

  .hero__en {
    font-size: clamp(96px, 14vw, 179.328px);
  }

  .news-section {
    height: auto;
    min-height: 592px;
    padding-inline: 6.25%;
    align-items: flex-start;
  }

  .news-box,
  .news-box--latest,
  .news-box--important {
    height: auto;
  }

  .news-box--latest {
    width: 53.671875%;
    min-height: 344px;
  }

  .news-box--important {
    width: 41.09375%;
    min-height: 122px;
  }

  .news-list a {
    white-space: normal;
  }

  .important-title {
    padding-inline: clamp(20px, 2.5vw, 32px);
    gap: clamp(8px, 1.25vw, 16px);
  }

  .important-title h2 {
    font-size: clamp(20px, 2.5vw, 24px);
  }

  .important-title span {
    font-size: clamp(9px, 1.09375vw, 14px);
  }

  .news-list--important {
    height: auto;
    min-height: 122px;
  }

  .vision__base {
    left: 33.90625%;
    width: 66.09375%;
  }

  .vision__media {
    left: 0;
    width: 42.96875%;
  }

  .vision__large-text {
    left: -1.328125%;
    font-size: clamp(150px, 15.78125vw, 202px);
  }

  .ring--red {
    left: 77.71015625%;
    width: 31.25vw;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1;
  }

  .vision__content {
    left: 48.28125%;
    width: 43.59375%;
  }

  .body-copy br,
  .service-content p br {
    display: none;
  }

  .photo-band--first .photo-card--large {
    left: 29.609375%;
    width: 42.578125%;
  }

  .photo-band--first .photo-card--small {
    left: 61.40625%;
    width: 27.34375%;
  }

  .works-section {
    padding-inline: 8.125%;
  }

  .ring--orange,
  .ring--green {
    width: 31.25vw;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1;
  }

  .section-heading-large {
    left: 4.765625%;
    width: 34.53125%;
    font-size: clamp(112px, 11.875vw, 152px);
  }

  .stat-card {
    padding-inline: clamp(18px, 2.5vw, 32px);
  }

  .stat-card h4 {
    font-size: clamp(18px, 1.875vw, 24px);
  }

  .stat-card strong {
    font-size: clamp(42px, 4.375vw, 56px);
  }

  .stat-card small {
    white-space: normal;
  }

  .service-section {
    --service-active-image-x: 52.96875vw;
    --service-track-width-before-active: 1626px;
    --service-dots-x: 24.609375vw;
    --service-carousel-left: calc(
      var(--service-active-image-x) - var(--service-track-width-before-active)
    );

    padding-inline: 8.125%;
    gap: 3.125%;
  }

  .ring--blue {
    right: -6.25%;
    bottom: 484px;
    width: 31.25vw;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1;
  }

  .service-heading {
    left: auto;
    right: 5.15625%;
  }

  .service-carousel {
    left: var(--service-carousel-left);
    width: 1594px;
    height: 300px;
  }

  .service-viewport {
    width: 100%;
    height: 300px;
  }

  .service-track {
    gap: 32px;
  }

  .service-slide {
    flex-basis: 510px;
    height: 300px;
  }

  .service-slide img {
    width: 536px;
    height: 367px;
    transform: translate(-1px, -30px);
  }

  #service-slide-1:checked ~ .service-carousel .service-track {
    transform: translateX(-542px);
  }

  #service-slide-2:checked ~ .service-carousel .service-track {
    transform: translateX(0);
  }

  #service-slide-3:checked ~ .service-carousel .service-track {
    transform: translateX(542px);
  }

  .carousel-dots {
    left: var(--service-dots-x);
  }

  .service-content {
    width: 38.28125%;
  }

  .service-content h3 {
    font-size: clamp(32px, 3.125vw, 40px);
  }

  .recruit-section {
    padding-inline: 8.125%;
  }

  .recruit-heading {
    left: 4.140625%;
  }

  .recruit-content p {
    font-size: clamp(48px, 5vw, 64px);
    text-align: center;
  }

  .photo-band--second .photo-card--large {
    left: 8.828125%;
    width: 42.578125%;
  }

  .photo-band--second .photo-card--upper {
    left: 61.484375%;
    width: 27.34375%;
  }

  .photo-band--second
    .photo-card:not(.photo-card--large):not(.photo-card--upper) {
    left: 36.953125%;
    width: 27.34375%;
  }

  .cta-card {
    padding-inline: 8.125%;
    overflow: hidden;
    isolation: auto;
  }

  .cta-card::before,
  .cta-card::after {
    inset: 0;
    z-index: auto;
  }

  .cta-card--recruit strong,
  .cta-card--recruit > span,
  .cta-card--recruit em,
  .cta-card--contact strong,
  .cta-card--contact > span,
  .cta-card--contact em {
    transform: none;
  }

  .cta-card strong {
    font-size: clamp(48px, 5vw, 64px);
  }

  .footer-box {
    padding-inline: 2.5%;
  }

  .footer-top {
    gap: 24px;
  }

  .footer-copyright {
    padding-inline: 9.453125%;
  }
}

@media (max-width: 1024px) {
  .client-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 767px) {
  /* SPは375px基準のデザインだが、375〜767px は幅リキッドで追従させる。
     固定pxだった配置は「375px時の見た目を保ったまま」右端基準や
     コンテナ幅比（cqw）に置き換えている */
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  html {
    overflow-x: hidden;
  }

  .site {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0 auto;
    padding-bottom: 0;
    overflow: visible;
  }

  .news-section,
  .vision-section,
  .photo-band,
  .works-section,
  .service-section,
  .recruit-section,
  .cta-section {
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  .works-section::before,
  .service-section::before,
  .recruit-section::after {
    content: none;
  }

  .recruit-section::before {
    inset: 0;
    z-index: auto;
  }

  main,
  section,
  .news-box,
  .vision__content,
  .works-inner,
  .service-content,
  .recruit-content,
  .footer-box {
    min-width: 0;
  }

  .site-header {
    left: 0;
    max-width: none;
    height: 68px;
    padding: 16px 24px 8px;
    z-index: 30;
    transform: none;
  }

  /* Figmaの852px基準からコピー以下を48px上げ、その分だけ高さも詰める。
     実機（375x812 Safari）ではブラウザUIで表示領域が約630pxになり、
     デザイン通りの位置だとコピーが下端で見切れるため。 */
  .hero {
    height: 804px;
    overflow: hidden;
  }

  /* SPは .hero 自体が overflow: hidden なので、ラッパはヒーローいっぱいに広げるだけでよい */
  .hero__visual {
    left: 0;
    width: 100%;
    height: 100%;
    margin-left: 0;
  }

  /* Figma（393px幅）の画像配置 1730x1039・左-302px・上-187px をそのまま置く。
     人物の位置をデザインに揃えるため object-fit に任せず実寸で指定し、
     横位置は画面中央基準（50% - 499px）にして幅が変わっても人物がずれないようにする */
  .hero__image {
    position: absolute;
    top: -187px;
    left: 50%;
    width: 1730px;
    height: 1039px;
    max-width: none;
    margin-left: -499px;
    object-fit: cover;
  }

  .hero__copy {
    left: 20px;
    top: 388px;
    width: auto;
    filter: drop-shadow(0 0 12px #000);
    /* 実機Safari(375px)で12文字行「技術に生きる喜びがある。」が折り返したため
       1行固定にし、それより狭い幅では12文字が収まるサイズまで縮める */
    font-size: min(28px, calc((100vw - 36px) / 12));
    line-height: 1.5;
    white-space: nowrap;
  }

  .hero__type {
    top: 580px;
    height: 224px;
  }

  .hero__en {
    height: 224px;
    flex-direction: column;
    font-size: 112px;
    line-height: 1;
    text-align: center;
    white-space: normal;
    transform: none;
  }

  .hero__ja {
    font-size: 20.081px;
    line-height: 1;
    right: 0px;
  }

  .news-section {
    height: auto;
    padding: 80px 20px 0;
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  .news-box,
  .news-box--latest,
  .news-box--important {
    width: 100%;
    height: auto;
  }

  .news-box--latest {
    min-height: 472px;
    padding: 32px;
  }

  .section-title--small h2,
  .important-title h2 {
    font-size: 24px;
    line-height: 1;
  }

  .section-title--small span,
  .important-title span {
    font-size: 12px;
    flex: 0 0 auto;
  }

  .news-list li,
  .news-list--important li {
    min-height: 88px;
    padding: 16px 0 17px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .news-list li::before {
    content: none;
  }

  .news-list li time,
  .news-list li .news-tag {
    display: inline-flex;
  }

  .news-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-content: start;
    column-gap: 16px;
    row-gap: 8px;
  }

  .news-tag {
    width: 94px;
    max-width: 94px;
    min-height: 19px;
    align-items: center;
    justify-content: center;
    justify-self: start;
  }

  .news-list a {
    grid-column: 1 / -1;
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .news-list--important {
    min-height: 254px;
    height: auto;
    padding: 16px 32px;
  }

  .news-list--important li {
    display: flex;
    min-height: 74px;
  }

  .news-list--important .news-tag {
    width: 44px;
    max-width: 44px;
  }

  .vision-section {
    height: 965px;
    margin-top: 184px;
  }

  .vision__media {
    top: 0;
    left: 0;
    width: 100%;
    height: 588px;
  }

  /* 375px時は550px幅を48px左にずらして置く。それより広い幅では
     ずらし分を足した幅で右端まで埋める */
  .vision__media img {
    width: max(550px, calc(100% + 48px));
    max-width: none;
    height: 612px;
    object-position: center;
    transform: translateX(-48px);
  }

  .vision__base {
    display: none;
  }

  .vision__large-text {
    left: 0;
    top: 240px;
    width: 387px;
    max-width: 100%;
    height: 206px;
    overflow: hidden;
    font-size: 88px;
    line-height: 1;
  }

  /* 375px時の left: 213.073px を右端基準に換算（375 - 213.073 - 240） */
  .ring--red {
    left: auto;
    right: -78.073px;
    top: -154.927px;
    width: 240px;
    height: 240px;
    transform: rotate(-40.05deg);
  }

  .vision__content {
    left: 20px;
    top: 429px;
    width: calc(100% - 20px);
    min-height: 536px;
    padding: 32px 28px;
    background: #efefef;
    gap: 32px;
  }

  .section-title h2 {
    font-size: 64px;
  }

  .section-title.section-title--small h2 {
    font-size: 24px;
  }

  .lead {
    font-size: 20px;
  }

  .lead__break--sp {
    display: block;
  }

  .lead__break--pc {
    display: none;
  }

  .body-copy,
  .service-content p {
    font-size: 14px;
    line-height: 2;
  }

  .body-copy br,
  .service-content p br {
    display: none;
  }

  /* 写真バンドは375px時の px 配置を cqw（バンド幅の%）に換算し、幅に比例して拡大する。
     高さは ::before で「写真の下端 + 次セクションの見出し/リングが食い込む余白（固定px）」 */
  .photo-band {
    container-type: inline-size;
    height: auto;
  }

  .photo-band::before {
    content: "";
    display: block;
  }

  .photo-band--first::before {
    height: calc(79.4667cqw + 204px); /* 298 + 204 = 502 @375 */
  }

  .photo-band--first .photo-card--large {
    left: 12.8cqw; /* 48 */
    top: 15.7333cqw; /* 59 */
    width: 72.6667cqw; /* 272.5 */
    height: 43.2cqw; /* 162 */
  }

  .photo-band--first .photo-card--small {
    left: 49.6cqw; /* 186 */
    top: 52.2667cqw; /* 196 */
    width: 46.6667cqw; /* 175 */
    height: 27.2cqw; /* 102 */
  }

  .works-section {
    height: auto;
    padding: 128px 32px 64px;
    overflow: visible;
  }

  .ring--orange {
    left: -63px;
    top: -160px;
    width: 240px;
    height: 240px;
  }

  .section-heading-large {
    top: -62px;
    left: 20px;
    width: auto;
    height: 124px;
    justify-content: flex-start;
    font-size: 96px;
  }

  .works-inner h3 {
    margin-bottom: 32px;
    font-size: 24px;
  }

  /* 375pxでは1列、カードが2枚並ぶ幅（約590px〜）からは2列 */
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }

  .stat-card {
    width: 100%;
    height: 207px;
    padding: 40px 32px;
  }

  .stat-card h4 {
    gap: 8px;
    font-size: 16px;
  }

  .stat-card__icon--construction {
    width: 14px;
    height: 20px;
  }

  .stat-card__icon--history {
    width: 23px;
    height: 20px;
  }

  .stat-card__icon--staff {
    width: 23px;
    height: 20px;
  }

  .stat-card__icon--partner {
    width: 31px;
    height: 20px;
  }

  .stat-card strong {
    font-size: 40px;
  }

  .clients-title {
    padding-top: 64px;
  }

  .clients-title span {
    font-size: 16px;
  }

  .client-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* ロゴ6点が2列だと縦に間延びするので、収まる幅からは3列 */
  @media (min-width: 560px) {
    .client-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .client-grid div {
    height: 64px;
  }

  .client-grid img {
    max-width: 143.5px;
    max-height: 36px;
  }

  .client-grid div:first-child img {
    width: 72px;
    max-width: 72px;
    max-height: 48px;
  }

  .client-grid div:nth-child(3) img {
    max-width: 95.171px;
  }

  .client-grid div:nth-child(4) img {
    max-width: 151.5px;
    max-height: 42.816px;
  }

  .service-section {
    min-height: 686px;
    height: auto;
    margin-top: 168px;
    padding: 128px 0 64px;
    display: block;
    overflow: visible;
  }

  /* 375px時の left: 232.56px を右端基準に換算（375 - 232.56 - 240） */
  .ring--blue {
    left: auto;
    right: -97.56px;
    top: -175.404px;
    bottom: auto;
    width: 240px;
    height: 240px;
    transform: rotate(28.13deg);
  }

  /* PC同様に右寄せ。375px時の left: 49px は右端から 2px */
  .service-heading {
    position: absolute;
    top: -64px;
    right: 10px;
    left: auto;
    z-index: 2;
    width: auto;
    height: 96px;
    font-size: 96px;
  }

  /* 左右11pxを残して幅いっぱい。コマは viewport 幅（cqw）基準で、
     高さは 353:207 の比率を保つ。下 29px はドットが重なる分（旧 236 - 207） */
  .service-carousel {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 22px);
    height: auto;
    margin: 0 auto;
    padding-bottom: 29px;
    transform: none;
    overflow: hidden;
  }

  .service-viewport {
    container-type: inline-size;
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  .service-track {
    gap: 12px;
  }

  .service-slide {
    flex: 0 0 100cqw;
    height: auto;
    aspect-ratio: 353 / 207;
  }

  .service-slide img {
    width: 100%;
    height: 100%;
    object-position: center;
    transform: none;
  }

  #service-slide-1:checked ~ .service-carousel .service-track {
    transform: translateX(0);
  }

  #service-slide-2:checked ~ .service-carousel .service-track {
    transform: translateX(calc(-1 * (100cqw + 12px)));
  }

  #service-slide-3:checked ~ .service-carousel .service-track {
    transform: translateX(calc(-2 * (100cqw + 12px)));
  }

  .carousel-dots {
    position: relative;
    left: auto;
    top: auto;
    width: max-content;
    height: 56px;
    margin: -56px auto 19px;
    transform: none;
  }

  .service-content {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    padding: 0 20px;
    overflow: visible;
    display: grid;
  }

  .service-panel {
    display: flex;
    grid-area: 1 / 1;
    width: 100%;
    min-height: 0;
    height: auto;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  #service-slide-1:checked ~ .service-content .service-panel--1,
  #service-slide-2:checked ~ .service-content .service-panel--2,
  #service-slide-3:checked ~ .service-content .service-panel--3 {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .service-content h3 {
    font-size: 32px;
    line-height: 1.4;
  }

  .service-content p {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: visible;
    transform: none;
    text-align: left;
  }

  .service-panel .button {
    margin-top: 0;
  }

  .recruit-section {
    height: 302px;
    margin-top: 168px;
    padding: 128px 20px 64px;
    background-size: 138.17% 119.87%;
    background-position: -66px -36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ring--green {
    left: -64.645px;
    top: -176.356px;
    width: 240px;
    height: 240px;
    transform: rotate(-21.27deg);
  }

  .recruit-heading {
    left: 20px;
    top: -62px;
    z-index: 3;
  }

  .recruit-content {
    gap: 32px;
  }

  .recruit-content p {
    font-size: 24px;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
  }

  .recruit-content .button {
    width: 185px;
    padding: 16px 32px;
  }

  .photo-band--second::before {
    height: calc(181.3333cqw + 168px); /* 680 + 168 = 848 @375 */
  }

  .photo-band--second .photo-card--large {
    left: 19.4667cqw; /* 73 */
    top: 21.3333cqw; /* 80 */
    width: 80cqw; /* 300 */
    height: 48cqw; /* 180 */
  }

  .photo-band--second .photo-card--upper {
    left: -8cqw; /* -30 */
    top: 90.6667cqw; /* 340 */
    width: 101.8667cqw; /* 382 */
    height: 60.5333cqw; /* 227 */
  }

  .photo-band--second
    .photo-card:not(.photo-card--large):not(.photo-card--upper) {
    left: 37.6cqw; /* 141 */
    top: 144.8cqw; /* 543 */
    width: 61.3333cqw; /* 230 */
    height: 36.5333cqw; /* 137 */
  }

  .cta-section {
    height: auto;
    grid-template-columns: 1fr;
  }

  .cta-card {
    min-height: 380px;
    padding: 64px 0;
    gap: 64px;
    overflow: hidden;
    isolation: auto;
  }

  .cta-card::before,
  .cta-card::after {
    inset: 0;
    z-index: auto;
  }

  .cta-card--recruit strong,
  .cta-card--recruit > span,
  .cta-card--recruit em,
  .cta-card--contact strong,
  .cta-card--contact > span,
  .cta-card--contact em {
    transform: none;
  }

  .cta-card strong {
    font-size: 64px;
  }

  /* SPでは採用情報への動線（RECRUITカード）を出さない */
  .cta-card--recruit {
    display: none;
  }

  .cta-card--contact::before {
    background-size: 184% auto;
    background-position: center top;
  }

  .site-footer {
    width: 100%;
    margin-left: 0;
  }

  .footer-box {
    min-height: 0;
    padding: 64px 32px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 16px 0;
  }

  .footer-address {
    width: 100%;
    font-size: 14px;
  }

  .footer-address p {
    overflow-wrap: anywhere;
  }

  .footer-copyright {
    height: 108px;
    padding: 40px 32px;
    font-size: 10px;
    text-align: center;
  }
}
