/*
 * certrevoker website, in the Reticle Ledger design language (katagami.ai),
 * matching the portal. A 12-column grid of flat mist cells parted by 6px of
 * white; cyan for what is live, copper for decisions a person must sign.
 * Radius 0 everywhere except the copper pin dot. No borders, shadows,
 * gradients or JavaScript. Fonts are self-hosted (SIL OFL 1.1).
 */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("assets/fonts/manrope.woff2") format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("assets/fonts/roboto-mono.woff2") format("woff2"); }

:root {
  --color-bg: #FFFFFF;
  --color-surface: #F3F6F9;
  --color-text: #16202B;
  --color-muted: #4F5B69;
  --color-border: #DBE3EA;
  --color-accent: #00779C;
  --color-accent-hover: #006383;
  --color-accent-soft: #E3F6FB;
  --color-accent-2: #9A512C;
  --color-accent-2-soft: #F6ECE4;
  --color-on-accent: #FFFFFF;
  --color-success: #2F7D66;
  --color-error: #B94B4B;
  --space-1: 6px; --space-2: 12px; --space-3: 16px; --space-4: 24px; --space-5: 36px; --space-6: 48px; --space-7: 64px;
  --gap: 6px;
  --motion: 120ms ease;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-heading: "Manrope", "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
  --type-1: 14.5px; --type-2: 17px; --type-3: 20px; --type-4: 26px; --type-5: 36px; --type-6: 58px;
  --hero-image: url("assets/hero.webp");
}

* { box-sizing: border-box; }
html { background: var(--color-bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--color-text); background: var(--color-bg); font: 400 var(--type-2)/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
@media (min-width: 1440px) { body { font-size: 18px; } }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-4); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h2 { font-size: 38px; }
h3 { font-size: var(--type-3); font-weight: 700; letter-spacing: -0.01em; margin-bottom: var(--space-2); }
p { margin: 0; }
p + p { margin-top: var(--space-2); }
a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
code { font-family: var(--font-mono); font-weight: 500; font-size: 0.88em; letter-spacing: 0; overflow-wrap: anywhere; }
.sub { display: block; font-family: var(--font-mono); font-size: var(--type-1); font-weight: 500; color: var(--color-muted); line-height: 1.4; margin-top: 2px; }
.label { display: block; font-family: var(--font-mono); font-size: var(--type-1); font-weight: 600; color: var(--color-muted); margin-bottom: var(--space-2); }
.pin-dot { display: inline-block; width: 12px; height: 12px; border-radius: 9999px; background: var(--color-accent-2); vertical-align: -1px; margin-right: 8px; }

/* masthead: a row of cells without fill */
.masthead { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-4) 0; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--color-text); font-family: var(--font-heading); font-weight: 800; font-size: var(--type-3); letter-spacing: -0.025em; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 24px; height: 24px; }
.masthead nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.masthead nav a { color: var(--color-text); font-weight: 400; }
.masthead nav a:hover { color: var(--color-accent); }
.masthead .action { margin-left: auto; }

main { padding-bottom: var(--space-6); }
section { margin-top: var(--space-7); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: end; margin-bottom: var(--space-4); }
.section-head p { color: var(--color-muted); max-width: 64ch; }

/* the grid of cells */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.cell { background: var(--color-surface); padding: var(--space-4); min-width: 0; }
.cell.tight { padding: var(--space-3) var(--space-4); font-size: 16px; }
.cell.pinned { background: var(--color-accent-2-soft); }
.cell.pinned .label { color: var(--color-accent-2); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }

.figure { display: block; background: var(--color-surface); padding: var(--space-3) var(--space-4); }
.figure .what { display: block; font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em; }
.figure .num { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 36px; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: var(--space-1); }

/* hero: head cell (5) beside the image cell (7), two figure cells under the head */
.hero { margin-top: var(--space-2); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); }
.hero-left { display: grid; gap: var(--gap); align-content: stretch; grid-template-rows: 1fr auto; }
.hero .head { background: var(--color-surface); padding: var(--space-6) var(--space-5) var(--space-5); }
.eyebrow { display: block; font-family: var(--font-mono); font-size: var(--type-1); font-weight: 500; color: var(--color-muted); }
.hero h1 { font-size: var(--type-6); margin: var(--space-3) 0 var(--space-4); }
.hero .lede { color: var(--color-muted); margin-bottom: var(--space-5); }
.hero .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.hero .image { background-color: var(--color-surface); background-image: var(--hero-image); background-size: cover; background-position: center; min-height: 640px; }

/* the one button per view */
.button { display: inline-flex; align-items: center; height: 48px; padding: 0 var(--space-4); background: var(--color-accent); color: var(--color-on-accent); font-weight: 600; white-space: nowrap; transition: background-color var(--motion); }
.button:hover { background: var(--color-accent-hover); text-decoration: none; }

/* authorizer chain as a row of cells */
.chain { list-style: none; margin: 0 0 var(--gap); padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.chain .cell { padding: var(--space-3); font-family: var(--font-mono); font-weight: 500; font-size: 15px; }
.chain .cell .sub { margin: 0 0 4px; font-size: 13px; }
.chain .cell.live { background: var(--color-accent); color: var(--color-on-accent); }
.chain .cell.live .sub { color: var(--color-on-accent); }

/* the ledger: cells parted by 6px, an ink foot row, row crosshair */
.ledger-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--gap)); }
table.ledger { width: 100%; border-collapse: separate; border-spacing: var(--gap); font-size: 16px; }
.ledger th { text-align: left; font-family: var(--font-mono); font-size: var(--type-1); font-weight: 600; color: var(--color-muted); padding: 0 var(--space-3) 2px; }
.ledger td { background: var(--color-surface); padding: 12px var(--space-3); vertical-align: top; transition: background-color var(--motion), color var(--motion); }
.ledger td.name { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em; }
.ledger td.fig { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger td.fig .sub { font-size: 13px; }
.ledger td.ok { color: var(--color-success); }
.ledger tr.pinned td { background: var(--color-accent-2-soft); }
.ledger tr.pinned td.fig:last-child { color: var(--color-accent-2); }
.ledger tbody tr:not(.pinned):hover td, .ledger tbody tr:not(.pinned):focus-within td { background: var(--color-accent-soft); }
.ledger:has(tbody td:nth-child(2):hover) tbody tr:not(.pinned) td:nth-child(2),
.ledger:has(tbody td:nth-child(3):hover) tbody tr:not(.pinned) td:nth-child(3),
.ledger:has(tbody td:nth-child(4):hover) tbody tr:not(.pinned) td:nth-child(4) { background: var(--color-accent-soft); }
.ledger tbody tr:not(.pinned) td.fig:hover { background: var(--color-accent) !important; color: var(--color-on-accent); }
.ledger tbody tr:not(.pinned) td.fig:hover .sub { color: var(--color-on-accent); }
.ledger tfoot td { background: var(--color-text); color: var(--color-bg); font-family: var(--font-mono); font-weight: 500; }
.ledger tfoot td .sub { color: var(--color-border); white-space: normal; }

/* screenshots in image cells */
.shot { margin: 0; background: var(--color-surface); padding: var(--space-2); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-family: var(--font-mono); font-size: var(--type-1); font-weight: 500; color: var(--color-muted); padding: var(--space-2) var(--space-1) 2px; }

pre { margin: var(--space-3) 0 0; background: var(--color-bg); padding: var(--space-2) var(--space-3); overflow-x: auto; font: 500 13px/1.6 var(--font-mono); }
pre code { font-size: 1em; overflow-wrap: normal; }

footer { padding: var(--space-4) 0 var(--space-6); color: var(--color-muted); font-size: var(--type-1); }
footer p + p { margin-top: var(--space-1); }

@media (max-width: 1199px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .image { min-height: 420px; }
  .section-head { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .span-3 { grid-column: span 6; } .span-4, .span-5, .span-7 { grid-column: span 12; }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  h2 { font-size: 30px; }
}
@media (max-width: 700px) {
  .masthead { flex-wrap: wrap; gap: var(--space-3); }
  .masthead nav { order: 3; width: 100%; gap: var(--space-3); }
  .hero h1 { font-size: 34px; }
  .hero .head { padding: var(--space-5) var(--space-4); }
  .hero .image { min-height: 260px; }
  .span-3, .span-6 { grid-column: span 12; }
  .chain { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tfoot, .ledger tr, .ledger td { display: block; }
  .ledger tr { margin-bottom: var(--space-2); }
  .ledger td { margin-bottom: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media (max-width: 700px) {
  .hero .pair { grid-template-columns: minmax(0, 1fr); }
  .figure .num { font-size: 30px; }
}
