/* Spire. Dark, quiet, tiled: a near-black green base, tiles a step lighter, cream type,
   one mint accent. Every colour, font and radius is a token here. */

:root {
  color-scheme: dark;
  --bg: #070e0c;
  --tile: #0d1916;
  --tile-2: #12211d;            /* insets, hovers, inputs */
  --line: rgba(214, 255, 236, 0.075);
  --line-2: rgba(214, 255, 236, 0.14);
  --ink: #eef2ea;
  --ink-2: #6c857b;             /* second headline line */
  --muted: #8ea398;
  --mint: #3fd6a6;
  --mint-soft: #9ff3cf;
  --mint-deep: #1f5446;
  --good: #4fd1a5;
  --warn: #f0b36e;
  --bad: #ff8a7a;

  --font-head: 'Geist', system-ui, sans-serif;
  --font-text: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  --step--2: 0.72rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.15rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 3.6vw, 2.8rem);
  --step-4: clamp(2.7rem, 6.4vw, 4.9rem);

  --gutter: 16px;
  --radius: 14px;
  --radius-s: 10px;
  --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 400 var(--step-0) / 1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--mint); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
button { font: inherit; }
::selection { background: var(--mint-deep); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-head); margin: 0; color: var(--ink); font-weight: 500; }
h1 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.05em; }
h1 .tone, h2 .tone { color: var(--ink-2); display: block; }
h2 { font-size: var(--step-3); line-height: 1.04; letter-spacing: -0.04em; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; max-width: 64ch; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 760px) { :root { --gutter: 28px; } }

.mono { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.02em; color: var(--muted); }
.eyebrow { font: 500 var(--step--2)/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.ok { color: var(--good); }
.bad { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ header */
.topbar { position: sticky; top: 0; z-index: 20; padding-top: 12px; padding-bottom: 12px;
  background: linear-gradient(var(--bg) 55%, transparent); }
.bar { display: flex; align-items: center; gap: 8px; }
.brand {
  display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 500 1.15rem/1 var(--font-head); letter-spacing: -0.03em; padding: 6px 14px 6px 6px;
  background: var(--tile); border: 1px solid var(--line); border-radius: 12px; height: 44px;
}
.brand svg { width: 30px; height: 30px; color: var(--ink); }
.nav { display: flex; gap: 2px; padding: 4px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; height: 44px; align-items: center; }
.nav a { font: 500 var(--step--1)/1 var(--font-text); color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--tile-2); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--tile-2); }
.bar .end { display: flex; gap: 8px; align-items: center; margin-left: auto; }
@media (max-width: 860px) { .nav { display: none; } }
@media (max-width: 520px) { .bar .end .btn:not(.gloss) { display: none; } }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  font: 500 var(--step--1) / 1 var(--font-text); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  background: var(--tile); color: var(--ink);
}
.btn:hover { background: var(--tile-2); border-color: var(--line-2); }
.btn .arr { font-size: 0.95em; opacity: 0.8; }
.btn.gloss { background: var(--ink); color: #0b1311; border-color: transparent; }
.btn.gloss:hover { background: #ffffff; }
.btn.lg { height: 52px; padding: 0 24px; font-size: var(--step-0); min-width: 180px; }
.btn.block { width: 100%; height: 52px; font-size: var(--step-0); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* ------------------------------------------------------------ tiles */
.card, .tile { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: var(--step-2); letter-spacing: -0.035em; }
.card h3 { margin-bottom: 6px; }
.card .lbl, .lbl { font-size: var(--step--1); color: var(--muted); margin-bottom: 8px; }
.card .sub { color: var(--muted); font-size: var(--step--1); margin: 6px 0 18px; }
.big { font: 500 2.5rem/1 var(--font-head); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.unit { font: 500 0.42em/1 var(--font-mono); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.grid { display: grid; gap: var(--gap); }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--tile-2); border: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); text-decoration: none;
}
.pill b { font: 500 var(--step--2)/1 var(--font-mono); color: var(--ink); padding: 5px 9px; border-radius: 999px; background: var(--mint-deep); letter-spacing: 0.06em; }

/* ------------------------------------------------------------ hero */
.hero { display: grid; gap: var(--gap); padding-top: 6px; }
@media (min-width: 1000px) { .hero { grid-template-columns: 1.05fr 1fr; } }
.hero .intro { display: flex; flex-direction: column; padding: 36px 32px 32px; min-height: 520px; }
.hero .intro h1 { margin-top: 26px; font-size: clamp(2.6rem, 4.5vw, 4rem); }
.hero .lede { margin-top: 22px; font-size: 1.1rem; color: var(--muted); max-width: 44ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 36px; }
.art {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  min-height: 360px; background: #050c0b url('img/hero.jpg') center 40% / cover no-repeat;
}
@media (max-width: 999px) { .art { background-image: url('img/hero-sq.jpg'); min-height: 420px; } .hero .intro { min-height: 0; } }
.art .float {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; gap: 8px; grid-template-columns: 1fr 1fr;
}
.glass {
  background: rgba(7, 16, 14, 0.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(214, 255, 236, 0.1); border-radius: 12px; padding: 14px 16px;
}
.glass .lbl { margin-bottom: 4px; font-size: var(--step--2); font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.glass .big { font-size: 2rem; }

/* ------------------------------------------------------------ the basket as spires */
.meadow-field { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 260px; padding: 0 2px; border-bottom: 1px solid var(--line-2); margin-top: 18px; }
.stem { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.stem .w { font: 500 1.15rem/1 var(--font-head); letter-spacing: -0.03em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stem .w small { font-size: 0.7em; color: var(--muted); }
.stem .head { width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden; background: var(--tile-2); box-shadow: 0 0 0 2px var(--tile), 0 0 0 3px var(--line-2); margin-bottom: 8px; }
.stem .head img { width: 100%; height: 100%; object-fit: cover; }
.stem .head .ini { display: grid; place-items: center; height: 100%; font: 500 10px/1 var(--font-mono); color: var(--mint-soft); }
.stem .stalk { width: min(46px, 70%); flex: none; transform-origin: bottom; animation: grow 1.1s cubic-bezier(.2,.7,.2,1) both; }
.stem .stalk svg { width: 100%; height: 100%; display: block; overflow: visible; }
.stem .stalk path { fill: rgba(159, 243, 207, 0.08); stroke: var(--mint-soft); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.stem:first-child .stalk path { fill: rgba(159, 243, 207, 0.16); }
.meadow-names { display: flex; justify-content: space-between; gap: 6px; padding: 10px 2px 0; }
.meadow-names .stem { justify-content: flex-start; }
.meadow-names .sym { font: 500 var(--step--2)/1.2 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.meadow.lg .meadow-field { height: 320px; }
.meadow.lg .stem .head { width: 40px; height: 40px; }
.meadow.lg .stem .w { font-size: 1.5rem; }
@keyframes grow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .stem .stalk { animation: none; } }
@media (max-width: 520px) { .stem .head { width: 24px; height: 24px; } .stem .w { font-size: 0.9rem; } .meadow.lg .meadow-field { height: 240px; } }

/* ------------------------------------------------------------ stats row */
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (min-width: 860px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip > div { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.strip .lbl { font: 500 var(--step--2)/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.strip .val { font: 500 2rem/1.15 var(--font-head); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; margin-top: 10px; }

/* ------------------------------------------------------------ sections */
section { padding: 104px 0 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px 24px; margin-bottom: 28px; }
.sec-head .eyebrow { display: block; margin-bottom: 16px; }
.sec-head p { color: var(--muted); max-width: 54ch; margin-top: 14px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; display: flex; flex-direction: column; }
.steps li::before { content: '0' counter(s); font: 500 var(--step--1)/1 var(--font-mono); color: var(--mint); padding-bottom: 72px; }
.steps p { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }

.bento { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .bento { grid-template-columns: repeat(3, 1fr); } .bento .wide { grid-column: span 2; } }
.bento .tile h3 { margin-bottom: 10px; }
.bento .tile p { color: var(--muted); font-size: 0.95rem; }
.bento .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--tile-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--mint-soft); margin-bottom: 28px; }
.bento .ico svg { width: 18px; height: 18px; }

.rules { margin: 0; }
.rules > div { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rules > div:last-child { border-bottom: 0; }
.rules dt { color: var(--muted); font-size: var(--step--1); }
.rules dd { margin: 0; font-size: var(--step--1); }
@media (max-width: 560px) { .rules > div { grid-template-columns: 1fr; gap: 2px; } }
.two { display: grid; gap: var(--gap); }
@media (min-width: 960px) { .two { grid-template-columns: 0.8fr 1.2fr; } }

.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table th { text-align: left; font: 500 var(--step--2)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 14px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tok { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tok img, .tok .ini { width: 28px; height: 28px; border-radius: 50%; background: var(--tile-2); flex: none; }
.tok .ini { display: grid; place-items: center; font: 500 10px/1 var(--font-mono); color: var(--mint-soft); }
.bar-w { height: 4px; background: var(--tile-2); border-radius: 2px; overflow: hidden; min-width: 70px; }
.bar-w i { display: block; height: 100%; border-radius: 2px; background: var(--mint-soft); }

.compare { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.compare th, .compare td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { font: 500 var(--step--2)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.compare tbody th { font-weight: 500; }
.compare td:nth-child(2) { color: var(--muted); }
.compare td:nth-child(3) { color: var(--ink); }
.compare td:nth-child(3)::before { content: '✓'; color: var(--mint); margin-right: 8px; }

.contracts > div { display: grid; grid-template-columns: minmax(130px, 200px) 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contracts > div:last-child { border-bottom: 0; }
.contracts dt { color: var(--muted); font-size: var(--step--1); }
.contracts dd { margin: 0; }
.contracts .addr { font: 400 var(--step--1)/1.4 var(--font-mono); word-break: break-all; }
@media (max-width: 560px) { .contracts > div { grid-template-columns: 1fr auto; } .contracts dt { grid-column: 1 / -1; } }
.copy { font: 500 var(--step--2)/1 var(--font-mono); background: var(--tile-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; color: var(--ink); cursor: pointer; }
.copy:hover { border-color: var(--line-2); }

details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.faq:first-child { padding-top: 4px; }
details.faq:last-child { border-bottom: 0; padding-bottom: 4px; }
details.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font: 400 1.1rem/1 var(--font-mono); color: var(--muted); }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin-top: 10px; color: var(--muted); }

.cta {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  padding: 72px 40px; display: grid; justify-items: start; gap: 18px;
  background: linear-gradient(90deg, rgba(7,14,12,.92) 30%, rgba(7,14,12,.1) 75%), #050c0b url('img/hero.jpg') 0% 42% / 150% auto no-repeat;
}
.cta p { color: var(--muted); }
@media (max-width: 760px) { .cta { background: linear-gradient(rgba(7,14,12,.55), rgba(7,14,12,.85)), #050c0b url('img/hero-sq.jpg') center 40% / cover no-repeat; padding: 56px 24px; } }

footer { padding: 72px 0 36px; color: var(--muted); font-size: var(--step--1); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; }

/* ------------------------------------------------------------ app */
.notice { padding: 12px 16px; border-radius: var(--radius-s); background: rgba(240, 179, 110, 0.08); border: 1px solid rgba(240, 179, 110, 0.3); color: var(--warn); margin: 10px 0 0; font-size: var(--step--1); }
.app-head { padding: 36px 0 4px; }
.app-head p { color: var(--muted); margin-top: 12px; }
.app-grid { display: grid; gap: var(--gap); padding-top: 22px; }
@media (min-width: 980px) { .app-grid { grid-template-columns: 1.15fr 1fr 1fr; } }
.app-grid > *, .hero > *, .two > *, .bento > *, .steps > * { min-width: 0; }
.amount input { width: 100%; }
.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.figs > div { background: var(--tile-2); border-radius: var(--radius-s); padding: 12px 14px; }
.figs dt { color: var(--muted); font: 500 var(--step--2)/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.figs dd { margin: 6px 0 0; font: 500 1.15rem/1.2 var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.clock { font: 500 clamp(3rem, 7vw, 4.4rem)/1 var(--font-head); letter-spacing: -0.055em; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.field { display: flex; gap: 8px; flex-wrap: wrap; }
.field input, .amount input {
  flex: 1 1 200px; min-width: 0; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--tile-2); color: var(--ink); font: 400 var(--step--1)/1.2 var(--font-mono);
}
.field input:focus, .amount input:focus { border-color: var(--mint); outline: none; box-shadow: 0 0 0 3px rgba(63, 214, 166, 0.18); }
.hype { font-weight: 500; color: var(--mint-soft); }

/* trade box */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--tile-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg button { border: 0; background: none; height: 38px; border-radius: 9px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--ink); color: #0b1311; }
.amount { position: relative; display: flex; }
.amount input { font: 500 1.6rem/1.2 var(--font-head); letter-spacing: -0.03em; height: 72px; padding: 0 100px 0 18px; border-radius: 12px; flex: 1; }
.amount .cur { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 500 var(--step--1)/1 var(--font-mono); color: var(--muted); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.quick button { border: 1px solid var(--line); background: var(--tile-2); border-radius: 8px; padding: 7px 11px; font: 500 var(--step--2)/1 var(--font-mono); color: var(--ink); cursor: pointer; }
.quick button:hover { border-color: var(--line-2); }
.tline { display: flex; justify-content: space-between; gap: 12px; font-size: var(--step--1); color: var(--muted); padding: 5px 0; }
.tline b { color: var(--ink); font-weight: 500; }
.tline select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; background: var(--tile-2); color: var(--ink); }
.status { min-height: 1.4em; font-size: var(--step--1); margin-top: 10px; }

.round { border-bottom: 1px solid var(--line); }
.round:last-child { border-bottom: 0; }
.round summary { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; align-items: center; }
.round summary::-webkit-details-marker { display: none; }
.round .no { font: 500 var(--step--1)/1 var(--font-mono); color: var(--mint); }
.round .body { padding: 0 0 18px; }
.empty { color: var(--muted); padding: 18px 0; }
