/* Home only. Everything shared lives in site.css. */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ hero -- */

.hero { padding: 46px 0 36px; }

.hero h1 { margin: 0 0 30px; }

.hero-mark {
  width: min(100%, 880px);
  height: auto;
  image-rendering: pixelated;
}

.hero-line {
  font-size: clamp(18px, 2.15vw, 27px);
  line-height: 1.42;
  color: var(--text);
  max-width: 58ch;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero .lede { font-size: 13px; line-height: 1.85; }

/* ----------------------------------------------------------------- strip -- */

.strip-band { padding-bottom: 12px; }

/* Six Zomi edge to edge, with the page gutter kept so the strip lines up with
   every figure below it. */
.strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 0;
}

.zomi-cell {
  position: relative;
  display: block;
  background: var(--panel);
  overflow: hidden;
}
.zomi-cell canvas {
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
  display: block;
}
.zomi-cell .tag {
  position: absolute;
  left: 0; bottom: 0;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--text);
  background: rgba(0, 0, 0, .74);
}
.zomi-cell .sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: 14px;
  background: rgba(0, 0, 0, .86);
  color: var(--body);
  font-size: 11px;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .16s linear;
}
.zomi-cell .sheet b { color: var(--accent); font-weight: 400; }
.zomi-cell:hover .sheet,
.zomi-cell:focus-visible .sheet { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .zomi-cell .sheet { transition: none; }
}

.strip-note { margin-top: 12px; }

/* ------------------------------------------------------------ band notes -- */

.band-note {
  margin-top: 18px;
  font-size: 11px;
  color: var(--meta);
  max-width: 78ch;
}

/* ------------------------------------------------------------- the bond -- */

.ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule);
  margin-bottom: 40px;
}
.ladder .rung {
  padding: 20px 22px 24px;
  border-bottom: var(--rule);
  border-right: var(--rule);
}
.ladder .rung:last-child { border-right: 0; }
.ladder .rung .num { margin: 6px 0 2px; }
.ladder .rung .sub { margin-bottom: 12px; }
.ladder .rung p:last-child { color: var(--body); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 34px 48px;
}
.split .num { margin: 8px 0 12px; }

.formula {
  margin: 16px 0;
  padding: 16px 18px;
  border: var(--rule);
  background: var(--panel);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.85;
  white-space: pre;
  overflow-x: auto;
}

/* ------------------------------------------------------------ sale grids -- */

.grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--rule);
  border-left: var(--rule);
}
.grid-8 > article,
.grid-8 > .zomi-card {
  display: block;
  border-bottom: var(--rule);
  border-right: var(--rule);
}
.grid-8 > article canvas,
.grid-8 > .zomi-card canvas {
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
  background: var(--panel);
}
/* A card is a link into the explorer, so it gets the underline off and the
   keyboard ring on rather than looking like body copy that happens to move. */
.grid-8 > .zomi-card { text-decoration: none; }
.grid-8 > .zomi-card:hover { background: var(--panel); }
.grid-8 > .zomi-card:hover .meta b { color: var(--accent); }
.grid-8 .meta { padding: 10px 12px 14px; }
.grid-8 .meta b { display: block; font-weight: 400; color: var(--text); font-size: 13px; }
.grid-8 .meta span { display: block; font-size: 10px; letter-spacing: .12em; color: var(--meta); line-height: 1.7; }

/* An empty market section is the honest state, not a hole. The grid frame
   stays visible so the shape of what will be there is legible, and the sentence
   sits inside it at reading size rather than as a caption on a thin box. */
.grid-8 .empty,
.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 58px 28px 62px;
  border-bottom: var(--rule);
  border-right: var(--rule);
  background:
    repeating-linear-gradient(to right, var(--line-soft) 0 1px, transparent 1px 25%),
    var(--panel);
  color: var(--body);
  font-size: 13px;
  line-height: 1.85;
  max-width: none;
}
.grid-8 .empty { min-height: 216px; display: flex; align-items: center; }

/* ----------------------------------------------------------------- steps -- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Five steps, five columns, or one. auto-fit would tile four and leave the
     fifth alone in a row of its own, and a three column fall leaves a hole in
     the same way: five does not divide by anything but five. */
  grid-template-columns: repeat(5, 1fr);
  border-top: var(--rule);
}
.steps li {
  margin: 0;
  padding: 20px 22px 26px;
  border-bottom: var(--rule);
  border-right: var(--rule);
  counter-increment: step;
}
.steps li:last-child { border-right: 0; }
.steps .eyebrow { margin-bottom: 10px; color: var(--accent); }

/* ------------------------------------------------------------------- faq -- */

.faq { margin: 0; border-top: var(--rule); }
.faq dt {
  padding: 24px 0 8px;
  color: var(--text);
  font-size: 15px;
  letter-spacing: .01em;
}
.faq dd {
  margin: 0;
  padding: 0 0 22px;
  border-bottom: var(--rule-soft);
  max-width: 82ch;
}

/* ----------------------------------------------------------------- token -- */

.token-side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.token-side .btn[aria-disabled="true"] { pointer-events: none; }

/* ------------------------------------------------------------------- 900 -- */

@media (max-width: 1080px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; }
}

@media (max-width: 900px) {
  .ladder { grid-template-columns: 1fr; }
  .ladder .rung { border-right: 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .grid-8 { grid-template-columns: repeat(2, 1fr); }
  .strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .hero { padding: 26px 0 22px; }
  .hero h1 { margin-bottom: 18px; }
  .hero-line { margin-bottom: 16px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .ladder { margin-bottom: 26px; }
  .ladder .rung { padding: 14px 0 18px; }
  .ladder .rung .sub { margin-bottom: 8px; }
  .steps li { padding: 16px 0 20px; }
  .faq dt { padding: 16px 0 6px; font-size: 13.5px; }
  .faq dd { padding-bottom: 16px; }
  .grid-8 .empty,
  .empty { padding: 30px 18px 32px; min-height: 0; font-size: 12.5px; }
  .band-note { margin-top: 14px; }
  .steps li { border-right: 0; }
  /* no hover on a touch screen, and a panel laid over the art would be text on
     a picture; the tag carries the id and the whole cell opens the explorer */
  .zomi-cell .sheet { display: none; }
}
