/* ==========================================================================
   あさひ司法書士事務所 デモサイト — style.css
   ========================================================================== */

:root {
  --navy-900: #0B1F3A;
  --navy-700: #16305A;
  --navy-600: #1E3E70;
  --gold-500: #C6A664;
  --gold-300: #E4D3A4;
  --bg-base:  #FAF8F4;
  --white:    #FFFFFF;
  --text-main:#1F2328;
  --text-sub: #5B6472;
  --border-light: #E7E2D8;

  --font-serif: "Noto Serif JP", serif;
  --font-sans: "Noto Sans JP", sans-serif;

  --header-h: 76px;
  --header-h-mobile: 64px;
  --max-width: 1120px;
  --header-max-width: 1340px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-base);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }

section[id], main#top {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.pc-only { display: inline; }

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

/* ---------- 共通レイアウト ---------- */

.section { padding: 88px 24px; }
.section__inner { max-width: var(--max-width); margin: 0 auto; }

.section__label {
  font-family: var(--font-serif);
  color: var(--gold-500);
  letter-spacing: 0.15em;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.section__label--light { color: var(--gold-300); }

.section__title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.section__title--light { color: var(--white); }

.section__lead {
  color: var(--text-sub);
  max-width: 640px;
  margin-bottom: 48px;
}
.section__lead--light { color: #C9D3E0; }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn--primary:hover { background: var(--gold-300); box-shadow: 0 6px 16px rgba(198,166,100,0.35); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,0.1); }

.btn--large { padding: 16px 32px; font-size: 1rem; }
.btn--small { padding: 10px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- デモ注記バー ---------- */

.demo-bar {
  background: var(--navy-900);
  color: var(--gold-300);
  text-align: center;
  font-size: 0.75rem;
  padding: 6px 12px;
}

/* ---------- ヘッダー ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 31, 58, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(198,166,100,0.25);
  transition: box-shadow 0.2s ease;
}
.header.is-scrolled {
  box-shadow: 0 6px 20px rgba(11,31,58,0.25);
}

.header__inner {
  max-width: var(--header-max-width);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  line-height: 1.2;
}
.header__logo-main {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  white-space: nowrap;
}
.header__logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  white-space: nowrap;
}

.header__nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
}
.header__nav li { flex-shrink: 0; }
.header__nav a {
  display: inline-block;
  color: #E6E9EF;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.header__nav a:hover { color: var(--gold-300); }

.header__contact {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
}
.header__tel {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  line-height: 1.2;
  color: var(--white);
  white-space: nowrap;
}
.header__tel-label { font-size: 0.65rem; color: var(--gold-300); white-space: nowrap; }
.header__tel-number { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }

.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.header__hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.header__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */

.hero {
  color: var(--white);
  padding: 120px 24px;
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6,17,32,0.94) 0%, rgba(8,22,42,0.9) 30%, rgba(11,31,58,0.78) 52%, rgba(11,31,58,0.4) 78%, rgba(11,31,58,0.18) 100%);
  z-index: 0;
  pointer-events: none;
}
.hero__inner { max-width: 640px; margin: 0 auto 0 max(24px, calc((100% - var(--max-width)) / 2 + 24px)); position: relative; z-index: 1; }

.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.badge {
  background: rgba(6,17,32,0.55);
  border: 1px solid var(--gold-500);
  color: var(--gold-300);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero__title {
  font-size: 2.3rem;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}

.hero__lead {
  color: #DCE3EC;
  margin-bottom: 36px;
  font-size: 0.98rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- 選ばれる3つの理由 ---------- */

.strength__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.strength-card {
  background: var(--white);
  border-top: 3px solid var(--gold-500);
  border-radius: 6px;
  padding: 32px 28px;
  box-shadow: 0 4px 18px rgba(11,31,58,0.06);
}
.strength-card__num {
  font-family: var(--font-serif);
  color: var(--gold-500);
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}
.strength-card__title {
  font-size: 1.1rem;
  margin-bottom: 14px;
  line-height: 1.6;
}
.strength-card__text {
  color: var(--text-sub);
  font-size: 0.92rem;
}

/* ---------- 代表者紹介 ---------- */

.representative { background: var(--white); }

.representative__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.representative__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(11,31,58,0.18);
}

.representative__name {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.representative__name span {
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-sub);
  font-weight: 400;
  margin-left: 8px;
}
.representative__role {
  color: var(--gold-500);
  font-weight: 700;
  margin-bottom: 20px;
}

.representative__meta {
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}
.representative__meta div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 10px;
}
.representative__meta dt {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.88rem;
}
.representative__meta dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.representative__message {
  margin: 0;
  padding: 20px 24px;
  background: var(--bg-base);
  border-left: 3px solid var(--gold-500);
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 2;
}

/* ---------- 業務内容 ---------- */

.service__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 28px;
  overflow: hidden;
}
.service-card__img {
  width: calc(100% + 56px);
  height: auto;
  margin: -28px -28px 20px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.service-card__no {
  font-family: var(--font-serif);
  color: var(--gold-500);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 10px;
}
.service-card__title {
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.service-card__text {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.service-card__items li {
  position: relative;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.7;
}
.service-card__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  border-radius: 50%;
}

/* ---------- 実績・お客様の声 ---------- */

.results {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
}

.results__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}

.result-stat { text-align: center; color: var(--white); }
.result-stat__num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-300);
}
.result-stat__unit { font-size: 1rem; margin-left: 4px; }
.result-stat__label { margin-top: 8px; font-size: 0.9rem; color: #C9D3E0; }

.voice__heading {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 6px;
  text-align: center;
}
.voice__note {
  text-align: center;
  color: #96A3B8;
  font-size: 0.78rem;
  margin-bottom: 32px;
}

.voice__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.voice-card {
  background: var(--white);
  border-radius: 6px;
  padding: 26px 24px;
}
.voice-card__tag {
  display: inline-block;
  background: var(--gold-300);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.voice-card__text {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 14px;
  display: block;
  line-height: 1.8;
}
.voice-card__attr {
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* ---------- 料金 ---------- */

.fee__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 20px;
}

.fee__table th, .fee__table td {
  padding: 16px 18px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}
.fee__table thead th {
  background: var(--navy-900);
  color: var(--white);
  font-weight: 700;
  white-space: nowrap;
}
.fee__table tbody tr:nth-child(even) { background: var(--white); }
.fee__table tbody tr:nth-child(odd) { background: var(--bg-base); }
.fee__table tbody tr:last-child td { border-bottom: none; }

.fee__note { color: var(--text-sub); font-size: 0.85rem; }

/* ---------- ご相談の流れ ---------- */

.flow__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.flow-step {
  background: var(--white);
  border-radius: 6px;
  padding: 26px 20px;
  text-align: center;
  position: relative;
  border-top: 3px solid var(--gold-500);
}
.flow-step__num {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--gold-500);
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.flow-step__title { font-size: 1rem; margin-bottom: 10px; }
.flow-step__text { font-size: 0.82rem; color: var(--text-sub); }

/* ---------- FAQ ---------- */

.faq__list { display: grid; gap: 14px; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 4px 24px;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 32px 18px 0;
  font-weight: 700;
  color: var(--navy-900);
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 1.4rem;
  color: var(--gold-500);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 0 20px;
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.9;
}

/* ---------- お問い合わせ ---------- */

.contact {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--white);
  border-radius: 8px;
  padding: 36px;
}

.form-row { margin-bottom: 22px; }
.form-row label, .form-row legend {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--navy-900);
  padding: 0;
}
.form-row fieldset { border: none; padding: 0; margin: 0; }

.required, .optional {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}
.required { background: #FBE7E7; color: #B23B3B; }
.optional { background: var(--bg-base); color: var(--text-sub); }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  background: var(--bg-base);
}
input:focus, textarea:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
}

.checkbox-group, .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.checkbox-group label, .radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 0.88rem;
  margin: 0;
}

.checkbox-single {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-sub);
}
.checkbox-single a { color: var(--navy-900); text-decoration: underline; }

.contact-form__note {
  font-size: 0.78rem;
  color: var(--text-sub);
  text-align: center;
  margin-top: 14px;
}

.contact-form__success {
  margin-top: 18px;
  padding: 16px;
  background: #E9F5EC;
  color: #2A7A44;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
}

.contact__side {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(198,166,100,0.3);
  border-radius: 8px;
  padding: 32px 28px;
  color: var(--white);
  text-align: center;
}
.contact__side-label { font-size: 0.85rem; color: #C9D3E0; margin-bottom: 12px; }
.contact__side-tel {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 12px;
}
.contact__side-hours, .contact__side-area { font-size: 0.82rem; color: #C9D3E0; margin-top: 6px; }

/* ---------- 事務所案内 ---------- */

.about { background: var(--white); }

.about__table th, .about__table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  font-size: 0.9rem;
}
.about__table th {
  width: 180px;
  background: var(--bg-base);
  color: var(--navy-900);
  font-weight: 700;
}
.about__note {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* ---------- フッター ---------- */

.footer {
  background: var(--navy-900);
  color: #C9D3E0;
  padding: 56px 24px 24px;
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  border-bottom: 1px solid rgba(198,166,100,0.25);
  padding-bottom: 32px;
}
.footer__logo { font-family: var(--font-serif); color: var(--white); font-size: 1.2rem; font-weight: 700; }
.footer__logo-sub { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--gold-300); margin: 4px 0 16px; }
.footer__address, .footer__tel { font-size: 0.85rem; margin-top: 6px; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  max-width: 420px;
}
.footer__nav a { font-size: 0.85rem; }
.footer__nav a:hover { color: var(--gold-300); }

.footer__bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.78rem;
  color: #7C88A0;
  display: grid;
  gap: 6px;
}

/* ==========================================================================
   スクロールリビール（項目ごとにライズして表示）
   .js が付いている（＝JS有効）ときだけ初期状態を隠す。JS無効時は通常表示。
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

/* ヘッダーナビ：中間幅（ノートPCの非最大化ウィンドウなど）で7項目が
   詰まって折り返さないよう、768pxより広い段階でハンバーガーに切り替える */
@media (max-width: 1100px) {
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy-900);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid rgba(198,166,100,0.25);
  }
  .header__nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; flex-wrap: wrap; }
  .header__nav li { flex-shrink: 1; }
  .header__nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: normal;
  }

  /* メニュー展開時、項目ごとにスッと浮き上がるライズアニメーション */
  .header__nav li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .header__nav.is-open { max-height: 520px; }
  .header__nav.is-open li {
    opacity: 1;
    transform: translateY(0);
  }
  .header__nav.is-open li:nth-child(1) { transition-delay: 0.06s; }
  .header__nav.is-open li:nth-child(2) { transition-delay: 0.11s; }
  .header__nav.is-open li:nth-child(3) { transition-delay: 0.16s; }
  .header__nav.is-open li:nth-child(4) { transition-delay: 0.21s; }
  .header__nav.is-open li:nth-child(5) { transition-delay: 0.26s; }
  .header__nav.is-open li:nth-child(6) { transition-delay: 0.31s; }
  .header__nav.is-open li:nth-child(7) { transition-delay: 0.36s; }

  .header__contact { display: none; }
  .header__hamburger { display: flex; }
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .representative__grid { grid-template-columns: 200px 1fr; gap: 32px; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: var(--header-h-mobile); }

  .pc-only { display: none; }

  .section { padding: 64px 20px; }
  .section__title { font-size: 1.5rem; }

  .hero { padding: 56px 20px; }
  .hero__title { font-size: 1.7rem; }
  .hero__inner { margin: 0; max-width: 100%; }

  .strength__grid { grid-template-columns: 1fr; }
  .representative__grid { grid-template-columns: 1fr; }
  .representative__photo { max-width: 180px; margin: 0 auto; }
  .representative__meta div { grid-template-columns: 1fr; gap: 4px; }

  .service__list { grid-template-columns: 1fr; }

  .results__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .voice__grid { grid-template-columns: 1fr; }

  /* 料金表 → カード化 */
  .fee__table-wrap { border: none; overflow: visible; }
  .fee__table thead { display: none; }
  .fee__table, .fee__table tbody, .fee__table tr, .fee__table td { display: block; width: 100%; }
  .fee__table tr {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 8px 16px;
  }
  .fee__table td {
    border-bottom: 1px dashed var(--border-light);
    padding: 10px 0;
  }
  .fee__table td:last-child { border-bottom: none; }
  .fee__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-500);
    margin-bottom: 4px;
  }

  .flow__list { grid-template-columns: 1fr; }

  .contact-form { padding: 24px 20px; }

  .about__table, .about__table tbody, .about__table tr, .about__table th, .about__table td {
    display: block; width: 100%;
  }
  .about__table th { width: auto; padding-bottom: 4px; }
  .about__table td { padding-top: 4px; padding-bottom: 20px; }

  .footer__inner { flex-direction: column; }
}
