/* ===== Reusable components ===== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    transform 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.btn--primary:hover {
  background: var(--primary-hover);
}
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.btn--ghost {
  color: var(--text-secondary);
}
.btn--ghost:hover {
  color: var(--text);
}
.btn--light {
  background: #fff;
  color: var(--navy);
}
.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn--lg {
  padding: 14px 24px;
  font-size: 1rem;
}
.btn--block {
  width: 100%;
}

/* --- Section scaffolding --- */
.section {
  padding-block: var(--space-9);
}
.section--tight {
  padding-block: var(--space-8);
}
.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-7);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head p {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Cards & grids --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  transition:
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease);
  height: 100%;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d7dfea;
  transform: translateY(-2px);
}
.card p {
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.94rem;
}
.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.card__icon svg {
  width: 20px;
  height: 20px;
}

.grid {
  display: grid;
  gap: var(--space-4);
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* --- Tags / chips --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
}
.chip--blue {
  background: var(--primary-soft);
  color: var(--primary);
}
.chip--amber {
  background: #fef3c7;
  color: #92400e;
}
.chip--purple {
  background: #f3e8ff;
  color: #6d28d9;
}
.chip--green {
  background: #dcfce7;
  color: #15803d;
}

/* --- Forms --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.94rem;
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.field textarea {
  resize: vertical;
  min-height: 96px;
}
.field-error {
  min-height: 16px;
  font-size: 0.78rem;
  color: var(--danger);
}
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.form-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.form-status {
  margin-top: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: none;
}
.form-status[data-state="ok"] {
  display: block;
  background: #dcfce7;
  color: #15803d;
}
.form-status[data-state="error"] {
  display: block;
  background: #fee2e2;
  color: var(--danger);
}

/* --- Accordion --- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.accordion__item + .accordion__item {
  border-top: 1px solid var(--border);
}
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.98rem;
}
.accordion__trigger:hover {
  background: var(--primary-soft);
}
.accordion__trigger svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--primary);
  transition: transform 0.2s var(--ease);
}
.accordion__trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.accordion__panel {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  max-width: 78ch;
}
.accordion__panel[hidden] {
  display: none;
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
