:root {
  --void: #000000;
  --heat: #fff3d6;
  --ember: #ff5a1f;
  --steel-text: #9aa6c2;
  --steel-label: #6b7794;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--void);
  color: var(--heat);
}

body {
  font-family: 'Syne', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#forge {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.62) 100%);
}

.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 32px;
  padding: var(--pad);
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  pointer-events: none;
}


.logo {
  position: absolute;
  top: max(var(--pad), env(safe-area-inset-top));
  left: var(--pad);
  width: clamp(32px, 3vw, 44px);
  height: auto;
}

.mark h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(48px, 12vw, 196px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--heat);
}

.mark .line {
  margin: 16px 0 0 0.12em;
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.4;
  color: var(--steel-text);
}

.ledger dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 20px;
  row-gap: 7px;
  font-size: 13px;
  line-height: 1.45;
}

.ledger .row {
  display: contents;
}

.ledger dt {
  color: var(--steel-label);
  font-weight: 400;
}

.ledger dd {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--heat);
}

.ledger .hash {
  max-width: 32ch;
  word-break: break-all;
}

.ledger .genesis {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--steel-label);
}

@media (min-width: 760px) {
  .page {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .mark {
    flex: 0 0 auto;
  }
  .ledger {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 32px;
  }
  .ledger .hash {
    max-width: min(32ch, 100%);
  }
}

@media (min-width: 760px) and (max-width: 1100px) {
  .logo {
  position: absolute;
  top: max(var(--pad), env(safe-area-inset-top));
  left: var(--pad);
  width: clamp(32px, 3vw, 44px);
  height: auto;
}

.mark h1 {
    font-size: clamp(48px, 10vw, 196px);
  }
}

@media (max-width: 759px) {
  .page {
    flex-direction: column-reverse;
    justify-content: flex-start;
    padding-top: calc(var(--pad) + 4vh);
  }
  .ledger .hash {
    max-width: 22ch;
  }
}

/* Portrait of any width: the chain runs vertical and fades out behind the text. */
@media (max-aspect-ratio: 9/10) {
  .vignette {
    background:
      linear-gradient(to bottom, rgba(0,0,0,0) 38%, rgba(0,0,0,0.9) 66%, #000 100%),
      radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.5) 100%);
  }
}

/* Short landscape (phones on their side): readout moves to the top-right. */
@media (min-width: 760px) and (max-height: 520px) {
  .ledger {
    position: absolute;
    top: max(var(--pad), env(safe-area-inset-top));
    right: var(--pad);
    margin-left: 0;
  }
  .ledger dl {
    font-size: 12px;
    row-gap: 4px;
  }
  .ledger .hash {
    max-width: 32ch;
  }
  .ledger .genesis {
    margin-top: 12px;
    font-size: 12px;
  }
  .logo {
  position: absolute;
  top: max(var(--pad), env(safe-area-inset-top));
  left: var(--pad);
  width: clamp(32px, 3vw, 44px);
  height: auto;
}

.mark h1 {
    font-size: clamp(48px, 10vw, 196px);
  }
}
