/* ==========================================================================
   XDR PlusOne — Components
   Buttons, cards, badges, forms, tables, accordions
   ========================================================================== */

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  border-radius: 8px;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 200ms var(--ease-standard),
              color 200ms var(--ease-standard),
              border-color 200ms var(--ease-standard),
              box-shadow 200ms var(--ease-standard);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand-purple); color: white; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--brand-purple-700); box-shadow: var(--shadow-cta-lg); }
.btn-secondary { background: white; color: var(--brand-purple); border-color: var(--brand-purple); }
.btn-secondary:hover { background: var(--brand-purple-50); }
.btn-ghost { background: transparent; color: var(--brand-purple); padding: 0 8px; }
.btn-ghost:hover { color: var(--brand-purple-700); }
.btn-on-dark { background: white; color: var(--brand-purple-900); }
.btn-on-dark:hover { background: var(--brand-purple-100); color: var(--brand-purple-900); }
.btn-on-dark-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.5); }
.btn-on-dark-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.85); }
.btn-lg { height: 56px; padding: 0 32px; font-size: 16px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform 200ms var(--ease-standard); display: inline-flex; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------------- Badge / pill ---------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 4px;
  background: var(--brand-purple-100);
  color: var(--brand-purple);
}
.pill-num {
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* ---------------- Card ---------------- */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px;
}
.card .icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-purple-100);
  color: var(--brand-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* Larger illustrative scene atop a pain/feature card */
.card .scene {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-purple-50) 0%, var(--brand-purple-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.card .scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(91,63,191,0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.card .scene svg { color: var(--brand-purple); position: relative; z-index: 1; }
.card .scene.tone-danger { background: linear-gradient(135deg, #FFF1EE 0%, #FBECEA 100%); }
.card .scene.tone-danger svg { color: var(--color-danger); }
.card .scene.tone-navy { background: linear-gradient(135deg, var(--brand-navy-100) 0%, #D6E0F2 100%); }
.card .scene.tone-navy svg { color: var(--brand-navy); }
.card-title {
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.45;
}
.card-body {
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-fg-muted);
  margin: 0;
}

/* ---------------- Stat card ---------------- */
.stat-card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: white;
}
.stat-card .stat-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-card .num {
  font-size: 56px;
  line-height: 1;
}
.stat-card .stat-unit {
  font-family: var(--font-jp);
  font-size: 22px;
  color: var(--gray-950);
  font-weight: 700;
}
.stat-card .stat-label {
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 6px;
  line-height: 1.5;
}
.stat-card .stat-source {
  font-family: var(--font-jp);
  font-size: 11px;
  color: var(--color-fg-subtle);
  margin: 0;
  line-height: 1.5;
}

/* ---------------- Pillar (Promise) card ---------------- */
.pillar-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.pillar-card .pillar-visual {
  position: relative;
  height: 140px;
  background: linear-gradient(135deg, var(--brand-purple-900) 0%, var(--brand-navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pillar-card .pillar-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 25% 30%, rgba(183,166,255,0.45), transparent 60%),
    radial-gradient(50% 60% at 80% 70%, rgba(30,58,138,0.5), transparent 60%);
  pointer-events: none;
}
.pillar-card .pillar-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.pillar-card .pillar-visual svg {
  position: relative;
  z-index: 1;
  color: var(--brand-purple-light);
  filter: drop-shadow(0 4px 12px rgba(91,63,191,0.4));
}
.pillar-card .pillar-num-label {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--brand-purple-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pillar-card .pillar-num-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brand-purple-light);
}
.pillar-card .pillar-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.pillar-card .pillar-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pillar-card h3 {
  font-family: var(--font-jp);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.45;
}
.pillar-card p {
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-fg-muted);
  margin: 0;
  flex: 1;
}
.pillar-card .answer {
  padding: 12px 16px;
  background: var(--brand-purple-50);
  border-radius: 8px;
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--brand-purple-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------------- Comparison table ---------------- */
.compare-wrap {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  background: white;
}
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-jp);
}
.compare-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  background: var(--gray-50);
  border-bottom: 1px solid var(--color-border);
}
.compare-table th.col-ours {
  background: var(--brand-purple);
  color: white;
}
.compare-table td {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.65;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .col-label { font-weight: 700; color: var(--gray-950); }
.compare-table .col-self { color: var(--color-fg-subtle); }
.compare-table .col-ours-cell { background: var(--brand-purple-50); color: var(--gray-950); }
.compare-table .icon-inline { vertical-align: middle; margin-right: 8px; }

/* ---------------- Steps row ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: var(--color-border-strong);
}
.step {
  text-align: center;
  position: relative;
  padding: 0 12px;
}
.step .step-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--brand-purple);
  color: var(--brand-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}
.step .step-tile {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 16px 16px;
  margin-top: 16px;
  text-align: left;
  box-shadow: var(--shadow-xs);
  position: relative;
}
.step .step-tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 10px;
}
.step .step-tile-head .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-purple);
}
.step .step-tile-illust {
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-purple-50) 0%, var(--brand-purple-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--brand-purple);
}
.step .step-title {
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}
.step .step-body {
  font-family: var(--font-jp);
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-fg-muted);
  margin: 0;
}

/* ---------------- Accordion (FAQ) ---------------- */
.acc-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.acc-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-950);
  user-select: none;
  background: white;
  border: none;
  width: 100%;
  text-align: left;
  line-height: 1.5;
}
.acc-head:hover { background: var(--brand-purple-50); }
.acc-head .q-mark {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-purple);
  flex-shrink: 0;
  width: 24px;
}
.acc-head .acc-toggle { margin-left: auto; color: var(--brand-purple); flex-shrink: 0; }
.acc-body > div {
  padding: 0 24px 20px 64px;
  font-family: var(--font-jp);
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-fg-muted);
}

/* ---------------- Form ---------------- */
.form { width: 100%; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-950);
  margin: 0 0 6px;
}
.field label .req {
  color: var(--color-danger);
  margin-left: 6px;
  font-size: 11px;
  vertical-align: 2px;
}
.field .help {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--color-fg-muted);
  margin: 6px 0 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 56px;
  padding: 0 14px;
  font-family: var(--font-jp);
  font-size: 15px;
  color: var(--gray-950);
  background: white;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.field textarea {
  padding: 12px 14px;
  height: 140px;
  line-height: 1.7;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand-purple);
  box-shadow: var(--shadow-focus);
}
.field.error input,
.field.error textarea { border-color: var(--color-danger); background: #FFF7F6; }
.field.error .help { color: var(--color-danger); }

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--color-fg);
  line-height: 1.6;
}
.checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-purple);
}
.checkbox a { color: var(--brand-purple); text-decoration: underline; }

/* ---------------- Grid utilities ---------------- */
.grid { display: grid; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-2-asym { grid-template-columns: 1.2fr 1fr; gap: 32px; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-asym { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .steps::before { display: none; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
