/* /stablecoins — "How stablecoins move" public explainer (formerly /layers).
   Reading-column narrative on supply vs settlement movement. All rules are
   namespaced .ly-* (retained filename/prefix to avoid churn) to avoid
   collisions with the shared homepage/tape styles. Reuses tokens.css
   variables; defines only the local teal/coral movement pair (matching
   css/tape.css) for the movement equation. No JS. */

:root {
  --ly-pos: #7dd3c0;   /* expanded — matches --tape-pos */
  --ly-neg: #f0928c;   /* contracted — matches --tape-neg */
}

body { line-height: 1.7; }

.ly-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Hero ─────────────────────────────────── */
.ly-hero {
  padding: 5.5rem 0 2rem;
}
.ly-hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.ly-hero-title {
  font-family: var(--serif-display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--text);
  margin: 0 0 1rem;
}
.ly-hero-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0;
}

/* ── Gateway grid (hero-adjacent visual entry points) ── */
.ly-gateway {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 2.5rem;
}
.ly-gateway-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.ly-gateway-card:hover {
  border-color: rgba(125, 211, 192, 0.4);
  background: rgba(125, 211, 192, 0.045);
  transform: translateY(-2px);
}
.ly-gateway-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ly-card-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.ly-card-title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text);
}
.ly-card-copy {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.ly-card-cta {
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.ly-gateway-card:hover .ly-card-cta { color: var(--accent-light); }

/* Card motifs — decorative, no live data */
.ly-card-motif {
  display: block;
  height: 34px;
  margin: 0.15rem 0 0.1rem;
  opacity: 0.9;
}
.ly-motif-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 34px;
}
.ly-motif-bars span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  opacity: 0.55;
}
.ly-motif-bars span:nth-child(1) { height: 40%; }
.ly-motif-bars span:nth-child(2) { height: 62%; }
.ly-motif-bars span:nth-child(3) { height: 78%; }
.ly-motif-bars span:nth-child(4) { height: 100%; opacity: 0.85; }

.ly-motif-equation {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 34px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
}
.ly-motif-equation i { font-style: normal; color: var(--text-faint); opacity: 0.7; }
.ly-motif-equation strong { color: var(--accent-light); font-weight: 500; }

@media (min-width: 640px) {
  .ly-gateway { grid-template-columns: repeat(2, 1fr); }
}

/* ── Market scan grid (under "What a stablecoin is") ── */
.ly-scan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 1.1rem 0 1.25rem;
}
.ly-scan-grid > div {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  background: var(--bg-card);
}
.ly-scan-grid > div > span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.ly-scan-grid > div > strong {
  display: block;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.ly-scan-grid > div > p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
@media (min-width: 760px) {
  .ly-scan-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Movement model (supply vs settlement side-by-side) ── */
.ly-model {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 1.4rem 0;
}
.ly-model-card {
  padding: 1.1rem 1.15rem 1.25rem;
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  background: var(--bg-card);
}
.ly-model-card h3 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0.4rem 0 0.6rem;
}
.ly-model-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0.6rem 0 0;
}
.ly-model-state {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.ly-model-card--live .ly-model-state {
  color: var(--accent-light);
  background: rgba(125, 211, 192, 0.12);
  border: 1px solid rgba(125, 211, 192, 0.3);
}
.ly-model-card--research .ly-model-state {
  color: #d99a6c;
  background: rgba(217, 154, 108, 0.1);
  border: 1px solid rgba(217, 154, 108, 0.3);
}
.ly-model-card--live { border-left: 2px solid rgba(125, 211, 192, 0.4); }
.ly-model-card--research { border-left: 2px solid rgba(217, 154, 108, 0.35); }
.ly-model-equation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 0.5rem;
}
.ly-model-equation .is-pos { color: var(--ly-pos); }
.ly-model-equation .is-neg { color: var(--ly-neg); }
.ly-model-equation .ly-op { color: var(--text-faint); }
.ly-model-equation strong { color: var(--text); font-weight: 500; }

/* Supply movement visual — solid filled pool, decorative */
.ly-supply-visual {
  display: block;
  width: 100%;
  height: 170px;
  margin: 0.6rem 0 0.25rem;
}
.ly-pool-shape { fill: url(#lySplitPoolFill); }
.ly-supply-visual stop:first-child { stop-color: var(--accent-light); stop-opacity: 0.95; }
.ly-supply-visual stop:last-child { stop-color: var(--ly-pos); stop-opacity: 0.45; }
.ly-pool-arrow { opacity: 0.9; }
.ly-pool-arrow--in { fill: var(--ly-pos); }
.ly-pool-arrow--out { fill: var(--ly-neg); }

/* Settlement movement visual — node/path sketch with illustrative motion */
.ly-settle-visual {
  display: block;
  width: 100%;
  height: 170px;
  margin: 0.6rem 0 0.25rem;
}
.ly-settle-path {
  fill: none;
  stroke: rgba(217, 154, 108, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
}
.ly-settle-node {
  fill: #0a0d12;
  stroke: #d99a6c;
  stroke-width: 1.5;
}
.ly-settle-particle { fill: var(--accent-light); }
.ly-settle-particle--a { animation: ly-settle-move-a 4.5s ease-in-out infinite; }
.ly-settle-particle--b { animation: ly-settle-move-b 4.5s ease-in-out infinite; animation-delay: -2.25s; }
@keyframes ly-settle-move-a {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(192px, 110px); opacity: 0; }
}
@keyframes ly-settle-move-b {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(-192px, 110px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ly-settle-particle--a,
  .ly-settle-particle--b {
    animation: none;
    opacity: 0.8;
  }
}

.ly-split-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-faint);
}

@media (min-width: 640px) {
  .ly-model { grid-template-columns: repeat(2, 1fr); }
}

/* ── Sections ─────────────────────────────── */
.ly-section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border-hairline);
}
.ly-section-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.ly-section-title {
  font-family: var(--serif-display);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 1rem;
}
.ly-section p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 0.9rem;
}
.ly-section p:last-child { margin-bottom: 0; }
/* Core-framing lede — the supply-vs-settlement distinction */
.ly-section p.ly-lede {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text);
}
.ly-section p.ly-lede strong { color: var(--text); font-weight: 600; }
.ly-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 192, 0.3);
}
.ly-section a:hover { border-bottom-color: var(--accent); }

/* ── Formula strip ────────────────────────── */
.ly-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin: 0.5rem 0 1.25rem;
  padding: 1.25rem 1rem;
  border: 1px solid rgba(125, 211, 192, 0.18);
  border-radius: 12px;
  background: rgba(125, 211, 192, 0.04);
  text-align: center;
}
.ly-formula-term {
  font-family: var(--serif-display);
  font-size: clamp(15px, 2.4vw, 19px);
  font-weight: 400;
  color: var(--text);
}
.ly-formula-op {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-faint);
}
.ly-formula-term--result { color: var(--accent-light); }

/* ── Schematic proportion bar (1-in-N, illustrative only) ── */
.ly-proportion {
  margin: 0.25rem 0 1.25rem;
}
.ly-proportion-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.ly-proportion-fill {
  display: block;
  height: 100%;
  width: 9%;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, var(--ly-pos), var(--accent-light));
}
.ly-proportion-caption {
  margin: 0.55rem 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
}

/* ── Movement equation (reuses tape pos/neg language) ── */
.ly-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin: 0.5rem 0 1rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  background: var(--bg-card);
  font-family: var(--mono);
  font-size: clamp(13px, 2.2vw, 16px);
}
.ly-equation .is-net { color: var(--text); font-weight: 500; }
.ly-equation .is-pos { color: var(--ly-pos); }
.ly-equation .is-neg { color: var(--ly-neg); }
.ly-equation .ly-op { color: var(--text-faint); }

/* ── Daily Tape dated strip (schematic, illustrative only) ── */
.ly-tape-strip {
  margin: 0.25rem 0 1.1rem;
}
.ly-tape-strip-row {
  display: flex;
  gap: 5px;
}
.ly-tape-tile {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  background: rgba(125, 211, 192, 0.16);
  border: 1px solid rgba(125, 211, 192, 0.3);
}
.ly-tape-strip-caption {
  margin: 0.55rem 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-align: center;
}

/* ── Static supply motif (decorative, no data values) ── */
.ly-spark {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0.25rem 0 1.1rem;
  overflow: visible;
}
.ly-spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.ly-spark-area { fill: url(#lySparkFill); opacity: 0.5; }
.ly-spark stop:first-child { stop-color: var(--accent); stop-opacity: 0.4; }
.ly-spark stop:last-child { stop-color: var(--accent); stop-opacity: 0; }

/* ── Footer bridge ────────────────────────── */
.ly-bridge {
  padding: 2.25rem 0 3rem;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.ly-bridge a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 192, 0.3);
}
.ly-bridge a:hover { border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .ly-gateway-card {
    transition: none;
  }
  .ly-gateway-card:hover {
    transform: none;
  }
}

/* ── Motion polish — restrained, CSS-only. Every effect below is purely
   decorative, makes no data claim, and is switched off under
   prefers-reduced-motion. Above-the-fold elements reveal once on load;
   lower sections use slow loops so a calm motion moment is present
   whenever the reader scrolls to them (no JS / scroll observers). ── */

/* Shared: gentle highlight for the citable "Net" figure */
@keyframes ly-net-glow {
  0%, 100% { opacity: 0.8; text-shadow: none; }
  50%      { opacity: 1; text-shadow: 0 0 6px rgba(125, 211, 192, 0.5); }
}

/* Hero · Supply card — bars rise in, staggered (one-shot) */
.ly-motif-bars span {
  transform-origin: bottom;
  animation: ly-bar-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ly-motif-bars span:nth-child(1) { animation-delay: 0.05s; }
.ly-motif-bars span:nth-child(2) { animation-delay: 0.15s; }
.ly-motif-bars span:nth-child(3) { animation-delay: 0.25s; }
.ly-motif-bars span:nth-child(4) { animation-delay: 0.35s; }
@keyframes ly-bar-rise {
  from { transform: scaleY(0.05); }
  to   { transform: scaleY(1); }
}

/* Hero · Daily Tape card — Net gently highlights */
.ly-motif-equation strong { animation: ly-net-glow 3.2s ease-in-out infinite; }

/* "What a stablecoin is" — sparkline draws in, endpoint glows */
.ly-spark-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: ly-spark-draw 1.8s ease-out 0.2s forwards;
}
@keyframes ly-spark-draw { to { stroke-dashoffset: 0; } }
.ly-spark-area {
  opacity: 0;
  animation: ly-spark-fill 1.1s ease-out 1.1s forwards;
}
@keyframes ly-spark-fill { to { opacity: 0.5; } }
.ly-spark-dot {
  fill: var(--accent-light);
  animation: ly-spark-dot-pulse 3s ease-in-out infinite;
}
@keyframes ly-spark-dot-pulse {
  0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 1px rgba(125, 211, 192, 0.4)); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 5px rgba(125, 211, 192, 0.7)); }
}

/* Two ways · Supply side — mint/redeem rhythm + a slow breathe (solid, measured) */
.ly-pool-arrow--in  { animation: ly-pool-in 4.2s ease-in-out infinite; }
.ly-pool-arrow--out { animation: ly-pool-out 4.2s ease-in-out infinite; }
.ly-pool-shape      { animation: ly-pool-breathe 5s ease-in-out infinite; }
@keyframes ly-pool-in {
  0%, 100% { opacity: 0.3; }
  22%      { opacity: 1; }
  55%      { opacity: 0.3; }
}
@keyframes ly-pool-out {
  0%, 55%, 100% { opacity: 0.3; }
  80%           { opacity: 1; }
}
@keyframes ly-pool-breathe {
  0%, 100% { opacity: 0.82; }
  50%      { opacity: 1; }
}

/* Two ways · Settlement side — flowing dashed paths + glowing particles */
.ly-settle-path {
  stroke: rgba(217, 154, 108, 0.55);
  stroke-width: 1.75;
  animation: ly-settle-dash 3.6s linear infinite;
}
@keyframes ly-settle-dash { to { stroke-dashoffset: -32; } }
.ly-settle-particle { filter: drop-shadow(0 0 4px rgba(125, 211, 192, 0.7)); }

/* "What DDD measures" — sliver grows in, then pulses to read against the long track */
.ly-proportion-fill {
  transform-origin: left center;
  animation: ly-prop-grow 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both,
             ly-prop-glow 3.6s ease-in-out 1.6s infinite;
}
@keyframes ly-prop-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes ly-prop-glow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.4); }
}

/* Daily Tape — a calm wave reads across the dated records; Net highlights */
.ly-tape-tile { animation: ly-tile-scan 6s ease-in-out infinite; }
.ly-tape-tile:nth-child(1) { animation-delay: 0s; }
.ly-tape-tile:nth-child(2) { animation-delay: 0.32s; }
.ly-tape-tile:nth-child(3) { animation-delay: 0.64s; }
.ly-tape-tile:nth-child(4) { animation-delay: 0.96s; }
.ly-tape-tile:nth-child(5) { animation-delay: 1.28s; }
.ly-tape-tile:nth-child(6) { animation-delay: 1.6s; }
.ly-tape-tile:nth-child(7) { animation-delay: 1.92s; }
@keyframes ly-tile-scan {
  0%, 70%, 100% {
    background: rgba(125, 211, 192, 0.16);
    border-color: rgba(125, 211, 192, 0.3);
  }
  35% {
    background: rgba(125, 211, 192, 0.32);
    border-color: rgba(125, 211, 192, 0.55);
  }
}
.ly-equation .is-net { animation: ly-net-glow 3.2s ease-in-out infinite; }

/* Honour reduced-motion: drop every decorative animation to a still state */
@media (prefers-reduced-motion: reduce) {
  .ly-motif-bars span,
  .ly-motif-equation strong,
  .ly-spark-line,
  .ly-spark-area,
  .ly-spark-dot,
  .ly-pool-arrow--in,
  .ly-pool-arrow--out,
  .ly-pool-shape,
  .ly-settle-path,
  .ly-proportion-fill,
  .ly-tape-tile,
  .ly-equation .is-net {
    animation: none !important;
  }
  .ly-motif-bars span { transform: none; }
  .ly-spark-line { stroke-dashoffset: 0; }
  .ly-spark-area { opacity: 0.5; }
  .ly-spark-dot { opacity: 0.85; filter: none; }
  .ly-proportion-fill { transform: scaleX(1); filter: none; }
  .ly-settle-particle { filter: none; }
}
