:root {
  color-scheme: light;
  --bg: #f7f6f1;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #737373;
  --line: #dedbd2;
  --green: #c6f006;
  --blue: #315cff;
  --soft: #ece9df;
  --shadow: 0 24px 80px rgba(20, 20, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: #f2f0e8;
}

.intro video,
.introShade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro video {
  object-fit: cover;
}

.introShade {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.58)),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(247, 246, 241, 0.74));
  pointer-events: none;
}

.skipButton,
.enterButton,
.primaryButton,
.secondaryButton,
.executeButton,
.assetButton {
  border: 1px solid var(--ink);
  cursor: pointer;
}

.skipButton {
  position: absolute;
  right: 28px;
  top: 24px;
  width: 76px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.enterButton {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%) translateY(12px);
  min-width: 210px;
  height: 54px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
}

.enterButton.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.shell {
  min-height: 100vh;
  padding: 18px clamp(16px, 3vw, 44px) 80px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(20, 20, 20, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4c4c4c;
  font-size: 14px;
}

.nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.primaryButton,
.secondaryButton,
.executeButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
}

.primaryButton {
  justify-self: end;
  min-width: 54px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--green);
  box-shadow: 4px 4px 0 var(--ink);
}

.secondaryButton {
  min-height: 48px;
  padding: 0 22px;
  background: var(--paper);
}

.wide {
  min-width: 156px;
  min-height: 50px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  max-width: 1180px;
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  padding: 70px 0 42px;
}

.eyebrow,
.sectionTitle p,
.docIntro p {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.88;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  color: #3d3d3d;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.quotePanel,
.swapBox,
.book,
.marketRail article,
.docs {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.quotePanel {
  border-radius: 28px;
  padding: 24px;
}

.quoteHeader,
.routeLine,
.bookTop,
.bookRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quoteHeader {
  margin-bottom: 34px;
  font-weight: 900;
}

.quoteHeader strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: #101010;
  color: var(--green);
  font-size: 12px;
}

.routeLine {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.routeLine span,
.quoteGrid small,
.bookTop small,
.bookRow.head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.routeLine strong {
  font-size: 24px;
}

.routeTrack {
  position: relative;
  height: 78px;
  margin: 4px 0;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.routeTrack::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px dashed #b8b4a8;
}

.routeTrack span {
  position: absolute;
  top: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--green);
  animation: pulseRoute 1.8s ease-in-out infinite;
}

.routeTrack span:nth-child(1) {
  left: 18%;
}

.routeTrack span:nth-child(2) {
  left: 48%;
  animation-delay: 0.25s;
}

.routeTrack span:nth-child(3) {
  left: 78%;
  animation-delay: 0.5s;
}

.quoteGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.quoteGrid div {
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfaf6;
}

.quoteGrid b {
  display: block;
  margin-top: 8px;
  font-size: 25px;
}

.terminal,
.markets,
.docs {
  max-width: 1180px;
  margin: 0 auto 34px;
}

.sectionTitle {
  margin-bottom: 20px;
}

.sectionTitle h2,
.docIntro h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.98;
}

.tradeGrid {
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 20px;
}

.swapBox,
.book {
  border-radius: 24px;
  padding: 20px;
}

.swapBox {
  display: grid;
  gap: 12px;
}

.swapBox label {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfaf6;
}

.swapBox label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.swapBox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 40px;
  font-weight: 900;
}

.assetButton {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}

.assetButton small {
  color: #c8c8c8;
}

.switchIcon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: -4px auto;
  border-radius: 50%;
  background: var(--green);
  border: 1px solid var(--ink);
  font-weight: 900;
}

.executeButton {
  min-height: 56px;
  background: var(--green);
  color: var(--ink);
}

.book {
  align-self: stretch;
}

.bookTop {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 900;
}

.bookRow {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.6fr;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.bookRow:last-child {
  border-bottom: 0;
}

.bookRow mark {
  justify-self: end;
  padding: 5px 10px;
  border-radius: 999px;
  background: #efffd0;
  color: #151515;
  font-size: 12px;
  font-weight: 900;
}

.bookRow em {
  color: var(--muted);
  font-style: normal;
}

.markets {
  padding-top: 42px;
}

.marketRail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.marketRail article {
  min-height: 220px;
  padding: 22px;
  border-radius: 24px;
}

.marketRail span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.marketRail h3 {
  margin: 42px 0 12px;
  font-size: 30px;
}

.marketRail p,
.docText p {
  color: #4b4b4b;
  line-height: 1.65;
}

.docs {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 30px;
  border-radius: 28px;
  padding: clamp(22px, 4vw, 44px);
}

.docText {
  column-count: 2;
  column-gap: 32px;
}

@keyframes pulseRoute {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(198, 240, 6, 0);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(198, 240, 6, 0.65);
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    border-radius: 24px;
  }

  .nav {
    display: none;
  }

  .hero,
  .tradeGrid,
  .docs {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .marketRail {
    grid-template-columns: repeat(2, 1fr);
  }

  .docText {
    column-count: 1;
  }
}

@media (max-width: 560px) {
  .shell {
    padding-inline: 12px;
  }

  h1 {
    font-size: 52px;
  }

  .quotePanel,
  .swapBox,
  .book,
  .docs {
    border-radius: 20px;
  }

  .tradeGrid {
    gap: 14px;
  }

  .bookRow {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding: 14px 0;
  }

  .bookRow.head {
    display: none;
  }

  .bookRow mark {
    justify-self: start;
  }

  .marketRail {
    grid-template-columns: 1fr;
  }
}
