/* 博然商事 ホームページ
   白を基本に、濃い紺を1色だけアクセントに使う。スマホ（幅375px）を先に作り、広い画面で整える。
   文字は各端末の標準フォントだけを使う（外部のフォントは読み込まない）。 */

:root {
  --navy: #14305a;
  --navy-dark: #0d2142;
  --navy-soft: #e9eef6;
  --navy-line: #c3cfe0;
  --ink: #1c2430;
  --muted: #5a6473;
  --line: #dde2ea;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --radius: 6px;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
  line-break: strict;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 800px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; color: #fff; }

/* ---- 確認用の組み立てだけで出る表示 ---- */
.preview-banner { background: #ffe066; color: #000; font-size: 13px; line-height: 1.5; padding: 8px 16px; text-align: center; font-weight: 700; }
mark.needs-check { background: #ffe066; color: #000; outline: 2px dashed #c0392b; outline-offset: 1px; padding: 0 2px; font-weight: 700; }

/* ---- ヘッダーとメニュー ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 64px; gap: 0 16px; position: relative; }
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--navy); padding: 10px 0; }
.logo-text { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .16em; line-height: 1; }
.logo img { height: 40px; width: auto; }

.nav-toggle { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: var(--ink); }
.nav-list a[aria-current="page"], .nav-item.is-current > a { color: var(--navy); font-weight: 700; }
.subnav { list-style: none; margin: 0; padding: 0; }

/* スマホ：JavaScript が動くときはボタンで開閉（動かないときは常に表示） */
@media (max-width: 767px) {
  .site-nav { width: 100%; }
  .nav-list { border-top: 1px solid var(--line); }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li:last-child { border-bottom: 0; }
  .nav-list > li > a { display: block; padding: 14px 4px; font-size: 16px; }
  .subnav { padding: 0 0 10px 16px; }
  .subnav a { display: block; padding: 8px 4px; font-size: 14px; color: var(--muted); }
  .subnav a::before { content: "— "; color: var(--navy-line); }

  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 12px; margin: 0;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    color: var(--navy); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--navy); border-radius: 1px; position: relative;
    transition: transform .2s var(--ease), background-color .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(13, 33, 66, .08); padding: 0 16px 8px;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .js .nav-list { border-top: 0; }
  .js.nav-open .site-nav { display: block; }
}

/* パソコン：横並び。事業内容はマウスを乗せる／キーボードで選ぶと下に一覧 */
@media (min-width: 768px) {
  .nav-list { display: flex; gap: 4px; }
  .nav-item { position: relative; }
  .nav-item > a { display: block; padding: 20px 14px; font-size: 15px; position: relative; }
  .nav-item > a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 12px; height: 2px;
    background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
  }
  .nav-item > a:hover::after, .nav-item.is-current > a::after { transform: scaleX(1); }
  .subnav {
    position: absolute; left: 0; top: 100%; min-width: 280px; padding: 8px 0;
    background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy);
    box-shadow: 0 12px 24px rgba(13, 33, 66, .08);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .has-sub:hover > .subnav, .has-sub:focus-within > .subnav {
    opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .subnav a { display: block; padding: 10px 18px; font-size: 14px; line-height: 1.5; }
  .subnav a:hover { background: var(--bg-soft); color: var(--navy); }
}

/* ---- ボタン ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 12px 28px; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.4; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.button::after { content: "→"; transition: transform .2s var(--ease); }
.button:hover::after { transform: translateX(3px); }
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover { background: var(--navy-dark); color: #fff; box-shadow: 0 6px 16px rgba(13, 33, 66, .18); }
.button-light { background: #fff; color: var(--navy); }
.button-light:hover { background: var(--navy-soft); color: var(--navy-dark); }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.button:disabled::after { transform: none; }

/* ---- トップの一番上 ---- */
.hero { padding: 40px 0 24px; background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-inner { display: grid; gap: 24px; align-items: center; }
.hero-heading { text-wrap: balance; word-break: auto-phrase; font-family: var(--serif); font-size: clamp(28px, 7.4vw, 46px); letter-spacing: .06em; color: var(--navy-dark); line-height: 1.45; }
.hero-lead { margin: 18px 0 26px; color: var(--muted); font-size: 16px; max-width: 34em; }
.hero-actions { margin: 0; }
.hero-actions .button { width: 100%; }
.hero-visual { margin: 0 -8px; }
.hero-photo { margin: 32px 0 0; }
.hero-photo img { width: 100%; border-radius: var(--radius); }
@media (min-width: 768px) {
  .hero { padding: 72px 0 48px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .hero-actions .button { width: auto; }
  .hero-visual { margin: 0; }
}

/* 図：日本から中国へ線が伸び、4つの点が順に灯る */
.diagram { width: 100%; max-width: 600px; margin: 0 auto; overflow: visible; }
.dg-route-base { fill: none; stroke: var(--navy-line); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
.dg-route { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.dg-branch { fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; opacity: .7; }
.dg-hub { fill: var(--navy); }
.dg-core { fill: var(--navy); }
.dg-halo { fill: var(--navy); opacity: .12; transform-box: fill-box; transform-origin: center; }
.dg-origin-ring { fill: var(--navy-soft); stroke: var(--navy-line); stroke-width: 1; }
.dg-origin-core { fill: var(--navy); }
.dg-label { font-family: var(--sans); font-size: 26px; font-weight: 700; letter-spacing: .25em; fill: var(--navy-dark); }

/* 動きは「視差効果を減らす」が off のときだけ付ける（on のときは上の最終の形をそのまま表示） */
@media (prefers-reduced-motion: no-preference) {
  .hero-heading { animation: rise .9s var(--ease) .1s both; }
  .hero-lead { animation: rise .9s var(--ease) .3s both; }
  .hero-actions { animation: rise .9s var(--ease) .45s both; }
  .reveal-up { animation: rise .8s var(--ease) .05s both; }

  .dg-route { stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.45, 0, .2, 1) .6s forwards; }
  .dg-origin-ring { animation: breathe 2.4s ease-in-out .2s 2 both; transform-box: fill-box; transform-origin: center; }
  .dg-hub, .dg-label-to { opacity: 0; animation: fade .4s ease-out 2.1s forwards; }
  .dg-branch { stroke-dashoffset: 1; animation: draw .45s ease-out forwards; }
  .dg-core { fill: #c9d2df; animation: lit .45s ease-out forwards; }
  .dg-halo { opacity: 0; animation: halo 1.4s ease-out forwards; }
  .dg-b1 { animation-delay: 2.2s; } .dg-d1 .dg-core, .dg-d1 .dg-halo { animation-delay: 2.55s; }
  .dg-b2 { animation-delay: 2.6s; } .dg-d2 .dg-core, .dg-d2 .dg-halo { animation-delay: 2.95s; }
  .dg-b3 { animation-delay: 3.0s; } .dg-d3 .dg-core, .dg-d3 .dg-halo { animation-delay: 3.35s; }
  .dg-b4 { animation-delay: 3.4s; } .dg-d4 .dg-core, .dg-d4 .dg-halo { animation-delay: 3.75s; }

  .js .reveal.is-waiting { opacity: 0; transform: translateY(18px); }
  .js .reveal.is-waiting.is-shown { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes lit { to { fill: var(--navy); } }
@keyframes halo { 0% { opacity: .4; transform: scale(.35); } 100% { opacity: .12; transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* ---- 共通のブロック ---- */
.section { padding: 48px 0; }
.section-title { font-family: var(--serif); font-size: 24px; letter-spacing: .1em; color: var(--navy-dark); margin-bottom: 24px; display: flex; align-items: center; gap: 14px; }
.section-title::before { content: ""; width: 28px; height: 2px; background: var(--navy); flex: none; }
@media (min-width: 768px) { .section { padding: 72px 0; } .section-title { font-size: 28px; margin-bottom: 32px; } }

.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 32px 0 28px; }
.page-title { text-wrap: balance; word-break: auto-phrase; font-family: var(--serif); font-size: clamp(24px, 6vw, 34px); letter-spacing: .08em; color: var(--navy-dark); }
.page-eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: .08em; }
@media (min-width: 768px) { .page-head { padding: 48px 0 40px; } }
.breadcrumb ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--navy-line); }
.breadcrumb a { color: var(--muted); }

/* 事業の一覧 */
.biz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .biz-list { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.biz-card { position: relative; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: 0 0 var(--radius) var(--radius); padding: 24px 20px 22px; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.biz-no { font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--navy); margin-bottom: 6px; }
.biz-name { font-size: 19px; color: var(--navy-dark); margin-bottom: 10px; }
.biz-summary { color: var(--muted); margin: 0; }
.biz-more { align-self: flex-start; margin-top: 16px; font-weight: 700; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; min-height: 44px; }
.biz-more::after { content: "→"; transition: transform .2s var(--ease); }
.biz-more:hover::after { transform: translateX(3px); }
.biz-card:target { box-shadow: 0 0 0 3px var(--navy-soft); }

/* 最後の「お問い合わせ」のブロック */
.section-cta { background: var(--navy); color: #fff; }
.cta-inner { text-align: center; }
.cta-text { font-size: 17px; margin-bottom: 24px; }
.cta-inner .button { width: 100%; max-width: 360px; }

/* 詳細ページ */
.detail-section { padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.detail-section h2, .prose h2 { font-size: 20px; color: var(--navy-dark); margin: 0 0 14px; padding-left: 14px; border-left: 3px solid var(--navy); line-height: 1.5; }
.prose h2 { margin-top: 36px; }
.note { font-size: 14px; color: var(--muted); }
.detail-cta { text-align: center; margin-top: 8px; }
.detail-cta .button { width: 100%; max-width: 360px; }
.lead { font-size: 16px; margin-bottom: 28px; }
.bullet-list { margin: 0 0 1em; padding-left: 1.4em; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: 4px; }

/* 表（会社概要など） */
.table-wrap { margin: 0 0 1em; }
.info-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: 14px 10px; border-bottom: 1px solid var(--line); line-height: 1.7; }
.info-table th { width: 6.5em; background: var(--bg-soft); color: var(--navy-dark); font-weight: 700; font-size: 14px; }
.info-table td { font-size: 15px; }
@media (min-width: 768px) { .info-table th { width: 10em; padding: 18px 20px; font-size: 15px; } .info-table td { padding: 18px 20px; font-size: 16px; } }

/* お問い合わせフォーム */
.contact-form { display: grid; gap: 22px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; padding: 0; font-size: 15px; }
.badge { display: inline-block; font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 3px; font-weight: 700; letter-spacing: .05em; }
.badge-required { background: var(--navy); color: #fff; }
.badge-optional { background: var(--line); color: var(--muted); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid #c6cdd8; border-radius: var(--radius); padding: 12px 14px; line-height: 1.6;
}
.contact-form textarea { resize: vertical; min-height: 160px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.choices { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.choice, .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; }
.choice input, .check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); flex: none; }
.consent { background: var(--bg-soft); border-radius: var(--radius); padding: 8px 14px; }
.turnstile-slot:empty { min-height: 0; }
.turnstile-slot { min-height: 65px; }
.turnstile-slot.is-placeholder { border: 2px dashed var(--navy-line); border-radius: var(--radius); min-height: 65px; display: flex; align-items: center; justify-content: center; padding: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.form-actions .button { width: 100%; }
@media (min-width: 768px) { .form-actions .button { width: auto; min-width: 240px; } }
.field-error { margin: 6px 0 0; color: #b42318; font-size: 14px; font-weight: 700; }
[aria-invalid="true"] { border-color: #b42318 !important; }
.form-status { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: #fdecea; color: #8a1c12; font-weight: 700; font-size: 15px; }
.form-status.is-info { background: var(--navy-soft); color: var(--navy-dark); }
.form-notice { background: #fff4d6; border-left: 3px solid #c58a00; padding: 12px 14px; border-radius: var(--radius); }
.form-success { background: var(--navy-soft); border-left: 3px solid var(--navy); padding: 16px 18px; border-radius: var(--radius); }

/* ---- フッター ---- */
.site-footer { background: var(--navy-dark); color: #d7deea; padding: 36px 0 28px; font-size: 14px; }
.footer-inner { display: grid; gap: 14px; }
.footer-name { font-family: var(--serif); font-size: 18px; color: #fff; letter-spacing: .1em; margin: 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-nav a { color: #d7deea; text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.copyright { margin: 8px 0 0; color: #9eabc2; }
.site-footer :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
}
