/* Fauna Ledger — site styles. Brand: parchment + engraved brass, EB Garamond. */

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EBGaramond.ttf") format("truetype");
  font-weight: 400 640; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EBGaramond-Italic.ttf") format("truetype");
  font-weight: 400 640; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/static/fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #ece3d0;
  --panel: #f6efdf;
  --panel-2: #f1e8d5;
  --ink: #2a2620;
  --ink-soft: #6a5f4c;
  --brass: #926c34;
  --brass-dark: #6d4f22;
  --rule: rgba(146, 108, 52, 0.26);
  --accent: #926c34;              /* overridden per-card inline */
  --maxw: 1080px;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-dark); text-decoration-color: var(--rule); }
a:hover { text-decoration-color: var(--brass); }

/* --- shared bits --------------------------------------------------------- */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brass-dark);
  margin: 0 0 0.6rem;
}
.lede { font-size: 1.2rem; color: var(--ink); max-width: 42ch; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.08; margin: 0.1rem 0 0.8rem; font-weight: 640; }
h2 { font-weight: 640; }
.section-title {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass-dark);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin: 2.2rem 0 1.2rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7em 1.3em;
  border-radius: 3px;
  background: var(--brass-dark);
  color: #f6efdf;
  border: 1px solid var(--brass-dark);
}
.btn:hover { background: var(--brass); }
.btn-ghost { background: transparent; color: var(--brass-dark); }
.btn-ghost:hover { background: rgba(146, 108, 52, 0.1); }

/* --- header / footer ----------------------------------------------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto; padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 2.5rem; height: 2.5rem; display: block; }
.brand-name { font-size: 1.35rem; font-weight: 640; letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--brass-dark); }

.site-main { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem 1.5rem 4rem; }

.site-footer { border-top: 1px solid var(--rule); background: var(--panel-2); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.5rem; }
.footer-brand { font-weight: 640; margin: 0 0 0.3rem; }
.footer-meta, .footer-links { font-size: 0.92rem; color: var(--ink-soft); margin: 0.3rem 0; }

/* --- home hero ----------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: center;
  padding: 1.5rem 0 2rem;
}
.hero-card { position: relative; display: block; justify-self: end; text-decoration: none;
  filter: drop-shadow(0 12px 26px rgba(60, 44, 20, 0.28)); transition: transform 0.15s; }
.hero-card:hover { transform: translateY(-4px); }
.hero-card-label {
  display: block; text-align: center; margin-top: 0.7rem;
  font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; color: var(--brass-dark);
}
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero-seal { filter: none; text-align: center; }
.hero-seal img { margin: 0 auto; }
.launch {
  border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 2.4rem;
  text-align: center; max-width: 46ch; margin-left: auto; margin-right: auto;
}
.launch-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0.2rem 0 0.8rem; }
.launch .lede { margin: 0 auto 0.6rem; }
.launch .hero-actions { justify-content: center; }

/* --- card grids (home recent + set binder) ------------------------------ */
.card-grid, .binder { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.binder { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.card-cell a, .binder-slot a {
  display: block; text-decoration: none; color: var(--ink);
  transition: transform 0.14s;
}
.card-cell a:hover, .binder-slot.revealed a:hover { transform: translateY(-3px); }
.card-cell img, .binder-slot img {
  /* drop-shadow (not box-shadow) so it follows the card's transparent corners */
  filter: drop-shadow(0 6px 12px rgba(60, 44, 20, 0.28));
}
.cell-num, .slot-num { font-family: var(--mono); font-weight: 700; font-size: 0.8rem;
  color: var(--brass-dark); display: block; margin-top: 0.5rem; }
.cell-name, .slot-name { display: block; font-size: 0.98rem; line-height: 1.25; }
.slot-caption { display: block; }

.binder-slot.empty .slot-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 5 / 7; border: 1px dashed var(--rule); border-radius: 4px;
  background: repeating-linear-gradient(135deg, var(--panel) 0 10px, var(--panel-2) 10px 20px);
  color: var(--ink-soft);
}
.slot-placeholder .slot-num { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }
.slot-hint { font-family: var(--sans); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.14em; margin-top: 0.4rem; }

.set-head { margin-bottom: 2rem; }
.set-progress { font-size: 1.05rem; color: var(--ink-soft); }
.set-progress strong { font-family: var(--mono); color: var(--brass-dark); font-size: 1.2rem; }
.see-all { margin-top: 1.4rem; font-size: 1.05rem; }

/* --- card page ----------------------------------------------------------- */
.card-page { max-width: 900px; margin: 0 auto; }
.preview-flag {
  background: #7a2b22; color: #f6efdf; padding: 0.6rem 1rem; border-radius: 4px;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 700; text-align: center;
}
.card-page-head { text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: 1.4rem; }
.sci-name { font-style: italic; font-size: 1.25rem; color: var(--ink-soft); margin: 0.2rem 0 1rem; }
.badge-row { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.tier-badge, .iucn-badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.45em 0.85em; border-radius: 3px; border: 1px solid var(--rule);
  background: var(--panel);
}
.tier-dot { width: 0.7em; height: 0.7em; border-radius: 50%;
  background: var(--tier); border: 1px solid rgba(0, 0, 0, 0.35); }
.iucn-badge { border-color: var(--tier); color: var(--tier); }

.card-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; }
.card-faces figure { margin: 0; }
.card-faces img { filter: drop-shadow(0 12px 26px rgba(60, 44, 20, 0.26)); }
.card-faces figcaption {
  text-align: center; margin-top: 0.6rem; font-family: var(--sans);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-soft); font-weight: 700;
}

.ledger { margin: 0; }
.ledger dt {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.68rem; font-weight: 700; color: var(--brass-dark);
  float: left; clear: left; width: 8.5rem; padding-top: 0.35rem;
}
.ledger dd { margin: 0 0 0.55rem 8.5rem; padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule); }
.ledger dd::after { content: ""; display: block; clear: both; }

.notable { background: var(--panel); border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem; border-radius: 0 4px 4px 0; margin: 1.6rem 0; }
.notable-label { font-family: var(--sans); text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.66rem; font-weight: 700;
  color: var(--brass-dark); margin: 0 0 0.3rem; }
.notable-text { margin: 0; font-size: 1.1rem; }

.facts p { margin: 0 0 1rem; }
.range-caption { font-style: italic; color: var(--ink-soft); }

.ig-link { text-align: center; margin: 1.8rem 0; font-size: 1.05rem; }
.attribution { margin-top: 2.5rem; }
.attribution p { font-size: 0.95rem; color: var(--ink-soft); margin: 0.3rem 0; }
.card-nav { margin-top: 2.5rem; }

/* --- prose (about / 404) ------------------------------------------------- */
.prose { max-width: 60ch; margin: 0 auto; }
.prose h2 { margin-top: 2.2rem; font-size: 1.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.6rem; }
.notfound { text-align: center; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 18px; }
  .hero { grid-template-columns: 1fr; }
  .hero-card { justify-self: center; max-width: 320px; }
  .card-faces { grid-template-columns: 1fr; }
  .site-header { padding: 1rem; }
  .ledger dt { float: none; width: auto; padding-top: 0; }
  .ledger dd { margin-left: 0; }
}
