/* Landing page. The Higgsfield banner is the hero and the pfp's knight is the mark (site/art/, cut by
   scripts/build-site-art.py). EB Garamond for headlines and figures, Libre Franklin for text, and DotGothic16, a pixel
   face, only for what the knights say and the numbers on the board. Teal from the banner's sky is the accent, marble
   white is the button on the sky; green and red only mean up and down. */

:root {
  --bg: #f4f2ed;
  --surface: #fffefb;
  --ink: #08222a;
  --ink-2: #3c565c;
  --ink-3: #6b8186;
  --line: rgba(8, 34, 42, 0.1);
  --line-2: rgba(8, 34, 42, 0.2);
  --teal: #1d6577;
  --teal-hover: #17566a;
  --sky: #1c566a; /* the top of the banner's sky */
  --on-sky: #fbf7f0;
  --marble: #f3ebdd;
  --marble-hover: #fbf6ee;
  --sq-light: #ede6da; /* the board's marble, site/art/board-marble.webp */
  --sq-dark: #5f8d91;
  --up: #0f7f58;
  --down: #c0392f;
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pixel: 'DotGothic16', ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: 1200px;
  --pad: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, figure, ol { margin: 0; }
h1, h2, h3 { font-weight: 400; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- buttons: square cut, marble on the sky ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 4px; border: 1px solid transparent;
  background: var(--marble); color: var(--ink);
  font: 500 14.5px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { background: var(--marble-hover); }
.pill.glass { background: transparent; border-color: rgba(251, 247, 240, 0.4); color: var(--on-sky); }
.pill.glass:hover { background: rgba(251, 247, 240, 0.1); border-color: rgba(251, 247, 240, 0.65); }
.pill.lg { min-height: 52px; padding: 0 26px; font-size: 15.5px; }
.pill[aria-disabled] { cursor: default; }

/* ---------- hero: the copy on the sky, the banner's sky running up under it ---------- */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; background: var(--sky); color: var(--on-sky); }

.nav {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 22px var(--pad) 0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 23px/1 var(--serif); }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(251, 247, 240, 0.35); }
.nav-links { display: flex; gap: 4px; margin-left: 28px; }
.nav-links a { padding: 8px 12px; font-size: 14.5px; color: rgba(251, 247, 240, 0.78); text-decoration: none; }
.nav-links a:hover { color: var(--on-sky); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }

.hero-copy { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 9vh, 112px) var(--pad) 0; }
.hero h1 {
  max-width: 9.2em;
  font: 500 clamp(50px, 5.6vw, 84px)/0.98 var(--serif);
  font-variant-numeric: lining-nums; letter-spacing: -0.012em; text-wrap: balance;
}
.hero-sub { margin-top: 24px; max-width: 31em; font-size: 18px; line-height: 1.6; color: rgba(251, 247, 240, 0.86); }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.ca {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 14px;
  border-radius: 4px; border: 1px solid rgba(251, 247, 240, 0.25); background: rgba(8, 34, 42, 0.25); cursor: pointer;
  font: 400 13px/1 var(--sans); letter-spacing: 0.01em; color: var(--on-sky);
}
.ca .k { color: rgba(251, 247, 240, 0.6); }
.ca:hover { border-color: rgba(251, 247, 240, 0.45); }

/* The banner, full width. Its top 30% is plain sky: it runs up under the copy and fades in from the sky colour. */
.hero-art { display: block; margin-top: -13%; }
.hero-art img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%);
  mask-image: linear-gradient(to bottom, transparent, #000 12%);
}

/* ---------- numbers ---------- */
.band { padding: 48px 0 24px; }
.band-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.figures { display: flex; flex-wrap: wrap; }
.figures div { padding: 0 44px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; }
.figures div:first-child { padding-left: 0; border-left: 0; }
.figures dt { margin-top: 4px; font-size: 13.5px; color: var(--ink-3); }
.figures dd { font: 500 42px/1.05 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.on { background: var(--up); }
.dot.on.paper { background: var(--teal); }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font: 500 clamp(40px, 4.2vw, 58px)/1.02 var(--serif); letter-spacing: -0.01em; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
.split-head p { margin-top: 18px; max-width: 24em; font-size: 17px; color: var(--ink-2); }
.steps { list-style: none; padding: 0; border-top: 1px solid var(--line-2); }
.steps li { display: grid; grid-template-columns: 64px minmax(0, 1fr); padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.step-n { font: 500 21px/1.15 var(--serif); color: var(--teal); }
.steps h3 { font: 600 17px/1.45 var(--sans); }
.steps p { margin-top: 4px; max-width: 36em; font-size: 15.5px; color: var(--ink-2); }

.section-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.arrow-link { font-weight: 500; color: var(--teal); text-decoration: none; white-space: nowrap; }
.arrow-link::after { content: ' \2192'; }
.arrow-link:hover { color: var(--teal-hover); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- live: the newest board and the latest trades ---------- */
.live { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 64px; align-items: start; }
.board-card {
  padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 1px 2px rgba(8, 34, 42, 0.04), 0 24px 48px -32px rgba(8, 34, 42, 0.3);
}
/* one marble picture under all 64 squares, cream at the top left like the pages draw it */
.board {
  display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 2px; overflow: hidden;
  background: var(--sq-dark) url('/art/board-marble.webp') 0 0 / 100% 100%;
}
.sq { position: relative; display: grid; place-items: center; min-width: 0; }
.sq svg { width: 80%; height: auto; }
a.sq:hover { box-shadow: inset 0 0 0 3px var(--teal); }
a.sq:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ink); }
.sq.out svg { opacity: 0.55; }
.sq.ghost { overflow: hidden; }
.sq.ghost .fill { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(29, 101, 119, 0.4); transition: height 0.6s ease; }
.sq.ghost::after { content: ''; position: absolute; inset: 7px; border: 1.5px dashed rgba(8, 34, 42, 0.45); border-radius: 2px; }
.ghost-no { position: relative; z-index: 1; font: 400 12px/1 var(--pixel); color: var(--ink); }
.sq.drop svg { animation: drop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes drop { from { transform: translateY(-60%); opacity: 0; } to { transform: none; opacity: 1; } }
.board-card figcaption { margin: 12px 2px 2px; font-size: 13.5px; color: var(--ink-3); }

.next {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
}
.next img { width: 48px; height: 48px; border-radius: 3px; background: var(--sq-light); image-rendering: pixelated; }
.next-title { font-size: 15px; }
.next-title b { font-weight: 600; }
.meter { height: 6px; margin: 9px 0 7px; border-radius: 1px; background: rgba(8, 34, 42, 0.08); overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width 0.6s ease; }
.meter.full i { background: var(--up); }
.next-label { font-size: 13.5px; color: var(--ink-3); }
.next-label span { color: var(--ink); font-weight: 500; }

.list-title { margin: 32px 0 2px; font: 500 13.5px/1.4 var(--sans); color: var(--ink-3); }
.trades { list-style: none; padding: 0; }
.trades li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.trades li.empty { display: block; color: var(--ink-3); font-size: 14.5px; }
.trades img { width: 36px; height: 36px; border-radius: 3px; background: var(--sq-light); image-rendering: pixelated; }
.t-head { font-size: 14.5px; line-height: 1.45; }
.t-head a { text-decoration: none; }
.t-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-head b { font-weight: 600; }
.t-side { color: var(--ink-2); }
.t-side.buy { color: var(--up); }
.t-side.burn { color: var(--down); }
.t-side.sweep { color: var(--teal); }
.t-usd { color: var(--ink-3); }
.t-said { margin-top: 4px; font: 400 13px/1.55 var(--pixel); color: var(--ink-2); overflow-wrap: anywhere; }
/* a decimal point in the pixel font, from pixel() in landing.js: DotGothic16 gives '.' a whole half-width cell */
.dp { letter-spacing: -0.2em; }
.t-when { padding-top: 2px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.trades li.fresh { animation: fresh 2.4s ease-out both; }
@keyframes fresh { from { background: rgba(29, 101, 119, 0.08); } to { background: transparent; } }

/* ---------- footer ---------- */
.foot { padding: 28px 0 44px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.foot .brand { font-size: 20px; color: var(--ink); gap: 10px; }
.foot .brand img { width: 30px; height: 30px; box-shadow: none; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-note { margin-left: auto; color: var(--ink-3); font-size: 13.5px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 14px;
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .live { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .board-card { max-width: 560px; }
}
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .hero-art { margin-top: -6%; } /* the copy runs wider here: keep the cloud clear of the buttons */
}
/* phones: the statue's half of the banner, under the copy */
@media (max-width: 760px) {
  .nav-buy { display: none; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art { margin-top: 0; }
  .hero-art img { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%); mask-image: linear-gradient(to bottom, transparent, #000 10%); }
}
@media (max-width: 640px) {
  :root { --pad: 20px; }
  .nav { padding-top: 16px; }
  .brand { gap: 10px; font-size: 21px; }
  .brand img { width: 34px; height: 34px; }
  .nav .pill { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .hero-copy { padding-top: 44px; }
  .hero h1 { font-size: 48px; line-height: 1; }
  .hero-sub { margin-top: 18px; font-size: 16.5px; }
  .hero-cta { margin-top: 26px; }
  .hero-cta .pill { flex: 1 1 auto; }
  .band { padding: 36px 0 8px; }
  .figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; width: 100%; }
  .figures div { padding: 0 0 0 18px; }
  .figures div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .figures dd { font-size: 34px; }
  .section { padding: 68px 0; }
  .steps li { grid-template-columns: 48px minmax(0, 1fr); }
  .section-top { margin-bottom: 24px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .trades li { grid-template-columns: 32px minmax(0, 1fr); }
  .trades img { width: 32px; height: 32px; }
  .t-when { grid-column: 2; padding-top: 0; }
  .foot-note { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
