@charset "UTF-8";
/* ==========================================================
   青牡丹工務店  style.css
   PC：Figma 1440px（左サイドバー280px＋メイン1120px）
   SP：Figma 375px（767px以下で切り替え）
   ========================================================== */

/* ---------- 変数 ---------- */
:root {
  --blue: #4282B8;
  --blue-light: #B1C6DC;   /* 区切り線・番号 */
  --black: #000;
  --gray: #F8F8F8;         /* グレー背景 */
  --white: #fff;
  --red: #E60012;
  --font-ja: "Zen Kaku Gothic New", sans-serif;
  --font-en: "Kanit", sans-serif;
  --side: 280px;           /* サイドバー幅 */
  --gutter: 40px;          /* メイン右余白 */
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, dl, dt, dd, table, th, td { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; vertical-align: bottom; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { padding: 0; border: none; background: none; cursor: pointer; }
table { border-collapse: collapse; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.8125;   /* 16px×1.8125＝29px。Figmaは行間180%(28.8px)を29pxに丸めて表示するので合わせる */
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-break: strict;   /* 「ー」「ッ」などを行頭に置かない（Figmaの改行に合わせる） */
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================
   ローディング
   ========================================================== */
.loading {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--white);
  transition: opacity .8s ease, visibility .8s ease;
}
.loading__logo { width: 200px; animation: loadingLogo 1.4s ease both; }
.loading.is-hide { opacity: 0; visibility: hidden; }
@keyframes loadingLogo {
  0%   { opacity: 0; transform: translateY(16px); }
  60%  { opacity: 1; transform: none; }
  100% { opacity: 1; }
}

/* ==========================================================
   ヘッダー（PC：左固定サイドバー）
   ========================================================== */
.header {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  width: var(--side);
  padding: 74px 40px 40px;
  background: var(--white);
  overflow-y: auto;
}
.header__logo { width: 200px; }
.header__logo a { display: block; transition: opacity .3s; }
.header__logo a:hover { opacity: .7; }
.header__toggle { display: none; }

.gnav { margin-top: 25px; }
.gnav__item--sp, .gnav__copy { display: none; }
.gnav__item { border-bottom: 1px solid var(--blue-light); }
.gnav__parent {
  position: relative;
  display: flex; align-items: center;
  padding: 32px 0 31px;
  font-size: 20px; font-weight: 700; line-height: 1;
  transition: color .3s;
}
.gnav__parent:hover { color: var(--blue); }
.gnav__parent--mail::before {
  content: ""; flex: none;
  width: 24px; height: 18px; margin-right: 16px;
  background: url(../images/common/icon-mail.svg) center / contain no-repeat;
}
/* ＋／−アイコン：閉じているときは＋、開いたら− */
.gnav__icon {
  position: absolute; right: 0; top: 50%;
  width: 24px; height: 24px; margin-top: -12px;
}
.gnav__icon::before, .gnav__icon::after {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 24px; height: 1px; background: var(--blue);
  transition: transform .3s;
}
.gnav__icon::after { transform: rotate(90deg); }
.gnav__item.has-child:hover .gnav__icon::after,
.gnav__item.has-child:focus-within .gnav__icon::after { transform: rotate(0); }

/* 子メニュー：ホバーで開閉（grid の 0fr→1fr で高さをなめらかに） */
.gnav__child {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s ease;
}
.gnav__child-inner { min-height: 0; overflow: hidden; }
.gnav__child ul { padding: 32px 0 29px 17px; border-top: 1px solid var(--blue-light); }
.gnav__child li + li { margin-top: 24px; }
.gnav__item.has-child:hover .gnav__child,
.gnav__item.has-child:focus-within .gnav__child { grid-template-rows: 1fr; }
.gnav__child li { font-size: 14px; font-weight: 700; line-height: 1; }
.gnav__child li a { display: inline-block; transition: color .3s; }
.gnav__child li a:hover { color: var(--blue); }

/* ==========================================================
   メイン共通
   ========================================================== */
.main { margin-left: var(--side); }

/* 見出し（日本語ラベル＋英字アウトライン） */
.sec-head__ja { font-size: 24px; font-weight: 700; line-height: 1; }
.sec-head__en {
  margin-top: 20px;
  font-family: var(--font-en);
  font-size: 128px; font-weight: 700; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--blue);
  letter-spacing: 0;
}

/* ボタン（Read More 型） */
.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 240px; height: 60px;
  border: 1px solid var(--black);
  border-radius: 8px;
  background: var(--white);
  font-size: 16px; font-weight: 700; line-height: 1;
  transition: background-color .3s, color .3s;
}
.btn::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--black);
  transition: background-color .3s;
}
.btn:hover { background: var(--black); color: var(--white); }
.btn:hover::after { background: var(--white); }

/* 青ボタン（送信・トップへ戻る） */
.btn--blue {
  width: 284px;
  border-color: var(--blue);
  background: var(--blue); color: var(--white);
}
.btn--blue::after { background: var(--white); }
.btn--blue:hover { background: var(--white); color: var(--blue); }
.btn--blue:hover::after { background: var(--blue); }
.btn--blue:disabled { opacity: .4; cursor: not-allowed; }
.btn--blue:disabled:hover { background: var(--blue); color: var(--white); }
.btn--blue:disabled:hover::after { background: var(--white); }

/* ふわっと出現（トップページのみJSで付与） */
.js-fade { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.js-fade.is-show { opacity: 1; transform: none; }
.no-js .js-fade, body:not(.page-top) .js-fade { opacity: 1; transform: none; }

/* ==========================================================
   トップ：ファーストビュー
   ========================================================== */
.fv { position: relative; padding: 40px var(--gutter) 0 0; }
.fv::before {           /* 右上の青い四角 */
  content: ""; position: absolute; z-index: -1;
  top: 0; left: 433px; right: 0;
  height: 727px; background: var(--blue);
}
.fv__inner {
  position: relative;
  height: 873px;
  background: var(--gray);
  border-radius: 50px;
}
.fv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fv__copy { position: absolute; left: 467px; top: 633px; }
.fv__title {
  display: inline-block;
  padding: 14px;
  background: var(--white);
  border-radius: 10px;
  font-size: 64px; font-weight: 700; line-height: 1;
}
.fv__lead { margin-top: 21px; font-size: 16px; font-weight: 700; line-height: 2; }
.fv__lead.js-fade { transition-delay: .3s; }
.fv__scroll {
  position: absolute; left: 18px; top: 798px;
  font-size: 10px; line-height: 1.4; color: var(--blue);
}
.fv__scroll::after {     /* 下に伸びる線（アニメーション） */
  content: ""; position: absolute; left: 22px; top: 17px;
  width: 1px; height: 111px;
  background: var(--blue);
  transform-origin: top;
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ==========================================================
   トップ：スライダー＋縦書きコピー
   ========================================================== */
.gallery { position: relative; margin-top: 76px; }
.gallery__band { padding: 63px 0; background: var(--gray); overflow: hidden; }
.slider { overflow: hidden; }
.slider__track {
  display: flex; width: max-content;
  animation: slide var(--slide-duration, 30s) linear infinite;
}
.slider__item { flex: none; width: 360px; height: 360px; margin-left: 48px; }
.slider__item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(var(--slide-distance, 1224px) * -1)); }
}
.gallery__copy {
  position: absolute; z-index: 2; left: 806px; top: 254px;
  width: 172px; height: 451px;
  padding: 27px 28px 0 32px;
  background: var(--gray);
  writing-mode: vertical-rl;
  font-size: 40px; font-weight: 700; line-height: 1.4; letter-spacing: .5em;
}
.gallery__copy-blue { color: var(--blue); }
.gallery__copy-black { color: var(--black); }
.gallery__illust { position: absolute; left: 625px; top: 491px; width: 161px; }

/* ==========================================================
   トップ：ABOUT
   ========================================================== */
.about-top { padding: 71px var(--gutter) 0 0; }
.about-top__text { width: 429px; max-width: 100%; margin-top: 40px; }
.about-top .btn { margin-top: 40px; }

/* ==========================================================
   トップ：SERVICE
   ========================================================== */
.service-top { position: relative; margin-top: 85px; padding: 49px var(--gutter) 100px 0; }
.service-top__bg {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 192px; right: 0;
  background: var(--gray);
  border-radius: 60px 0 0 60px;
}
.service-top__illust { position: absolute; left: 857px; top: 91px; width: 124px; }

.service-item { position: relative; display: flex; align-items: flex-start; margin-top: 64px; }
.service-item + .service-item { margin-top: 92px; }
.service-item__img { position: relative; z-index: 1; flex: none; width: 516px; height: 464px; object-fit: cover; }
.service-item__body { position: relative; width: 430px; margin-left: 56px; padding-top: 168px; }
.service-item__num {
  position: absolute; left: -77px; top: 0;
  font-family: var(--font-en); font-size: 168px; font-weight: 700; line-height: 1;
  color: var(--blue-light);
  pointer-events: none;
}
.service-item__title {
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  background: var(--white);
  font-size: 24px; font-weight: 700; line-height: 1;
}
.service-item__text { margin-top: 48px; }
.service-item .btn { margin-top: 28px; }

/* 02：左右反転 */
.service-item--reverse { flex-direction: row-reverse; justify-content: flex-end; }
.service-item--reverse .service-item__img { margin-left: 56px; }
.service-item--reverse .service-item__body { margin-left: 3px; }
.service-item--reverse .service-item__num { left: 308px; }

/* ==========================================================
   トップ：NEWS
   ========================================================== */
.news { padding: 107px var(--gutter) 0 0; }
.news__list { margin-top: 47px; border-top: 1px solid var(--blue-light); }
.news__item { border-bottom: 1px solid var(--blue-light); }
.news__link {
  position: relative;
  display: block; width: 100%;
  padding: 32px 80px 32px 0;
  text-align: left;
  transition: opacity .3s;
}
.news__link::after {
  content: ""; position: absolute; right: 26px; top: 50%;
  width: 16px; height: 16px; margin-top: -8px;
  background: url(../images/common/icon-arrow-right.svg) center / contain no-repeat;
  transition: transform .3s;
}
.news__link:hover { opacity: .7; }
.news__link:hover::after { transform: translateX(6px); }
.news__meta { display: flex; align-items: center; gap: 16px; }
.news__tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 116px; height: 24px;
  border: 1px solid var(--blue);
  font-size: 12px; font-weight: 700; line-height: 1; color: var(--blue);
  letter-spacing: .15em; text-indent: .15em;
}
.news__date { font-size: 12px; font-weight: 700; line-height: 1; color: var(--blue); }
.news__title { display: block; margin-top: 23px; font-size: 16px; font-weight: 700; line-height: 1; }

/* ==========================================================
   CONTACT（共通パーツ）
   ========================================================== */
.contact-cta { padding-top: 131px; }
.contact-cta__inner {
  position: relative;
  padding: 33px 40px 53px 25px;
  background: var(--gray);
  border-radius: 60px 0 0 60px;
}
.sec-head--cta .sec-head__en { margin-top: 20px; }
.contact-cta__illust { position: absolute; left: 945px; top: 31px; width: 175px; }
.contact-cta__row { position: relative; display: flex; align-items: center; margin-top: 39px; }
.contact-cta__tel-label {
  display: flex; flex-direction: column; justify-content: center;
  width: 74px; height: 68px;
  border-right: 1px solid var(--black);
}
.contact-cta__tel-en { font-family: var(--font-en); font-size: 32px; line-height: 1; }
.contact-cta__tel-ja { margin-top: 10px; font-size: 12px; font-weight: 700; line-height: 1; }
.contact-cta__tel {
  display: flex; flex-direction: column; justify-content: center;
  width: 324px; height: 68px; padding-left: 31px;
  border-right: 1px solid var(--black);
}
.contact-cta__tel-num { font-family: var(--font-en); font-size: 32px; line-height: 1; }
.contact-cta__hours { margin-top: 10px; font-size: 12px; font-weight: 700; line-height: 1; }
.contact-cta__mail {
  position: relative;
  display: flex; align-items: center;
  width: 284px; height: 60px; margin-left: 63px; padding: 4px 0 0 38px;   /* Figmaに合わせて中身を左へ2px・下へ2px */
  background: var(--white);
  border-radius: 10px;
  font-size: 16px; font-weight: 700; line-height: 1;
  transition: background-color .3s, color .3s;
}
.contact-cta__mail::before {
  content: ""; width: 21px; height: 20px; margin-right: 10px;
  background: url(../images/common/icon-mail.svg) center / contain no-repeat;
}
.contact-cta__mail::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--black);
}
.contact-cta__mail:hover { background: var(--black); color: var(--white); }
.contact-cta__mail:hover::before { filter: invert(1); }
.contact-cta__mail:hover::after { background: var(--white); }

/* ==========================================================
   フッター
   ========================================================== */
.footer {
  position: relative;
  display: flex; justify-content: space-between;
  margin-left: var(--side);
  padding: 117px var(--gutter) 38px 0;
}
.footer__logo { display: block; width: 222px; }
.footer__logo img { width: 100%; }
.footer__address { margin-top: 31px; font-size: 16px; line-height: 2; }
.footer__address div { display: flex; gap: 16px; }
.footer__address dd { display: flex; gap: 8px; }
.footer__nav { width: 570px; padding-top: 26px; }
.footer__nav ul { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__nav ul + ul { margin-top: 40px; }
.footer__nav li { font-size: 16px; font-weight: 700; line-height: 1; }
.footer__nav a { display: inline-flex; align-items: center; transition: color .3s; }
.footer__nav a:hover { color: var(--blue); }
.footer__mail::before {
  content: ""; width: 20px; height: 16px; margin-right: 8px;
  background: url(../images/common/icon-mail.svg) center / contain no-repeat;
}
.footer__copy {
  position: absolute; right: 56px; bottom: 26px;
  font-size: 14px; line-height: 1;
}
.footer__copy small { font-size: inherit; }

/* ==========================================================
   お知らせモーダル
   ========================================================== */
.modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 55px 20px; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; width: 100%; height: 100%; justify-self: stretch; align-self: stretch; background: rgba(0, 0, 0, .3); cursor: pointer; }
.modal__box {
  position: relative;
  display: flex; flex-direction: column;
  width: 860px; max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px);
  padding: 16px 0 24px;
  background: var(--white);
  animation: modalIn .35s ease both;
}
.modal.is-closing .modal__box { animation: modalOut .25s ease both; }
.modal.is-closing .modal__overlay { opacity: 0; transition: opacity .25s; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes modalOut { from { opacity: 1; } to { opacity: 0; transform: translateY(20px); } }
.modal__scroll { flex: 1 1 auto; overflow-y: auto; padding: 0 102px; overscroll-behavior: contain; }
.modal__title { margin-top: 24px; font-size: 24px; font-weight: 700; line-height: 1.8; }
.modal__img { display: block; width: 100%; margin-top: 18px; aspect-ratio: 656 / 366; object-fit: cover; }
.modal__text { margin-top: 40px; font-size: 16px; line-height: 1.8125; }
.modal__text p + p, .modal__text ul + p, .modal__text p + ul { margin-top: 1.8em; }
.modal__text li::before { content: "・"; }
.modal__close { flex: none; margin: 40px auto 0; }
.modal__x {
  position: absolute; right: -50px; top: -4px;
  width: 40px; height: 40px;
}
.modal__x:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.modal__x::before, .modal__x::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 44px; height: 3px; margin: -1.5px 0 0 -22px;
  background: var(--white);
  transform: rotate(45deg);
}
.modal__x::after { transform: rotate(-45deg); }

/* ==========================================================
   下層ページ共通：メインビジュアル＋導入
   ========================================================== */
.mv { position: relative; padding: 40px var(--gutter) 0 0; }   /* 高さは画像の比率で決まる（1440px幅で40＋661＝701px） */
.mv::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; left: 433px; right: 0; height: calc(100% - 138px);   /* 1440px幅で563px。画面が広がっても比率を保つ */
  background: var(--blue);
}
.mv__img { display: block; width: 100%; height: auto; aspect-ratio: 1120 / 661; object-fit: cover; border-radius: 50px; }
/* 画像の縦の長さがページごとに少し違う（Figma通り）。下の余白で差を吸収して、見出しの位置はそろえる */
.page-service .mv__img { aspect-ratio: 1120 / 671; margin-bottom: -10px; }
.page-contact .mv__img, .page-thanks .mv__img { aspect-ratio: 1120 / 656; margin-bottom: 5px; }
.intro { position: relative; padding: 64px var(--gutter) 0 0; }
.intro__title { font-size: 40px; font-weight: 700; line-height: 1; }
.intro__text { width: 420px; max-width: 100%; margin-top: 64px; }
.intro__illust { position: absolute; top: 64px; left: 538px; width: 165px; }
.page-service .intro__illust { top: 64px; }

/* ページ内リンクボタン */
.anchor { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 64px; }
.anchor a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px;
  width: 208px; height: 61px;
  border: 1px solid var(--blue); border-radius: 10px;
  font-size: 16px; line-height: 1; 
  transition: background-color .3s, color .3s;
}
.anchor a::after {
  content: ""; width: 10px; height: 10px;
  background: var(--blue);
  -webkit-mask: url(../images/common/icon-chevron-down.svg) center / contain no-repeat;
          mask: url(../images/common/icon-chevron-down.svg) center / contain no-repeat;
  transition: background-color .3s;
}
.anchor a:hover { background: var(--blue); color: var(--white); }
.anchor a:hover::after { background: var(--white); }

.sub-sec { padding-right: var(--gutter); scroll-margin-top: 40px; }
.sub-title { font-size: 32px; font-weight: 700; line-height: 1; }

/* ==========================================================
   私達について
   ========================================================== */
.philosophy { margin-top: 80px; }
.philosophy__figure { width: 923px; max-width: 100%; margin-top: 64px; }
.philosophy__figure img { width: 100%; }
/* PCでは図の中に文字があるので、説明文は読み上げ用にだけ残す */
.philosophy__caption {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}

.company { margin-top: 51px; }
.company__flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; width: 953px; max-width: 100%; margin-top: 64px; }
.company__text { width: 465px; }
.company__ceo { flex: none; width: 331px; }
.company__ceo img { width: 100%; }
.company__ceo-role { margin-top: 12px; line-height: 1.5; }
.company__ceo-name { margin-top: 20px; font-size: 32px; font-weight: 700; line-height: 1; color: var(--blue); }
.company__table { width: 953px; max-width: 100%; margin-top: 51px; }
.company__table tr { border-bottom: 1px solid #CCC; }
.company__table th, .company__table td { padding: 27px 0 24px; text-align: left; vertical-align: top; line-height: 1.5; }
.company__table th { width: 242px; font-weight: 700; }

.safety { margin-top: 57px; }
.safety__h3 { margin-top: 96px; font-size: 24px; font-weight: 700; line-height: 1; }
.safety__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; width: 953px; max-width: 100%; margin-top: 40px; }
.safety__item + .safety__h3 { margin-top: 35px; }
.safety__text { width: 640px; }
.safety__img { flex: none; width: 267px; }

.page-about .contact-cta { padding-top: 192px; }

/* ==========================================================
   事業内容
   ========================================================== */
.works { margin-top: 75px; }
.works + .works { margin-top: 72px; }
.works__img { display: block; width: 960px; max-width: 100%; height: auto; }
.works__body { width: 860px; max-width: calc(100% - 50px); margin: 56px 0 0 50px; }
.works__title { padding-bottom: 39px; border-bottom: 1px solid var(--blue-light); font-size: 24px; font-weight: 700; line-height: 1; }
.works__desc { display: flex; gap: 54px; min-height: 290px; margin-top: 20px; }   /* 左360px＋間54px → 右の文章は414px目から（Figma通り） */
.works__lead { flex: none; width: 360px; font-size: 20px; font-weight: 700; line-height: 1.8; }
.works__text { width: 432px; }
.works__cases { display: grid; grid-template-columns: repeat(2, 352px); gap: 40px 62px; }
.works__case-title { font-size: 16px; font-weight: 700; line-height: 1; }
.works__case img { display: block; width: 100%; height: auto; margin-top: 20px; }
.works__case-meta { margin-top: 20px; font-size: 14px; line-height: 1; }

.page-service .contact-cta { padding-top: 71px; }

/* ==========================================================
   お問い合わせ・送信完了
   ========================================================== */
.form-wrap { display: flex; gap: 150px; margin-top: 62px; padding-right: var(--gutter); }
.form-main { flex: none; width: 470px; max-width: 100%; }
.steps { display: flex; align-items: center; }
.steps__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 209px; height: 58px; padding-bottom: 6px;   /* 中身を3px上へ（Figmaに合わせる） */
  border: 3px solid var(--blue);
  color: var(--blue); background: var(--white);
  font-size: 16px; font-weight: 700; line-height: 1;
}
.steps__item span { font-size: 12px; font-weight: 700; line-height: 1; }
.steps__item.is-current { background: var(--blue); color: var(--white); }
.steps__line { width: 52px; height: 1px; background: var(--blue); }

.form-tel__lead { font-size: 16px; font-weight: 700; line-height: 1; }
.form-tel__num { display: block; margin-top: 29px; font-family: var(--font-en); font-size: 32px; line-height: 1; }
.form-tel__hours { margin-top: 14px; font-size: 12px; font-weight: 700; line-height: 1; }

.form { margin-top: 62px; }
.form__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.form__group + .form__group { margin-top: 26px; }
.form__label { display: flex; align-items: center; gap: 8px; padding: 0; font-size: 16px; font-weight: 700; line-height: 1; }
.form__req { font-size: 12px; font-weight: 700; color: var(--black); }
.form__req::before { content: "★"; color: var(--red); }
.form__radios { display: grid; gap: 14px; margin-top: 27px; }
.form__radio { display: flex; align-items: center; gap: 8px; width: fit-content; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
.form__radio input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 16px; height: 16px; margin: 0;
  border: 1px solid var(--blue); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.form__radio input::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .2s; }
.form__radio input:checked::before { transform: scale(1); }
.form__radio input:focus-visible, .form__check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.form__fields { display: flex; gap: 40px; margin-top: 26px; margin-bottom: 1px; }
.form__input {
  display: block; width: 100%; height: 60px; margin-top: 27px; padding: 0 15px;
  border: 1px solid var(--blue-light); border-radius: 0;
  background: var(--gray);
  font-size: 16px; font-weight: 700;
  transition: border-color .3s, background-color .3s;
}
.form__fields .form__input { margin-top: 0; }
.form__input::placeholder { color: #BDBDBD; }
.form__input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.form__check { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 51px; font-size: 16px; line-height: 1; cursor: pointer; }
.form__check input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 16px; height: 16px; margin: 0;
  border: 1px solid var(--blue); cursor: pointer;
  display: grid; place-items: center;
}
.form__check input::before { content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) scale(0); transition: transform .2s; }
.form__check input:checked::before { transform: rotate(-45deg) scale(1); }
.form__submit { margin: 69px auto 0; }

.thanks-back { margin-top: 91px; }

.page-contact .contact-cta { padding-top: 72px; }
.page-thanks .contact-cta { padding-top: 169px; }

/* ==========================================================
   タブレット（768〜1279px）：メインを可変幅に
   ========================================================== */
@media (max-width: 1279px) {
  .sec-head__en { font-size: clamp(80px, 10vw, 128px); }
  .fv::before { left: 38.6%; height: auto; aspect-ratio: 1 / 1; max-height: 92%; }
  .fv__inner { height: auto; aspect-ratio: 1120 / 873; }
  .fv__copy { left: 41.7%; top: auto; bottom: 10%; }
  .fv__title { padding: .22em; font-size: calc((100vw - 320px) * .0571); white-space: nowrap; }
  .fv__lead { margin-top: 1.2em; font-size: max(12px, calc((100vw - 320px) * .0143)); }
  .fv__scroll { top: auto; bottom: 60px; }
  .gallery__copy { left: auto; right: 40px; }
  .gallery__illust { display: none; }
  .service-top__illust { left: auto; right: 80px; }
  .service-item__img { width: 45%; height: auto; aspect-ratio: 516 / 464; }
  .service-item__body { flex: 1; width: auto; }
  .service-item__num { font-size: clamp(100px, 13vw, 168px); }
  .service-item--reverse .service-item__num { left: auto; right: -20px; }
  .contact-cta__row { flex-wrap: wrap; row-gap: 24px; }
  .contact-cta__mail { margin-left: 0; }
  .contact-cta__illust { left: auto; right: 30px; top: 24px; width: 110px; }
  .footer { flex-direction: column; gap: 48px; }
  .footer__copy { position: static; margin-top: 40px; }
  .mv { height: auto; }
  .intro__illust { left: auto; right: 40px; }
  .company__flex, .safety__item { width: auto; }
  .works__desc { min-height: 0; }
  .works__cases { margin-top: 64px; grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .form-wrap { flex-direction: column; gap: 48px; }
  .page-about .contact-cta, .page-service .contact-cta { padding-top: 120px; }
}

/* ==========================================================
   スマートフォン（767px以下）
   ========================================================== */
@media (max-width: 767px) {
  :root { --side: 0px; --gutter: 20px; }
  body { font-size: 14px; line-height: 1.786; }   /* 14px×1.786＝25px */

  /* ヘッダー */
  .header {
    position: absolute; bottom: auto; right: 0;
    width: 100%; height: 80px; padding: 10px 0 0;
    background: transparent; overflow: visible;
  }
  .header__logo { position: relative; z-index: 210; width: 100px; }
  .header__toggle {
    position: fixed; top: 0; right: 0; z-index: 300;
    display: block; width: 56px; height: 48px;
    background: var(--blue);
  }
  .header__toggle-line, .header__toggle::before, .header__toggle::after {
    content: ""; position: absolute; left: 12px;
    width: 32px; height: 1px; background: var(--white);
    transition: transform .3s, opacity .3s;
  }
  .header__toggle::before { top: 12px; }
  .header__toggle-line { top: 24px; }
  .header__toggle::after { top: 36px; }
  .is-menu-open .header__toggle::before { transform: translateY(12px) rotate(45deg); }
  .is-menu-open .header__toggle-line { opacity: 0; }
  .is-menu-open .header__toggle::after { transform: translateY(-12px) rotate(-45deg); }

  .gnav {
    position: fixed; inset: 0; z-index: 200;
    margin: 0; padding: 109px 20px 30px;
    background: var(--white);
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity .4s, visibility .4s;
  }
  .is-menu-open .gnav { opacity: 1; visibility: visible; }
  .gnav__list { display: grid; justify-items: center; gap: 0; }
  .gnav__item, .gnav__item--sp { display: contents; border: 0; }
  .gnav__parent, .gnav__item--sp > a, .gnav__child li a {
    display: inline-flex; padding: 0; margin-bottom: 32px;
    font-size: 16px; font-weight: 700; line-height: 1;
  }
  .gnav__icon { display: none; }
  .gnav__child, .gnav__child-inner, .gnav__child ul, .gnav__child li { display: contents; }
  .gnav__parent--mail::before { width: 20px; height: 16px; margin-right: 8px; }
  .gnav__copy { display: block; margin-top: -6px; text-align: center; font-size: 12px; line-height: 1; }

  /* 見出し */
  .sec-head__ja { font-size: 20px; }
  .sec-head__en { margin-top: 12px; font-size: min(75px, 20vw); }

  /* FV */
  .fv { padding: 101px 0 0 10px; }
  .fv::before { display: none; }
  .fv__inner { height: 589px; aspect-ratio: auto; border-radius: 20px 0 0 20px; }
  .fv__img { object-fit: cover; object-position: left top; border-radius: 20px 0 0 20px; }
  .fv__copy { left: 9px; right: 0; top: 409px; bottom: auto; }
  .fv__title { padding: 13px 14px; font-size: 24px; }
  .fv__lead { margin-top: 21px; font-size: 12px; }
  .fv__scroll { left: 9px; top: 543px; bottom: auto; }
  .fv__scroll::after { height: 54px; top: 18px; }

  /* スライダー */
  .gallery { margin-top: 73px; }
  .gallery__band { padding: 16px 0 58px; }
  .slider__item { width: 200px; height: 200px; margin-left: 16px; }
  .gallery__copy {
    left: 236px; right: auto; top: 116px;
    width: 112px; height: 284px; padding: 22px 16px 0;
    font-size: 24px; line-height: 1.667; letter-spacing: .5em;
  }
  .gallery__illust { left: 167px; right: auto; top: 256px; width: 64px; }

  /* ABOUT */
  .about-top { padding: 128px 20px 0; }
  .about-top__text { width: auto; margin-top: 42px; }
  .about-top .btn { margin-top: 30px; }

  /* SERVICE */
  .service-top { margin-top: 52px; padding: 27px 20px 80px; }
  .service-top__bg { left: 100px; border-radius: 40px 0 0 40px; }
  .service-top__illust { left: auto; right: 20px; top: -50px; width: 72px; }
  .service-item, .service-item--reverse { display: block; margin-top: 24px; }
  .service-item + .service-item { margin-top: 50px; }
  .service-item__img, .service-item--reverse .service-item__img { width: 100%; height: auto; aspect-ratio: 335 / 301; margin: 0; }
  .service-item__body, .service-item--reverse .service-item__body { width: auto; margin: 22px 0 0; padding-top: 0; }
  .service-item__num, .service-item--reverse .service-item__num { left: auto; right: 0; top: 0; font-size: 48px; }
  .service-item__title { padding: 13px 16px; font-size: 24px; }
  .service-item__text { margin-top: 14px; font-size: 16px; line-height: 1.8125; }
  .service-item .btn { margin-top: 28px; }

  /* NEWS */
  .news { padding: 97px 20px 0; }
  .news__list { margin-top: 46px; }
  .news__link { padding: 16px 40px 14px 0; }
  .news__link::after { right: 2px; }
  .news__meta { gap: 16px; }
  .news__title { margin-top: 17px; font-size: 14px; line-height: 1.8; }

  /* CONTACT */
  .contact-cta { padding-top: 64px; }
  .contact-cta__inner { padding: 29px 20px 42px; border-radius: 0; }
  .contact-cta__illust { left: auto; right: 20px; top: -14px; width: 60px; }
  .contact-cta__row { display: block; margin-top: 44px; }
  .contact-cta__tel-label { flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; width: auto; height: auto; padding-bottom: 27px; border-right: 0; border-bottom: 1px solid var(--black); }
  .contact-cta__tel-ja { margin-top: 0; }
  .contact-cta__tel { width: auto; height: auto; padding: 30px 0 0; border-right: 0; }
  .contact-cta__mail { margin: 34px 0 0; }

  /* フッター */
  .footer { display: block; padding: 24px 20px 24px; text-align: center; }
  .footer__info { display: flex; flex-direction: column; align-items: center; }
  .footer__address { margin-top: 30px; font-size: 12px; line-height: 2.67; }
  .footer__address div { display: block; }
  .footer__address dt { display: inline; margin-right: 1em; }
  .footer__address dd { display: inline; }
  .footer__sp-br { display: block; }
  .footer__nav { width: auto; padding-top: 64px; }
  .footer__nav ul { flex-direction: column; align-items: center; gap: 32px; }
  .footer__nav ul + ul { margin-top: 32px; }
  .footer__copy { position: static; margin-top: 64px; font-size: 12px; }

  /* モーダル */
  .modal { padding: 64px 12px 24px; }
  .modal__box { max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); }
  .modal__box { padding: 16px 0 24px; }
  .modal__scroll { padding: 0 20px; }
  .modal__title { margin-top: 16px; font-size: 18px; }
  .modal__text { margin-top: 24px; font-size: 14px; }
  .modal__close { margin-top: 24px; }
  .modal__x { right: 0; top: -52px; }

  /* 下層 */
  .mv { height: auto; padding: 64px 0 0 10px; }
  .mv::before { left: 160px; height: 180px; top: 48px; }
  .mv__img, .page-service .mv__img, .page-contact .mv__img, .page-thanks .mv__img { aspect-ratio: 365 / 240; margin-bottom: 0; object-fit: cover; border-radius: 20px 0 0 20px; }
  .intro { padding: 40px 20px 0; }
  .intro__title { font-size: 28px; }
  .intro__text { width: auto; margin-top: 32px; }
  .intro__illust, .page-service .intro__illust { top: 16px; right: 20px; left: auto; width: 72px; }
  .anchor { gap: 12px; margin-top: 40px; }
  .anchor a { width: calc(50% - 6px); height: 56px; font-size: 14px; }
  .sub-sec { padding: 0 20px; scroll-margin-top: 64px; }
  .sub-title { font-size: 24px; }

  .philosophy { margin-top: 64px; }
  .philosophy__figure { margin-top: 24px; }
  .philosophy__figure img { width: 100%; }
  /* スマホでは図の文字が小さすぎるので、説明文を下に表示する */
  .philosophy__caption { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-top: 24px; }
  .philosophy__list { display: grid; gap: 16px; counter-reset: ph; }
  .philosophy__list li { counter-increment: ph; font-size: 14px; line-height: 1.7; }
  .philosophy__list li span { display: block; font-size: 16px; font-weight: 700; }
  .philosophy__list li span::before { content: counter(ph) " "; color: var(--blue); }

  .company { margin-top: 64px; }
  .company__flex { flex-direction: column; gap: 32px; margin-top: 32px; }
  .company__text { width: auto; letter-spacing: .05em; }
  .company__ceo { width: 100%; max-width: 280px; margin: 0 auto; }
  .company__ceo-name { font-size: 24px; margin-top: 12px; }
  .company__table { margin-top: 40px; }
  .company__table th, .company__table td { display: block; width: auto; padding: 0; }
  .company__table th { padding-top: 16px; }
  .company__table td { padding: 6px 0 16px; }

  .safety { margin-top: 64px; }
  .safety__h3 { margin-top: 40px; font-size: 18px; line-height: 1.5; }
  .safety__item { flex-direction: column-reverse; gap: 20px; margin-top: 20px; }
  .safety__item + .safety__h3 { margin-top: 40px; }
  .safety__text { width: auto; }
  .safety__img { width: 100%; }

  .works { margin-top: 56px; }
  .works + .works { margin-top: 56px; }
  .works__img { aspect-ratio: 335 / 180; object-fit: cover; border-radius: 30px; }
  .works__body { width: auto; max-width: none; margin: 32px 0 0; }
  .works__title { padding-bottom: 20px; font-size: 20px; }
  .works__desc { flex-direction: column; gap: 16px; min-height: 0; }
  .works__lead { width: auto; font-size: 16px; }
  .works__text { width: auto; }
  .works__cases { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }

  .form-wrap { flex-direction: column; gap: 40px; margin-top: 40px; padding: 0 20px; }
  .form-main { width: 100%; }
  .steps__item { flex: 1; width: auto; }
  .steps__line { width: 20px; flex: none; }
  .form { margin-top: 40px; }
  .form__fields { gap: 16px; }
  .form__check { letter-spacing: 0; font-size: 14px; }
  .form__submit { width: 100%; max-width: 284px; margin-top: 48px; }
  .page-about .contact-cta, .page-service .contact-cta, .page-contact .contact-cta, .page-thanks .contact-cta { padding-top: 64px; }
  .thanks-back { margin-top: 48px; }
}

/* 動きを減らす設定の人にはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js-fade { opacity: 1; transform: none; }
}
