/* Components: sheets, doves, tags, the proof figures, mission, diagnostic. */

/* A sheet of paper resting on the page (see paper.css for the origami vocabulary). */
.sheet {
  position: relative;
  background: var(--color-surface);
  border: 1px solid transparent;
  border-radius: var(--paper-radius);
  box-shadow: var(--paper-shadow-rest);
}

/* ─── Doves: the six logo facets in fern and moss, one brass facet (design system dove mark) ─── */

.section-dove {
  flex: none;
  width: 2.75rem;
  height: 2.5rem;
}

.dove {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dove__facet { fill: var(--fern-600); }
.dove__facet--fern-500 { fill: var(--fern-500); }
.dove__facet--fern-700 { fill: var(--fern-700); }
.dove__facet--moss-700 { fill: var(--moss-700); }
.dove__facet--brass-400 { fill: var(--brass-400); }

.dove__ghost polygon {
  fill: none;
  stroke: var(--color-border-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Static mode: each section's dove folds in once from its scattered triangles (design system
   §6). Reduced motion shows it formed. */
@media (prefers-reduced-motion: no-preference) {
  .dove--section.is-folding .dove__facet {
    animation: fold-in var(--duration-fold) var(--ease-fold) both;
    animation-delay: calc(var(--i, 0) * 0.05s);
    transform-box: fill-box;
    transform-origin: center;
  }
}

@keyframes fold-in {
  from {
    opacity: 0;
    transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.8);
  }
}

/* ─── Tags ─── */

.tag--filled {
  background: var(--color-primary);
  border-color: transparent;
  color: var(--color-primary-contrast);
}

.tag--accent {
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

/* ─── Proof figures: Archivo 700, tabular (design system §2 "Chiffres") ─── */

.ledger {
  margin-top: var(--space-8);
  padding-block: var(--space-8) var(--space-6);
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.ledger__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat {
  container-type: inline-size;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  border-left: 1px solid var(--color-border);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat__figure {
  font-family: var(--font-body);
  /* Never wider than its column: "+2 000" is about 4.6 em wide in Archivo 700. */
  font-size: min(var(--type-figure), 21cqi);
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: var(--color-primary);
}

.stat__prefix,
.stat__suffix {
  display: inline-block;
  font-size: 0.5em;
  font-weight: 600;
  vertical-align: 0.7em;
  letter-spacing: 0;
  color: var(--color-accent-text);
}

.stat__prefix {
  margin-right: 0.02em;
}

.stat__suffix {
  margin-left: 0.04em;
}

.stat__label {
  max-width: 18ch;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-strong);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.ledger__note {
  margin-top: var(--space-7);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

@media (max-width: 1023px) {
  .ledger__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-7);
  }

  .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:last-child {
    grid-column: 1 / -1;
  }
}

/* ─── Mission ─── */

.mission {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-6);
}

.mission__text {
  font-family: var(--font-serif);
  font-size: var(--type-subtitle);
  font-style: italic;
  line-height: 1.4;
}

/* ─── Diagnostic ─── */

.lede--strong {
  font-family: var(--font-serif);
  font-size: var(--type-subtitle);
  font-style: italic;
  line-height: 1.35;
  color: var(--color-text);
}

.column > .diagnostic__action {
  margin-top: var(--space-6);
}
