/* ===== 有限会社晴博工業 共通スタイル ===== */
:root {
  --navy: #16356E;
  --blue: #2C66BF;
  --sky: #5B9BE6;
  --accent: #F6920D;
  --ink: #20303f;
  --gray: #5d6b7a;
  --bg: #f5f8fb;
  --line: #dde5ee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--ink);
  line-height: 1.8;
  background: #fff;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); }

.inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-logo img { height: 54px; width: auto; display: block; }

.gnav ul { display: flex; gap: 28px; list-style: none; }
.gnav a {
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: 15px;
  padding: 8px 2px; border-bottom: 3px solid transparent; transition: .2s;
}
.gnav a:hover, .gnav a.current { border-bottom-color: var(--accent); }

.header-cta { white-space: nowrap; padding: 11px 26px; font-size: 14.5px; }

.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 12.5px; }
.lang-switch a, .lang-switch .cur {
  padding: 4px 8px; border-radius: 4px; text-decoration: none; color: var(--gray); white-space: nowrap;
}
.lang-switch a:hover { background: var(--bg); color: var(--blue); }
.lang-switch .cur { background: var(--navy); color: #fff; font-weight: 600; }
.lang-switch span.sep { color: var(--line); }

#nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* ===== ヒーロー ===== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 70%, #3F7FD6 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
}
/* 動画背景 */
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8,20,45,.82) 0%, rgba(8,20,45,.55) 55%, rgba(8,20,45,.30) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 110px 20px 120px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.5; letter-spacing: .06em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero h1 .accent { color: var(--sky); }
.hero p { margin-top: 20px; font-size: clamp(14px, 1.8vw, 17px); opacity: .98; max-width: 620px; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.hero-btns { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 14px 36px; border-radius: 6px; text-decoration: none;
  font-weight: 700; font-size: 16px; transition: .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #e0951a; }
.btn-ghost { border: 2px solid #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ===== セクション共通 ===== */
.section { padding: 80px 0; }
.section.alt { background: var(--bg); }
.sec-title { text-align: center; margin-bottom: 48px; }
.sec-title .en { display: block; font-size: 13px; letter-spacing: .25em; color: var(--blue); font-weight: 700; }
.sec-title h2 { font-size: clamp(24px, 3.2vw, 32px); color: var(--navy); letter-spacing: .08em; margin-top: 4px; }
.sec-title h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 2px;
  background: var(--accent); margin: 14px auto 0;
}
.lead { text-align: center; max-width: 720px; margin: -24px auto 48px; color: var(--gray); }

/* ===== 強みカード ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 32px 26px; text-align: center; box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.card .icon { width: 64px; height: 64px; margin: 0 auto 18px; }
.card h3 { color: var(--navy); font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--gray); text-align: left; }

/* ===== 事業内容 ===== */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.service .service-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--navy); color: #fff; padding: 14px 20px;
}
.service .service-head .num { color: var(--sky); font-weight: 700; font-size: 14px; letter-spacing: .1em; }
.service .service-head h3 { font-size: 18px; letter-spacing: .06em; }
.service .service-body { padding: 20px 22px 24px; font-size: 14.5px; color: var(--ink); }

/* トップ用サービス簡易リスト */
.service-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.service-chips a {
  text-decoration: none; background: #fff; border: 1.5px solid var(--blue); color: var(--navy);
  padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: .2s;
}
.service-chips a:hover { background: var(--blue); color: #fff; }

/* ===== 会社概要テーブル ===== */
.profile-table { width: 100%; border-collapse: collapse; background: #fff; }
.profile-table th, .profile-table td { border: 1px solid var(--line); padding: 16px 20px; text-align: left; }
.profile-table th { background: var(--bg); color: var(--navy); width: 28%; font-weight: 700; }

.map-wrap { margin-top: 40px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ===== CTA帯 ===== */
.cta {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
  text-align: center; padding: 64px 20px;
}
.cta h2 { font-size: clamp(20px, 3vw, 28px); letter-spacing: .08em; }
.cta .cta-btn {
  margin-top: 22px; font-size: 18px; padding: 16px 56px;
}
.cta .cta-note { margin-top: 8px; font-size: 14px; opacity: .9; }

/* ===== お問い合わせ ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-box {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 32px;
  box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.contact-box h3 { color: var(--navy); margin-bottom: 16px; font-size: 19px; }
.contact-box .big-tel { font-size: 34px; font-weight: 700; color: var(--navy); text-decoration: none; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; color: var(--navy); font-size: 14px; margin-bottom: 6px; }
.form-row .req { color: #d3382f; font-size: 12px; margin-left: 6px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 15px; font-family: inherit; background: var(--bg);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--blue); background: #fff; }

/* ===== フッター ===== */
.site-footer { background: var(--navy); color: #fff; padding: 48px 0 0; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px 40px;
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.footer-info .f-name { font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.footer-info p { font-size: 14px; opacity: .85; margin-top: 10px; }
.footer-nav ul { list-style: none; display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.f-tagline {
  text-align: center; font-size: 14px; letter-spacing: .14em; padding: 0 20px 22px;
  color: #fff; opacity: .92;
}
.copyright {
  text-align: center; font-size: 12px; padding: 16px;
  background: rgba(0,0,0,.25); letter-spacing: .05em;
}

/* ===== 下層ページタイトル ===== */
.page-title {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
  padding: 56px 20px; text-align: center;
}
.page-title h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: .1em; }
.page-title .en { font-size: 13px; letter-spacing: .25em; color: var(--sky); font-weight: 700; }

/* ===== 理念・ステートメント ===== */
.statement { text-align: center; max-width: 800px; margin: 0 auto; }
.statement h3 { font-size: clamp(20px, 2.8vw, 28px); color: var(--navy); letter-spacing: .08em; line-height: 1.7; margin-bottom: 24px; }
.statement p { color: var(--gray); }

.philosophy-block {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 40px 36px; margin-bottom: 32px; box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.philosophy-block .ph-label { font-size: 13px; letter-spacing: .25em; color: var(--blue); font-weight: 700; }
.philosophy-block h3 { font-size: clamp(19px, 2.4vw, 24px); color: var(--navy); margin: 6px 0 16px; line-height: 1.6; }
.philosophy-block p { color: var(--ink); }
.philosophy-block ul { margin: 14px 0 0 1.4em; color: var(--ink); }
.philosophy-block li { margin-bottom: 6px; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 26px 22px; text-align: center; box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.value-item .v-icon { width: 52px; height: 52px; display: block; margin: 0 auto 14px; }
.value-item .v-en { font-size: 17px; font-weight: 700; color: var(--blue); letter-spacing: .06em; }
.value-item .v-ja { margin-top: 8px; font-size: 14px; color: var(--ink); }

/* ===== 代表挨拶 ===== */
.message-box { max-width: 800px; margin: 0 auto; }
.message-box p { margin-bottom: 1.2em; }
.message-sign { text-align: right; font-weight: 700; color: var(--navy); margin-top: 28px; }
.message-sign .post { font-size: 13px; font-weight: 600; color: var(--gray); display: block; }

/* ===== ESG・ポリシー ===== */
.esg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.esg-item {
  background: #fff; border-top: 5px solid var(--blue); border: 1px solid var(--line);
  border-top: 5px solid var(--blue); border-radius: 10px; padding: 30px 26px;
  box-shadow: 0 2px 10px rgba(27,58,107,.06);
}
.esg-item.e { border-top-color: #3a9e5f; }
.esg-item.s { border-top-color: var(--sky); }
.esg-item.g { border-top-color: var(--accent); }
.esg-item h3 { color: var(--navy); font-size: 18px; margin-bottom: 14px; }
.esg-item ul { list-style: none; }
.esg-item li { padding: 8px 0 8px 22px; position: relative; font-size: 14.5px; border-bottom: 1px dashed var(--line); }
.esg-item li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ===== 事業内容 詳細レイアウト ===== */
.biz {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 36px; margin-bottom: 36px; box-shadow: 0 2px 10px rgba(27,58,107,.06);
  display: grid; grid-template-columns: 380px 1fr; gap: 36px; align-items: start;
  scroll-margin-top: 90px;
}
.biz.rev { grid-template-columns: 1fr 380px; }
.biz.rev .biz-img { order: 2; }
.biz-img img { width: 100%; border-radius: 10px; display: block; }
.biz-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.biz-head .num { font-size: 28px; font-weight: 700; color: var(--accent); font-family: Arial, sans-serif; }
.biz-head h3 { font-size: 23px; color: var(--navy); letter-spacing: .05em; }
.biz-text > p { font-size: 15px; margin-bottom: 16px; }
.biz-list-title { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 8px; }
.biz-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.biz-list li { position: relative; padding-left: 20px; font-size: 14px; color: var(--ink); }
.biz-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 2px; background: var(--blue); }
.biz-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.biz-tags span { background: var(--bg); border: 1px solid var(--line); color: var(--gray); font-size: 12px; padding: 4px 12px; border-radius: 999px; }

/* 事業内容 ページ内ナビ */
.biz-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 48px; }
.biz-nav a {
  text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--navy);
  background: #fff; border: 1.5px solid var(--line); padding: 8px 16px; border-radius: 999px; transition: .2s;
}
.biz-nav a:hover { border-color: var(--blue); color: var(--blue); }

/* ===== 未来への挑戦 ===== */
.future-keywords { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.future-keywords span {
  background: var(--navy); color: #fff; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; letter-spacing: .06em;
}

/* ===== レスポンシブ ===== */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .biz, .biz.rev { grid-template-columns: 1fr; padding: 24px; }
  .biz.rev .biz-img { order: 0; }
  .biz-list { grid-template-columns: 1fr; }
  .esg-grid { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }

  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; cursor: pointer; padding: 8px;
  }
  .nav-toggle-label span { display: block; height: 3px; background: var(--navy); border-radius: 2px; }
  .gnav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); display: none;
  }
  .gnav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .gnav a { display: block; padding: 14px 24px; border-bottom: none; }
  #nav-toggle:checked ~ .gnav { display: block; }
  .hero-inner { padding: 72px 20px 80px; }
}

/* =========================================================
   ===== アニメーション（上品・控えめ） =====
   JSが <html> に .anim-ready を付与した時だけ有効化。
   JS無効/失敗時はコンテンツが必ず表示される（プログレッシブエンハンスメント）。
   ========================================================= */

/* ---- スクロールリビール（共通） ---- */
.anim-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1),
              transform .8s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.anim-ready .reveal.in {
  opacity: 1;
  transform: none;
}

/* グリッド子要素のスタッガー（カード等が順に立ち上がる） */
.anim-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
.anim-ready .reveal-stagger.in > * {
  opacity: 1;
  transform: none;
}
.anim-ready .reveal-stagger.in > *:nth-child(1) { transition-delay: .00s; }
.anim-ready .reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.anim-ready .reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.anim-ready .reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.anim-ready .reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.anim-ready .reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.anim-ready .reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }
.anim-ready .reveal-stagger.in > *:nth-child(8) { transition-delay: .56s; }

/* 見出し下のアクセントバーが伸びる */
.anim-ready .reveal .sec-title h2::after,
.anim-ready .sec-title.reveal h2::after {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .7s cubic-bezier(.22,.61,.36,1) .15s;
}
.anim-ready .reveal.in .sec-title h2::after,
.anim-ready .sec-title.reveal.in h2::after {
  transform: scaleX(1);
}

/* ---- ヒーロー：読み込み時のフェードアップ ---- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}
.anim-ready .hero h1,
.anim-ready .hero p,
.anim-ready .hero-btns {
  opacity: 0;
  animation: heroRise .9s cubic-bezier(.22,.61,.36,1) forwards;
}
.anim-ready .hero h1     { animation-delay: .15s; }
.anim-ready .hero p      { animation-delay: .35s; }
.anim-ready .hero-btns   { animation-delay: .55s; }

/* ヒーロー背景グリッドがゆっくり流れる */
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 48px 48px, 48px 48px; }
}
.anim-ready .hero::before {
  animation: gridDrift 26s linear infinite;
}

/* 下層ページのタイトル帯もそっと立ち上がる */
.anim-ready .page-title h1,
.anim-ready .page-title .en {
  opacity: 0;
  animation: heroRise .8s cubic-bezier(.22,.61,.36,1) forwards;
}
.anim-ready .page-title .en { animation-delay: .1s; }
.anim-ready .page-title h1  { animation-delay: .25s; }

/* ---- ホバーの微動（PCのみ・上品に） ---- */
@media (hover: hover) {
  .card, .value-item, .esg-item, .service, .philosophy-block, .biz {
    transition: transform .3s ease, box-shadow .3s ease;
  }
  .card:hover, .value-item:hover, .esg-item:hover,
  .service:hover, .philosophy-block:hover, .biz:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(27,58,107,.13);
  }
  .value-item .v-icon { transition: transform .35s ease; }
  .value-item:hover .v-icon { transform: scale(1.1) rotate(-3deg); }

  .btn { transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(246,146,13,.32); }

  .service-chips a, .biz-nav a { transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
  .service-chips a:hover, .biz-nav a:hover { transform: translateY(-2px); }

  .footer-nav a { transition: opacity .2s ease, letter-spacing .2s ease; }
  .footer-nav a:hover { letter-spacing: .03em; }
}

/* ---- ヘッダー：スクロールで少し引き締まる ---- */
.site-header { transition: box-shadow .3s ease, padding .3s ease; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(27,58,107,.10); }
.site-header.scrolled .header-inner { padding-top: 6px; padding-bottom: 6px; }
.site-header .header-logo img { transition: height .3s ease; }
.site-header.scrolled .header-logo img { height: 46px; }

/* ---- アクセシビリティ：視差軽減設定を尊重 ---- */
@media (prefers-reduced-motion: reduce) {
  .anim-ready .reveal,
  .anim-ready .reveal-stagger > *,
  .anim-ready .hero h1,
  .anim-ready .hero p,
  .anim-ready .hero-btns,
  .anim-ready .page-title h1,
  .anim-ready .page-title .en {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .anim-ready .hero::before { animation: none !important; }
  .anim-ready .reveal .sec-title h2::after,
  .anim-ready .sec-title.reveal h2::after { transform: scaleX(1) !important; }
}
