/* HOME BASE theme base styles
   デザインはインラインスタイルで各テンプレートに保持しています。
   ここには「インラインで書けないもの」だけを置いています。 */

html, body { margin: 0; padding: 0; background: #FFFFFF; }

body {
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #0A1710;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 説明文：勝手に改行させず、右端まで使って自然に折り返す */
.hb-wrap p,
.hb-wrap p span,
.hb-entry p {
  text-wrap: wrap;
  line-break: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: none;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

a { color: #0E3A26; text-decoration: none; }
a:hover { color: #23A455; }

.hb-wrap { width: 100%; overflow-x: hidden; background: #FFFFFF; }

/* 画像スロット（デザインの image-slot 相当） */
.hb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-img-box { position: relative; overflow: hidden; }

@keyframes hb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ヘッダー：PC / スマホ切り替え */
.hb-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 28px); flex-wrap: wrap; }
.hb-burger { display: none; }
.hb-drawer { display: none; flex-direction: column; background: #0E3A26; }
.hb-drawer.is-open { display: flex; }

/* PCのみ表示（各ページ上部のスタッツ帯など） */
.hb-pc-only { display: grid; }
/* スマホのみ 1カラム／2カラムにする箇所 */
.hb-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.hb-masonry { columns: 4 200px; column-gap: 6px; }
.hb-hero-pc { display: block; }
.hb-hero-sp { display: none; }
.hb-hero-overlay-pc { display: block; }
.hb-hero-overlay-sp { display: none; }

@media (max-width: 899px) {
  .hb-nav { display: none; }
  .hb-burger {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; align-self: stretch; padding: 0 20px; background: #0E3A26; cursor: pointer;
    border: 0;
  }
  .hb-pc-only { display: none; }
  .hb-cols-3 { grid-template-columns: minmax(0, 1fr); }
  .hb-masonry { columns: 2; }
  .hb-hero-pc { display: none; }
  .hb-hero-sp { display: block; }
  .hb-hero-overlay-pc { display: none; }
  .hb-hero-overlay-sp { display: block; }

  /* スマホ：カードグリッドは必ず1カラムに収める（はみ出し防止） */
  .hb-wrap [style*="minmax(280px"],
  .hb-wrap [style*="minmax(300px"],
  .hb-wrap [style*="minmax(320px"],
  .hb-wrap [style*="minmax(340px"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* スマホ：ヘッダーロゴを最大まで大きく */
  /* ヘッダーの高さ（46px + 上下16px = 78px）を変えずに最大化 */
  .hb-header a img { height: 46px !important; width: auto; }

  /* スマホ：ヒーローは左右ぎりぎりまで使う */
  .hb-hero-inner { padding-left: 10px !important; padding-right: 10px !important; }
  .hb-hero-copy { width: 100%; align-items: stretch !important; }
  .hb-hero-copy h1 { font-size: 8.9vw !important; text-align: right; white-space: nowrap !important; letter-spacing: -0.04em; }
  .hb-hero-btns { width: 100%; }

  /* スマホ：説明文は強制改行せず、右端まで使って自然に折り返す */
  .hb-wrap p br { display: none; }
  .hb-wrap p[style*="max-width"],
  .hb-wrap div[style*="max-width"] { max-width: 100% !important; }
  .hb-wrap [style*="nowrap"] { white-space: normal !important; }
  .hb-wrap h1, .hb-wrap h2, .hb-wrap h3 { white-space: normal !important; }
}

/* ページトップへ戻る */.hb-to-top {
  position: fixed; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 56px; height: 56px; background: #0E3A26; color: #fff; cursor: pointer; border: 0;
  box-shadow: 0 8px 24px rgba(10, 23, 16, 0.28);
}
.hb-to-top:hover { background: #23A455; color: #04150C; }

/* WordPress 管理バー表示時 */
body.admin-bar-showing .hb-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar-showing .hb-header { top: 46px; }
}

/* Honeypot（bot専用の非表示フィールド） */
.hb-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* 外部フォームプラグインを併用した場合の見た目合わせ */
.hb-form .wpcf7-form-control {
  width: 100%; padding: 15px 16px; background: #FFFFFF; border: 2px solid #DCE7DE;
  font-family: inherit; font-size: 14px; font-weight: 500; color: #0A1710; outline: none;
}
.hb-form .wpcf7-form-control:focus { border-color: #23A455; }
.hb-form .wpcf7-submit {
  background: #0E3A26; color: #fff; border: 0; font-weight: 900;
  font-size: clamp(16px, 1.6vw, 22px); padding: clamp(20px, 2.2vw, 30px) clamp(22px, 2.6vw, 36px);
  cursor: pointer;
}
.hb-form .wpcf7-submit:hover { background: #23A455; color: #04150C; }

/* 投稿本文 */
.hb-entry p { margin: 0 0 1.6em; font-size: clamp(14px, 1.05vw, 16px); font-weight: 500; line-height: 2.1; color: #26382E; }
.hb-entry h2 { font-weight: 900; font-size: clamp(20px, 2vw, 30px); line-height: 1.4; margin: 2em 0 0.8em; }
.hb-entry h3 { font-weight: 900; font-size: clamp(17px, 1.6vw, 24px); line-height: 1.5; margin: 1.8em 0 0.7em; }
.hb-entry img { display: block; margin: 0 0 1.6em; }


/* ===== ヒーロー：3枚クロスフェード ===== */
@keyframes hbHeroFade {
	0%   { opacity: 0; transform: scale(1.10); }
	4%   { opacity: 1; }
	30%  { opacity: 1; }
	36%  { opacity: 0; transform: scale(1.00); }
	100% { opacity: 0; transform: scale(1.10); }
}
@keyframes hbHeroBar {
	0%   { transform: scaleX(0); }
	33%  { transform: scaleX(1); }
	36%  { transform: scaleX(0); }
	100% { transform: scaleX(0); }
}
.hb-hero-slide {
	opacity: 0;
	transform-origin: center;
	animation: hbHeroFade 21s linear infinite;
	will-change: opacity, transform;
}
.hb-hero-bar {
	position: relative;
	display: block;
	width: clamp(34px, 4vw, 64px);
	height: 3px;
	background: rgba(255, 255, 255, 0.32);
	overflow: hidden;
}
.hb-hero-bar > span {
	position: absolute;
	inset: 0;
	background: #23A455;
	transform: scaleX(0);
	transform-origin: left;
	animation: hbHeroBar 21s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
	.hb-hero-slide { animation: none; opacity: 1; }
	.hb-hero-slide ~ .hb-hero-slide { opacity: 0; }
	.hb-hero-bar > span { animation: none; }
}


/* ===== ヒーロー：3分割パネル ===== */
.hb-hero-grid {
	position: absolute;
	inset: 0;
	overflow: hidden;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: minmax(0, 1fr);
	gap: 0;
}
@keyframes hbHeroFade2 {
	0%   { opacity: 0; transform: scale(1.14) translate3d(0,1.4%,0); }
	2%   { opacity: 1; }
	48%  { opacity: 1; }
	54%  { opacity: 0; transform: scale(1.02) translate3d(0,-1.4%,0); }
	100% { opacity: 0; transform: scale(1.14) translate3d(0,1.4%,0); }
}
@keyframes hbPanelIn {
	from { clip-path: inset(0 0 100% 0); transform: translateY(28px); }
	to   { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
@keyframes hbLogoRise {
	0%   { opacity: 0; transform: translateY(46px) scale(0.94); filter: blur(10px); }
	100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes hbFloat {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-10px); }
}
@keyframes hbFadeUp {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes hbScrollDot {
	0%   { transform: translateY(-110%); opacity: 0; }
	25%  { opacity: 1; }
	75%  { opacity: 1; }
	100% { transform: translateY(110%); opacity: 0; }
}
.hb-panel { animation: hbPanelIn 1.15s cubic-bezier(0.16,1,0.3,1) both; }
.hb-logo-rise { animation: hbLogoRise 1.5s cubic-bezier(0.16,1,0.3,1) 0.5s both; }
.hb-logo-float { animation: hbFloat 7s ease-in-out 2.1s infinite; }
.hb-hero-fade-up { animation: hbFadeUp 1s cubic-bezier(0.16,1,0.3,1) 1.6s both; }
@media (prefers-reduced-motion: reduce) {
	.hb-panel, .hb-logo-rise, .hb-logo-float, .hb-hero-fade-up {
		animation: none !important; opacity: 1 !important;
		clip-path: none !important; transform: none !important; filter: none !important;
	}
}
.hb-hero-slide2 {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	animation: hbHeroFade2 14s linear infinite;
	will-change: opacity, transform;
}
.hb-himg-pc { display: block; }
.hb-himg-sp { display: none; }
.hb-header-front {
	position: absolute !important;
	top: 0; left: 0; right: 0;
	background: transparent !important;
	backdrop-filter: none !important;
	border-bottom: none !important;
}
.hb-header-front .hb-nav a { color: #fff !important; }
.hb-header-front .hb-nav a span:first-child { color: #8FE07A !important; }
body.home .hb-wrap > .hb-header-front + * { margin-top: 0; }
@media (max-width: 899px) {
	.hb-hero-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
		height: 100svh;
	}
	.hb-hero-inner { min-height: 100svh !important; }
	.hb-hero-inner img { width: min(84%, 560px) !important; }
	.hb-himg-pc { display: none !important; }
	.hb-himg-sp { display: block !important; }
}
@media (prefers-reduced-motion: reduce) {
	.hb-hero-slide2 { animation: none; }
	.hb-hero-slide2.hb-himg-pc:first-child, .hb-hero-slide2.hb-himg-sp:nth-child(3) { opacity: 1; }
}


/* ===== オープニングスプラッシュ ===== */
@keyframes hbSplashOut {
	0%, 62% { opacity: 1; visibility: visible; }
	100%    { opacity: 0; visibility: hidden; }
}
@keyframes hbSplashLogo {
	0%   { opacity: 0; transform: translateY(28px) scale(0.95); filter: blur(12px); }
	28%  { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
	62%  { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
	100% { opacity: 0; transform: translateY(-18px) scale(1.04); filter: blur(4px); }
}
@keyframes hbSplashBar {
	0%   { transform: scaleX(0); }
	58%  { transform: scaleX(1); }
	100% { transform: scaleX(1); opacity: 0; }
}
.hb-splash {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(28px, 4vw, 48px);
	background: #04150C;
	pointer-events: none;
	animation: hbSplashOut 2.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.hb-splash-logo {
	display: block;
	width: min(74%, 620px);
	height: auto;
	animation: hbSplashLogo 2.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hb-splash-bar {
	display: block;
	width: min(40%, 220px);
	height: 2px;
	background: rgba(255, 255, 255, 0.18);
	overflow: hidden;
}
.hb-splash-bar > span {
	display: block;
	width: 100%;
	height: 100%;
	background: #23A455;
	transform-origin: left;
	transform: scaleX(0);
	animation: hbSplashBar 2.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
	.hb-splash { animation: hbSplashOut 1.2s linear forwards; }
	.hb-splash-logo, .hb-splash-bar > span { animation: none; opacity: 1; transform: none; filter: none; }
}


/* ===== スマホ総点検（899px以下） ===== */
@media (max-width: 899px) {
	/* 横スクロール防止（scroll container を作らない clip を使用） */
	html, body { overflow-x: clip; }
	.hb-wrap, .hb-wrap * { min-width: 0; }
	.hb-wrap img, .hb-wrap svg, .hb-wrap iframe { max-width: 100%; }

	/* 長い英字ラベル・URLの飛び出し防止 */
	.hb-wrap { overflow-wrap: anywhere; word-break: normal; line-break: strict; }

	/* 固定2列・3列・4列グリッドを安全に折り返す */
	.hb-wrap [style*="repeat(3,minmax(0,1fr))"],
	.hb-wrap [style*="repeat(3, minmax(0, 1fr))"],
	.hb-wrap [style*="repeat(2,minmax(0,1fr))"],
	.hb-wrap [style*="repeat(2, minmax(0, 1fr))"] { grid-template-columns: minmax(0, 1fr) !important; }

	/* 表組み（会社概要・募集要項・1日の流れ）は縦積み */
	.hb-wrap [style*="grid-template-columns:30%"],
	.hb-wrap [style*="grid-template-columns: 30%"] {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 8px !important;
	}

	/* auto-fit グリッドは全て1カラム */
	.hb-wrap [style*="auto-fit"] { grid-template-columns: minmax(0, 1fr) !important; }

	/* セクション左右余白を20pxで統一 */
	.hb-wrap > section,
	.hb-wrap > footer { padding-left: 20px !important; padding-right: 20px !important; }
	.hb-wrap > section > section { padding-left: 0 !important; padding-right: 0 !important; }

	/* 見出しの巨大化を抑える */
	.hb-wrap h1 { font-size: clamp(24px, 7.4vw, 40px) !important; }
	.hb-wrap h2 { font-size: clamp(20px, 5.8vw, 32px) !important; }
	.hb-wrap h3 { font-size: clamp(17px, 4.8vw, 24px) !important; }

	/* 巨大な連番ナンバーを縮小 */
	.hb-wrap span[style*="font-size:clamp(46px,6vw,92px)"] { font-size: 44px !important; }

	/* ボタン・リンクのはみ出し防止 */
	.hb-wrap a[style*="padding"] { max-width: 100%; }

	/* ページトップボタンを小さめに */
	.hb-to-top { width: 48px; height: 48px; right: 12px; bottom: 12px; }

	/* ドロワーは画面内でスクロール可能に */
	.hb-drawer { max-height: calc(100svh - 78px); overflow-y: auto; }

	/* ヒーロー：進行バーの位置をセーフに */
	.hb-hero-bars { left: 20px !important; bottom: 24px !important; }

	/* スプラッシュのロゴサイズ */
	.hb-splash-logo { width: min(78%, 420px) !important; }
}

/* iOS Safari のアドレスバー対策（svh 未対応ブラウザ向け保険） */
@supports not (height: 100svh) {
	@media (max-width: 899px) {
		.hb-hero-grid { height: 100vh; }
		.hb-hero-inner { min-height: 100vh !important; }
	}
}


/* ===== TOP：PCはヒーロー重ね、スマホは通常ヘッダー ===== */
@media (min-width: 900px) {
	.hb-header-front .hb-hlogo-w { display: block !important; }
	.hb-header-front .hb-hlogo-b { display: none !important; }
}
@media (max-width: 899px) {
	.hb-header-front {
		position: sticky !important;
		background: rgba(255, 255, 255, 0.96) !important;
		backdrop-filter: blur(8px) !important;
		border-bottom: 2px solid #0E3A26 !important;
	}
	.hb-hlogo-w { display: none !important; }
	.hb-hlogo-b { display: block !important; }
	.hb-topscrim { display: none !important; }
	.hb-logo-scrim { display: block !important; width: min(140%, 520px) !important; height: 200px !important; background: radial-gradient(ellipse at center, rgba(4,21,12,0.3) 0%, rgba(4,21,12,0.18) 48%, rgba(4,21,12,0) 76%) !important; }
	.hb-hero-grid { height: calc(100svh - 78px); }
	.hb-hero-inner { min-height: calc(100svh - 78px) !important; }
}
@supports not (height: 100svh) {
	@media (max-width: 899px) {
		.hb-hero-grid { height: calc(100vh - 78px); }
		.hb-hero-inner { min-height: calc(100vh - 78px) !important; }
	}
}


/* ===== TOP：PCは動画ヒーロー、スマホは3枚パネル ===== */
.hb-hero-video { display: none; }
@media (min-width: 900px) {
	.hb-hero-grid { display: block !important; }
	.hb-hero-video {
		display: block !important;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.hb-hero-grid .hb-panel { display: none !important; }
	.hb-hero-bars { display: none !important; }
}


/* ===== TOP：スマホも動画ヒーロー ===== */
.hb-hero-video-sp { display: none; }
@media (max-width: 899px) {
	.hb-hero-grid { display: block !important; }
	.hb-hero-video-sp {
		display: block !important;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.hb-hero-grid .hb-panel { display: none !important; }
	.hb-hero-bars { display: none !important; }
}
@media (min-width: 900px) {
	.hb-hero-video-sp { display: none !important; }
}


/* ===== スマホ：ヒーロー動画を左右いっぱいに ===== */
@media (max-width: 899px) {
	.hb-hero-grid {
		display: block !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		max-width: none !important;
		padding: 0 !important;
		background: #04150C;
		overflow: hidden;
	}
	.hb-hero-video-sp {
		display: block !important;
		position: absolute !important;
		top: 50% !important;
		left: 50% !important;
		transform: translate(-50%, -50%) !important;
		width: 100% !important;
		height: 100% !important;
		min-width: 100% !important;
		min-height: 100% !important;
		max-width: none !important;
		max-height: none !important;
		object-fit: fill !important;
		object-position: center center !important;
	}
}
