/* Tinted — "Glass House". Tokens from DA.md: white paper, black ink, one cobalt for what is yours. */
:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #55555a;
  --rule: #e6e6e8;
  --yours: #1f4bff;
  --display: "Inter Tight", "Geist", ui-sans-serif, system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, 0, 1);
  --col: 1320px;
  /* Tower size: height and the drawing's aspect ratio (1360 x 2048). */
  --th: min(84svh, 1040px);
  --tw: calc(var(--th) * 0.6641);
  --gap: clamp(20px, 2.4vw, 44px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  /* A faint field of ink dots under everything, as on Umbra. */
  background-image: radial-gradient(rgba(10, 10, 10, 0.16) 0.8px, transparent 0.9px);
  background-size: 14px 14px;
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.col { width: min(var(--col), 100% - 48px); margin-inline: auto; }

/* ---------- Brand: the Facade mark (nine tinted windows, one lit) and the word ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 22px; height: 22px; flex: none; transition: transform .5s var(--ease); }
.brand:hover .mark { transform: rotate(-90deg); }
.brand-word { font: 700 25px/1 var(--display); letter-spacing: -0.055em; padding-bottom: 2px; }

/* ---------- Old wordmark, kept for reference only ---------- */
.wordmark {
  font: 800 26px/1 var(--sans);
  letter-spacing: -0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.wm-i { position: relative; display: inline-block; }
.wm-i i {
  position: absolute;
  left: 50%;
  top: -0.08em;
  width: 0.2em;
  height: 0.2em;
  background: var(--yours);
  transform: translateX(-50%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  letter-spacing: -0.01em;
  transition: transform .3s var(--ease), background-color .2s;
}
.btn-yours { background: var(--yours); color: #fff; }
.btn-yours:hover { background: #1238e0; transform: translateY(-1px); }
.btn-small { height: 38px; padding: 0 18px; font-size: 14px; }
.link { font: 500 15px/1 var(--sans); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.link:hover { border-color: var(--yours); color: var(--yours); }
:focus-visible { outline: 2px solid var(--yours); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 72px;
  padding: 0 max(24px, calc((100vw - var(--col)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--rule); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font: 500 15px/1 var(--sans); text-decoration: none; }
.nav-links a:hover { color: var(--yours); }

/* ---------- Type ---------- */
.display {
  font: 600 clamp(48px, 5.4vw, 116px)/0.9 var(--display);
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.ready .line > span { transform: none; }
.hero-right .line > span { transition-delay: .12s; }
.title { font: 600 clamp(40px, 4.4vw, 84px)/0.95 var(--display); letter-spacing: -0.04em; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 30em; }
.kicker, .label, .num, .tag, .live, .rules, .ledger-head, .facts dt, .note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kicker { color: var(--ink-2); margin-bottom: 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: max(100svh, 760px);
  min-height: 640px;
  overflow: hidden;
}
.tower {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--tw);
  height: var(--th);
  transform: translate(calc(-50% + var(--px, 0px)), 0);
  opacity: 0;
  translate: 0 40px;
  transition: opacity 1.1s var(--ease), translate 1.4s var(--ease);
  will-change: transform;
}
.ready .tower { opacity: 1; translate: 0 0; }
/* The tower is drawn in dots (dots.js), from the engraving; its window turns cobalt once the dots have landed. */
.tower-dots { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@keyframes lights-on {
  0% { opacity: 0; }
  18% { opacity: .7; }
  30% { opacity: .15; }
  46% { opacity: 1; }
  58% { opacity: .5; }
  70%, 100% { opacity: 1; }
}
/* The window's box, measured on the drawing (assets/tower-window.json). */
.window {
  position: absolute;
  left: 59.41%;
  top: 49.9%;
  width: 6.1%;
  height: 7.18%;
  border-radius: 0;
}
.window:hover + .window-card, .window:focus-visible + .window-card { outline: 2px solid var(--yours); outline-offset: 0; }
.window-card {
  position: absolute;
  right: calc(100% - 59.41% + 12px);
  top: 48%;
  width: clamp(170px, 15vw, 220px);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 16px 12px;
  clip-path: inset(0 0 0 100%);
  transition: clip-path .6s var(--ease) .1s;
  pointer-events: none;
}
.lit .window-card { clip-path: inset(0 0 0 0); transition-delay: .9s; }
.window-card dl { margin: 10px 0; border-top: 1px solid var(--rule); }
.window-card dl div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.window-card dt, .window-card dd { font: 500 13px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.window-card dd { color: var(--yours); }
.label { font-size: 11px; color: var(--ink-2); }
.label.yours { color: var(--yours); }
.cursor-tag {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 8px;
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
}
.cursor-tag.on { opacity: 1; }

.hero-side {
  position: absolute;
  top: 33%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 2;
}
.hero-left { right: calc(50% + var(--tw) / 2 + var(--gap)); align-items: flex-end; text-align: right; }
.hero-right { left: calc(50% + var(--tw) / 2 + var(--gap)); align-items: flex-start; }
.hero-left .lede { max-width: 25em; }
.hero-actions { display: flex; align-items: center; gap: 22px; }
.lede-small { font-size: 16px; max-width: 22em; }
.live { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); }
.live b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Live status of both chains */
.status { display: grid; gap: 7px; font: 400 12px/1.3 var(--mono); }
.status div { display: grid; grid-template-columns: 132px auto; gap: 12px; }
.status dt { text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.status dd b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pulse { width: 7px; height: 7px; background: var(--ink); animation: pulse 1.6s steps(2, jump-none) infinite; }
@keyframes pulse { 50% { opacity: .15; } }

/* Rails: the column's edges, drawn the full height of the page */
.rails { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.rails::before, .rails::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.rails::before { left: calc(50% - min(var(--col), 100vw - 48px) / 2); }
.rails::after { right: calc(50% - min(var(--col), 100vw - 48px) / 2); }

/* The RPC console: real requests from the visitor's browser */
.console { margin-top: 28px; border: 1px solid var(--ink); background: var(--ink); color: #e9e9ec; }
.console-head { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #26262b; font: 400 12px/1 var(--mono); }
.console-tabs { display: flex; gap: 4px; }
.console-tabs button { font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #8b8b92; padding: 8px 10px; border: 1px solid transparent; }
.console-tabs button[aria-selected="true"] { color: #fff; border-color: #3a3a40; }
.console-tabs button[data-as="you"][aria-selected="true"] { color: #fff; background: var(--yours); border-color: var(--yours); }
.console-target { color: #6e6e76; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-run { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: #e9e9ec; padding: 8px 10px; border: 1px solid #3a3a40; }
.console-run:hover { background: #fff; color: var(--ink); }
.console-body { margin: 0; padding: 18px 16px; min-height: 300px; max-height: 360px; overflow: auto; font: 400 13px/1.65 var(--mono); white-space: pre-wrap; word-break: break-all; }
.console-body .c-req { color: #e9e9ec; }
.console-body .c-req::before { content: "→ "; color: #6e6e76; }
.console-body .c-res::before { content: "← "; color: #6e6e76; }
.console-body .c-res { color: #b9b9c0; }
.console-body .c-hidden { color: #fff; font-weight: 500; }
.console-body .c-yours { color: #8ea6ff; font-weight: 500; }
.console-body .c-err { color: #8b8b92; }
.console-body .c-ms { color: #55555c; }
.console-body .caret { display: inline-block; width: .6em; height: 1.1em; background: #e9e9ec; vertical-align: text-bottom; animation: pulse 1s steps(2, jump-none) infinite; }
.console-foot { padding: 10px 16px 12px; border-top: 1px solid #26262b; font: 400 12px/1.4 var(--mono); color: #6e6e76; }

/* Reveal on load / on scroll */
.reveal { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .9s var(--ease); }
.in, .ready .hero .reveal { opacity: 1; translate: 0 0; }
.ready .hero .reveal { transition-delay: .45s; }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 12vw, 180px) 0 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .lede { margin-top: 4px; }

/* Two views */
.compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.pane { font: 400 14px/1.4 var(--mono); font-variant-numeric: tabular-nums; min-width: 0; }
.pane-you { background: var(--paper); }
.pane-them { background: var(--ink); color: #f2f2f2; }
.view-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--rule); }
.pane-them .view-head, .pane-them .view-row { border-color: #2a2a2e; }
.view-title { font: 600 22px/1 var(--display); letter-spacing: -0.02em; }
.view-sub { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pane-them .view-sub { color: #8b8b92; }
.view-row { position: relative; display: grid; grid-template-columns: 1.15fr .6fr 2fr; gap: 14px; align-items: center; padding: 0 24px; height: 56px; border-bottom: 1px solid var(--rule); transition: background-color .25s; }
.view-row:last-child { border-bottom: 0; }
.view-row:has(.k) { grid-template-columns: 1.15fr 2.6fr; }
.view-row .k { color: var(--ink-2); }
.pane-them .view-row .k { color: #8b8b92; }
.view-row.hover { background: #f4f5ff; }
.pane-them .view-row.hover { background: #16161a; }
.pane-you .mine::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--yours); }
.v-yours { color: var(--yours); }
.cell { position: relative; display: block; min-height: 1.4em; }
.cell .clear { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .35s; }
.cell .ink { position: absolute; left: 0; top: 50%; height: 1.15em; width: var(--w, 70%); translate: 0 -50%; background: var(--ink); transform-origin: left; }
.pane-them .cell .ink { background: #26262b; }
.cell.inked .ink { transform: scaleX(1); }
.cell.tintable .ink { transform: scaleX(0); transition: transform .55s var(--ease); }
.pane-them .view-row { transition-delay: calc(var(--i) * 140ms); }
.pane-them .cell.tintable .ink, .pane-them .cell.tintable .clear { transition-delay: calc(var(--i) * 140ms); }
.pane-them.tinted .cell.tintable .ink { transform: scaleX(1); }
.pane-them.tinted .cell.tintable .clear { opacity: 0; }
.swap { position: relative; display: block; height: 1.4em; }
.swap > span { position: absolute; inset: 0; transition: opacity .4s, translate .5s var(--ease); transition-delay: calc(var(--i) * 140ms); }
.swap .now { opacity: 0; translate: 0 8px; }
.pane-them.tinted .swap .was { opacity: 0; translate: 0 -8px; }
.pane-them.tinted .swap .now { opacity: 1; translate: 0 0; }
.compare-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.compare-foot .link { font-size: 13px; }
.rules { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin-top: 28px; }
.rules li { padding: 14px 0; border-bottom: 1px solid var(--rule); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); }
.rules code { font: 500 13px var(--mono); color: var(--ink); }
.rules span { color: var(--ink); }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); }
.step { display: flex; flex-direction: column; gap: 12px; }
.step figure { overflow: hidden; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--ink); margin-bottom: 10px; }
/* No white box behind the dotted illustrations: they sit on the page's own dot field. */
.step canvas { display: block; width: 100%; height: 100%; }
.step h3 { font: 600 26px/1.05 var(--display); letter-spacing: -0.03em; }
.step p:not(.num):not(.tag) { color: var(--ink-2); font-size: 16px; }
.num { color: var(--ink-2); }
.tag { align-self: flex-start; margin-top: 4px; padding: 7px 10px; border: 1px solid var(--rule); font-size: 11px; color: var(--ink-2); }
.tag-live { border-color: var(--yours); color: var(--yours); }
.tag-live:hover { background: var(--yours); color: #fff; }
.step:nth-child(2) { transition-delay: .08s; }
.step:nth-child(3) { transition-delay: .16s; }

/* Ledger */
.ledger { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.ledger-col { padding-top: 22px; }
.ledger-col + .ledger-col { border-left: 1px solid var(--ink); padding-left: clamp(20px, 3vw, 48px); }
.ledger-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink-2); }
.ledger-col:first-child .ledger-head { color: var(--yours); }
.sq { width: 10px; height: 10px; background: var(--yours); display: inline-block; }
.ledger ul { list-style: none; }
.ledger li { font: 500 clamp(20px, 2vw, 30px)/1.2 var(--display); letter-spacing: -0.02em; padding: 14px 0; border-bottom: 1px solid var(--rule); padding-right: 24px; }
.honest { margin-top: 36px; max-width: 44em; color: var(--ink-2); }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); background: var(--paper); }
.facts div { padding: 24px 20px 28px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.facts div:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
.facts dt { color: var(--ink-2); margin-bottom: 12px; }
.facts dd { font: 500 clamp(18px, 1.6vw, 26px)/1.15 var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.batch-link { text-decoration: none; border-bottom: 1px solid var(--ink); }
.batch-link:hover { color: var(--yours); border-color: var(--yours); }
.building-cta { display: flex; align-items: center; gap: 24px; margin-top: 40px; flex-wrap: wrap; }
.note { color: var(--ink-2); font-size: 11px; }

/* Footer */
.footer { margin-top: clamp(120px, 14vw, 200px); border-top: 1px solid var(--ink); padding: 48px 0 56px; background: var(--paper); }
/* The wordmark in dots, the width of the column, as Umbra signs its footer. */
.footer-mark { display: block; width: min(var(--col), 100% - 48px); margin: 0 auto 40px; }
.footer-dots { display: block; width: 100%; aspect-ratio: 3.3 / 1; }
.footer-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; }
.wordmark-big { font-size: clamp(64px, 9vw, 140px); line-height: .8; }
.footer-line { font: 500 20px/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink-2); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font: 500 14px var(--sans); text-decoration: none; }
.footer-links a:hover { color: var(--yours); }

/* Dialog */
.dialog {
  margin: auto;
  width: min(520px, 100% - 32px);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .18);
}
.dialog::backdrop { background: rgba(255, 255, 255, .78); }
.dialog-close-form { position: absolute; top: 14px; right: 16px; }
.dialog-close { font: 400 26px/1 var(--sans); width: 32px; height: 32px; }
.dialog-title { font: 600 38px/1 var(--display); letter-spacing: -0.04em; margin-bottom: 22px; }
.dialog-steps { list-style: none; border-top: 1px solid var(--rule); margin-bottom: 18px; }
.dialog-steps li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; }
.dialog-steps .num { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--rule); font-size: 11px; }
.dialog-steps li.active { color: var(--ink); }
.dialog-steps li.active .num { border-color: var(--ink); }
.dialog-steps li.done { color: var(--ink); }
.dialog-steps li.done .num { background: var(--yours); border-color: var(--yours); color: #fff; }
.dialog-status { min-height: 1.5em; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.dialog-status.error { color: var(--ink); }
.dialog-result { margin-bottom: 18px; }
.rpc-row { display: flex; gap: 8px; margin: 8px 0; }
.rpc-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/1 var(--mono); padding: 12px; border: 1px solid var(--yours); color: var(--yours); }
.copy { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 0 14px; border: 1px solid var(--ink); }
.copy:hover { background: var(--ink); color: var(--paper); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
}
@media (max-width: 860px) {
  :root { --th: min(64svh, 640px); }
  .hero { height: auto; min-height: 0; padding: 112px 0 0; display: flex; flex-direction: column; align-items: center; }
  /* One headline, then the words, then the tower: the two sides become one column. */
  .hero-side { display: contents; }
  .hero-left .display { order: 1; }
  .hero-right .display { order: 2; }
  .hero .lede { order: 3; margin-top: 20px; padding: 0 24px; text-align: center; max-width: 30em; }
  .hero-actions { order: 4; margin-top: 22px; }
  .status { order: 5; margin-top: 24px; padding: 0 20px; }
  .status div { grid-template-columns: 120px auto; }
  .hero .display .line { display: inline-block; }
  .hero .display .line + .line { margin-left: .26em; }
  .hero .lede-small { display: none; }
  .display { text-align: center; }
  .tower { order: 6; position: relative; left: auto; bottom: auto; transform: translate(var(--px, 0px), 0); margin-top: 36px; }
  .display { font-size: clamp(48px, 13vw, 84px); }
  .live { justify-content: center; }
  .hero-actions { flex-direction: column; gap: 16px; }
  .window-card { width: 168px; }
  .compare { grid-template-columns: 1fr; }
  .view-row { grid-template-columns: 1fr .6fr; height: auto; min-height: 56px; padding: 12px 16px; row-gap: 6px; }
  .view-row .d { grid-column: 1 / -1; }
  .view-row:has(.k) { grid-template-columns: 1fr 1.4fr; }
  .view-head { padding: 18px 16px; flex-direction: column; gap: 6px; }
  .steps, .ledger, .facts { grid-template-columns: 1fr; }
  .console-head { flex-wrap: wrap; }
  .console-target { display: none; }
  .ledger-col + .ledger-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); margin-top: 24px; }
  .facts div, .facts div:nth-child(4n + 1) { padding: 20px 0; border-left: 0; }
  .footer-row { grid-template-columns: 1fr; align-items: start; }
  .nav .btn-small { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .tower, .reveal, .line > span { opacity: 1 !important; translate: none !important; transform: none; }
  .window-card { opacity: 1; clip-path: none; }
}
