/* ============================================================
   HOME (front page) specific styles
   ============================================================ */

/* ---- Hero ---- */
.hero{position:relative;background:#fff}
.hero__grid{display:grid;grid-template-columns:1fr 2fr;gap:22px;min-height:390px}
.hero__left,.hero__right{position:relative;overflow:hidden;background:#e9e9e9}
.hero__left img,.hero__right img{width:100%;height:100%;object-fit:cover;display:block}
.hero__copy{position:absolute;left:27%;top:50%;transform:translateY(-50%);z-index:3}
.hero__copy .en{display:flex;flex-direction:column;align-items:flex-start;gap:7px;margin:0 0 6px}
.hero__copy .en span{
  background:#fff;color:var(--ink);font-family:var(--font-en);font-weight:400;
  font-size:clamp(38px,5.4vw,66px);line-height:1;padding:5px 14px;letter-spacing:.01em;
}
.hero__copy .jp{
  display:inline-block;background:#fff;color:var(--ink);
  font-size:13px;letter-spacing:.08em;padding:8px 14px;margin-top:4px;
}
.br-sp{display:none}
.sp-br{display:none}

/* ---- ヒーロー：モダンな表示アニメ（画像の初期リビール＋ゆっくりケンバーンズ／コピーのスライドイン） ---- */
@keyframes knd-hero-reveal{from{opacity:0;-webkit-clip-path:inset(0 0 14% 0);clip-path:inset(0 0 14% 0)}to{opacity:1;-webkit-clip-path:inset(0 0 0 0);clip-path:inset(0 0 0 0)}}
@keyframes knd-kenburns-l{from{transform:scale(1)}to{transform:scale(1.09)}}
@keyframes knd-kenburns-r{from{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes knd-hero-copy{from{opacity:0;transform:translateY(34px)}to{opacity:1;transform:none}}
.hero__left{animation:knd-hero-reveal 1.1s cubic-bezier(.2,.7,.2,1) both}
.hero__right{animation:knd-hero-reveal 1.1s .18s cubic-bezier(.2,.7,.2,1) both}
.hero__left img{animation:knd-kenburns-l 22s ease-in-out infinite alternate;will-change:transform}
.hero__right img{animation:knd-kenburns-r 26s ease-in-out infinite alternate;will-change:transform}
.hero__copy .en span{opacity:0;animation:knd-hero-copy .85s cubic-bezier(.2,.7,.2,1) forwards}
.hero__copy .en span:nth-child(1){animation-delay:.5s}
.hero__copy .en span:nth-child(2){animation-delay:.66s}
.hero__copy .en span:nth-child(3){animation-delay:.82s}
.hero__copy .jp{opacity:0;animation:knd-hero-copy .85s cubic-bezier(.2,.7,.2,1) 1s forwards}
@media(prefers-reduced-motion:reduce){
  .hero__left,.hero__right,.hero__left img,.hero__right img,.hero__copy .en span,.hero__copy .jp{animation:none;opacity:1;transform:none;-webkit-clip-path:none;clip-path:none}
}

/* ---- News band ---- */
.home-news{padding:44px 0}
.home-news__inner{display:flex;gap:40px;align-items:center;max-width:920px;margin:0 auto}
.home-news__label{flex:0 0 auto;text-align:center}
.home-news__label .en{font-family:var(--font-en);font-weight:800;font-size:30px;color:var(--blue);letter-spacing:.05em}
.home-news__list{flex:1}
.home-news .news-item{padding:12px 0}
.home-news .news-item:first-child{padding-top:0}
/* 日付列を固定幅にして「新着情報」バッジの左端を縦に揃える（日付長に影響されない） */
.home-news .news-item__date{flex:0 0 84px;width:84px}
.home-news__more{text-align:right;margin-top:10px}

/* ---- WITH THE REGION（AI計測：緑上辺=左高右低、写真右側斜辺、非イタリック） ---- */
/* 高さはビューポート幅に比例（最大化しても写真が切れないよう可変） */
.region{position:relative;overflow:hidden;min-height:clamp(520px,50vw,820px);display:flex;align-items:center}
.region::before{
  content:"";position:absolute;inset:0;background:var(--green);z-index:0;
  -webkit-clip-path:polygon(0 0,100% 64%,100% 100%,0 100%);
  clip-path:polygon(0 0,100% 64%,100% 100%,0 100%);
}
.region__photo{
  position:absolute;top:14%;right:0;bottom:0;width:50%;z-index:1;overflow:hidden;
  background-image:url(../images/top-region.jpg);
  background-repeat:no-repeat;
  background-size:150%;
  background-position:5% 30%;
  -webkit-clip-path:polygon(45% 0,100% 0,100% 100%,0 100%);
  clip-path:polygon(45% 0,100% 0,100% 100%,0 100%);
}
/* 背景画像で表示するため img は非表示（alt保持のためHTMLには残す） */
.region__photo img{display:none}
.region .container{position:relative;z-index:2;width:100%}
/* 文字を上下中央にコンパクトにまとめる（間隔を詰める） */
.region__text{width:54%;text-align:center;padding:0}
.region__en{font-family:var(--font-en);font-weight:800;font-size:clamp(38px,4.6vw,56px);color:var(--blue);line-height:1;margin-bottom:8px}
.region__jp-h{font-family:var(--font-mincho);font-size:27px;font-weight:600;letter-spacing:.22em;color:var(--blue);margin-bottom:10px}
.region__body{font-size:18px;font-weight:500;line-height:1.6;margin-bottom:18px}

/* ---- BUSINESS（タイトル上・画像左上角カット＋青線・薄緑斜めバンド） ---- */
.biz-section{position:relative;overflow:hidden}
.biz-section::after{
  content:"";position:absolute;left:0;right:0;bottom:22px;height:210px;background:var(--green);z-index:0;
  -webkit-clip-path:polygon(0 0,100% 44%,100% 100%,0 100%);
  clip-path:polygon(0 0,100% 44%,100% 100%,0 100%);
}
.biz-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:34px;position:relative;z-index:1;margin-top:10px}
/* タイトルは青線の右上に配置（重複スラッシュは廃止） */
.biz-card__title{font-family:var(--font-mincho);font-size:22px;font-weight:600;margin:0 0 12px;text-align:center;line-height:1.3}
.biz-card__imgwrap{position:relative}
.biz-card__img{overflow:hidden;-webkit-clip-path:polygon(15% 0,100% 0,100% 100%,0 100%,0 22%);clip-path:polygon(15% 0,100% 0,100% 100%,0 100%,0 22%)}
.biz-card__img img{width:100%;height:200px;object-fit:cover;transition:.4s;display:block}
.biz-card:hover .biz-card__img img{transform:scale(1.05)}
.biz-card__text{font-size:16px;line-height:1.62;color:#2a2a2a;font-weight:500;margin-top:16px}

/* ---- WORKS（写真右斜めカット・明朝縦書きキャッチ・青ボタン千鳥） ---- */
/* WORKS：写真｜ボタン｜注記｜キャッチ(右端)。緑はくさび形（左薄・右厚）。 */
.works-section{position:relative}
.works__inner{position:relative;display:flex;align-items:center;gap:18px;height:clamp(390px,34vw,440px)}
/* AI実測の緑くさび（左薄・右厚） */
.works__inner::before{
  content:"";position:absolute;inset:0;background:var(--green);z-index:0;
  -webkit-clip-path:polygon(0 66%,100% 0,100% 100%,0 84%);
  clip-path:polygon(0 66%,100% 0,100% 100%,0 84%);
}
/* 写真はフル高さでなくセクションの約72%・上寄せ */
.works__img{position:relative;z-index:1;flex:0 0 44%;align-self:flex-start;height:72%;margin-top:2%;overflow:hidden;-webkit-clip-path:polygon(0 0,100% 0,54% 100%,0 100%);clip-path:polygon(0 0,100% 0,54% 100%,0 100%)}
.works__img img{width:100%;height:100%;object-fit:cover;display:block}
.works__cats{position:relative;z-index:1;flex:1 1 auto;align-self:center;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-content:center;max-width:330px}
.works__sp{display:block}
.works__cats a{background:var(--blue);color:#fff;text-align:center;padding:11px 8px;font-size:14px;border-radius:2px;white-space:nowrap}
.works__cats a:hover{background:var(--blue-dark);color:#fff;opacity:1}
.works__texts{position:relative;z-index:1;align-self:center;display:flex;gap:16px;align-items:flex-start;padding:6px 4px 6px 0}
.works__catch{
  writing-mode:vertical-rl;font-family:var(--font-mincho);font-weight:600;
  font-size:clamp(20px,2vw,26px);letter-spacing:.14em;color:var(--blue);line-height:1.7;
}
.works__note{
  writing-mode:vertical-rl;font-size:12.5px;font-weight:600;color:var(--ink);letter-spacing:.1em;line-height:1.85;
}

/* ---- COMPANY (dark) ---- */
.company-section{padding-top:60px}
.company-dark{position:relative;background:var(--dark);color:#fff;overflow:hidden;margin-top:10px}
.company-dark__bg{position:absolute;inset:0;z-index:0}
/* 折り畳み自転車と看板が見えるよう、やや下寄りをクロップ */
.company-dark__bg img{width:100%;height:100%;object-fit:cover;object-position:50% 60%;opacity:.44}
/* AI実測：ダーク部≒31.5vw高。文言は上寄せ（下に余白）、ボタンは下寄せ（上に余白） */
.company-dark__inner{position:relative;z-index:2;display:grid;grid-template-columns:1fr auto;gap:40px;align-items:stretch;min-height:clamp(400px,31.5vw,560px);padding:0}
.company-dark__copy{align-self:start;padding-top:clamp(58px,7vw,100px);font-family:var(--font-mincho);font-size:clamp(24px,3.1vw,34px);font-weight:600;line-height:2;letter-spacing:.12em}
.company-dark__links{align-self:end;padding-bottom:clamp(48px,5.5vw,82px);display:flex;flex-direction:column;gap:14px;min-width:250px}
.company-dark__links a{background:#fff;color:var(--blue);text-align:center;padding:16px;font-size:16px;letter-spacing:.18em}
.company-dark__links a:hover{background:var(--green-soft);color:var(--blue);opacity:1}

/* ---- RECRUIT ---- */
.home-recruit{position:relative;overflow:visible;padding-bottom:120px}
/* 薄緑ウェッジ：募集要項の背後から右（キャラクター方向）へ細く尖る（AI準拠） */
.home-recruit::before{content:"";position:absolute;left:calc(50% - 50vw);width:100vw;top:40%;height:62%;background:var(--green);z-index:0;
  -webkit-clip-path:polygon(0 0,100% 80%,0 100%);clip-path:polygon(0 0,100% 80%,0 100%)}
.home-recruit__inner{position:relative;z-index:2;max-width:var(--container);margin:0 auto;padding:0 24px}
.home-recruit__h{font-family:var(--font-mincho);font-size:30px;font-weight:600;letter-spacing:.22em;color:var(--blue);margin:8px 0 20px}
.home-recruit__text{max-width:620px;font-size:18px;font-weight:500;line-height:1.6;margin-bottom:26px}
/* たぬきは右端に密着。横幅はコンテンツ幅（container=1080px）基準の一定サイズ＝AI原本どおり
   頭頂がRECRUITバーの直下に収まる。min(vw,px)で、幅が狭まればタヌキも比例縮小し、1080px以下で回り込みへ。 */
.home-recruit__bear{position:absolute;bottom:0;right:max(0px,calc(50% - 540px));width:min(40vw,395px);z-index:3;pointer-events:none}
/* 一定幅以下は「一気に下へ回り込ませる」＝右下の小さなのぞき（本文の背面）に切替 */
@media(max-width:1080px){
  .home-recruit__bear{width:150px;right:8px;bottom:0;z-index:0}
  .home-recruit{padding-bottom:72px}
}

/* ---- THE GOOD WORK ---- */
.goodwork{position:relative}
.goodwork__inner{position:relative;z-index:1;display:flex;align-items:center;gap:clamp(20px,3vw,40px)}
.goodwork__logo{flex:0 0 auto}
.goodwork__logo img{width:clamp(170px,20vw,260px);height:auto;display:block}
.goodwork__variations{flex:0 0 auto;margin-right:clamp(24px,6vw,96px)}
.goodwork__variations img{width:clamp(62px,6vw,76px);height:auto;display:block}
.goodwork__body{flex:1 1 auto}
.goodwork__en{font-family:var(--font-cond);font-weight:600;font-size:clamp(30px,3.4vw,44px);color:var(--blue);letter-spacing:.01em;line-height:1.05}
.goodwork__jp{font-family:var(--font-mincho);font-size:clamp(20px,2.3vw,28px);font-weight:600;color:var(--blue);letter-spacing:.22em;margin:8px 0 20px}
.goodwork__text{font-family:var(--font-jp);font-size:18px;font-weight:500;line-height:1.8;white-space:nowrap}

/* ---- DX 推進の取り組み ---- */
.dx__inner{display:flex;align-items:flex-end;gap:clamp(12px,2vw,32px)}
.dx__body{flex:1 1 auto;max-width:560px}
.dx__lead{font-family:var(--font-mincho);font-size:clamp(20px,2.3vw,28px);font-weight:600;letter-spacing:.04em;color:var(--ink);margin-bottom:6px}
.dx__h{font-family:var(--font-mincho);font-size:clamp(23px,3vw,34px);font-weight:600;color:var(--blue);letter-spacing:.05em;line-height:1.3;margin-bottom:10px}
.dx__sub{font-family:var(--font-jp);font-size:16px;font-weight:500;line-height:1.8;color:var(--ink);margin-bottom:28px}
.dx__list{display:flex;flex-direction:column;gap:20px}
.dx__item{display:flex;gap:16px;align-items:center}
.dx__ico{flex:0 0 auto;width:76px;height:76px}
.dx__ico img{width:100%;height:100%;display:block}
.dx__txt h3{font-size:16px;font-weight:700;color:var(--blue);margin-bottom:3px}
.dx__txt p{font-family:var(--font-jp);font-size:15px;font-weight:500;line-height:1.8;color:var(--ink)}
.dx__fig{flex:0 0 auto;width:clamp(250px,29vw,344px)}
.dx__fig img{width:100%;height:auto;display:block}
@media(max-width:820px){
  .dx__inner{flex-direction:column;gap:24px}
  .dx__body{max-width:none;width:100%}
  .dx__fig{width:min(250px,60%);margin:0 auto}
}

@media(max-width:980px){
  .goodwork__text{white-space:normal}
}
@media(max-width:820px){
  .goodwork::before{width:120vw;height:120px}
  .goodwork__inner{flex-wrap:wrap;justify-content:center;text-align:center;gap:20px}
  .goodwork__variations{display:none}
  .goodwork__body{flex:1 1 100%}
  .goodwork__text{text-align:left;line-height:1.9}
  .goodwork__text br{display:none}
}

@media(max-width:820px){
  /* スマホもPCと同じ左右分割（上下に割らない）。左画像は少し細く＋文字を少し左へ */
  .hero__grid{min-height:190px;grid-template-columns:0.7fr 2fr}
  .hero__copy{left:19%}
  .hero__copy .en span{font-size:clamp(24px,6.8vw,34px)}
  .hero__copy .jp{font-size:11px;padding:5px 9px}
  .home-news__inner{flex-direction:column;gap:14px}
  .region{display:block;min-height:0;padding:52px 0}
  .region::before{-webkit-clip-path:none;clip-path:none}
  .region__photo{position:relative;z-index:1;width:100%;height:230px;margin-top:24px;margin-bottom:34px;-webkit-clip-path:none;clip-path:none;background-size:cover;background-position:34% 28%}
  .region__text{width:100%}
  /* 採用：見出しを2行＋中央寄せ／たぬきは背景（文章より下） */
  .sp-br{display:inline}
  .home-recruit__inner{position:relative;z-index:2}
  .home-recruit__h{text-align:center}
  .region .container{display:flex;flex-direction:column}
  .biz-grid{grid-template-columns:1fr;gap:26px}
  .biz-section::after{display:none}
  .works__inner{flex-direction:column;min-height:0;height:auto;gap:0}
  .works__inner::before{-webkit-clip-path:none;clip-path:none}
  .works__img{flex:none;width:100%;height:auto;margin-top:0;align-self:stretch;-webkit-clip-path:none;clip-path:none}
  .works__img img{height:240px;min-height:0}
  .works__cats{max-width:none;width:100%;margin:24px 0}
  .works__sp{display:none}
  .works__texts{flex-direction:column-reverse;align-items:center;width:100%;padding:0 0 8px}
  .works__catch{writing-mode:horizontal-tb;font-size:21px;text-align:center;line-height:1.5}
  .works__note{writing-mode:horizontal-tb;text-align:center;line-height:1.7}
  .company-dark__inner{grid-template-columns:1fr;min-height:0;align-items:stretch;padding:44px 0;gap:24px}
  .company-dark__copy{align-self:auto;padding-top:0}
  .company-dark__links{align-self:auto;padding-bottom:0;min-width:0}
  .home-recruit__bear{width:110px;opacity:1;bottom:0;z-index:0}
  .home-recruit{padding-bottom:56px}
}
