/* 税理士法人明星 サイト共通のスタイル（2026-11-20 Claude Design の見本をもとに作り直し）
   各ページの中身は見本どおりの書き方（要素ごとに style を直接書く）にしてあり、
   ここには「全ページ共通の決まり」「ホバー・フォーカス」「幅によって変わるところ」だけを置く。
   色・文字の決まりは docs/design.md と、引き継ぎ資料の README（docs/引き継ぎ_デザイン.md）を参照 */

:root { --hero-max: 1180px; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: #222; font-family: 'Noto Sans JP', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #002A68; text-decoration: none; }
a:hover { color: #1f5bb0; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
[id] { scroll-margin-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #222; color: #fff; padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 8px; color: #fff; }
:focus-visible { outline: 2px solid #002A68; outline-offset: 2px; }

/* ---------- ホバー・フォーカス（見本の style-hover / style-focus） ---------- */
[data-h] { transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease; }
[data-h="h1"]:hover { color: #1f5bb0 !important; transform: scale(1.08) !important; }
[data-h="h2"]:hover { background: #1f5bb0 !important; color: #fff !important; }
[data-h="h3"]:hover { color: #1f5bb0 !important; }
[data-h="h4"]:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06) !important; color: #222 !important; }
[data-h="h5"]:hover { color: #222 !important; }
[data-h="h6"]:hover { background: #1f5bb0 !important; }
[data-h="h7"]:hover { border-color: #222 !important; color: #222 !important; }
[data-h="h8"]:hover { opacity: 1 !important; color: #F6DD39 !important; transform: scale(1.06) !important; }
[data-h="h9"]:hover { border-color: #002A68 !important; color: #002A68 !important; }
[data-h="h10"]:hover { background: rgba(203,199,254,.18) !important; }
[data-h="h11"]:hover { background: rgba(203,199,254,.18) !important; color: #222 !important; }
[data-h="h12"]:hover { border-color: #847CFE !important; box-shadow: 0 8px 24px rgba(91,80,230,.10) !important; transform: translateY(-2px) !important; color: #222 !important; }
[data-f="f1"]:focus { border-color: #5B50E6 !important; box-shadow: 0 0 0 3px rgba(132,124,254,.2) !important; }

/* 黒いボタンは、ヘッダーの「初回無料相談・お問い合わせ」と同じ色にそろえる。2026-11-29 ロゴの紺に変更（ARK 指定） */
[data-h="h2"], [data-h="h6"] { background: #002A68 !important; }

/* ---------- ヘッダー ---------- */
.hd { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 96px; padding: 0 clamp(20px,4vw,48px); background: rgba(255,255,255,.96); border-bottom: 1px solid #eee; }
.hd-logo { display: flex; align-items: center; gap: clamp(8px,2.5vw,12px); color: #002A68; flex: 0 1 auto; min-width: 0; }
.hd-logo:hover { color: #002A68; }
.hd-logo img { height: clamp(34px,9vw,46px); width: auto; flex: none; }
.hd-logo-text { display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.hd-logo-ja { font-weight: 700; font-size: clamp(17px,4.6vw,22px); letter-spacing: .08em; line-height: 1; }
.hd-logo-en { font: 500 clamp(7.5px,2vw,10px)/1 Outfit, sans-serif; letter-spacing: .06em; }
/* 右側は2段：上に電話番号と「初回無料相談・お問い合わせ」、下にメニュー（2026-11-22 ARK の参考デザインに合わせて変更） */
:root { --hd-h: 140px; }
.hd { height: var(--hd-h); padding-block: 14px; }
.hd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.hd-top { display: flex; align-items: center; gap: 28px; }
.hd-tel { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #002A68; line-height: 1; }
.hd-tel:hover { color: #002A68; }
.hd-tel .num { display: flex; align-items: center; gap: 6px; font: 600 30px/1 Outfit, sans-serif; letter-spacing: .02em; }
.hd-tel svg { width: 24px; height: 24px; fill: #002A68; }
.hd-tel .hours { font-size: 12.5px; color: #444; }
.hd-pill { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 32px; border-radius: 999px; background: #002A68; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.hd-pill:hover { color: #fff; }
[data-h="h13"]:hover { background: #1f5bb0 !important; color: #fff !important; }
.hd-nav { display: flex; align-items: center; gap: clamp(24px,2.6vw,40px); font-size: 16.5px; font-weight: 700; white-space: nowrap; }
.hd-nav-item { position: relative; color: #222; letter-spacing: .04em; }
.hd-nav-item[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; border-radius: 2px; background: #847CFE; }
.hd-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid #222; background: #fff; cursor: pointer; padding: 0; }
.hd-more span { width: 4px; height: 4px; border-radius: 50%; background: #222; }
.hd-more:hover { background: #222; }
.hd-more:hover span { background: #F6DD39; }
.hd-cta { display: flex; align-items: center; gap: 12px; background: #222; color: #fff; padding: 15px 14px 15px 24px; border-radius: 6px; font-size: 15px; }
.arrow-y { width: 26px; height: 26px; background: #F6DD39; color: #222; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.hd-menu-btn { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: none; width: 48px; height: 48px; border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer; color: #222; padding: 0; }
.hd-menu-btn .bar { width: 18px; height: 2px; background: #222; border-radius: 1px; }
.hd-menu-btn .lbl { font: 500 9px/1 Outfit, sans-serif; letter-spacing: .1em; margin-top: 2px; }
.hd-menu { position: fixed; inset: var(--hd-h) 0 0 0; z-index: 19; background: #fff; padding: 24px 20px; overflow: auto; }
.hd-menu-list { border-top: 1px solid #222; }
.hd-menu-list a { display: flex; justify-content: space-between; align-items: center; padding: 20px 4px; border-bottom: 1px solid #ddd; color: #222; font-size: 17px; font-weight: 700; }
.hd-menu-list .en { display: block; font: 500 11px Outfit, sans-serif; color: #5B50E6; letter-spacing: .1em; }
.circle-arrow { width: 36px; height: 36px; border-radius: 50%; background: #222; color: #F6DD39; display: flex; align-items: center; justify-content: center; flex: none; }

/* ---------- フッター・スマホ下部のボタン ---------- */
.ft { background: #2a2a2c; color: #fff; padding: clamp(56px,7vw,80px) clamp(20px,7vw,96px) 32px; }
.ft-in { max-width: 1280px; margin: 0 auto; }
.ft-cols { display: flex; flex-wrap: wrap; gap: clamp(40px,5vw,64px); }
.ft-brand { flex: 1 1 280px; }
.ft-logo { display: flex; align-items: center; gap: 14px; color: #fff; }
.ft-logo:hover { color: #fff; }
.ft-logo-mark { background: #fff; border-radius: 8px; padding: 8px 10px; display: flex; flex: none; }
.ft-logo-mark img { height: 30px; width: auto; }
.ft-logo-text { display: flex; flex-direction: column; gap: 4px; }
.ft-logo-ja { font-weight: 700; font-size: 19px; letter-spacing: .08em; line-height: 1; }
.ft-logo-en { font: 500 8.5px/1 Outfit, sans-serif; letter-spacing: .12em; opacity: .75; }
.ft-offices { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.ft-office { font-size: 12.5px; line-height: 1.7; }
.ft-office b { font-weight: 700; }
.ft-office span { opacity: .75; }
.ft-links { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,160px),1fr)); gap: 32px; }
.ft-group-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.2); }
.ft-group-head .dot { width: 6px; height: 6px; border-radius: 50%; background: #F6DD39; }
.ft-group-head .en { font-family: Outfit, sans-serif; font-size: 15px; }
.ft-group-head .ja { font-size: 12px; opacity: .65; }
.ft-group-links { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; font-size: 13.5px; }
.ft-group-links a { color: #fff; opacity: .9; display: inline-block; width: fit-content; transform-origin: left center; }
.ft-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 56px; font-size: 11px; opacity: .6; }
.ft-bottom .en { font-family: Outfit, sans-serif; }
.ft-spacer { display: none; height: 72px; }
.dock { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e5e5e5; }
.dock a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 6px; font-size: 14px; font-weight: 700; }
.dock .tel { border: 1px solid #ccc; color: #222; }
.dock .form { background: #002A68; color: #fff; gap: 10px; }
.dock .form .arrow-y { width: 20px; height: 20px; font-size: 11px; }

@media (max-width: 1239px) {
  :root { --hd-h: 96px; }
  .hd { padding-block: 0; }
  .hd-right { display: none; }
  .hd-menu-btn { display: flex; }
  .ft-spacer { display: block; }
  .dock { display: grid; }
}
/* フォームの確認画面では下部バーを出さない（「お問い合わせ」が送信ボタンに見えるため。ARK 指示 2026-11-30） */
html.is-form-confirm .dock, html.is-form-confirm .ft-spacer { display: none; }
@media (min-width: 1240px) { .hd-menu { left: auto; width: min(100%, 460px); box-shadow: -12px 0 32px rgba(0,0,0,.08); border-left: 1px solid #eee; } }

/* ---------- トップのヒーロー ---------- */
@media (max-width: 1023px) { :root { --hero-max: 540px; } }

/* ---------- お問い合わせ系のページ：横の案内（幅1000px未満は下へ） ---------- */
[data-card="top"] { display: none !important; }
@media (max-width: 999px) {
  [data-aside] { position: static !important; order: 2 !important; }
  [data-card="aside"] { display: none !important; }
  [data-card="top"] { display: flex !important; }
}

/* ---------- フォーム ---------- */
[data-step="confirm"], [data-step="done"] { display: none !important; }
[data-form-step="confirm"] [data-step="input"], [data-form-step="done"] [data-step="input"] { display: none !important; }
[data-form-step="confirm"] [data-step="confirm"] { display: flex !important; }
[data-form-step="done"] [data-step="done"] { display: flex !important; }
label[style*="border: 1px solid"]:has(> input:checked) { background: #F3F2FF !important; border-color: #847CFE !important; }
.form-error { font-size: 13px; color: #c62828; }
.form-status { font-size: 14px; color: #c62828; line-height: 1.8; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* 「要確認」の印。公開前に情報を埋めてすべて消す */
.tbc { background: #d63a3a; color: #fff; font: 700 10px 'Noto Sans JP', sans-serif; padding: 2px 6px; border-radius: 3px; }

/* ---------- ロード画面（2026-11-22）：上の端のバーが 0%→100%、それに合わせてロゴができあがる ----------
   出すのはタブで最初に開いたページだけ（tools/gen.py の LOADER_HEAD）。動きは tools/gen.py の LOADER_HTML の script */
.ld { display: none; }
.is-loading body { overflow: hidden; }
.is-loading .ld {
  display: flex; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; background: #fff;
  transition: opacity .5s ease, visibility .5s ease;
  animation: ld-fallback 0s linear 8s forwards;   /* 何かで止まっても、8秒後には必ず消す */
}
.ld.is-done { opacity: 0; visibility: hidden; }
@keyframes ld-fallback { to { opacity: 0; visibility: hidden; } }
.ld-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #F3F2FF; }
.ld-bar span { display: block; height: 100%; background: linear-gradient(90deg, #002A68, #1f5bb0); transform-origin: left center; transform: scaleX(0); }
.ld-center { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ld-logo { width: min(220px, 52vw); height: auto; overflow: visible; }
.ld-m1, .ld-m2 { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ld-sun { opacity: 0; }
.ld-pct { font: 500 15px/1 Outfit, sans-serif; letter-spacing: .14em; color: #002A68; font-variant-numeric: tabular-nums; }

/* ---------- フッターの一番下の動き（2026-11-29）：山の線が描かれ、太陽が昇り、明星がまたたく ---------- */
.ft { position: relative; padding-bottom: 0; }
/* 高さは画面幅に合わせる（2880:150＝幅の約5.2%）。aspect-ratio＋min-height だとスマホで横幅が1000px超に広がり、ページが横にずれたため高さで指定（2026-11-29） */
.ft-dawn { height: clamp(56px, 5.21vw, 160px); width: auto; margin: clamp(28px,3.5vw,44px) calc(clamp(20px,7vw,96px) * -1) 0; overflow: hidden; opacity: .85; pointer-events: none; }
.ft-dawn svg { display: block; width: 100%; height: 100%; }
.ft-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ft-sun, .ft-glow { transform-box: fill-box; transform-origin: center; }
.ft-star { transform-box: fill-box; transform-origin: center; animation: ft-twinkle 3.6s ease-in-out infinite; }
@keyframes ft-twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: no-preference) {
  .js-dawn .ft-line { stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.4,0,.2,1); }
  .js-dawn .ft-line-2 { transition-delay: .35s; }
  .js-dawn .ft-line-3 { transition-delay: .7s; }
  .js-dawn .ft-sun { transform: translateY(60%); transition: transform 2.4s cubic-bezier(.2,.7,.25,1) .9s; }
  .js-dawn .ft-glow { opacity: 0; transition: opacity 2.4s ease 1.2s; }
  .js-dawn .ft-dawn.is-in .ft-line { stroke-dashoffset: 0; }
  .js-dawn .ft-dawn.is-in .ft-sun { transform: none; }
  .js-dawn .ft-dawn.is-in .ft-glow { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ft-star { animation: none; opacity: 1; } }
