/* Nevoa: dark mist + matrix. One accent (mint), one radius scale (card 24, controls 14, pills full). */
:root {
  --bg: #08090c;
  --surface: rgb(16 20 22 / .62);
  --surface-2: rgb(255 255 255 / .04);
  --line: rgb(255 255 255 / .08);
  --fg: #eceef1;
  --muted: #8f949c;
  --accent: #a8d8ff;
  --accent-2: #8fa8ff;
  --accent-grad: linear-gradient(135deg, #c4e6ff 0%, #a8d8ff 45%, #8fa8ff 100%);
  --accent-ink: #071526;
  --danger: #f2a0a0;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% -10%, #141b26 0%, var(--bg) 60%);
  color: var(--fg);
  font: 15px/1.5 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
code, .mono { font-family: "Geist Mono", ui-monospace, monospace; }

/* ---------- background: kirigakure (hidden in mist) ----------
   Fog is SVG fractal noise drifting in loops; the vertical kanji fades in and out behind it. */
.scene { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.kanji {
  position: absolute; right: 6vw; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; font-size: min(26vh, 220px); line-height: 1; font-weight: 600;
  color: rgb(236 238 241 / .09); letter-spacing: .08em;
  animation: surface 14s ease-in-out infinite;
}
@keyframes surface { 0%, 100% { opacity: .35; filter: blur(6px); } 50% { opacity: 1; filter: blur(0); } }
.mist {
  position: absolute; inset: -10% auto -10% 0; width: calc(100% + 1600px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035 .007' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .80 0 0 0 0 .88 0 0 0 0 1 0 0 0 1.6 -.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 1200px 800px;
  opacity: .22;
  filter: blur(14px);
  mask-image: radial-gradient(120% 70% at 50% 60%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 70% at 50% 60%, #000 30%, transparent 75%);
  animation: roll 90s linear infinite;
}
.mist.m2 { opacity: .14; animation-duration: 140s; animation-direction: reverse; background-size: 1600px 1000px; top: 10%; }
.mist.m3 { opacity: .28; animation-duration: 70s; top: 40%; mask-image: linear-gradient(to bottom, transparent, #000 50%); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 50%); }
@keyframes roll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-1200px, 0, 0); } }

/* a soft grain over everything, fixed so it never repaints on scroll */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.top {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 24px; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-grad); color: var(--accent-ink); font-size: 16px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35);
}
.top-right { display: flex; gap: 8px; align-items: center; }
.pill {
  height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.net { text-decoration: none; cursor: pointer; transition: color 200ms ease, border-color 200ms ease; }
.net:hover { color: var(--fg); border-color: rgb(255 255 255 / .18); }
a.cta { display: grid; place-items: center; text-decoration: none; }
.wallet { cursor: pointer; color: var(--fg); font-family: "Geist Mono", monospace; transition: transform 160ms var(--ease-out), border-color 200ms ease; }
.wallet:active { transform: scale(.97); }

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 3; display: grid; justify-items: center; gap: 28px;
  padding: 48px 16px 64px; max-width: 1200px; margin: 0 auto;
}
.intro { text-align: center; max-width: 560px; }
.intro h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; margin: 0 0 12px; }
.intro .dim { color: var(--muted); }
.intro p { color: var(--muted); margin: 0 auto; max-width: 44ch; }

/* ---------- card ---------- */
.card {
  width: 100%; max-width: 460px; padding: 10px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 80px rgb(0 0 0 / .45);
}
@media (prefers-reduced-transparency: reduce) { .card { background: #11161a; backdrop-filter: none; } }

.balance { padding: 18px 16px 14px; display: grid; gap: 2px; }
.label { color: var(--muted); font-size: 13px; }
.amount { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.amount .tk { font-size: 18px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.sub { color: var(--muted); font-size: 13px; }

/* tabs with a sliding indicator */
.gas-warn {
  display: grid; gap: 4px; margin: 0 6px 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px;
  background: rgb(255 196 120 / .08); border: 1px solid rgb(255 196 120 / .25); color: #f3d6b0;
}
.gas-warn strong { color: #ffe2bd; font-weight: 600; }
.gas-warn a { color: #ffe2bd; text-underline-offset: 3px; justify-self: start; }
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; margin: 4px 6px 10px; border-radius: 14px; background: rgb(0 0 0 / .25); }
.tabs button {
  position: relative; z-index: 1; flex: 1; height: 36px; border: 0; border-radius: 10px; background: none;
  color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: color 200ms ease;
}
.tabs button[aria-selected="true"] { color: var(--fg); }
.tab-ind {
  position: absolute; top: 4px; left: 0; height: 36px; border-radius: 10px; background: rgb(255 255 255 / .07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06);
  transition: transform 260ms var(--ease-in-out), width 260ms var(--ease-in-out);
}

.panel { display: grid; gap: 8px; animation: panel-in 220ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); filter: blur(3px); } }

.field { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: rgb(0 0 0 / .25); border: 1px solid transparent; transition: border-color 200ms ease; }
.field:focus-within { border-color: rgb(168 216 255 / .45); }
.field label { color: var(--muted); font-size: 13px; }
.field input, .field select { width: 100%; border: 0; outline: 0; background: none; padding: 0; min-width: 0; }
.field.big input { font-size: 34px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.field input::placeholder { color: #5d6965; }
.field select { appearance: none; cursor: pointer; font-size: 16px; }
.field select option { background: #11161a; }
#to, #dest { font-family: "Geist Mono", monospace; font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .06); font-weight: 600; font-size: 14px; }

.hint { color: var(--muted); font-size: 13px; margin: 2px 8px 4px; }

.cta {
  height: 56px; border: 0; border-radius: 14px; cursor: pointer; width: 100%;
  background: var(--accent-grad); color: var(--accent-ink); font-size: 16px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35);
  transition: transform 160ms var(--ease-out), opacity 200ms ease, filter 200ms ease;
}
.cta:active { transform: scale(.97); }
.cta:disabled { cursor: progress; opacity: .55; filter: saturate(.4); }
.cta.ghost { background: rgb(168 216 255 / .1); color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .cta:not(:disabled):hover { filter: brightness(1.06); }
  .wallet:hover { border-color: rgb(255 255 255 / .18); }
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.link { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(255 255 255 / .2); }
.link:hover { color: var(--fg); }

.receive { display: grid; gap: 6px; padding: 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.addr { all: unset; cursor: pointer; display: block; padding: 10px 12px; border-radius: 10px; background: rgb(0 0 0 / .25); transition: transform 160ms var(--ease-out); }
.addr:active { transform: scale(.98); }
.addr code { display: block; font-size: 11.5px; line-height: 1.5; color: #c9ced6; word-break: break-all; }

/* ---------- activity feed ---------- */
.activity { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 460px; display: grid; gap: 6px; }
.activity li {
  display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: opacity 300ms ease, transform 300ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(-6px); }
}
.activity li:nth-child(n+6) { opacity: .45; }
.activity time { font-family: "Geist Mono", monospace; font-size: 11px; color: #5d6965; flex: none; }
.activity li.ok { color: var(--fg); }
.activity li.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; align-self: center; }
.activity li.err { color: var(--danger); }
.activity a { color: var(--accent); text-decoration: none; font-family: "Geist Mono", monospace; }

.faq { width: 100%; max-width: 460px; margin-top: 24px; }
.faq h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px 4px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 4px; font-weight: 500; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 4px 14px; color: var(--muted); max-width: 60ch; }
.foot { position: relative; z-index: 3; display: flex; justify-content: center; padding: 0 16px 32px; }

/* ---------- entry ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro, .card, .activity { animation: rise 700ms var(--ease-out) both; }
  .card { animation-delay: 80ms; }
  .activity { animation-delay: 160ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

@media (prefers-reduced-motion: reduce) {
  .mist, .kanji { animation: none; }
  .tab-ind, .panel { transition: none; animation: none; }
}

@media (max-width: 520px) {
  .top { padding: 0 16px; }
  .stage { padding-top: 24px; }
  .amount { font-size: 34px; }
  .field.big input { font-size: 28px; }
  #netPill { display: none; }
}
