/* ===================== Design Tokens ===================== */
:root {
  --red: #e83e34;
  --dark: #202020;
  --navy: #004384;
  --light: #ebf1f1;
  --gray: #a6b4bc;
  --mid: #666666;
  --line: #e4e4e4;
  --placeholder: #c8c8c8;
  --ink: #333333;
  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Alexandria", sans-serif;
}

/* ===================== Reset ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ja);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding: 0 82px; }
.txt-red { color: var(--red); }

/* ===================== Header ===================== */
.header { position: sticky; top: 0; z-index: 160; padding: 16px 16px 0; }
.header__bar {
  position: relative;
  width: 100%;
  background: transparent; border-radius: 4px;
  box-shadow: none; transition: background .3s, box-shadow .3s;
}


.header__row { display: flex; align-items: center; height: 73px; padding: 0 38px; }
.header__logo { margin: 0 auto 0 0; font-size: inherit; font-weight: inherit; line-height: 1; }
.header__logo a { display: flex; align-items: center; gap: 16px; }
.header__logo img { height: 42px; width: auto; flex-shrink: 0; }
.header__site { font-family: var(--font-en); font-size: 16px; color: #fff; }

.btn-entry {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 42px; border-radius: 999px;
  background: var(--red); color: #fff; border: none;
  font-family: var(--font-en); font-size: 16px;
  transition: background .2s, color .2s;
}
/* hero 上（ENTRYボタン）: hover→白背景・白枠・赤文字 */
.btn-entry:hover { background: #fff; color: var(--red); }
/* ヘッダー背景あり（ENTRYボタン2）: hover→白背景・赤枠・赤文字 */

/* ===================== Nav (右からスライドするドロワー) ===================== */
.header__nav {
  position: fixed; top: 0; right: 0;
  width: min(430px, 100%); height: 100%;
  background: #202020;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: -1;
}
.header__nav.is-open { transform: translateX(0); }
.nav__list { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 90px 30px 50px; }
.nav__item > a {
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px;
  padding: 14px 0px;
  font-size: 22px; font-weight: 500; color: #fff;
  border-bottom: 1px solid #333;
}
.nav__en { font-family: var(--font-en); font-size: 14px; font-weight: 400; color: var(--red); }
/* メニュー下部リンク（footer__nav と同デザイン・左寄せ） */
.nav__item--links { margin-top: 24px; }
.nav__links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; color: #fff; }
.nav__links a { display: inline-flex; align-items: center; color: #fff; transition: opacity .2s; }
.nav__links a:hover { opacity: .8; }
.nav__ext { display: inline-block; width: 11px; height: 11px; margin-left: 8px; }

/* Hamburger button — matches Figma「ハンバーガー」object (59×39 pill + staggered red bars) */
.btn-menu { display: block; width: 59px; height: 39px; flex-shrink: 0; margin-left: 24px; padding: 0; background: none; border: 0; cursor: pointer; line-height: 0; }
.btn-menu__icon { display: block; width: 100%; height: 100%; }
.btn-menu__icon--close { display: none; }
.btn-menu[aria-expanded="true"] .btn-menu__icon--bars { display: none; }
.btn-menu[aria-expanded="true"] .btn-menu__icon--close { display: block; }

/* ロールオーバー：上下の線が左右にスライド移動（デフォルト↔バリアント2） */
.btn-menu__pill { }
.btn-menu__bar { transform-box: view-box; transition: transform .3s ease; }
.btn-menu:hover .btn-menu__bar--top { transform: translateX(-9px); }
.btn-menu:hover .btn-menu__bar--bot { transform: translateX(9px); }
/* hero 上は枠なし（#ebf1f1）／ヘッダー背景あり時は「ハンバーガー2」の赤枠 */

/* ===================== Hero ===================== */
.hero { position: relative; height: 100vh; margin-top: -89px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }

/* ===================== Slideshow (Figma Component 7/8) ===================== */
/* 3枚をクロスフェードで巡回。JS が .is-active を付け替える */
.slideshow { position: absolute; inset: 0; overflow: hidden; }
.slideshow__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.slideshow__slide.is-active { opacity: 1; }
/* hero-3 のみ上端揃え（footer も hero 画像を共用） */
.slideshow__slide[src*="hero-3"] { object-position: top; }
.hero__inner {
  position: relative; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start; height: 100%;
  max-width: none; /* container の max-width を解除して全幅 */
  padding-bottom: 100px; /* 左下に固定 */
}
/* accent + title + en は1セット。accent は container 左端基準（1280以下は画面端、超えると左に余白） */
.hero__accent {
  position: absolute; left: 0; bottom: 100px; /* hero 下端から100px、上へ伸びる */
  width: 14px; height: 340px; background: linear-gradient(to bottom, #E83E34, #82231D);
}
.hero__title {
  font-size: 60px; font-weight: 700; line-height: 1.15; color: #fff;
  text-shadow: 0 4px 4px rgba(0,0,0,.25);
}
.hero__en {
  margin-top: 24px; font-family: var(--font-en); font-size: 20px; letter-spacing: 1px;
  color: #fff; text-shadow: 0 4px 4px rgba(0,0,0,.25);
}
/* PC: SVG を画面左端0に固定・画面幅5%でレスポンシブ。テキスト構成は非表示 */
.hero__txt {
  position: absolute; left: 0; bottom: 80px; z-index: 1;
  width: calc(480px + 8vw); height: auto;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.25));
}
/* 画面高さ500px未満：上端を500px時の位置に固定し、下端を画面外へ隠す（画像高=(480px+8vw)*340/568=287.32px+4.79vw） */
@media (max-height: 500px) {
  .hero__txt { top: calc(132.68px - 4.79vw); bottom: auto; }
}
.hero__inner .hero__accent,
.hero__inner .hero__title,
.hero__inner .hero__en { display: none; }
.hero__tab {
  position: fixed; right: 0; bottom: 40px; z-index: 40; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 198px; background: #fff; border-radius: 4px 0 0 4px;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,.25); transition: background .2s;
}
.hero__tab span {
  writing-mode: vertical-rl; font-family: var(--font-en); font-size: 16px; color: var(--red); transition: color .2s;
}
/* ロールオーバー（Group 65）: hover→赤背景・白文字 */
.hero__tab:hover { background: var(--red); }
.hero__tab:hover span { color: #fff; }

/* ===================== Section / Heading ===================== */
.section { padding: 100px 0; }
.section--dark { background: var(--dark); }
.section--red { background: var(--red); }
.section--light { background: var(--light); }
.section--staff { padding: 80px 0 120px; }
.section--values { padding: 40px 0 120px; }
.section--env { padding: 0 0 120px; }
.section--req { padding: 120px 0 0; }

/* 設計図 1 blueprint overlay (company / services / staff) — 背景色の上に15%で固定・中央上端・リピート */
.section--blueprint { position: relative; }
.section--blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/blueprint.png");
  background-repeat: repeat;
  background-position: top center;
  background-attachment: fixed;
  opacity: .15;
  pointer-events: none;
  z-index: 0;
}
.section--blueprint > .container,
.section--blueprint > .marquee__track { position: relative; z-index: 1; }
/* 車マーキー: blueprint は赤背景部分のみ。下端の道路(可変高さ)には重ねない */
.marquee--cars.section--blueprint::before { bottom: var(--road-h); }

.heading { margin-bottom: 40px; }
.heading__en { font-family: var(--font-en); font-weight: 600; font-size: 16px; letter-spacing: .8px; color: var(--red); }
.heading__ja { font-family: var(--font-ja); font-weight: 700; font-size: 53px; line-height: 1; margin-top: 12px; }
.heading--light .heading__ja { color: #fff; }
/* 赤背景（serviceセクション）の EN は白 */
.section--red .heading__en { color: #fff; }
.heading--dark .heading__ja { color: var(--dark); }

/* ===================== Company ===================== */
#company { padding-top: 150px; }
.company__lead { position: relative; display: inline-block; }
.company__lead::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 659px; max-width: 100%; height: 50px;
  background: linear-gradient(to right, var(--red), var(--navy));
}
.company__lead-title { position: relative; padding: 8px 0 8px 12px; font-size: 32px; font-weight: 700; line-height: 1.2; color: #fff; }
.company__text { margin-top: 24px; max-width: 1086px; font-size: 16px; line-height: 32px; color: #fff; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 40px; margin-top: 80px; }
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature__circle {
  display: flex; align-items: center; justify-content: center;
  width: 215px; height: 215px; border-radius: 50%; background: rgba(255,255,255,.95);
}
.feature__circle img { width: 215px; height: 215px; object-fit: contain; }
.feature__title { margin-top: 24px; font-size: 20px; font-weight: 700; line-height: 30px; color: #fff; }
.feature__rule { display: block; width: 36px; height: 3px; margin: 12px 0 26px; background: #E83E34; }
.feature__desc { font-size: 16px; line-height: 30px; color: #fff; text-align: left; padding: 0px 24px 0px; }

/* ===================== Services ===================== */
.services { display: flex; flex-direction: column; gap: 30px; margin-top: 32px; }
.service {
  position: relative; display: flex; height: 218px; overflow: hidden;
  background: var(--light); border-radius: 4px; box-shadow: 0 3px 4px 0 rgba(0,0,0,.25);
}
.service__img { width: 342px; height: 100%; flex-shrink: 0; object-fit: cover; }
.service__body { display: flex; flex-direction: column; justify-content: center; padding: 0 56px; }
.service__title { position: relative; padding-left: 14px; font-size: 30px; font-weight: 700; color: var(--dark); }
/* 先頭のワンポイント縦ライン：太さ3px・高さ23px・#004384・文字高さ中央 */
.service__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 23px; background: #004384;
}
.service__desc { margin-top: 8px; max-width: 661px; font-size: 16px; line-height: 30px; color: var(--ink); }
.service__no { position: absolute; right: 20px; bottom: 20px; font-family: var(--font-en); font-weight: 600; font-size: 16px; color: var(--navy); }

/* ===================== Marquee ===================== */
.marquee { overflow: hidden; }
/* 車マーキー: ベースは赤、下端に道路グラフィック(Figma Group 67)をx軸リピート。
   道路高さは固定でなくビューポート幅に追従（1280px時≈86px＝車の半分弱）。clampで上下限を制御 */
.marquee--cars {
  padding: 0;
  --road-h: clamp(48px, 6.72vw, 104px);
  background-color: var(--red);
  background-image: url(assets/group67.png);
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: auto var(--road-h);
}
.marquee--text { background: var(--dark); padding: 100px 0; }
.marquee__track { display: flex; align-items: center; gap: 40px; width: max-content; animation: marquee 30s linear infinite; }
.marquee__track img { width: 209px; height: 209px; flex-shrink: 0; object-fit: contain; }
.marquee__track--text {
  gap: 0; font-family: var(--font-en); font-weight: 500; font-size: 150px; line-height: 1;
  letter-spacing: 1.68px; color: #fff; white-space: nowrap; animation-duration: 45s;
}
.sanics-word { margin: 0 32px; flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===================== Staff / Interviews ===================== */
.interviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 41px; margin-top: 32px; }
.interview { position: relative; height: 447px; overflow: hidden; border-radius: 4px; }
.interview__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
/* hover で画像を110%拡大（li の overflow:hidden でクリップ） */
.interview:hover .interview__img { transform: scale(1.05); }
/* 右下18pxの矢印ピル（Figma Component 13→14）。hoverで薄グレー+赤矢印→赤背景+白矢印 */
.interview__arrow {
  position: absolute; right: 18px; bottom: 18px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 45px; height: 26px; border-radius: 13px;
  background: #ebf1f1; color: var(--red);
  transition: background .3s, color .3s;
}
.interview__arrow svg { display: block; width: 18px; height: 10px; }
.interview:hover .interview__arrow { background: var(--red); color: #fff; }
.interview__tab {
  position: absolute; right: 0; top: 0; display: flex; align-items: center; justify-content: center;
  width: 29px; height: 108px; background: var(--light); border-radius: 0 0 0 14px;
}
.interview__tab span { writing-mode: vertical-rl; font-family: var(--font-en); font-weight: 500; font-size: 14px; letter-spacing: .7px; color: var(--red); }
.interview__overlay { position: absolute; inset: auto 0 0 0; padding: 16px; }
.interview__quote { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-left: -16px; font-size: 20px; font-weight: 700; color: #fff; }
.interview__quote span { padding: 2px 8px; line-height: 30px; background: linear-gradient(to right, var(--red), var(--navy)); }
.interview__meta { margin-top: 12px; display: flex; align-items: center; gap: 12px; font-size: 16px; color: #fff; }
.interview { cursor: pointer; }
.interview:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ===================== Interview Modal (Figma Frame 69) ===================== */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 170; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
/* 枠線は border ではなく2枚レイヤー重ねで表現。
   下layer(.modal__dialog): -30度回転グラデ（左上 #E83E34 → 右下 #004384）/ 上layer(.modal__inner): 7px内側・背景 #EBF1F1
   ※CSSの-30degは開始色が右下に来るため、左上赤/右下青にするには色順を反転して記述している */
.modal__dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(1017px, 92vw); max-height: 90vh; display: flex;
  padding: 7px;
  background: linear-gradient(-30deg, #004384, #E83E34);
}
.modal__inner {
  flex: 1; min-height: 0; overflow-y: auto;
  background: #EBF1F1;
  padding: 48px 76px;
}
.modal__grid { display: grid; grid-template-columns: 350px 1fr; gap: 42px; align-items: start; }
.modal__media { position: relative; border-radius: 4px; overflow: hidden; }
.modal__img { width: 100%; height: auto; aspect-ratio: 384 / 294; object-fit: cover; }
.modal__quote {
  position: absolute; left: 0; bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.modal__quote span {
  padding: 6px 11px; font-size: 18px; font-weight: 700; line-height: 30px; color: #fff;
  background: linear-gradient(to right, var(--red), var(--navy));
}
.modal__meta { margin-top: 16px; display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--ink); }
.modal__en { margin-bottom: 20px; font-family: var(--font-en); font-weight: 500; font-size: 24px; letter-spacing: 1.2px; color: var(--red); }
.modal__text p { font-size: 16px; line-height: 28px; color: var(--ink); }
.modal__text p + p { margin-top: 20px; }
.modal__close {
  display: block; margin: 32px auto 0; height: 42px; padding: 0 28px;
  background: var(--light); border: 1px solid var(--red); border-radius: 21px;
  font-family: var(--font-en); font-size: 16px; color: var(--red); cursor: pointer;
  transition: background .2s, color .2s;
}
.modal__close:hover { background: var(--red); color: #fff; }

/* ===================== What we look for ===================== */
.values__head { text-align: center; }
.values__title { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 16px; font-size: 40px; font-weight: 700; color: #fff; }
/* Group 66: 両端の記号を上開きの斜線（左「\」/ 右「/」）に。右は左をミラー。線色は白（テキストと同色） */
.chevron { width: 24px; height: 36px; fill: none; }
.chevron path { stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chevron--right { transform: scaleX(-1); }

.personas { display: flex; flex-direction: column; gap: 39px; margin-top: 64px; }
.persona { position: relative; display: flex; align-items: center; justify-content: center; }
.persona__circle {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 118px; height: 118px; flex-shrink: 0; overflow: hidden; border-radius: 50%;
  background: var(--red); box-shadow: 0 3px 4px 0 rgba(0,0,0,.25);
}
.persona__circle img { width: 85px; height: 85px; object-fit: contain; }
.persona__card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; max-width: 920px; min-height: 118px; margin-left: -59px; padding: 20px 32px 20px 80px; text-align: center;
  background: var(--light); border-radius: 4px; box-shadow: 0 3px 4px 0 rgba(0,0,0,.25);
}
.persona__title { font-size: 24px; font-weight: 700; line-height: 36px; color: var(--red); }
.persona__desc { margin-top: 4px; font-size: 18px; font-weight: 700; line-height: 36px; color: var(--ink); }

/* ===================== Environment ===================== */
#environment { padding-bottom: 0; }
.env__card {
  background: var(--light); border-radius: 0 7px 7px 0;
  margin-left: calc(50% - 50vw);
  margin-right: 0;
  padding: 100px 60px 100px calc(50vw - 50%);
}
.env__text { font-size: 16px; line-height: 32px; color: var(--ink); }
.env__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.env__photos img { width: 100%; height: 210px; object-fit: cover; border-radius: 4px; }
.env__caption { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; color: var(--ink); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ===================== Requirements ===================== */
.req-table { width: 100%; border-collapse: collapse; text-align: left; border-radius: 7px; overflow: hidden; }
.req-table tr:last-child td { border-bottom: 0; }
.req-table th {
  width: 212px; padding: 24px 32px; vertical-align: middle; text-align: center;
  background: var(--red); color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .18px;
}
.req-table td {
  padding: 24px 32px; vertical-align: middle; background: #fff; color: var(--ink);
  font-size: 16px; line-height: 27px; letter-spacing: .16px; border-left: 1px solid var(--line);
  border-bottom: 1px solid #D9D9D9; white-space: pre-line;
}
.req-table tr + tr th, .req-table tr + tr td { border-top: 1px solid #fff; }

/* ===================== Entry Form ===================== */
.entry__lead { margin-bottom: 32px; font-size: 16px; line-height: 32px; color: var(--ink); }
.form { padding: 30px 30px 0; overflow: hidden; background: #fff; border-radius: 7px; }
/* form__row 全体をボーダーで囲み、先頭行の上端・末尾行の下端を角丸に（overflow hiddenでクリップ） */
.form__rows { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
/* 区切り線はセル単位。label部の下線のみ #fff、control部は通常の線色 */
.form__row { display: flex; }
.form__row:last-of-type .form__label,
.form__row:last-of-type .form__control { border-bottom: 0; }
.form__label {
  display: flex; align-items: center; width: 355px; flex-shrink: 0;
  padding: 20px 32px; background: #E4E4E4; border-bottom: 1px solid #fff;
  font-size: 18px; font-weight: 700; letter-spacing: .18px; color: var(--ink);
}
.req { margin-left: 12px; color: var(--red); }
.form__control { display: flex; align-items: center; flex: 1; padding: 16px 32px; border-bottom: 1px solid var(--line); }
.form__control input[type="text"],
.form__control input[type="email"],
.form__control input[type="tel"] {
  width: 100%; max-width: 651px; height: 49px; padding: 0 16px; border: 0; border-radius: 4px;
  background: var(--light); font-size: 16px; color: var(--ink); font-family: var(--font-ja);
}
.form__control input.is-half { max-width: 324px; }
.form__control textarea {
  width: 100%; max-width: 651px; padding: 16px; border: 0; border-radius: 4px;
  background: var(--light); font-size: 16px; color: var(--ink); font-family: var(--font-ja); resize: vertical;
}
.form__control ::placeholder { color: var(--placeholder); }
.form__control input:focus, .form__control textarea:focus { outline: 2px solid rgba(232,62,52,.4); }
.form__control--radios { gap: 40px; }
.radio, .checkbox { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--ink); cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--red); }
.checkbox input { width: 24px; height: 24px; accent-color: var(--red); }
.form__submit { display: flex; justify-content: center; padding: 48px 0; }
.btn-submit {
  height: 46px; padding: 0 48px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: var(--font-ja); transition: opacity .2s;
}
.btn-submit:hover { opacity: .9; }

/* ===================== AForm (formcontents.html) ===================== */
#aform-3 { padding: 30px 30px 0; overflow: hidden; background: #fff; border-radius: 7px; }
.aform-header { display: none; }
.aform-checking { display: none !important; }

.aform-content dl { display: flex; margin: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.aform-content dl:first-of-type { border-top: 1px solid var(--line); border-radius: 7px 7px 0 0; overflow: hidden; }
.aform-content dl:last-of-type { border-bottom: 1px solid var(--line); border-radius: 0 0 7px 7px; overflow: hidden; }
.aform-content dl:last-of-type dt,
.aform-content dl:last-of-type dd { border-bottom: 0; }
.aform-content dt {
  display: flex; align-items: center; width: 355px; flex-shrink: 0;
  padding: 20px 32px; background: #E4E4E4; border-bottom: 1px solid #fff;
  font-size: 18px; font-weight: 700; letter-spacing: .18px; color: var(--ink); margin: 0;
}
.aform-content dd {
  display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 8px;
  padding: 16px 32px; border-bottom: 1px solid var(--line); margin: 0;
}
.aform-required { font-size: 0; }
.aform-required::before { content: "●"; margin-left: 12px; color: var(--red); font-size: 14px; font-weight: 700; }

.aform-input[type="text"],
.aform-input[type="email"],
.aform-input[type="tel"] {
  width: 100%; max-width: 651px; height: 49px; padding: 0 16px; border: 0; border-radius: 4px;
  background: var(--light); font-size: 16px; color: var(--ink); font-family: var(--font-ja);
}
.aform-input.aform-textarea {
  width: 100%; max-width: 651px; padding: 16px; border: 0; border-radius: 4px;
  background: var(--light); font-size: 16px; color: var(--ink); font-family: var(--font-ja); resize: vertical;
}
.aform-input.aform-calendar {
  height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--light); font-size: 16px; color: var(--ink); font-family: var(--font-ja);
}
.aform-input[type="radio"] { width: 20px; height: 20px; accent-color: var(--red); }
.aform-input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--red); }
.aform-input:focus { outline: 2px solid rgba(232,62,52,.4); }

.aform-name-ul, .aform-kana-ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; align-items: center; width: 100%;
}
.aform-name-ul li, .aform-kana-ul li { display: flex; align-items: center; gap: 8px; flex: 1; }
.aform-name-ul li label, .aform-kana-ul li label { font-size: 14px; color: var(--ink); white-space: nowrap; }
.aform-name-ul input, .aform-kana-ul input { flex: 1; max-width: none !important; }

.aform-radio-ul, .aform-checkbox-ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 40px; flex-wrap: wrap; align-items: center;
}
.aform-radio-ul li, .aform-checkbox-ul li { display: flex; align-items: center; gap: 12px; }
.aform-radio-ul label, .aform-checkbox-ul label { font-size: 16px; color: var(--ink); cursor: pointer; }

.aform-input-example { font-size: 13px; color: var(--placeholder); width: 100%; }
.aform-error { font-size: 13px; color: var(--red); width: 100%; min-height: 0; }

.aform-button-area { display: flex; justify-content: center; padding: 48px 0; }
.aform-button-area input[type="submit"] {
  height: 46px; padding: 0 48px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: var(--font-ja); transition: opacity .2s;
}
.aform-button-area input[type="submit"]:hover { opacity: .9; }

/* ===================== Footer ===================== */
.footer { position: relative; height: 499px; overflow: hidden; }
.footer__bg { position: absolute; inset: 0; }
.footer__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(32,32,32,.6), rgba(66,66,66,.6)); }
.footer__inner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 0 50px 20px; }
.footer__top { display: flex; align-items: flex-end; justify-content: space-between; }
.footer__title { font-size: 60px; font-weight: 700; line-height: 1.3; color: #fff; text-shadow: 0 4px 4px rgba(0,0,0,.25); }
.footer__en { margin-top: 24px; font-family: var(--font-en); font-weight: 500; font-size: 20px; letter-spacing: 1px; color: #fff; text-shadow: 0 4px 4px rgba(0,0,0,.25); }
.footer__right { display: flex; flex-direction: column; align-items: flex-end; }
.footer__nav { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 14px; color: #fff; }
.footer__nav a { display: inline-flex; align-items: center; transition: opacity .2s; }
.footer__nav a:hover { opacity: .8; }
.footer__ext { display: inline-block; width: 11px; height: 11px; margin-left: 8px; }
.footer__copy { margin-top: 8px; text-align: right; font-size: 14px; color: #fff; }

/* ===================== Tablet (640–1023px) ===================== */
@media (min-width: 640px) and (max-width: 1023px) {
  /* タブレットは基本PCレイアウト維持。service画像のみ幅を狭める */
  .service__img { width: 240px; }
  /* feature__circle はカラム幅に追従して縮小（3つが画面幅を超えないように） */
  .feature__circle { width: 100%; max-width: 215px; height: auto; aspect-ratio: 1 / 1; }
  .feature__circle img { width: 100%; height: 100%; }
  .modal__grid { grid-template-columns: 260px 1fr; }
}

/* ===================== Mobile / Tablet (≤1023px) ===================== */
@media (max-width: 1023px) {
  .container { padding: 0 20px; }


  .header__row { height: 60px; padding: 0 16px; }
  .header__logo a { flex-direction: column; align-items: flex-start; gap: 2px; }
  .header__logo img { height: 28px; width: auto; }
  .header__site { display: block; font-size: 12px; line-height: 1.2; }
  .btn-entry { display: none; }
  .btn-menu { margin-left: 16px; }


  .hero { height: 100vh; margin-top: -76px; }
  .hero__inner { padding: 0 10px 90px 30px; }
  /* SP: SVG は非表示、従来のテキスト構成に戻す */
  .hero__txt { display: none; }
  .hero__inner .hero__accent,
  .hero__inner .hero__title,
  .hero__inner .hero__en { display: block; }
  .hero__accent { bottom: 60px; width: 10px; height: 240px; }
  .hero__title { font-size: 40px; }
  .hero__en { font-size: 16px; }
  .hero__tab { display: none; }

  .section { padding: 64px 0; }
  #company { padding-top: 64px; } /* SP は標準 section padding に統一 */
  .section--staff { padding: 48px 0 64px; }
  .section--values { padding: 40px 0 64px; }
  .section--env { padding: 0 0 64px; }
  .section--req { padding: 64px 0 0; }
  .heading__ja { font-size: 34px; }

  .company__lead::before { height: 100%; }
  .company__lead-title { font-size: 22px; }

  .marquee__track img { width: 120px; height: 120px; gap: 24px; }
  .marquee__track { gap: 24px; }
  .marquee__track--text { font-size: 56px; gap: 0; }

  .values__title { gap: 12px; font-size: 22px; }
  .personas { gap: 24px; margin-top: 48px; }
  .persona__circle { width: 80px; height: 80px; }
  .persona__circle img { width: 48px; height: 48px; }
  .persona__card { margin-left: -40px; min-height: 80px; padding: 16px 16px 16px 52px; }
  .persona__title { font-size: 18px; line-height: 28px; }
  .persona__desc { font-size: 15px; line-height: 26px; }

  .env__card { margin-right: 0; padding: 40px 24px 40px calc(50vw - 50% + 24px); }

  /* Requirements table → stacked */
  .req-table, .req-table tbody, .req-table tr, .req-table th, .req-table td { display: block; width: 100%; }
  .req-table th { padding: 16px 24px; font-size: 16px; text-align: left; }
  .req-table td { padding: 16px 24px; border-left: 0; }
  .req-table tr + tr th { border-top: 1px solid #fff; }
  .req-table tr + tr td { border-top: 0; }

  /* Form → stacked */
  .form__row { flex-direction: column; }
  .form__label { width: 100%; }
  .form__control--radios { flex-wrap: wrap; gap: 8px 40px; }
  /* AForm → stacked */
  .aform-content dl { flex-direction: column; }
  .aform-content dt { width: 100%; }
  .aform-name-ul, .aform-kana-ul { flex-direction: column; align-items: stretch; }
  .aform-name-ul li, .aform-kana-ul li { flex-direction: column; align-items: flex-start; }
  .aform-name-ul .aform-input[type="text"], .aform-kana-ul .aform-input[type="text"] { width: 100%; height: 49px; padding: 12px 16px; }
  .aform-radio-ul, .aform-checkbox-ul { gap: 8px 40px; }

  .footer { height: auto; min-height: 420px; }
  .footer__inner { min-height: 420px; padding: 0 20px 30px; }
  .footer__top { flex-direction: column; align-items: flex-start; gap: 30px; }
  .footer__title { font-size: 40px; }
  .footer__en { margin-top: 12px; font-size: 16px; }
  .footer__right { align-items: flex-start; }
  .footer__nav { align-items: flex-start; }
  .footer__copy { text-align: left; font-size: 13px; }
}

/* ===================== Phone only (≤639px) ===================== */
/* services / staff はタブレットではPCレイアウトを維持し、スマホでのみ折返す */
@media (max-width: 639px) {
  .services { margin-top: 24px; }
  .service { flex-direction: column; height: auto; }
  .service__img { width: 100%; height: 180px; }
  .service__body { padding: 24px 24px 48px; }
  .service__title { font-size: 22px; }

  .interviews { grid-template-columns: 1fr; gap: 32px; }
  .features { grid-template-columns: 1fr; gap: 48px; margin-top: 56px; }
  .env__photos { grid-template-columns: 1fr; gap: 32px; }

  .modal__inner { padding: 32px 20px; }
  .modal__grid { grid-template-columns: 1fr; gap: 24px; }

  .persona { flex-direction: column; align-items: center; }
  .persona__circle { margin-bottom: -40px; } /* circle 80px の半分 = card 上辺に50%重なり */
  .persona__card { margin-left: 0; width: 100%; padding: 56px 20px 24px; min-height: auto; align-items: flex-start; text-align: left; }

  #aform-3 { padding: 10px 10px; }
  .aform-content dt { padding: 10px 10px; }
  .aform-content dd { padding: 10px 10px; }
}
