/* ==========================================================================
   税理士法人 あおやぎ会計 — style.css
   方向性: 情報量系・信頼感 / 左固定サイドバーの2カラム
   01(朝霧)とは配色・書体・骨格・演出のすべてを変えている。
   ========================================================================== */

/* 和文は 400 と 700 の2ウェイトのみ要求している。500 を足すと日本語の
   サブセット woff2 が1フェイス分まるごと増えるため、強調は 700 に寄せた。
   数字・欧文の 500 は IBM Plex Sans（欧文のみ）なので影響が小さい。 */

/* --- 1. トークン ---------------------------------------------------------- */
:root {
  --navy:      #10243f;
  --navy-dp:   #0a1728;
  --blue:      #2f6fae;
  --blue-lt:   #e8f0f8;
  --slate:     #5c6773;
  --slate-lt:  #8b96a3;
  --bg:        #f5f7fa;
  --card:      #ffffff;
  --line:      #dde3ea;
  --line-dp:   #c3ccd6;
  --warn:      #b4532f;

  --step--2: clamp(0.70rem, 0.68rem + 0.10vw, 0.75rem);
  --step--1: clamp(0.81rem, 0.79rem + 0.12vw, 0.88rem);
  --step-0:  clamp(0.94rem, 0.91rem + 0.14vw, 1.00rem);
  --step-1:  clamp(1.06rem, 1.00rem + 0.28vw, 1.25rem);
  --step-2:  clamp(1.25rem, 1.14rem + 0.55vw, 1.63rem);
  --step-3:  clamp(1.50rem, 1.31rem + 0.94vw, 2.13rem);
  --step-4:  clamp(1.81rem, 1.49rem + 1.60vw, 2.88rem);

  --sp-2xs: 0.25rem;
  --sp-xs:  0.5rem;
  --sp-s:   0.75rem;
  --sp-m:   1.25rem;
  --sp-l:   2rem;
  --sp-xl:  clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --sp-2xl: clamp(3.5rem, 2.6rem + 4.5vw, 6rem);

  --sidebar: 17.5rem;
  --content: 58rem;

  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --num:  "IBM Plex Sans", "Noto Sans JP", sans-serif;

  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(16, 36, 63, 0.06), 0 1px 3px rgba(16, 36, 63, 0.04);
  --shadow-md: 0 2px 4px rgba(16, 36, 63, 0.05), 0 6px 16px rgba(16, 36, 63, 0.07);
}

/* --- 2. 基礎 -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--navy);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.5; letter-spacing: 0.01em; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 300;
  background: var(--navy); color: #fff; padding: var(--sp-s) var(--sp-m);
}
.skip:focus { left: 0; }

/* --- 3. 骨格: サイドバー + 本文 ------------------------------------------- */
.layout { display: block; }

.sidebar {
  background: var(--navy);
  color: #fff;
  padding: var(--sp-l) var(--sp-m);
}
.sidebar a { color: #fff; text-decoration: none; }

.logo { display: block; margin-bottom: var(--sp-l); }
.logo__name { font-size: var(--step-1); font-weight: 700; letter-spacing: 0.08em; }
.logo__type { font-size: var(--step--2); color: #9fb3cc; letter-spacing: 0.18em; margin-bottom: 0.2em; }
.logo__en { font-family: var(--num); font-size: var(--step--2); color: #7d93ad; letter-spacing: 0.16em; }

.sidenav { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.sidenav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  padding: 0.7em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--step--1);
  color: #dbe4ee;
}
.sidenav a:hover { color: #fff; padding-left: 0.4em; transition: padding-left 0.2s ease, color 0.2s ease; }
.sidenav a .n { font-family: var(--num); font-size: var(--step--2); color: #8095ae; } /* 濃紺地で 5.07:1 */

.side-cta { margin-top: var(--sp-l); }
.side-cta__note { font-size: var(--step--2); color: #9fb3cc; margin-bottom: var(--sp-xs); }
.side-tel {
  font-family: var(--num);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: block;
}
.side-hours { font-size: var(--step--2); color: #9fb3cc; }

/* --- 4. ボタン ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  font-size: var(--step--1);
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #245a91; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn--outline { border-color: var(--line-dp); color: var(--navy); background: #fff; }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* --- 5. 本文の器 ---------------------------------------------------------- */
.content { min-width: 0; }
.section {
  padding: var(--sp-2xl) clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.section > * { max-width: var(--content); }
.section--tint { background: #eef2f7; }
.section--navy { background: var(--navy); color: #fff; border-bottom: 0; }

.sec-head { margin-bottom: var(--sp-xl); }
.sec-head__no {
  font-family: var(--num);
  font-size: var(--step--2);
  letter-spacing: 0.22em;
  color: var(--blue);
  display: block;
  margin-bottom: var(--sp-2xs);
}
.section--navy .sec-head__no { color: #7fb0e0; }
.sec-head h2 { font-size: var(--step-3); }
.sec-head p { color: var(--slate); margin-top: var(--sp-s); max-width: 44em; }
.section--navy .sec-head p { color: #b9c9dc; }

/* --- 6. ヒーロー ---------------------------------------------------------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--navy) 12%, rgba(16, 36, 63, 0.72) 55%, rgba(16, 36, 63, 0.45));
}
.hero__inner {
  position: relative;
  padding: var(--sp-2xl) clamp(1.25rem, 5vw, 4rem);
  max-width: var(--content);
}
.hero__badge {
  display: inline-block;
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: var(--sp-m);
}
.hero h1 { font-size: var(--step-4); line-height: 1.45; margin-bottom: var(--sp-m); }
.hero h1 em { font-style: normal; color: #8dc0ef; }
.hero__text { color: #cbd8e6; max-width: 36em; margin-bottom: var(--sp-l); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-s); }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--sp-m);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-l);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.fact__num { font-family: var(--num); font-size: var(--step-3); font-weight: 500; line-height: 1.2; }
.fact__num span { font-size: var(--step-0); margin-left: 0.15em; }
.fact__label { font-size: var(--step--2); color: #9fb3cc; letter-spacing: 0.06em; }

/* --- 7. 選ばれる理由 ------------------------------------------------------ */
.reasons { display: grid; gap: var(--sp-m); grid-template-columns: 1fr; }
.reason {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-l) var(--sp-m);
  box-shadow: var(--shadow-sm);
}
.reason__icon {
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  background: var(--blue-lt);
  color: var(--blue);
  border-radius: var(--radius);
  margin-bottom: var(--sp-s);
}
.reason__icon svg { width: 1.35rem; height: 1.35rem; }
.reason h3 { font-size: var(--step-1); margin-bottom: var(--sp-xs); }
.reason p { font-size: var(--step--1); color: var(--slate); }

/* --- 8. サービス ---------------------------------------------------------- */
.services { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--card); padding: var(--sp-l) var(--sp-m); }
.service__no { font-family: var(--num); font-size: var(--step--2); color: var(--slate-lt); letter-spacing: 0.16em; }
.service h3 { font-size: var(--step-1); margin: var(--sp-2xs) 0 var(--sp-xs); }
.service p { font-size: var(--step--1); color: var(--slate); }
.service ul { margin-top: var(--sp-s); display: flex; flex-wrap: wrap; gap: var(--sp-2xs); }
.service li {
  font-size: var(--step--2);
  background: var(--blue-lt);
  color: #235886;
  padding: 0.2em 0.6em;
  border-radius: 2px;
}

/* --- 9. 料金表 ------------------------------------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 34rem; }

.price th, .price td {
  border: 1px solid var(--line);
  padding: var(--sp-s) var(--sp-m);
  text-align: left;
  font-size: var(--step--1);
  vertical-align: top;
}
.price thead th { background: var(--navy); color: #fff; font-weight: 700; }
.price tbody th { background: #eef2f7; font-weight: 700; width: 12rem; }
.price td strong { font-family: var(--num); font-size: var(--step-1); font-weight: 500; display: block; }
.price td small { color: var(--slate); font-size: var(--step--2); }
.price tbody tr:nth-child(even) td { background: #fbfcfd; }

.note-list { margin-top: var(--sp-m); font-size: var(--step--2); color: var(--slate); }
.note-list li { padding-left: 1.1em; position: relative; }
.note-list li::before { content: "※"; position: absolute; left: 0; }

/* --- 10. 対応業種 --------------------------------------------------------- */
.industries { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--sp-xs); }
.industry {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  padding: var(--sp-s) var(--sp-m);
  font-size: var(--step--1);
}
.industry span { display: block; font-size: var(--step--2); color: var(--slate); }

/* --- 11. 流れ ------------------------------------------------------------- */
.flow { counter-reset: step; }
.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--sp-m);
  padding-bottom: var(--sp-l);
  position: relative;
}
.flow li::before {
  content: counter(step);
  font-family: var(--num);
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  border-radius: 50%;
  font-size: var(--step--1);
}
/* 縦の連結線。最後の項目には引かない */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.25rem; top: 2.5rem; bottom: 0;
  width: 1px;
  background: var(--line-dp);
}
.flow h3 { font-size: var(--step-1); }
.flow p { font-size: var(--step--1); color: var(--slate); }
.flow .term { font-size: var(--step--2); color: var(--blue); margin-top: var(--sp-2xs); }

/* --- 12. FAQ -------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); background: var(--card); }
.faq summary {
  padding: var(--sp-m);
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 700;
  display: flex;
  gap: var(--sp-s);
  align-items: flex-start;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; font-family: var(--num); color: var(--blue); flex: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 0.6em; height: 0.6em;
  border-right: 2px solid var(--slate-lt);
  border-bottom: 2px solid var(--slate-lt);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: 0.35em;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .a {
  padding: 0 var(--sp-m) var(--sp-m) calc(var(--sp-m) + 1.4em);
  font-size: var(--step--1);
  color: var(--slate);
}

/* --- 13. 事務所概要 ------------------------------------------------------- */
.profile th, .profile td {
  border-bottom: 1px solid var(--line);
  padding: var(--sp-s) 0;
  text-align: left;
  font-size: var(--step--1);
  vertical-align: top;
}
.profile th { width: 8rem; font-weight: 700; color: var(--slate); }

.about-grid { display: grid; gap: var(--sp-l); grid-template-columns: 1fr; }
.about-grid figure figcaption { font-size: var(--step--2); color: var(--slate); margin-top: var(--sp-xs); }

/* --- 14. 帯 --------------------------------------------------------------- */
.band { position: relative; }
.band img { width: 100%; height: clamp(11rem, 26vh, 18rem); object-fit: cover; filter: brightness(0.45) saturate(0.8); }
.band__inner {
  position: absolute; inset: 0;
  display: grid; align-content: center;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  color: #fff;
}
.band__inner p { font-size: var(--step-2); font-weight: 700; }
.band__inner small { font-size: var(--step--1); color: #cbd8e6; }

/* --- 15. お問い合わせ ----------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: var(--sp-l);
  grid-template-columns: 1fr;
  /* 電話カードをフォームの高さに引き伸ばさない（下に空洞ができる） */
  align-items: start;
}
.contact-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: var(--sp-l) var(--sp-m);
}
.contact-card h3 { font-size: var(--step-1); margin-bottom: var(--sp-xs); }
.contact-card p { font-size: var(--step--1); color: #b9c9dc; margin-bottom: var(--sp-m); }
.contact-tel { font-family: var(--num); font-size: var(--step-3); font-weight: 500; color: #fff; display: block; }
.contact-tel:hover { text-decoration: none; }

.form-row { display: grid; gap: var(--sp-2xs); margin-bottom: var(--sp-m); }
.form-row label { font-size: var(--step--1); font-weight: 700; }
.req { font-size: var(--step--2); color: #ffb59c; margin-left: 0.4em; }
.form-row input, .form-row select, .form-row textarea {
  font: inherit;
  font-size: var(--step--1);
  padding: 0.7em 0.8em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 100%;
}
.form-row textarea { min-height: 7rem; resize: vertical; }
.form-row input::placeholder, .form-row textarea::placeholder { color: #8fa3ba; }
.form-row select option { color: #10243f; }
.form-note { font-size: var(--step--2); color: #9fb3cc; margin-bottom: var(--sp-m); }

/* --- 16. フッター --------------------------------------------------------- */
.site-footer { background: var(--navy-dp); color: #94a7bd; padding: var(--sp-xl) clamp(1.25rem, 5vw, 4rem) var(--sp-l); font-size: var(--step--1); }
.site-footer a { color: #cbd8e6; }
.footer-grid { display: grid; gap: var(--sp-l); grid-template-columns: 1fr; padding-bottom: var(--sp-l); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-grid h3 { font-size: var(--step--1); color: #fff; margin-bottom: var(--sp-xs); }
.footer-grid li { padding: 0.15em 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-s); padding-top: var(--sp-m); font-size: var(--step--2); }
.fiction { max-width: 52em; color: #7c8ea4; }

/* --- 17. モバイル用ヘッダー（広い画面では隠す） --------------------------- */
.mobile-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-s);
  background: var(--navy); color: #fff;
  padding: var(--sp-s) var(--sp-m);
}
/* .sidebar a には色を指定してあるが、ここは .sidebar の外なので
   グローバルの a { color: var(--blue) } を拾ってしまう（濃紺地で 2.98:1）。 */
.mobile-bar a { color: #fff; }
.mobile-bar .logo { margin: 0; }
.drawer-toggle {
  background: none; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff;
  border-radius: var(--radius); padding: 0.5em 0.9em; font: inherit; font-size: var(--step--2); cursor: pointer;
}

/* --- 18. 画面幅による変化（2箇所のみ） ------------------------------------ */
@media (min-width: 40em) {
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1.3fr 0.7fr; }
  .contact-grid { grid-template-columns: 0.8fr 1.2fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 64em) {
  .layout { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .sidebar {
    position: sticky; top: 0;
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    padding: var(--sp-xl) var(--sp-m);
  }
  .mobile-bar { display: none; }
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(3, 1fr); }
}

/* 狭い画面ではサイドバーを引き出しにする */
@media (max-width: 63.99em) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: min(20rem, 84vw);
    z-index: 60;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }
  .sidebar.is-open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
  .scrim {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(10, 23, 40, 0.5);
    opacity: 0; visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
  }
  .scrim.is-open { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* --- 19. 支援クラス ------------------------------------------------------- */
/* 画面には出さないが、支援技術には読ませる（表の caption 等） */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- 20. サイドナビの現在地 ----------------------------------------------- */
.sidenav a.is-current {
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--blue);
  padding-left: 0.6em;
}
.sidenav a.is-current .n { color: #8dc0ef; }

/* --- 21. 横スクロールする表 ----------------------------------------------- */
/* 表は狭い画面で必ず溢れる。溢れていることが見えないと「切れている」と
   受け取られるため、狭い画面でだけ操作の手がかりを出す。
   role="region" + tabindex="0" はキーボードでスクロールさせるために必要。 */
.table-scroll:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

@media (max-width: 47.99em) {
  .table-scroll { position: relative; }
  .table-scroll::after {
    content: "→ 横にスクロールできます";
    display: block;
    font-size: var(--step--2);
    color: var(--slate);
    padding-top: var(--sp-2xs);
    position: sticky;
    left: 0;
  }
}

/* --- 以下、HTML 側の style 属性を規則へ移したもの --- */

/* 節の中の小見出し（料金表の二枚目、代表挨拶など） */
.sub-head { margin: var(--sp-l) 0 var(--sp-s); font-size: var(--step-1); }

/* 側部の相談ボタン。間隔のためだけの p を廃したぶんをここで持つ */
.side-cta .btn { margin-top: 1rem; }

/* 代表挨拶 */
.message { font-size: var(--step--1); color: var(--slate); }
.message__sign { font-size: var(--step--1); margin-top: var(--sp-s); }

/* 事務所概要の図版は二枚並ぶ */
.about-grid figure + figure { margin-top: var(--sp-m); }

/* 問い合わせカード内の所在地 */
.contact-card__addr { margin-top: var(--sp-m); margin-bottom: 0; }

/* 送信結果の表示域 */
.form-status { margin-top: var(--sp-s); font-size: var(--step--1); }

\n