/* Landing page. Scoped to body.site so the operator desk keeps its own look. */

body.site {
  --bg: #100e0c;
  --bg-raise: #1b1814;
  --ink: #f7f1e6;
  --muted: #cbbfae;
  --gold: #ffbc2e;
  --gold-deep: #e0a31a;
  --line: rgba(247, 241, 230, 0.14);
  --card: #1a1714;
  margin: 0;
  background:
    radial-gradient(920px 520px at 100% -8%, rgba(255, 188, 46, 0.16), transparent 58%),
    radial-gradient(640px 420px at -12% 8%, rgba(255, 188, 46, 0.07), transparent 52%),
    var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
}

body.site * { box-sizing: border-box; }

body.site ::selection {
  background: rgba(255, 188, 46, 0.35);
  color: var(--ink);
}

body.site h1,
body.site h2,
body.site h3,
body.site .brand-name,
body.site .amount,
body.site .figures strong,
body.site .book dd,
body.site .chain-id {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 600;
}

body.site h1,
body.site h2,
body.site h3,
body.site p { overflow-wrap: break-word; }

body.site a { color: inherit; }

body.site :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--gold);
  color: #1a1408;
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 14, 12, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  display: block;
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-sub {
  margin-top: 3px;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
}

.jump a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
}

.jump a:hover { color: var(--ink); background: rgba(247, 241, 230, 0.06); }

.desk-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #1a1408 !important;
  background: var(--gold);
  font-size: 14px;
  font-weight: 600;
}

.desk-link:hover { background: #ffd36a !important; color: #1a1408 !important; }

@media (max-width: 959px) {
  .jump { order: 3; flex: 1 1 100%; }
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 36px 0 12px;
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 188, 46, 0.18);
}

body.site h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 38em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: #ffd36a; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.market {
  background:
    radial-gradient(380px 160px at 100% 0%, rgba(255, 188, 46, 0.18), transparent 62%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.market-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.market-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.market-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.market-mark { width: 52px; height: 52px; flex: 0 0 auto; }

body.site button {
  width: auto;
  background: var(--gold);
  color: #1a1408;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 42px;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

#refresh { margin-left: auto; }
#connect { margin-left: auto; }

body.site button:hover { background: #ffd36a; }
body.site button:disabled { opacity: 0.55; cursor: wait; }

body.site button.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

body.site button.quiet:hover { background: transparent; border-color: var(--gold); }

.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  min-width: 0;
}

.figures div,
.book div,
.card,
.steps li,
.rules article,
.chains article { min-width: 0; }

.figures span,
.book dt,
.eyebrow,
.tag {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.figures strong,
.book dd,
.amount {
  display: block;
  margin-top: 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.figures strong { font-size: clamp(26px, 3vw, 32px); line-height: 1.05; }

.meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ribbon {
  margin: 14px 0 0;
  padding: 12px 12px 12px 14px;
  background: rgba(255, 188, 46, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.public {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.public h1 {
  max-width: 16em;
  font-size: clamp(36px, 6vw, 56px);
}

.public .lede {
  max-width: 100%;
  margin-top: 14px;
}

.public .market { margin-top: 28px; }

@media (max-width: 640px) {
  .public .market-head { flex-wrap: wrap; }
  .public #refresh { margin: 10px 0 0; }
}

.public .proxy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.public .proxy span {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.public .legal {
  margin: 22px 0 0;
  color: var(--ink);
  font-weight: 700;
}

@media (min-width: 720px) {
  .public .figures { grid-template-columns: 1fr 1fr 1fr; }
}

.band { padding: 28px 0 8px; }

.section-head { max-width: 40em; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.03em; }
.section-head p { margin: 8px 0 0; color: var(--muted); }

.books,
.rules,
.chains,
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card,
.steps li,
.rules article,
.chains article {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 18px 20px;
}

body.site .card h3,
body.site .steps h3,
body.site .rules h3,
body.site .chains h3 {
  margin: 6px 0 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.amount { margin: 14px 0 8px; font-size: clamp(34px, 5vw, 48px); line-height: 1; }

.fine { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

.book {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0 0;
}

.book dd { margin: 2px 0 0; font-size: 24px; }

.hint {
  display: block;
  margin-top: 3px;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  color: var(--muted);
}

.block { padding-top: 36px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.steps span {
  display: block;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.steps p,
.rules p,
.chains p { margin: 8px 0 0; color: var(--muted); }
.chains .mono { overflow-wrap: anywhere; }

.chain-id {
  margin: 0;
  color: var(--gold);
  font-size: 28px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.chains h3 { margin-top: 4px; }

.tag {
  display: inline-block;
  margin: 14px 0 0;
  padding: 5px 9px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
}

.colophon {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
}

.foot { display: grid; gap: 12px; }
.foot p { margin: 0; color: var(--muted); max-width: 46em; }
.foot a { color: var(--ink); }
.legal { color: var(--ink) !important; font-weight: 600; }

@media (min-width: 720px) {
  .book { grid-template-columns: 1fr 1fr; gap: 16px 22px; }
  .rules { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .bar { flex-wrap: nowrap; justify-content: flex-start; gap: 20px; }
  .jump { margin-left: auto; }
  .wrap { width: min(1120px, calc(100% - 64px)); }
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 40px; padding-top: 54px; }
  .books { grid-template-columns: 0.82fr 1.18fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .chains { grid-template-columns: repeat(3, 1fr); }
  .foot {
    grid-template-columns: auto 1fr;
    column-gap: 28px;
    align-items: center;
  }
  .legal { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.site) { scroll-behavior: auto; }
  body.site * { transition: none !important; }
}

html:has(body.site) { scroll-behavior: smooth; }

body.site input {
  background: #100e0c;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 46px;
  width: 100%;
}

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

.use-form label {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.use-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body.site .use-buttons button,
body.site #use .actions button {
  margin: 0;
}

body.site .use-buttons button {
  flex: 1 1 calc(50% - 8px);
  white-space: normal;
}

#use .actions { margin-top: 16px; }
#use-warn { margin-top: 12px; }

body.site dialog {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: auto;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #16130f;
  color: var(--ink);
}

body.site dialog::backdrop { background: rgba(8, 7, 6, 0.72); }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dialog-head h2 { margin: 0; font-size: 28px; }

#wallet-note a { text-decoration: underline; }
#wc-box { margin-top: 12px; }
#wc-box button { margin-top: 10px; }

body.site .wallet-choice {
  display: flex;
  width: 100%;
  margin: 0 0 8px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #100e0c;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 54px;
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
}

body.site .wallet-choice:hover { background: #100e0c; border-color: var(--gold); }

.wallet-choice span { display: flex; align-items: center; gap: 10px; min-width: 0; }

.wallet-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1408;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.wallet-choice small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

body.site :is(#top, #market, #books, #how, #rules, #chains) {
  scroll-margin-top: 152px;
}

@media (max-width: 959px) {
  .bar { padding: 8px 0 6px; gap: 2px 12px; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 20px; }
  .jump a { padding: 7px 8px; }
}

@media (min-width: 960px) {
  body.site :is(#top, #market, #books, #how, #rules, #chains) {
    scroll-margin-top: 84px;
  }
}
