/* Natural Negative — table card explainers
   Shared brand layer. Edit tokens here, all three pages follow. */

:root {
  /* Brand */
  --paper:      #FFFFFF;
  --ink:        #1C534E;   /* taken from the logo file */
  --body:       #427570;   /* body copy */
  --rule:       #CBDCD9;   /* hairlines */
  --wash:       #F0F6F5;   /* animation stages */
  --page:       #F4F8F8;   /* outside the card, desktop only */

  /* Process states */
  --scrap:      #C6BEB2;   /* rejected part */
  --scrap-ink:  #8C8375;
  --marginal:   #93B7B3;

  --card-w: 28rem;
  --pad: 1.75rem;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: 'Funnel Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: var(--card-w);
  background: var(--paper);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

@media (min-width: 31rem) {
  body { padding: 2.5rem 1rem; }
  .card { border: 1px solid var(--rule); }
}

/* ---------- Sticky wordmark + read progress ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  padding: 0.9rem var(--pad) 0.75rem;
}
.topbar a { display: inline-block; text-decoration: none; }
.topbar img { display: block; height: 1.75rem; width: auto; }
.topbar .bar { height: 1px; background: var(--rule); margin-top: 0.7rem; }
.topbar .bar i { display: block; height: 1px; width: 0; background: var(--ink); }

/* ---------- Beats ---------- */

.hero { padding: 2.25rem var(--pad) 2.5rem; }

h1 {
  color: var(--ink);
  font-size: clamp(2.25rem, 10vw, 2.875rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.beat {
  padding: 2rem var(--pad);
  border-top: 1px solid var(--rule);
}
.beat h2 {
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

p { margin: 0; max-width: 36ch; }
p + p { margin-top: 0.8rem; }
b, strong { color: var(--ink); font-weight: 700; }
.lead { font-size: 1.125rem; }

.close { color: var(--ink); font-size: 1.25rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }

/* ---------- Animation stages ---------- */

.scene {
  background: var(--wash);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1.1rem 0 0;
}
.scene > svg { width: 100%; height: auto; display: block; overflow: visible; }
.scene figcaption {
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}

/* Beats fade up once, as they arrive. Animations inside a scene are held
   until .play lands on it, so nothing has finished before it is seen. */
.beat, .scene { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.beat.play, .scene.play { opacity: 1; transform: none; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem var(--pad) 1.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.foot nav { display: flex; flex-direction: column; gap: 0.4rem; }
.foot a {
  color: var(--body);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  align-self: flex-start;
}
.foot a:hover, .foot a:focus-visible { color: var(--ink); border-color: var(--ink); }
.logo { width: 3.25rem; height: auto; flex: none; }

:where(a):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.ic { width: 1.05em; height: 1.05em; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .beat, .scene { opacity: 1; transform: none; transition: none; }
  .scene * { animation: none !important; }
}
