/* ============================================================
   facts.css — "the specimen sheet"
   A naturalist's measured record: hairline rules, oversized
   figures, a ledger of entries. Cream & navy, per styles.css.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

.fx {
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --hair: rgba(29, 51, 72, .16);
  --hair-soft: rgba(29, 51, 72, .09);
  position: relative;
  padding-top: 4.5rem;
  overflow-x: hidden;
}

/* Paper grain. Sits above the cream, under everything else. */
.fx::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}
.fx > * { position: relative; z-index: 1; }

.fx-kicker {
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--slate);
}

/* ---------------- masthead ---------------- */
.fx-mast {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}
.fx-mast-rule {
  height: 3px; margin-bottom: 2.6rem;
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  opacity: .55;
  animation: fx-draw 1.1s cubic-bezier(.16, .84, .3, 1) both;
  transform-origin: left;
}
.fx-binomial {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(2.9rem, 11vw, 7.5rem); line-height: .92;
  letter-spacing: -.005em; margin: 1.1rem 0 0;
  animation: fx-rise .9s cubic-bezier(.2, .8, .25, 1) both .1s;
}
.fx-binomial em { font-style: italic; display: block; color: var(--ink); }
.fx-common {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .42em;
  text-transform: uppercase; color: var(--slate);
  margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--hair);
  animation: fx-rise .9s cubic-bezier(.2, .8, .25, 1) both .2s;
}

.fx-taxon {
  display: grid; gap: 0 2.5rem; margin-top: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  animation: fx-rise .9s cubic-bezier(.2, .8, .25, 1) both .3s;
}
.fx-taxon > div { border-top: 1px solid var(--hair-soft); padding: .8rem 0; }
.fx-taxon dt {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--slate); margin-bottom: .3rem;
}
.fx-taxon dd { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); }

.fx-lede {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  font-style: italic; line-height: 1.5; color: var(--slate);
  max-width: 40em; margin-top: 2.6rem;
  animation: fx-rise .9s cubic-bezier(.2, .8, .25, 1) both .4s;
}
.fx-lede a { color: var(--navy); text-decoration: none; box-shadow: inset 0 -1px 0 var(--navy); }
.fx-lede a:hover { background: var(--navy); color: var(--cream); box-shadow: none; }

/* ---------------- vitals ---------------- */
.fx-vitals {
  max-width: 1160px; margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1px solid var(--navy);
}
.fx-vital {
  padding: 1.8rem 1.4rem 1.6rem 0;
  border-right: 1px solid var(--hair-soft);
  animation: fx-rise .8s cubic-bezier(.2, .8, .25, 1) both;
  animation-delay: calc(500ms + var(--d));
}
.fx-vital:last-child { border-right: 0; }
.fx-fig {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(3.2rem, 6vw, 4.6rem); line-height: .95;
  letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums;
}
.fx-unit {
  font-family: var(--mono); font-size: .62rem; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase; color: var(--slate);
  margin-left: .55em; vertical-align: .9em;
}
.fx-vital h2 {
  font-family: var(--sans); font-weight: 500; font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  margin: .9rem 0 .45rem;
}
.fx-note { font-size: .86rem; color: var(--slate); line-height: 1.55; max-width: 22em; }

/* ---------------- scale plate ---------------- */
.fx-scale {
  max-width: 1160px; margin: 0 auto clamp(3rem, 7vw, 6rem);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  background:
    linear-gradient(var(--cream-deep), var(--cream-deep)) padding-box;
}
.fx-scale-head { max-width: 34em; margin-bottom: 3rem; }
.fx-scale-head h2 {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.05; margin: .7rem 0 .8rem;
}
.fx-scale-sub { color: var(--slate); font-size: .95rem; max-width: 34em; }

.fx-scale-chart {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: clamp(.5rem, 2vw, 2rem);
  height: clamp(230px, 34vw, 380px);
  align-items: end;
  border-bottom: 1px solid var(--navy);
  padding-bottom: .9rem;
}
.fx-bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.fx-bar-fig {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--slate); margin-bottom: .5rem;
  opacity: 0; transition: opacity .5s ease calc(var(--d) + .5s);
}
.fx-bar-stem { height: var(--h); display: flex; align-items: flex-end; justify-content: center; }
.fx-bar-stem i {
  display: block; width: 100%; max-width: 74px; height: 0;
  background: var(--hair); border: 1px solid var(--hair);
  transition: height .95s cubic-bezier(.16, .84, .3, 1) var(--d);
}
.is-heron .fx-bar-stem i {
  background: var(--navy); border-color: var(--navy);
  box-shadow: 0 18px 34px -22px rgba(20, 37, 52, .8);
}
.is-heron .fx-bar-fig { color: var(--navy); font-weight: 500; }
.fx-scale.in .fx-bar-stem i { height: 100%; }
.fx-scale.in .fx-bar-fig { opacity: 1; }
.fx-bar-who {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--slate);
  margin-top: .9rem; min-height: 2.4em; line-height: 1.35;
}
.is-heron .fx-bar-who { color: var(--navy); }

/* wingspan ruler */
.fx-wing { margin-top: 3.2rem; }
.fx-wing-cap, .fx-wing-fig {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--slate); display: block;
}
.fx-wing-fig { margin-top: .9rem; color: var(--navy); }
.fx-wing-fig em { font-family: var(--serif); font-size: 1rem; font-style: italic; letter-spacing: 0; text-transform: none; color: var(--slate); }
.fx-wing-rule {
  position: relative; height: 30px; margin-top: .9rem;
  border-top: 1px solid var(--navy);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.2s cubic-bezier(.16, .84, .3, 1) .35s;
}
.fx-scale.in .fx-wing-rule { transform: scaleX(1); }
.fx-wing-rule i {
  position: absolute; top: 0; left: var(--x);
  width: 1px; height: 8px; background: var(--navy); opacity: .45;
}
.fx-wing-rule i[style*="--tall"] { height: 17px; opacity: .8; }

/* ---------------- ledger ---------------- */
.fx-set { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter) clamp(2.5rem, 5vw, 4rem); }
.fx-set-head {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono); font-weight: 500;
  font-size: .68rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--navy); padding: 1.4rem 0;
}
.fx-set-mark { width: 26px; height: 1px; background: var(--navy); flex: none; }

.fx-ledger { list-style: none; border-top: 1px solid var(--navy); }
.fx-entry {
  position: relative;
  display: grid; grid-template-columns: 4.5rem 1fr;
  gap: 0 1.5rem; align-items: start;
  padding: 1.7rem 1.4rem 1.7rem 1rem;
  border-bottom: 1px solid var(--hair-soft);
  transition: color .35s ease;
}
/* navy wash sweeps in from the left on hover */
.fx-entry::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--navy);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.16, .84, .3, 1);
}
.fx-entry:hover::before { transform: scaleX(1); }
.fx-entry:hover, .fx-entry:hover h3, .fx-entry:hover .fx-entry-num { color: var(--cream); }
.fx-entry:hover .fx-entry-num { opacity: .85; }

.fx-entry-num {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--navy); opacity: .42; padding-top: .45rem;
  font-variant-numeric: tabular-nums; transition: color .35s ease, opacity .35s ease;
}
.fx-entry h3 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.15; color: var(--navy); margin-bottom: .5rem;
  transition: color .35s ease;
}
.fx-entry p { font-size: .95rem; line-height: 1.68; max-width: 54em; }

/* ---------------- pull quote ---------------- */
.fx-quote {
  background: var(--navy); color: var(--cream);
  padding: clamp(3.5rem, 8vw, 7rem) var(--gutter);
  margin: clamp(2rem, 5vw, 4rem) 0;
  text-align: center;
}
.fx-quote p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem); line-height: 1.32;
  max-width: 22em; margin: 0 auto; text-wrap: balance;
}
.fx-quote p::before, .fx-quote p::after { content: "“"; opacity: .35; }
.fx-quote p::after { content: "”"; }
.fx-quote cite {
  display: block; margin-top: 2.2rem; font-style: normal;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .24em;
  text-transform: uppercase; opacity: .72;
}
.fx-quote cite a { color: var(--cream); text-decoration: none; box-shadow: inset 0 -1px 0 rgba(244, 241, 233, .5); }
.fx-quote cite a:hover { box-shadow: inset 0 -1px 0 var(--cream); }

/* ---------------- close ---------------- */
.fx-close {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.fx-close h2 {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.06; margin: 1rem 0 .9rem;
  text-wrap: balance;
}
.fx-close-sub { color: var(--slate); max-width: 34em; margin: 0 auto 2.4rem; }
.fx-close-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------------- reveal + motion ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .25, 1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes fx-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fx-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before, .fx *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .fx-bar-stem i { height: 100% !important; }
  .fx-bar-fig { opacity: 1 !important; }
  .fx-wing-rule { transform: none !important; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .fx-vital { border-right: 0; border-bottom: 1px solid var(--hair-soft); padding-right: 0; }
  .fx-scale-chart { height: clamp(190px, 44vw, 260px); gap: .45rem; }
  .fx-bar-who { font-size: .5rem; letter-spacing: .08em; }
}
@media (max-width: 620px) {
  .fx-entry { grid-template-columns: 1fr; gap: .35rem; padding: 1.4rem .9rem; }
  .fx-entry-num { padding-top: 0; }
  .fx-binomial em { display: inline; }
  .fx-scale-chart { height: 180px; }
  .fx-bar-fig { font-size: .56rem; }
}
