/* ============================================================
   components.css — buttons, specimen labels, stats, figures,
   pull quotes, forms, cards
   ============================================================ */

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--candytuft);
  color: var(--ink-deep);
  border: none;
}
.btn--primary:hover {
  background: #b4638b;
  box-shadow: 0 0 0 4px rgba(196, 115, 155, .35);
}

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border: 1px solid var(--lichen);
}
.btn--ghost:hover {
  border-color: var(--candytuft);
  background: rgba(196, 115, 155, .08);
}
.surface-light .btn--ghost, .on-light .btn--ghost {
  color: var(--ink-deep);
  border-color: rgba(6, 24, 28, .4);
}
.surface-light .btn--ghost:hover, .on-light .btn--ghost:hover {
  border-color: var(--candytuft);
}

.btn .arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   THE SPECIMEN LABEL — the most-reused component on the site.
   <dl class="specimen"> with mono voice. Field-notebook register.
   ============================================================ */
.specimen {
  /* positioning context: visually-hidden <dt>s inside horizontal scrollers
     must not resolve against the ICB, or mobile viewports expand */
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--small);
  border-top: 1px solid var(--rule-dark);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 46ch;
}
.surface-light .specimen { border-top-color: var(--rule-light); }

.specimen__index {
  font-size: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lichen);
}
.surface-light .specimen__index { color: var(--text-on-light-mute); }

.specimen__binomial {
  font-style: italic;
  color: var(--chalk);
  letter-spacing: .02em;
}
.surface-light .specimen__binomial { color: var(--ink-deep); }

.specimen__name {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-weight: 400;
  font-size: var(--h3);
  line-height: 1.15;
  color: var(--chalk);
  text-transform: none;
  letter-spacing: 0;
  margin-block: 2px 4px;
}
.surface-light .specimen__name { color: var(--ink-deep); }

.specimen__row {
  font-size: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lichen);
  line-height: 1.7;
}
.surface-light .specimen__row { color: var(--text-on-light-mute); }
.specimen__row dt { display: inline; }
.specimen__row dt::after { content: ' \00b7 '; }
.specimen__row dd { display: inline; margin: 0; }

.specimen__quote {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-style: italic;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  color: var(--lichen);
  border-top: 1px solid var(--rule-dark);
  padding-top: 12px;
  margin-top: 6px;
}
.surface-light .specimen__quote {
  border-top-color: var(--rule-light);
  color: var(--text-on-light-mute);
}

@media (min-width: 640px) {
  .specimen--two-col .specimen__row { display: block; }
}

/* ============================================================
   THE STAT — number + label + source line. No source, no stat.
   ============================================================ */
.stat { max-width: 32ch; }
.stat__number {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-weight: 300;
  font-size: var(--display-l);
  line-height: 1;
  color: var(--gorse);
}
.stat__label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--label);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lichen);
  margin-top: 10px;
}
.surface-light .stat__label { color: var(--text-on-light-mute); }
.stat__source {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--lichen);
  opacity: .75;
  margin-top: 8px;
}
.surface-light .stat__source { color: var(--text-on-light-mute); }

/* ============================================================
   THE PHOTO FIGURE — always captioned, always credited
   ============================================================ */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius-card); }
.photo figcaption {
  font-family: var(--font-mono);
  font-size: var(--label);
  letter-spacing: .06em;
  color: var(--lichen);
  margin-top: 10px;
  line-height: 1.6;
}
.surface-light .photo figcaption { color: var(--text-on-light-mute); }

/* ============================================================
   THE PULL QUOTE — offset into the margin, lichen / rule (not candytuft)
   ============================================================ */
.pull-quote {
  position: relative;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-style: italic;
  font-weight: 400;
  font-size: var(--h2);
  line-height: 1.25;
  max-width: 24ch;
  padding-left: 40px;
  margin-block: calc(var(--tile) * 2);
}
.pull-quote::before {
  content: '';
  position: absolute;
  left: 0; top: .35em; bottom: .35em;
  width: 1px;
  background: var(--lichen);
}
.surface-light .pull-quote::before,
.on-light .pull-quote::before {
  background: rgba(6, 24, 28, .28);
}
.pull-quote cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lichen);
  margin-top: 18px;
}
.surface-light .pull-quote cite { color: var(--text-on-light-mute); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--label);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lichen);
}
.surface-light .field label, .on-light .field label { color: var(--text-on-light-mute); }

.field input,
.field textarea,
.field select {
  background: rgba(237, 238, 234, .04);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-card);
  color: var(--chalk);
  padding: 14px 16px;
  min-height: 48px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--candytuft);
  outline: 2px solid var(--gorse);
  outline-offset: 2px;
}
.surface-light .field input,
.surface-light .field textarea,
.surface-light .field select,
.on-light .field input,
.on-light .field textarea,
.on-light .field select {
  background: var(--chalk);
  border-color: rgba(6, 24, 28, .28); /* nudged past --rule-light for AA field edges */
  color: var(--ink-deep);
}

.field .hint {
  font-size: var(--label);
  font-family: var(--font-mono);
  color: var(--lichen);
  letter-spacing: .04em;
}
.field .error {
  font-size: var(--small);
  color: var(--gorse);
}

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ============================================================
   PARTNER LOGO STRIP
   ============================================================ */
.partners-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}
.partners-strip img {
  height: clamp(28px, 3.2vw, 40px);
  max-height: 40px;
  max-width: 120px; /* optical balance — wide wordmarks (Lottoland) must not dominate */
  width: auto;
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
  opacity: .6;
  mix-blend-mode: multiply; /* kills white logo boxes on the limestone ground */
  transition: filter var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.partners-strip a:hover img, .partners-strip img:hover { filter: none; opacity: 1; }

/* ============================================================
   MILESTONE BAR (under the mosaic)
   ============================================================ */
.milestone {
  font-family: var(--font-mono);
  font-size: var(--label);
  letter-spacing: .1em;
  color: var(--lichen);
}
.milestone__track {
  position: relative;
  height: 6px;
  background: rgba(168, 181, 162, .15);
  border-radius: 3px;
  margin-block: 12px;
  overflow: visible;
}
.milestone__fill {
  height: 100%;
  background: var(--myrtle);
  border-radius: 3px;
}
.milestone__marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  background: var(--gorse);
}
.milestone__labels {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}

/* ============================================================
   TOOLTIP (mosaic)
   ============================================================ */
.mosaic-tooltip {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  background: var(--ink-deep);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: var(--label);
  letter-spacing: .08em;
  line-height: 1.8;
  color: var(--chalk);
  max-width: 280px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mosaic-tooltip.is-visible { opacity: 1; transform: none; }
.mosaic-tooltip .t-name {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  font-size: 1.0625rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}
.mosaic-tooltip .t-message {
  font-style: italic;
  color: var(--candytuft);
  text-transform: none;
  letter-spacing: .02em;
}
.mosaic-tooltip .t-meta { color: var(--lichen); text-transform: uppercase; }

/* ============================================================
   FOOTNOTE / SOURCE BLOCK
   ============================================================ */
.footnote {
  font-family: var(--font-mono);
  font-size: var(--small);
  line-height: 1.7;
  letter-spacing: .01em;
  color: var(--lichen);
  max-width: 60ch;
  padding-left: 20px;
  border-left: 1px solid var(--rule-dark);
}
.surface-light .footnote {
  color: var(--text-on-light-mute);
  border-left-color: var(--rule-light);
}
