/* JSB Digital — static site styles */

:root {
  /* brand */
  --yellow: #ffff66;
  --grey: #636262;
  --paper: #f6f6f6;

  /* derived */
  --ink: #262525;          /* brand grey, darkened — headings and body */
  --white: #ffffff;
  --rule: #d8d7d7;
  --rule-dark: #4a4949;

  --display: "Archivo", system-ui, sans-serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.62;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

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

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 99;
  background: var(--ink);
  color: var(--yellow);
  padding: 0.6rem 1rem;
  font-family: var(--display);
}

/* ---------- type ---------- */

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.35rem); letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.15rem, 1.1vw + 0.95rem, 1.4rem);
  line-height: 1.5;
  color: var(--grey);
  max-width: 33rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 1.4rem;
  display: block;
}

/* yellow as a highlighter — the only place it touches a light background */
.mark {
  background: var(--yellow);
  box-shadow: 0 0 0 0.18em var(--yellow);
  color: var(--ink);
}

/* ---------- header ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}

.wordmark img { width: 38px; height: 38px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--grey);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:not(.btn):hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav a:not(.btn)[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--ink);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--ink); color: var(--yellow); border-color: var(--ink); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.nav .btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

/* ---------- sections ---------- */

.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band-tint { background: var(--white); }

.band-dark { background: var(--ink); color: var(--paper); }

/* full yellow surface — dark text on brand yellow */
.band-yellow { background: var(--yellow); color: var(--ink); }
.band-yellow .lede { color: #3d3c3c; }
.band-yellow .eyebrow { color: #3d3c3c; }
.band-yellow .ledger { border-top-color: var(--ink); }
.band-yellow .ledger-row { border-bottom-color: rgba(38,37,37,0.22); }
.band-yellow .ledger-meta, .band-yellow .from, .band-yellow .arrow { color: #555454; }
.band-yellow .to { background: var(--ink); color: var(--yellow); }
.band-yellow .btn-primary { background: var(--ink); color: var(--yellow); }
.band-yellow .btn-primary:hover { background: var(--paper); color: var(--ink); }

/* brand grey surface */
.band-grey { background: var(--grey); color: #ffffff; }
.band-grey .lede { color: #eceaea; }
.band-grey .eyebrow { color: var(--yellow); }
.band-grey .col-rule { background: var(--yellow); }
.band-grey .btn-ghost { color: #ffffff; border-color: #ffffff; }
.band-grey .btn-ghost:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.band-grey .plain-list li { border-bottom-color: rgba(255,255,255,0.25); }
.band-grey .plain-list li::before { background: var(--yellow); }
.band-dark .lede { color: #c4c3c3; }
.band-dark .eyebrow { color: var(--yellow); }

.hero {
  padding: clamp(4rem, 11vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -18%;
  right: -14%;
  width: 46vw;
  max-width: 34rem;
  aspect-ratio: 1;
  background: var(--yellow);
  border-radius: 50%;
  z-index: 0;
}
.hero .shell { position: relative; z-index: 1; }
@media (max-width: 52rem) {
  .hero::before { top: auto; bottom: -26%; right: -32%; width: 74vw; }
}
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: 1.6rem; }

.hero-rule {
  width: 4.5rem;
  height: 8px;
  background: var(--ink);
  margin-bottom: 2.2rem;
}

/* ---------- ledger (signature) ---------- */

.ledger {
  border-top: 2px solid var(--ink);
  margin-top: 2.6rem;
}

.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

a.ledger-row:hover .ledger-label { text-decoration: underline; text-underline-offset: 3px; }

.ledger-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
}

.ledger-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey);
  grid-column: 1;
  margin-top: 0.2rem;
}

.ledger-figures {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 500;
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
  white-space: nowrap;
}

.from { color: var(--grey); }
.arrow { color: var(--grey); padding: 0 0.35em; }
.to {
  color: var(--ink);
  font-weight: 600;
  background: var(--yellow);
  padding: 0.1em 0.4em;
}

.band-dark .ledger { border-top-color: var(--paper); }
.band-dark .ledger-row { border-bottom-color: var(--rule-dark); }
.band-dark .from, .band-dark .arrow, .band-dark .ledger-meta { color: #a09f9f; }

/* ---------- stat block ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.stat { background: var(--white); padding: 1.35rem 1.25rem; }
.stat:first-child { background: var(--yellow); }

.stat-value {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 0.45rem;
  display: block;
}
.stat:first-child .stat-label { color: #4a4949; }

/* ---------- columns ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 2.8rem;
}

.col h3 { margin-bottom: 0.7rem; }
.col p { max-width: 30rem; }

.col-rule {
  width: 2.5rem;
  height: 3px;
  background: var(--ink);
  margin-bottom: 1.2rem;
}
.band-dark .col-rule { background: var(--yellow); }

/* ---------- portrait ---------- */

.portrait-row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
  margin-top: 2.6rem;
}

.portrait img { width: 100%; max-width: 15rem; }

@media (max-width: 42rem) {
  .portrait-row { grid-template-columns: 1fr; }
  .portrait img { max-width: 11rem; }
}

/* ---------- plain list ---------- */

.plain-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  max-width: var(--measure);
}

.plain-list li {
  padding: 0.85rem 0 0.85rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55em;
  width: 0.65rem;
  height: 3px;
  background: var(--ink);
}
.band-dark .plain-list li { border-bottom-color: var(--rule-dark); }
.band-dark .plain-list li::before { background: var(--yellow); }

/* ---------- quote ---------- */

blockquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--ink);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--grey);
  max-width: 36rem;
}
blockquote p { max-width: none; }
blockquote cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--grey);
}

/* ---------- prose ---------- */

.prose h2 { margin: 2.8rem 0 1rem; }
.prose h3 { margin: 2.2rem 0 0.7rem; }
.prose ul { max-width: var(--measure); padding-left: 1.2rem; }
.prose li { margin-bottom: 0.55rem; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--yellow);
}
.prose a:hover { background: var(--yellow); }

.article-head { border-bottom: 1px solid var(--rule); padding-bottom: 2.2rem; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 3.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--display);
  font-size: 0.85rem;
}
.footer-nav a { color: var(--grey); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); background: var(--yellow); }

.footer-legal {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--grey);
  margin-top: 2.2rem;
  text-transform: uppercase;
}

/* ---------- consent ---------- */

.consent {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 30rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem 1.35rem;
  z-index: 60;
  font-size: 0.88rem;
  line-height: 1.5;
  display: none;
}
.consent[data-open="true"] { display: block; }
.consent p { max-width: none; margin-bottom: 1rem; }
.consent a { color: var(--yellow); }
.consent .btn-row { margin-top: 0; }
.consent .btn { border-color: var(--paper); padding: 0.5rem 1rem; font-size: 0.82rem; }
.consent .btn-primary { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.consent .btn-primary:hover { background: var(--paper); border-color: var(--paper); }
.consent .btn-ghost { color: var(--paper); }
.consent .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
  .reveal-2 { animation-delay: 0.09s; }
  .reveal-3 { animation-delay: 0.18s; }
}

@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 34rem) {
  .masthead-inner { gap: 0.8rem; }
  .nav { gap: 1rem; font-size: 0.85rem; width: 100%; }
  .ledger-row { grid-template-columns: 1fr; }
  .ledger-figures { grid-column: 1; grid-row: auto; text-align: left; margin-top: 0.5rem; }
}
