/* ==========================================================================
   COMPONENTS — reusable building blocks
   Each component is defined once here and reused across sections.
   ========================================================================== */

/* ---------- Icon ----------
   <svg class="icon"><use href="assets/icons/icons.svg#icon-NAME"></use></svg> */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Icon inside a soft square tile */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.section--dark .icon-tile {
  background: rgba(211, 80, 23, 0.16);
}

/* ---------- Button ----------
   Variants: btn--primary (orange), btn--dark (black), btn--outline, btn--sm */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.95rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

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

.btn--primary:hover {
  background: var(--color-accent-hover);
}

.btn--dark {
  background: var(--color-dark);
  color: #fff;
}

.btn--dark:hover {
  background: #000;
}

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

.btn--outline:hover {
  background: var(--color-ink);
  color: #fff;
}

.btn--sm {
  padding: 0.7rem 1.1rem;
  font-size: 0.75rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Eyebrow (small label above titles) ---------- */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.section--dark .eyebrow {
  color: #f0875a;
}

/* ---------- Badge (e.g. "• Swiss Ledger Blockchain") ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- Card ----------
   White box, slightly rounded corners, thin orange line on the left.
   Variants: card--dark (on dark bands), card--plain (no accent line) */
.card {
  position: relative;
  padding: var(--space-6) var(--space-5) var(--space-5) calc(var(--space-5) + var(--accent-line));
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-left: var(--accent-line) solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow);
}

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

.card__title {
  margin-bottom: var(--space-2);
}

.card__text {
  margin: 0;
  color: var(--color-ink);
  font-size: 0.975rem;
}

.card__footer {
  margin-top: var(--space-5);
}

.card--dark {
  background: var(--color-dark-surface);
  border-color: var(--color-dark-line);
  border-left-color: var(--color-accent);
  box-shadow: none;
}

.card--dark .card__text {
  color: var(--color-on-dark-muted);
}

.card--plain {
  border-left-width: 1px;
  border-left-color: var(--color-line);
  padding-left: var(--space-5);
}

/* Card that stretches its content to fill equal-height rows */
.card--column {
  display: flex;
  flex-direction: column;
}

.card--column .card__footer {
  margin-top: auto;
  padding-top: var(--space-5);
}

/* ---------- Check list (bullets with a check icon) ---------- */
.check-list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
}

.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-3);
  font-size: 0.95rem;
  line-height: 1.55;
}

.check-list .icon {
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
  color: var(--color-accent);
}

/* ---------- Arrow link ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  cursor: pointer;
}

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

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

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

/* ---------- Chip (small labelled tag) ----------
   Variant: chip--soon (for "coming soon" items) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.chip .icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

.chip--soon {
  border-style: dashed;
  background: transparent;
}

.chip__tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
}

/* ---------- Step (numbered step of the trade cycle) ---------- */
.step {
  counter-increment: step;
}

.step__number::before {
  content: counter(step, decimal-leading-zero);
}

.step__number {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

/* ---------- Status label (roadmap) ----------
   Variants: status--done, status--now, status--next */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status--done { color: var(--color-ink); }
.status--done::before { background: var(--color-ink); }

.status--now { color: var(--color-accent-text); }
.status--now::before {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(211, 80, 23, 0.18);
  animation: pulse 2s var(--ease) infinite;
}

.status--next { color: var(--color-ink-muted); }
.status--next::before { border: 1.5px solid var(--color-ink-muted); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(211, 80, 23, 0.25); }
  50%      { box-shadow: 0 0 0 7px rgba(211, 80, 23, 0.05); }
}

/* ---------- Reveal on scroll (activated by js/main.js) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Small stagger for items in the same grid */
.js .reveal:nth-child(2) { transition-delay: 0.06s; }
.js .reveal:nth-child(3) { transition-delay: 0.12s; }
.js .reveal:nth-child(4) { transition-delay: 0.18s; }
.js .reveal:nth-child(5) { transition-delay: 0.24s; }
.js .reveal:nth-child(6) { transition-delay: 0.30s; }
