/* ============================================================
   SP版レイアウト（900px以下）

   PC版は 1920px のデザインを画面幅に比例縮小しているだけなので、
   375px では本文30px が 5.9px まで縮んで読めない。SP は別物として組む。

   ■ 前回の失敗と、その反省
     クラス名のホワイトリストで position:static を当て、DOM順に流していた。
     (a) 挙げ忘れたクラスが PC座標のまま取り残される（.foot を忘れて
         フッター下に2万pxの空白ができた）
     (b) XD は「同種要素をまとめて書き出す」ので DOM順＝読み順ではない
         （VALUE が「挑 自 リ 戦 責自走 スペクト」と読めていた）
     という2点で原理的に破綻していた。

   ■ 今回の方針
     ・リセットは :where(*) で全子孫に効かせる（挙げ忘れが起きない）
     ・並び順は HTML の data-o と CSS の order で作る（DOMは動かさない）
     ・トーンは縮めるのではなく振り切る。巨大英字は裁ち落とし、
       写真と色面はフルブリード、流れる写真帯は残す

   ■ PC版には一切影響しない（全部このメディアクエリの中）
   ============================================================ */

@media (max-width: 900px) {

/* ------------------------------------------------------------
   1. トークン
   ------------------------------------------------------------ */
:root {
  /* 文字（1系統に統一。以前は13種類のサイズが場当たりに混在していた） */
  --sp-display:   6.4rem;   /* Anton の巨大英字。主役なので縮めない */
  --sp-eyebrow:   1.2rem;   /* 和文ラベル */
  --sp-statement: 2.6rem;   /* セクションの主張文 */
  --sp-lead:      1.7rem;
  --sp-body:      1.5rem;   /* これを下回らない */
  --sp-caption:   1.2rem;

  /* 余白（6段のみ） */
  --s1: 0.8rem; --s2: 1.6rem; --s3: 2.4rem;
  --s4: 4rem;   --s5: 6.4rem; --s6: 9.6rem;

  --sp-pad: 2rem;           /* 文字の左右余白。写真と色面は 0 */
}

html { font-size: 10px; }
body { overflow-x: hidden; }

/* ------------------------------------------------------------
   2. 土台：絶対配置をやめる
   ホワイトリストではなく全子孫。挙げ忘れが起きない。
   ------------------------------------------------------------ */
.page:has(.sec) { position: static; width: auto; height: auto; margin: 0; }
body:has(.sec) .body-layer { position: static; width: auto; top: auto; }
body:has(.sec) .kv { position: relative; }

.sec, .sec :where(*) {
  position: static;
  left: auto; top: auto; right: auto; bottom: auto;
  width: auto; height: auto; max-width: 100%;
  margin: 0;
}
/* 詳細度 (0,3,0) の .a.r.dl / .a.c.dl に勝つ必要がある */
.sec :where(.a, .a.r, .a.c, .a.r.dl, .a.c.dl, .b, .ol, .card, .fill, .rule) {
  transform: none; translate: none; scale: none;
}
.sec .a { white-space: normal; text-align: left; }
.sec .a.w { white-space: pre-line; }   /* 空行で段落を作っている本文だけ改行を残す */
.sec img { max-width: 100%; }

/* SPで出さないもの：PC専用の骨組みと、狭い画面で邪魔になる装飾 */
.sec :where(.tick, .dots, .tri, .rule, .card.pill, .value-plate, .flow__arrow),
.sec .u--rail,
.sec .fill.bleed-x, .sec .fill.bleed-l, .sec .fill.bleed-r,
.sec .card.rad10,
.sec--copy .clip-x { display: none; }

/* ------------------------------------------------------------
   3. セクションとユニット
   ------------------------------------------------------------ */
.sec {
  display: flow-root;
  padding: var(--s6) 0;
  background: var(--base);
  overflow: hidden;              /* 裁ち落とした見出しの横あふれを切る */
}
.sec > * { padding-inline: var(--sp-pad); }
.sec > * + * { margin-top: var(--s5); }

.u { display: flex; flex-direction: column; padding-inline: var(--sp-pad); }
.sec > .u { padding-inline: 0; }
.u > * { padding-inline: var(--sp-pad); }
.u > * + * { margin-top: var(--s3); }

/* 並び順は data-o で指定（DOMは動かさない） */
.sec [data-o]      { order: 99; }
[data-o="1"]{order:1}  [data-o="2"]{order:2}  [data-o="3"]{order:3}
[data-o="4"]{order:4}  [data-o="5"]{order:5}  [data-o="6"]{order:6}
[data-o="7"]{order:7}  [data-o="8"]{order:8}  [data-o="9"]{order:9}
[data-o="10"]{order:10} [data-o="11"]{order:11} [data-o="12"]{order:12}
[data-o="13"]{order:13} [data-o="14"]{order:14}

/* ------------------------------------------------------------
   4. 文字
   ------------------------------------------------------------ */
.sec .a {
  font-size: var(--sp-body); line-height: 2;
  letter-spacing: .02em; font-weight: 400; color: var(--ink-3);
}
.sec .a span { font-size: inherit !important; line-height: inherit; }
.sec .a span.mi { font-family: var(--mincho); font-weight: 800; }

/* 巨大英字。左端まで裁ち落とす。これがこのサイトの主役 */
.sec .a.dl {
  font-family: var(--display); font-weight: 400;
  font-size: var(--sp-display); line-height: .95;
  letter-spacing: -.02em; color: var(--red);
  margin-inline-start: calc(var(--sp-pad) * -1 - .4rem);
  padding-inline: 0; padding-inline-start: var(--sp-pad);
}
/* 見出し直下の和文ラベル */
.sec .a.r.disp, .sec .a.disp:not(.dl) {
  font-size: var(--sp-eyebrow); font-weight: 700;
  letter-spacing: .18em; line-height: 1.4; color: var(--red);
  margin-top: var(--s2);
}
.sec .a.w7, .sec .a.w8, .sec .a.w9 { font-weight: 700; }
.sec h3.a.w7 { font-size: var(--sp-statement); line-height: 1.65; color: var(--ink); }
.sec .a.w8   { font-size: var(--sp-lead); line-height: 1.9; }

/* アウトライン文字（VISION / MISSION / VALUE のラベル、フッターのリンク） */
.sec .ol { display: block; }
.sec .ol svg { width: auto; height: 1.8rem; display: block; }

/* ------------------------------------------------------------
   5. 写真：全部フルブリード（左右の余白を切らない）
   ------------------------------------------------------------ */
.sec .b {
  display: block; padding-inline: 0;
  width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
}
.sec .b > img { width: 100%; height: 100%; object-fit: cover; }

/* 流れる写真帯は残す。横に流れる帯は縦スクロールのSPでこそ効く */
.sec .clip-x.strip {
  display: block; position: relative; padding-inline: 0;
  width: 100%; height: 12rem; overflow: hidden;
}
.sec .strip__track {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; opacity: .3;
}
.sec .strip__track img {
  flex: none; width: 18rem; height: 12rem; margin-right: .6rem; object-fit: cover;
}

/* ------------------------------------------------------------
   6. ヘッダー
   ------------------------------------------------------------ */
.head-abs { position: fixed; left: 0; width: 100%; height: 5.6rem; }
.head-shift { position: static; width: auto; height: 100%; translate: none; }
.head-bar { position: absolute; left: 0; top: 0; width: 100%; height: 5.6rem;
            border-radius: 0; opacity: .95; }
.head-abs .ol, .head-abs .head__btn { display: none; }
/* 「RECRUIT SITE」はPC座標のまま残るとヘッダー帯の外に浮く。
   56pxの帯にロゴと並べる余地は無いので、SPでは出さない */
.head-abs .a { display: none; }
.head-abs, .head-abs--top { color: var(--red); }
.head-abs--top .head-bar { opacity: .95; }
.head-abs--top .logo-swap__on-kv  { opacity: 0; }
.head-abs--top .logo-swap__on-bar { opacity: 1; }
.head-abs .logo-swap {
  position: absolute; left: var(--sp-pad); top: 1.2rem;
  width: 9.6rem; height: 3.2rem;
}
.head-abs .logo-swap img { position: absolute; inset: 0; width: 100%; height: auto; }
.burger {
  position: absolute; right: 1rem; top: 0;
  width: 4.4rem; height: 5.6rem;
  display: grid; align-content: center; justify-items: center;
}
.burger i { width: 2.2rem; height: .2rem; margin-bottom: .6rem; }
.burger i:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   7. FV
   ------------------------------------------------------------ */
body:has(.sec) .kv { height: 72svh; min-height: 44rem; }
body:has(.sec) .fv-text {
  position: absolute; top: 0; left: 0; right: 0; bottom: auto;
  height: 72svh; min-height: 44rem;
  display: grid; align-content: end; justify-items: center;
  padding: 0 var(--sp-pad) var(--s4); pointer-events: none;
}
body:has(.sec) .fv-text .b {
  order: 1; position: static; width: 90%; height: auto;
  aspect-ratio: auto; margin: 0;
}
body:has(.sec) .fv-text .b img { position: static; width: 100%; height: auto; }
body:has(.sec) .fv-text .a.kv-recruit {
  order: 2; position: static; display: block; text-align: center;
  font-size: 3.4rem; line-height: 1; letter-spacing: 0;
  transform: none; translate: none; margin-top: var(--s1);
}

} /* @media */
