/* ============================================================
   美田行政書士事務所 — 共通スタイル
   Apple-inspired minimal, professional, navy-based
   ============================================================ */

/* --- Variables --- */
:root {
  --white:       #ffffff;
  --gray:        #f6f7f9;
  --gray-2:      #fafbfc;
  --navy:        #1a3a5c;
  --navy-hover:  #2d5f8a;
  --navy-pale:   #eef2f7;
  --navy-deep:   #0f2540;
  --accent:      #b89968; /* 控えめなゴールド、究業感用 */
  --text:        #1d1d1f;
  --text-sub:    rgba(0,0,0,0.56);
  --text-light:  rgba(0,0,0,0.36);
  --text-on-dark:#f5f5f7;
  --border:      rgba(0,0,0,0.1);
  --border-light:rgba(0,0,0,0.06);
  --shadow:      rgba(0,0,0,0.08);
  --font-head:   'Noto Sans JP', "SF Pro JP", "SF Pro Display", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", メイリオ, Meiryo, sans-serif;
  --font-body:   'Noto Sans JP', "SF Pro JP", "SF Pro Text",    "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", メイリオ, Meiryo, sans-serif;
  --font-en:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w:       1080px;
  --max-w-wide:  1200px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100vw; }
img, iframe { max-width: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -0.2px;
  color: var(--text);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--navy); text-decoration: none; transition: color 0.2s, background 0.2s; }
a:hover { color: var(--navy-hover); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text);
  font-weight: 700;
}
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-logo:hover { color: var(--navy); }
.nav-logo-mark {
  width: 30px;
  height: 30px;
  min-width: 30px;
  aspect-ratio: 1 / 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark img,
.nav-logo-mark svg {
  width: 30px;
  height: 30px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-logo-mark .badge-gold {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
/* hover可能なデバイスのみ金色バッジを表示。スマホ等では非表示 */
@media (hover: hover) and (pointer: fine) {
  .nav-logo:hover .nav-logo-mark .badge-gold { opacity: 1 !important; }
}
@media (hover: none), (pointer: coarse) {
  .nav-logo-mark .badge-gold { display: none !important; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.03em;
  line-height: 1;
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-links a:not(.nav-cta).is-current::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--navy); }
.nav-cta {
  background: var(--navy);
  color: var(--text-on-dark) !important;
  padding: 8px 18px;
  border-radius: 980px;
  font-size: 13.5px !important;
}
.nav-cta:hover { background: var(--navy-hover) !important; color: var(--text-on-dark) !important; }
.nav-links a.nav-ext {
  font-size: 12.5px; padding: 6px 12px;
  background: rgba(200,169,106,0.1);
  color: var(--accent, #8a6e2f) !important;
  border-radius: 980px;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(200,169,106,0.25);
  transition: background 0.2s ease;
}
.nav-links a.nav-ext::after { display: none !important; }
.nav-links a.nav-ext:hover { background: rgba(200,169,106,0.18); color: #6e5524 !important; }
.nav-links a.nav-ext svg { opacity: 0.7; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* ============================================================
   PAGE HEADER (sub-pages)
   ============================================================ */
.page-head {
  padding: 84px 0 64px;
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}
.page-head .label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--navy-pale);
  border-radius: 980px;
  background: var(--navy-pale);
}
.page-head h1 {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.page-head .lead {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-sub);
  max-width: 640px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 24px;
  font-family: var(--font-en);
  letter-spacing: 0.05em;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .sep { color: rgba(0,0,0,0.2); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 28px;
  border-radius: 980px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: var(--text-on-dark); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: var(--text-on-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--text-on-dark); }
.btn-white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover { background: var(--navy-pale); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--text-on-dark); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text-on-dark); }
.btn-lg { padding: 14px 36px; font-size: 17px; }
.btn svg { flex-shrink: 0; }
.btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-white { background: var(--white); }
.section-gray  { background: var(--gray); }
.section-navy  { background: var(--navy); color: var(--text-on-dark); }
.section-navy-deep { background: var(--navy-deep); color: var(--text-on-dark); }
.section-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--navy);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-navy .section-label,
.section-navy-deep .section-label { color: rgba(255,255,255,0.55); }
.section-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.10;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
  margin-bottom: 48px;
}
.section-navy .section-title,
.section-navy-deep .section-title { color: var(--text-on-dark); }
.section-title .accent { color: var(--navy); }
.section-navy .section-title .accent,
.section-navy-deep .section-title .accent { color: var(--accent); }
.section-sub {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-sub);
  text-align: center;
  max-width: 640px;
  margin: -32px auto 48px;
}
.section-navy .section-sub,
.section-navy-deep .section-sub { color: rgba(255,255,255,0.68); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 4px 24px var(--shadow);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.card-num {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--navy);
  margin-bottom: 12px;
}
.card-tag {
  display: inline-block;
  background: var(--navy-pale);
  color: var(--navy);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 980px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: var(--text);
  margin-bottom: 12px;
}
.card p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-sub);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--gray);
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.footer-brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-block;
}
.footer-brand-mark img { width: 28px; height: 28px; display: block; object-fit: contain; }
.footer-brand p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-sub);
  line-height: 1.85;
}
.footer-brand a { color: var(--text-sub); }
.footer-brand a:hover { color: var(--navy); }
.footer-col-title {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-sub);
}
.footer-col a:hover { color: var(--navy); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom small, .footer-bottom a {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-light);
}
.footer-bottom a:hover { color: var(--navy); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .section-title { font-size: 32px; }
  .page-head h1 { font-size: 38px; }
}

@media (max-width: 767px) {
  section { padding: 56px 0; }
  .section-title { font-size: 24px; line-height: 1.45; }
  .section-sub { font-size: 14px; margin: -16px auto 28px; line-height: 1.8; }
  .page-head { padding: 48px 0 40px; }
  .page-head h1 { font-size: 26px; line-height: 1.45; }
  .page-head .lead { font-size: 14px; line-height: 1.85; }
  .container, .container-wide { padding: 0 18px; }
  body { font-size: 14.5px; }
  h2 { font-size: 22px; }
  h3 { font-size: 17px; }

  /* Nav */
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 52px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    padding: 16px 20px 28px;
    border-bottom: 1px solid var(--border);
    gap: 0;
    backdrop-filter: blur(20px);
  }
  .nav-links.is-open a {
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }
  .nav-links.is-open .nav-cta {
    margin-top: 16px;
    text-align: center;
    padding: 13px 20px;
  }
  .nav-toggle { display: flex; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
