/* ==========================================================================
   コンポーネント定義
   ボタン・カード・バッジ等、セクション横断で再利用するパーツ。
   個別セクションの装飾は style.css 側では上書きせず、ここに集約する。
   ========================================================================== */

/* --- Accessibility utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--soft {
  background-color: var(--color-bg-soft);
}

/* --- Icon --- */
.icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-soft);
  color: var(--color-navy);
  font-size: 28px;
  position: relative;
  flex-shrink: 0;
}

.icon-badge--gold {
  color: var(--color-gold);
}

.icon-badge .icon {
  stroke-width: 2.4;
}

/* --- Section heading --- */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-gold);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.eyebrow .icon {
  width: 14px;
  height: 14px;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-navy);
  text-align: center;
  letter-spacing: 0.01em;
}

.section-lead {
  margin-top: var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-base);
}

.section-head {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: var(--space-7);
  text-align: center;
}

.text-gold {
  color: var(--color-gold-deep);
}

.text-navy {
  color: var(--color-navy);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 1rem 2.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--fs-body);
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
  white-space: nowrap;
}

.btn .icon {
  width: 1.2em;
  height: 1.2em;
}

.btn--primary {
  background-color: var(--color-navy-deep);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

.btn__sub {
  display: block;
  font-size: var(--fs-xsmall);
  font-weight: 400;
  opacity: 0.85;
}

/* --- Card --- */
.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.card--soft {
  background-color: var(--color-bg-soft);
  border-color: transparent;
}

.card--center {
  text-align: center;
}

.card__icon {
  margin-bottom: var(--space-3);
}

.card--center .card__icon {
  margin-inline: auto;
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-base);
}

/* Grid of cards */
.card-grid {
  display: grid;
  gap: var(--space-4);
}

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

.num-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--color-navy);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-small);
  flex-shrink: 0;
}

/* --- Checklist --- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-small);
  line-height: var(--lh-base);
}

.checklist__item .icon {
  color: var(--color-gold);
  width: 22px;
  height: 22px;
  margin-top: 0.15em;
}

.checklist__item--navy .icon {
  color: var(--color-navy);
}

/* --- Tag / pill --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-soft);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-navy);
}

.tag--outline {
  background-color: transparent;
  border: 1.5px solid var(--color-gold);
  color: var(--color-navy);
}

/* --- Badge(ヒーロー特徴チップ) --- */
.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem var(--space-3);
  border-radius: var(--radius-full);
  background-color: var(--color-bg-gold);
  border: 1px solid var(--color-gold);
  color: var(--color-navy);
  font-weight: 700;
  font-size: var(--fs-small);
  line-height: var(--lh-tight);
  text-align: center;
}

/* --- Highlight box (cream/gold panels with a statement + checklist) --- */
.highlight-box {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background-color: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.highlight-box__figure {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  font-size: 40px;
  box-shadow: var(--shadow-sm);
}

.highlight-box__body {
  flex: 1;
}

.highlight-box__lead {
  font-weight: 700;
  color: var(--color-navy);
  font-size: var(--fs-lead);
  line-height: var(--lh-tight);
}

.highlight-box__figure--navy {
  background-color: var(--color-navy-deep);
  color: #fff;
}

.highlight-box__desc {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: var(--lh-tight);
}

.highlight-box__desc a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-gold-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.highlight-box__desc a .icon {
  width: 14px;
  height: 14px;
}

/* --- Closing statement bar --- */
.statement {
  text-align: center;
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--color-navy);
  line-height: var(--lh-base);
}

/* --- Process step --- */
.step-row {
  display: grid;
  gap: var(--space-3);
  align-items: stretch;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}

.step__icon {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  font-size: 36px;
}

.step__title {
  font-weight: 700;
  color: var(--color-navy);
  font-size: var(--fs-body);
}

.step__text {
  font-size: var(--fs-xsmall);
  color: var(--color-text-muted);
  line-height: var(--lh-base);
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  opacity: 0.5;
}

.step-arrow .icon {
  width: 20px;
  height: 20px;
}

/* --- Comparison table --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.compare-table {
  width: 100%;
  min-width: 460px;
  font-size: 0.84rem;
}

.compare-table th,
.compare-table td {
  padding: 0.8rem 0.75rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: middle;
  line-height: var(--lh-tight);
}

.compare-table thead th {
  background-color: var(--color-navy-deep);
  color: #fff;
  font-weight: 700;
}

.compare-table thead th:first-child {
  background-color: var(--color-bg-soft);
  color: var(--color-navy);
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--color-navy);
  text-align: left;
  white-space: nowrap;
}

.compare-table tbody th .icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: var(--space-2);
}

.compare-table tbody td:last-child {
  color: var(--color-gold-deep);
  font-weight: 700;
  background-color: var(--color-bg-gold);
  border-left: 3px solid var(--color-gold);
}

/* --- FAQ --- */
.faq-list {
  display: grid;
  gap: var(--space-4);
}

.faq-item {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.faq-item__q {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  color: var(--color-navy);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-soft);
  margin-bottom: var(--space-3);
}

.faq-item__q .icon {
  width: 28px;
  height: 28px;
  color: var(--color-navy-soft);
}

.faq-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--fs-small);
  flex-shrink: 0;
}

.faq-mark--q {
  background-color: var(--color-navy);
  color: #fff;
}

.faq-mark--a {
  background-color: var(--color-gold-deep);
  color: #fff;
}

.faq-item__a {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: var(--lh-base);
}

.faq-item__a strong {
  color: var(--color-gold-deep);
}

/* --- Fade-in scroll animation (最小限) --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--fade-duration) ease, transform var(--fade-duration) ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Site header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--color-border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: 0.75rem;
}

.site-logo {
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1.1rem;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  margin-left: var(--space-7);
  gap: var(--space-4);
}

.site-nav a {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
  transition: color var(--transition-base);
}

.site-nav a:hover {
  color: var(--color-gold-deep);
}

.header-cta {
  padding: 0.7rem 1.5rem;
  font-size: var(--fs-small);
}

/* --- Sticky mobile CTA --- */
.mobile-cta {
  display: none;
}

@media (max-width: 767px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: var(--mobile-cta-height);
    background-color: var(--color-bg);
    box-shadow: 0 -4px 16px rgba(22, 33, 61, 0.12);
    padding: var(--space-2) var(--space-3);
  }

  .mobile-cta .btn {
    flex: 1;
  }

  body {
    padding-bottom: var(--mobile-cta-height);
  }
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-bg);
  color: var(--color-text);
  border-top: 1px solid var(--color-border-soft);
  text-align: center;
  padding-block: var(--space-6);
  font-size: var(--fs-small);
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
}

.site-footer__nav a {
  color: var(--color-navy);
  font-weight: 700;
  transition: color var(--transition-base);
}

.site-footer__nav a:hover {
  color: var(--color-gold-deep);
}

.site-footer__divider {
  color: var(--color-border);
}

.site-footer__copy {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-xsmall);
}

@media (max-width: 480px) {
  .site-footer__nav {
    flex-direction: column;
    gap: var(--space-2);
  }

  .site-footer__divider {
    display: none;
  }
}

/* --- Contact form --- */
.form-grid {
  display: grid;
  gap: var(--space-4);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-row label {
  font-weight: 700;
  font-size: var(--fs-small);
  color: var(--color-navy);
}

.form-row .required {
  color: var(--color-gold-deep);
  font-size: var(--fs-xsmall);
  margin-left: var(--space-2);
  font-weight: 700;
}

.form-row input,
.form-row textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: var(--fs-body);
  background-color: var(--color-bg);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}

.form-row textarea {
  resize: vertical;
  min-height: 140px;
}

.form-note {
  font-size: var(--fs-xsmall);
  color: var(--color-text-muted);
}

/* --- Accordion (TOPページFAQ用、details/summaryネイティブ実装) --- */
.accordion-item {
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
}

.accordion-item__q {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  font-weight: 700;
  color: var(--color-navy);
  line-height: var(--lh-tight);
}

.accordion-item__q::-webkit-details-marker {
  display: none;
}

.accordion-item__q-text {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.accordion-item__chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-gold);
  transition: transform 0.2s ease;
}

.accordion-item[open] .accordion-item__chevron {
  transform: rotate(180deg);
}

.accordion-item__body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-3);
  color: var(--color-text-muted);
  line-height: var(--lh-base);
}
