/* css/pages/landing.css: the landing page (/), owned by its page agent. Built on css/base.css (DESIGN.md): this file
   only lays out the landing's own blocks (the hero, the real-yield chart, the bond diagram, the on-chain ledger, the
   token strip) in the same grammar. Colours only through the tokens in css/tokens.css.
   Mobile first; breakpoints 640 / 900 / 1120 like base.css. */

/* ================================================================== hero */
.hero .actions { gap: 14px 26px; }
.hero .actions .btn { min-width: 164px; }
.hero .surface figcaption span { min-width: 0; }
.nowrap { white-space: nowrap; }
.hero .surface.empty-surface canvas { display: none; }
@media (max-width: 639px) { .hero .surface canvas { height: clamp(260px, 82vw, 320px); } }
@media (min-width: 640px) and (max-width: 999px) { .hero .surface canvas { height: clamp(340px, 52vw, 440px); } }
@media (min-width: 1000px) {
  .hero .surface canvas { height: clamp(380px, 36vw, 470px); }
}

/* ================================================================== stats band */
/* the label wraps as text with its mark inline, and every cell's label, value and line below share three rows, so
   the values stand on one line however the labels wrap */
.band .stats .k { display: block; line-height: 1.45; }
.band .stats .k .tag { margin-left: 6px; font-size: 12px; vertical-align: 1px; }
@supports (grid-template-rows: subgrid) {
  .band .stats { grid-auto-rows: auto; }
  .band .stats .cell { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .band .stats .v { align-self: end; }
}
.band .stats .v .u { margin-left: 4px; }
.band .stats .v.sm { font-size: clamp(26px, 2.8vw, 38px); line-height: 1; padding-top: .14em; padding-bottom: .12em; }
@media (max-width: 359px) { .band .stats .v.sm { font-size: 22px; } }
.source .src-block code { font-size: 12px; color: var(--ink-2); }
.source time { color: var(--ink-2); }

/* ================================================================== optional columns */
/* phones: a ledger keeps its first columns; the rest come back from 640px (.opt) or 900px (.opt-lg) */
.ledger .opt { display: none; }
@media (min-width: 640px) { .ledger .opt { display: table-cell; } }
.ledger .opt-lg { display: none; }
@media (min-width: 900px) { .ledger .opt-lg { display: table-cell; } }

/* ================================================================== No. 1, where bonds beat inflation */
.beat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.beat > * { min-width: 0; }
@media (min-width: 900px) {
  .beat { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; }
  .beat-key { position: sticky; top: calc(var(--nav-h) + 28px); }
}
.beat-take { font: 400 22px/1.4 var(--serif); color: var(--ink); margin-bottom: 22px; text-wrap: pretty; }
.beat-take b { font-weight: 500; color: var(--orange-ink); }
.beat-key .terms > div { padding: 14px 0; }
@media (min-width: 640px) { .beat-key .terms > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.beat-key .terms b { font-size: 19px; }
.beat-key .terms b .mono { font: 500 15px var(--mono); }
.beat-panel .panel-b { padding: 14px 18px 8px; }
/* positive real yields come in the brand orange from barChart({ posCls: 'accent' }); the US row stands out */
#beat-chart .chart .ch-row.us text.ch-name { fill: var(--ink); font-weight: 500; }

/* ================================================================== No. 2, how a bond works (priors' "how a line opens") */
.howto { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.howto > * { min-width: 0; }
@media (min-width: 900px) { .howto { grid-template-columns: 300px minmax(0, 1fr); gap: 64px; } }
.diagram { max-width: 330px; align-self: start; }
@media (min-width: 900px) { .diagram { position: sticky; top: calc(var(--nav-h) + 28px); } }
.diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram .box { stroke: var(--ink); fill: var(--panel); transition: fill .5s var(--ease), stroke .5s var(--ease); }
.diagram .t1 { fill: var(--ink); font: 400 22px var(--serif); }
.diagram .t2 { fill: var(--muted); font: 400 12px var(--sans); }
.diagram .lb { fill: var(--orange-ink); font: italic 400 16px var(--serif); stroke: none; transition: opacity .5s; }
.diagram .ar, .diagram .hd { stroke: var(--ink); transition: stroke .5s, opacity .5s; }
.diagram .ar.g, .diagram .hd.g { stroke: var(--up); } .diagram .lb.g { fill: var(--up); }
.diagram .ar.r, .diagram .hd.r { stroke: var(--down); } .diagram .lb.r { fill: var(--down); font-size: 14px; }
.diagram .loss { opacity: .55; transition: opacity .5s; }
/* the walk-through (landing.js): one step at a time, its box lit and its money moving */
.howto.playing .diagram [data-on] { transition: opacity .5s var(--ease), fill .5s var(--ease), stroke .5s var(--ease); }
.howto.playing .diagram g[data-on], .howto.playing .diagram text[data-on] { opacity: .35; }
.howto.playing .diagram .loss { opacity: .22; }
.howto[data-at="1"] .diagram [data-on~="1"], .howto[data-at="2"] .diagram [data-on~="2"],
.howto[data-at="3"] .diagram [data-on~="3"], .howto[data-at="4"] .diagram [data-on~="4"] { opacity: 1; }
.howto[data-at="1"] .diagram rect[data-on~="1"], .howto[data-at="2"] .diagram rect[data-on~="2"],
.howto[data-at="3"] .diagram rect[data-on~="3"], .howto[data-at="4"] .diagram rect[data-on~="4"] { fill: var(--orange-soft); stroke: var(--orange); }
.howto[data-at="1"] .diagram g[data-on~="1"] .ar, .howto[data-at="2"] .diagram g[data-on~="2"] .ar,
.howto[data-at="3"] .diagram g[data-on~="3"] .ar, .howto[data-at="4"] .diagram g[data-on~="4"] .ar { stroke-dasharray: 5 6; animation: obDash 1.6s var(--ease) 1 both; }
/* the money moves once each time its step is shown, then the dashes rest (no looping animation besides the code background) */
@keyframes obDash { from { stroke-dashoffset: 33; } to { stroke-dashoffset: 0; } }

.stepls { list-style: none; }
.stepl { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-top: 1px solid var(--rule); }
.stepl:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 640px) { .stepl { grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 28px 0; } }
.stepl .n { font: italic 400 30px/1 var(--serif); color: var(--orange-display); }
@media (min-width: 640px) { .stepl .n { font-size: 34px; } }
.stepl h3 { margin: 0 0 8px; font: 500 23px/1.2 var(--serif); }
@media (min-width: 640px) { .stepl h3 { font-size: 25px; } }
.stepl p { color: var(--ink-2); max-width: 38em; }
.stepl .aside { display: block; margin-top: 10px; font-size: 15px; color: var(--muted); }
.howto.playing .stepl { cursor: pointer; }
.howto.playing .stepl .n { transition: color .5s var(--ease); }
.howto.playing .stepl:not(.on) .n { color: var(--muted); }
/* beside the sticky diagram (from 900px) the steps not being shown step back; on phones every step stays readable */
@media (min-width: 900px) {
  .howto.playing .stepl { opacity: .5; transition: opacity .5s var(--ease); }
  .howto.playing .stepl.on { opacity: 1; }
}

/* ================================================================== No. 3, three ways */
.ways .way .btn { min-width: 150px; }

/* ================================================================== No. 4, bitcoin credit (the Strategy stack) */
.bc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.bc > * { min-width: 0; }
@media (min-width: 1000px) { .bc { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; } }
.bc-stack .panel-h .sub, .bc-yields .panel-h .sub { font-size: 13.5px; }
.bc-stack .panel-b { padding-top: 12px; padding-bottom: 8px; }
.bc-stack .panel-b > .sk.block { height: 300px; }
.bc-side { display: grid; gap: 18px; }
.bc-list { list-style: none; }
.bc-list li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; grid-template-areas: "k nm v" "bar bar bar"; gap: 4px 10px; align-items: baseline; padding: 9px 0 10px; border-bottom: 1px solid var(--rule-2); cursor: help; }
.bc-list li:last-child { border-bottom: 0; }
.bc-list .bc-k { grid-area: k; font: 500 12.5px var(--mono); color: var(--ink); }
.bc-list .bc-nm { grid-area: nm; font: 400 15px var(--serif); color: var(--ink-2); }
.bc-list .bc-v { grid-area: v; font: 500 13.5px var(--mono); color: var(--orange-ink); font-variant-numeric: tabular-nums; }
.bc-list .cellbar { grid-area: bar; width: 100%; height: 3px; margin: 2px 0 0; }
.bc-list li.ref { margin-top: 8px; border-top: 1px solid var(--ink); }
.bc-list li.ref .bc-k { color: var(--ink-2); }
.bc-list li.ref .bc-v { color: var(--ink); }
.bc-list li.ref .cellbar::after { background: var(--ink-2); }
.bc-est { margin-left: 5px; font: 500 11.5px var(--sans); color: var(--muted); }
.bc-yields .panel-f .fine { font-size: 12.5px; line-height: 1.45; }
.bc-mstr { display: grid; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule); border-left: 2px solid var(--orange); }
.bc-mstr p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.bc-mstr p b { font: 500 13px var(--mono); color: var(--ink); }
.bc-mstr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.bc-mstr-row .cc { min-width: 46px; color: var(--orange-ink); border-color: var(--orange-soft); }
.bc-px { font: 500 16px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.bc-px .sk { min-width: 4.4em; }
.bc-mstr-row .btn { margin-left: auto; }
#bc-lede .bc-n { font-weight: 500; color: var(--orange-ink); }
.bc-own { margin-top: 18px; max-width: 60em; }

/* ================================================================== No. 5, on chain, live */
.oc-table .who .cc { min-width: 44px; }
/* phones: names may wrap so the price and the Buy button stay in view without scrolling the table */
@media (max-width: 639px) {
  .oc-table td:first-child, .series-tbl td:first-child { white-space: normal; }
  .oc-table .nm-s, .series-tbl .nm-s { overflow-wrap: anywhere; }
}
.oc-table td.oc-tracks { color: var(--ink-2); white-space: normal; min-width: 0; }
.oc-table .oc-x, .oc-table .oc-act { width: 1%; text-align: right; }
.oc-table .oc-x a { font-size: 13.5px; color: var(--muted); }
.oc-table .oc-x a:hover { color: var(--ink); }
.oc-table td.num .price { font-size: 15px; color: var(--ink); }
.oc-table td.num .px-ref { display: block; margin-top: 2px; font: 12px var(--sans); color: var(--muted); }
.oc-table .oc-tracks, .oc-table .oc-fee, .oc-table .oc-x { display: none; }
@media (min-width: 640px) { .oc-table .oc-fee, .oc-table .oc-x { display: table-cell; } }
@media (min-width: 900px) { .oc-table .oc-tracks { display: table-cell; } }
.oc-note { margin-top: 16px; }

.series { margin-top: 56px; }
.series-h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.series .ledger thead th { background: transparent; }
.series .banner { margin-top: 18px; }
.series .empty { padding: 24px 0 8px; }
.series-tbl .who .cc { min-width: 58px; }
.series-tbl td .tag { font-size: 12.5px; }

/* ================================================================== the token strip (priors' "$PRIORS as collateral") */
.chapter.token { padding-top: 0; }
.token > .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.token > .wrap > * { min-width: 0; }
@media (min-width: 900px) { .token > .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
.token h2 { margin-bottom: 18px; font: 400 clamp(32px, 3.6vw, 46px)/1.06 var(--serif); letter-spacing: -.016em; }
.token-l p { margin-bottom: 26px; max-width: 32em; font: 400 19px/1.55 var(--serif); color: var(--ink-2); }
.oc-table td.oc-tracks .ref { margin-right: 10px; }
/* the issuer under a series name: "OpenBonds Lab" and its verified mark (js/ui/issuer.js) */
.series-tbl .ser-iss .tag { margin-left: 8px; }
