/* ==========================================================
   Components: header, nav, buttons, cards, figures, footer
   ========================================================== */

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  height: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.brand__mark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link,
.nav__sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius);
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__sub-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav__item--sub {
  position: relative;
}

.nav__sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 300px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(28, 42, 94, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s 0.2s;
}

.nav__item--sub:hover .nav__sub,
.nav__item--sub.is-open .nav__sub,
.nav__item--sub:focus-within .nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.nav__item--sub:hover .nav__sub-toggle svg,
.nav__item--sub.is-open .nav__sub-toggle svg {
  transform: rotate(180deg);
}

.nav__sub a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border-radius: var(--radius);
}

.nav__sub a:hover,
.nav__sub a:focus-visible {
  background: var(--paper);
}

.nav__sub-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.nav__cta {
  margin-left: 12px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  margin-right: -10px;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle span:nth-child(1) {
  top: 17px;
}

.nav-toggle span:nth-child(2) {
  top: 26px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 21px;
  transform: rotate(-45deg);
}

/* mobile nav overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 900;
  padding: calc(var(--header-h) + 24px) var(--page-x) 40px;
  background: var(--paper);
  overflow-y: auto;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav__list > li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav__link,
.mobile-nav__sub-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}

.mobile-nav__sub-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.mobile-nav__sub-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mobile-nav__sub {
  padding: 0 0 12px 12px;
}

.mobile-nav__sub[hidden] {
  display: none;
}

.mobile-nav__sub a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  font-size: 1rem;
}

.mobile-nav__cta {
  margin-top: 28px;
}

@media (max-width: 1023px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .site-header {
    background: var(--paper);
    border-bottom-color: var(--line);
  }
}

@media (min-width: 1024px) {
  .mobile-nav {
    display: none !important;
  }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn--primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: #C9A85A;
  border-color: #C9A85A;
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--outline:hover {
  background: rgba(28, 42, 94, 0.06);
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn--sm {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.875rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  text-underline-offset: 4px;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover {
  text-decoration: underline;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

.link-arrow--light {
  color: #fff;
}

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-6);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--ink);
}

.card__num {
  display: block;
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.card__title {
  font-size: 1.125rem;
  line-height: 1.55;
  margin-bottom: var(--sp-3);
}

.card__body {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-2);
}

@media (max-width: 639px) {
  .card {
    padding: var(--sp-5);
  }
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1023px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- quote box ---------- */
.quote-box {
  position: relative;
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--gold);
  background: rgba(233, 223, 196, 0.4);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.quote-box__title {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-2);
}

.quote-box p {
  color: var(--text);
  font-size: 0.9375rem;
}

.emph-line {
  padding-left: var(--sp-5);
  border-left: 3px solid var(--gold);
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.8;
}

/* ---------- tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--fs-small);
  line-height: 1.6;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #fff;
}

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: var(--gutter);
}

.step {
  position: relative;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-strong);
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--ink);
}

.step__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: var(--sp-3);
}

.step__title {
  font-size: 1.125rem;
  margin-bottom: var(--sp-2);
}

.step__body {
  font-size: 0.9375rem;
  color: var(--text-2);
}

.step__icon {
  width: 28px;
  height: 28px;
  margin-bottom: var(--sp-4);
  color: var(--ink);
}

.step__icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 1023px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
    border-left: 1px solid var(--line-strong);
    padding-left: var(--sp-5);
  }

  .step {
    border-top: 0;
    padding-top: 0;
    padding-bottom: var(--sp-6);
  }

  .step::before {
    top: 10px;
    left: calc(-1 * var(--sp-5) - 1px);
    width: 2px;
    height: 32px;
  }
}

/* ---------- icon list ---------- */
.icon-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5) var(--sp-7);
}

.icon-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--sp-4);
  align-items: start;
}

.icon-list svg {
  width: 24px;
  height: 24px;
  color: var(--ink);
  margin-top: 4px;
}

.icon-list strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 2px;
}

.icon-list p {
  font-size: 0.9375rem;
  color: var(--text-2);
}

@media (max-width: 767px) {
  .icon-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- check list ---------- */
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 14px;
  height: 8px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}

/* ---------- table ---------- */
.table-wrap {
  width: 100%;
}

.table {
  font-size: 0.9375rem;
  border-top: 1px solid var(--line-strong);
}

.table th,
.table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.table thead th {
  background: var(--mist);
  font-weight: 700;
  color: var(--ink);
}

.table tbody th {
  font-weight: 500;
  color: var(--ink);
  width: 20%;
  white-space: nowrap;
}

.table td:last-child {
  color: var(--ink);
}

@media (max-width: 767px) {
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .table tbody th {
    padding: 0 0 8px;
    border: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    white-space: normal;
  }

  .table td {
    padding: 6px 0;
    border: 0;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--text-2);
  }
}

/* ---------- definition list ---------- */
.dl {
  border-top: 1px solid var(--line-strong);
}

.dl > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--sp-5);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.dl dt {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.dl dd {
  color: var(--text);
}

@media (max-width: 639px) {
  .dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

/* ---------- CTA band ---------- */
.cta-band {
  padding-block: var(--sp-8);
  text-align: center;
}

.cta-band__text {
  font-size: var(--fs-lead);
  color: var(--on-ink);
  margin-bottom: var(--sp-5);
}

.cta-band--large {
  padding-block: var(--sp-10);
}

.cta-band--large h2 {
  margin-bottom: var(--sp-4);
}

.cta-band--large p {
  max-width: 560px;
  margin-inline: auto;
  color: var(--on-ink-2);
  margin-bottom: var(--sp-6);
}

/* ---------- figures (共通言語) ---------- */
.figure {
  margin: 0;
}

.figure__caption {
  margin-top: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--text-2);
  text-align: center;
}

.fig-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.fig-box small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.4;
}

.fig-box--muted {
  border-color: var(--silver);
  color: var(--text-2);
  background: var(--mist);
}

.fig-box--ink {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.fig-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--text-2);
  line-height: 1.3;
  text-align: center;
}

.fig-arrow svg {
  width: 100%;
  max-width: 64px;
  height: 12px;
  color: var(--silver);
}

.fig-arrow--gold svg {
  color: var(--gold);
}

.fig-arrow--gold {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--on-ink-2);
  font-size: var(--fs-small);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  padding-block: var(--sp-8);
}

.site-footer .brand__mark {
  color: #fff;
  font-size: 1.25rem;
}

.site-footer__brand p {
  margin-top: var(--sp-4);
  line-height: 1.8;
}

.site-footer__col h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-2);
  margin-bottom: var(--sp-4);
}

.site-footer__col li {
  margin-bottom: 8px;
}

.site-footer__col a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.site-footer__col a:hover {
  color: #fff;
}

.site-footer__bottom {
  border-top: 1px solid var(--on-ink-line);
  padding-block: var(--sp-5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

@media (max-width: 1023px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}
