/* Sakura — RWA yield markets on Base.
   The shell: a fixed rail on the left holding the bloom (the product, in WebGL) and a numbered
   index; the board scrolls on the right. Near-black ground, one neon blossom pink, hairlines
   instead of boxes. */

:root {
  --ink: #050308;
  --ink-2: #0a0610;
  --veil: rgba(10, 5, 14, 0.64);
  --line: rgba(255, 122, 198, 0.14);
  --line-2: rgba(255, 122, 198, 0.3);
  --pink: #ff2d86;
  --pink-soft: #ff8fc7;
  --rose: #ffd3ec;
  --blue: #3d7bff;
  --green: #35d6a4;
  --amber: #ffb648;
  --text: #f8eef4;
  --muted: #ad8ea2;
  --muted-2: #6f5c6a;
  --rail: 392px;
  --gut: clamp(20px, 4vw, 64px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Shippori Mincho", "Zen Kaku Gothic New", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--ink); }

body {
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.up { color: var(--green); }

/* ---------------------------------------------------------------- the rail */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12, 5, 16, 0.72), rgba(5, 3, 8, 0.92)),
    url("/img/hero.jpg") 40% center / cover no-repeat;
  z-index: 20;
}
.rail::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(70% 42% at 50% 40%, rgba(255, 45, 134, 0.12), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, rgba(5, 3, 8, 0.7) 0%, rgba(5, 3, 8, 0) 18%, rgba(5, 3, 8, 0) 46%, rgba(5, 3, 8, 0.86) 86%, rgba(5, 3, 8, 0.96) 100%);
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 12px rgba(255, 45, 134, 0.6)); }
.brand b { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: 0.01em; }
.brand i { font-style: normal; font-size: 11px; color: var(--muted-2); letter-spacing: 0.22em; }

#bloom { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }

.index { margin-top: auto; position: relative; z-index: 2; display: grid; gap: 2px; }
.index a {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: baseline; gap: 10px;
  padding: 11px 10px; border-radius: 10px; color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}
.index a u { text-decoration: none; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.index a span { font-size: 15px; }
.index a em { font-style: normal; font-size: 11px; color: var(--muted-2); letter-spacing: 0.12em; }
.index a:hover { background: rgba(255, 45, 134, 0.08); color: var(--text); }
.index a.on { background: rgba(255, 45, 134, 0.14); color: var(--text); }
.index a.on u, .index a.on em { color: var(--pink); }

.rail-foot {
  position: relative; z-index: 2; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.rail-note { position: relative; z-index: 2; margin-top: 14px; font-size: 11.5px; color: var(--muted-2); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font); white-space: nowrap;
  padding: 11px 17px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255, 45, 134, 0.08); color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: rgba(255, 45, 134, 0.17); border-color: var(--pink); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #ff4f9b, #e0156c); border-color: transparent; color: #fff;
  box-shadow: 0 14px 34px -16px rgba(255, 45, 134, 0.95);
}
.btn.primary:hover { background: linear-gradient(180deg, #ff6aab, #ef2279); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-2); }
.btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--pink-soft); border-color: var(--line-2); }

/* ---------------------------------------------------------------- the flow */

.flow {
  margin-left: var(--rail);
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(255, 45, 134, 0.07), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #080410 0%, var(--ink) 40%);
}
.flow::before {
  content: "";
  position: fixed; inset: 0 0 0 var(--rail); pointer-events: none; z-index: 0;
  background-image: linear-gradient(90deg, rgba(255, 122, 198, 0.045) 1px, transparent 1px);
  background-size: 124px 100%;
}
.band { position: relative; z-index: 1; padding: clamp(56px, 7vw, 104px) var(--gut); }
.band + .band { border-top: 1px solid var(--line); }
.band.tight { padding-top: clamp(34px, 4vw, 56px); padding-bottom: clamp(34px, 4vw, 56px); }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 600 11px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink-soft);
  margin-bottom: 20px;
}
.eyebrow b { font-family: var(--display); font-size: 13px; letter-spacing: 0; color: var(--pink); }
.eyebrow s { flex: 1; height: 1px; background: var(--line); text-decoration: none; }

h1.display {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(42px, 6.4vw, 92px); line-height: 1.02; letter-spacing: -0.015em;
}
h1.display em { font-style: normal; color: var(--pink); text-shadow: 0 0 60px rgba(255, 45, 134, 0.6); }
h1.display.sm { font-size: clamp(32px, 4.2vw, 60px); }
h2.display { font-family: var(--display); font-size: clamp(27px, 3.1vw, 42px); line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 16.5px; font-family: var(--font); font-weight: 600; }

.lede { margin-top: 22px; font-size: clamp(15px, 1.25vw, 18px); color: #e4cfdd; max-width: 54ch; }
.cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.after { margin-top: 20px; font-size: 13px; color: var(--muted-2); max-width: 62ch; }

/* ---------------------------------------------------------------- the board */

.board { width: 100%; border-collapse: collapse; }
.board th {
  font: 600 10.5px/1 var(--font); letter-spacing: 0.17em; text-transform: uppercase; color: var(--muted-2);
  text-align: right; padding: 0 14px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.board th:nth-child(-n+2) { text-align: left; }
.board td {
  padding: 16px 14px; text-align: right; border-bottom: 1px solid rgba(255, 122, 198, 0.07);
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap;
}
.board td:nth-child(-n+2) { text-align: left; }
.board tbody tr { cursor: pointer; transition: background 0.14s ease; }
.board tbody tr:hover { background: linear-gradient(90deg, rgba(255, 45, 134, 0.1), rgba(255, 45, 134, 0)); }
.board tbody tr:hover .tick b { color: var(--pink-soft); }
.board .n { color: var(--muted-2); font-size: 11.5px; width: 34px; }
.board .tick { font-family: var(--font); }
.board .tick b { display: block; font-weight: 600; font-size: 15px; transition: color 0.14s ease; }
.board .tick small { color: var(--muted-2); font-size: 12px; }
.board .spark { width: 92px; height: 26px; vertical-align: middle; }
.board .spark svg { display: block; width: 92px; height: 26px; overflow: visible; }
.board .util { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
.board .bar { width: 54px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.board .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--pink-soft)); }
.board .go { color: var(--muted-2); width: 20px; }
.board tbody tr:hover .go { color: var(--pink); }

/* ---------------------------------------------------------------- steps + columns */

.steps { display: grid; gap: 0; margin-top: 8px; }
.step { display: grid; grid-template-columns: 76px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step .num { font-family: var(--display); font-size: 30px; color: var(--pink); opacity: 0.85; line-height: 1; }
.step .num em { display: block; font-style: normal; font-size: 11px; color: var(--muted-2); letter-spacing: 0.1em; margin-top: 8px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; max-width: 70ch; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.col h3 { font-size: 20px; font-family: var(--display); font-weight: 600; }
.col p { color: var(--muted); font-size: 14.5px; margin-top: 12px; }
.spec { margin-top: 20px; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13.5px; border-top: 1px dashed rgba(255, 122, 198, 0.12); }
.spec div span:first-child { color: var(--muted); }
.spec div span:last-child { font-family: var(--mono); }

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 46px); margin-top: 26px; }
.figure b { display: block; font-family: var(--mono); font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -0.02em; }
.figure span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------------------------------------------------------------- panels (app pages) */

.panel { border: 1px solid var(--line); border-radius: 14px; background: rgba(13, 7, 18, 0.66); backdrop-filter: blur(12px); }
.pad { padding: 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13.5px; }
.kv + .kv { border-top: 1px dashed rgba(255, 122, 198, 0.1); }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 14px; align-content: start; }
.badge { font: 600 10.5px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); }
.badge.live { color: var(--green); border-color: rgba(53, 214, 164, 0.32); }

.field { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(6, 4, 10, 0.72); }
.field .lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field .lab a { color: var(--pink-soft); cursor: pointer; }
.field input { width: 100%; border: 0; background: transparent; color: var(--text); font: 500 20px/1.2 var(--mono); outline: none; }
.field input::placeholder { color: var(--muted-2); }
.tabs { display: flex; gap: 4px; padding: 4px; background: rgba(6, 4, 10, 0.72); border: 1px solid var(--line); border-radius: 12px; }
.tabs button { flex: 1; padding: 9px 10px; border: 0; border-radius: 9px; cursor: pointer; font: 600 13px/1 var(--font); color: var(--muted); background: transparent; }
.tabs button.on { background: rgba(255, 45, 134, 0.17); color: var(--text); }
.health { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.health i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber), var(--pink)); }
.addr-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; }
.addr-row + .addr-row { border-top: 1px dashed rgba(255, 122, 198, 0.1); }
.addr-row span:first-child { color: var(--muted); }
.addr-row a, .addr-row span:last-child { font-family: var(--mono); font-size: 12.5px; }

/* ---------------------------------------------------------------- market page */

.market-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 380px); gap: 22px; align-items: start; }
.market-grid .side { position: sticky; top: 24px; }
.dot {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; flex: none;
  background: rgba(255, 45, 134, 0.1); border: 1px solid var(--line);
  font: 600 15px/1 var(--mono); color: var(--pink-soft);
}
#curve svg { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------- doc */

.doc p { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
.doc em { color: var(--rose); font-style: normal; }
.doc .cols { gap: clamp(22px, 3vw, 44px); }
.doc .entry { padding: 22px 0; border-top: 1px solid var(--line); }
.doc .entry:first-child { border-top: 0; }

/* ---------------------------------------------------------------- reveal + toast */

.rise { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.rise.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px);
  background: #140a16; border: 1px solid var(--line-2); color: var(--text);
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease; z-index: 90; max-width: min(92vw, 520px);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast a { color: var(--pink-soft); text-decoration: underline; }

/* ---------------------------------------------------------------- footer */

.foot { position: relative; z-index: 1; padding: 36px var(--gut) 54px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot h4 { font: 600 10.5px/1 var(--font); letter-spacing: 0.17em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 12px; }
.foot .addr { font-family: var(--mono); font-size: 12px; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 1080px) {
  :root { --rail: 0px; }
  .rail {
    position: relative; inset: auto; width: 100%; flex-direction: column;
    padding: 16px var(--gut) 18px; border-right: 0; border-bottom: 1px solid var(--line);
    height: auto;
  }
  .rail .bloomwrap { position: relative; height: 172px; margin: 4px calc(var(--gut) * -1) 6px; order: 0; }
  .brand { order: -1; }
  .index { order: 1; }
  .rail-foot { order: 2; }
  .rail-note { order: 3; }
  #bloom { position: absolute; inset: 0; }
  .index { margin-top: 10px; grid-auto-flow: column; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .index a { grid-template-columns: 1fr; gap: 2px; padding: 9px 10px; text-align: center; }
  .index a u { display: none; }
  .flow { margin-left: 0; }
  .flow::before { inset: 0; }
  .cols, .market-grid { grid-template-columns: 1fr; }
  .market-grid .side { position: static; }
  .figures { grid-template-columns: 1fr; gap: 16px; }
  .step { grid-template-columns: 54px 1fr; gap: 16px; }
  .board .spark, .board th.spark-h { display: none; }
}

@media (min-width: 1081px) {
  .rail .bloomwrap { position: absolute; inset: 0; }
}

/* ---------------------------------------------------------------- the register */

.q { border-top: 1px solid var(--line); padding-top: 18px; }
.q:first-child { border-top: 0; padding-top: 0; }
.q h4 { margin: 0 0 12px; font: 600 15px/1.45 var(--font); display: flex; gap: 10px; }
.q h4 u { text-decoration: none; font-family: var(--mono); font-size: 12px; color: var(--pink); flex: none; padding-top: 2px; }
.q .opts { display: grid; gap: 7px; }
.q button {
  text-align: left; padding: 11px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(6, 4, 10, 0.5); color: var(--muted);
  font: 400 13.5px/1.45 var(--font); transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.q button:hover { color: var(--text); border-color: var(--line-2); }
.q button.on { background: rgba(255, 45, 134, 0.14); border-color: var(--pink); color: var(--text); }

/* ---------------------------------------------------------------- the gate */

.gate { margin-top: 30px; max-width: 760px; }
.gate .kv:first-child { padding-top: 0; }
