:root {
  --bg: #0f1210;
  --panel: #171a16;
  --panel-2: #1d211b;
  --cream: #f4e6bd;
  --text: #f3f1e8;
  --muted: #8b8f86;
  --line: rgba(244, 230, 189, 0.16);
  --orange: #ff8a1f;
  --gold: #ffd782;
  --green: #193424;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 14%, rgba(255, 138, 31, 0.18), transparent 26vw),
    radial-gradient(circle at 16% 72%, rgba(244, 230, 189, 0.10), transparent 32vw),
    linear-gradient(180deg, #142117 0%, var(--bg) 42%, #0b0c0b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.site-header,
main,
.site-footer {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.mark {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid var(--cream);
  border-left-color: transparent;
  border-bottom-color: transparent;
}

.mark span {
  width: 14px;
  height: 14px;
  border-right: 5px solid var(--cream);
  border-top: 5px solid var(--cream);
  transform: translate(-1px, 1px);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 16, 0.55);
  backdrop-filter: blur(18px);
}

.top-nav a {
  padding: 10px 16px;
  border-radius: 6px;
  color: rgba(243, 241, 232, 0.68);
  font-size: 14px;
  transition: color 160ms ease, background 160ms ease;
}

.top-nav a:hover {
  color: var(--cream);
  background: rgba(244, 230, 189, 0.08);
}

.ghost-button,
.site-footer button {
  justify-self: end;
  border: 1px solid var(--line);
  background: rgba(244, 230, 189, 0.06);
  color: var(--cream);
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: 54px;
  padding: 74px 0 90px;
}

.hero > * {
  min-width: 0;
}

.hero::before {
  content: "";
  position: absolute;
  right: -18vw;
  top: 70px;
  width: 70vw;
  height: 70vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  border: 1px solid rgba(244, 230, 189, 0.16);
  background:
    conic-gradient(from 210deg, rgba(255, 138, 31, 0.62), rgba(244, 230, 189, 0.16), rgba(255, 138, 31, 0.0), rgba(255, 138, 31, 0.62)),
    radial-gradient(circle, transparent 52%, rgba(244, 230, 189, 0.08) 53%, transparent 58%);
  filter: blur(0.2px);
  opacity: 0.46;
  animation: slowSpin 28s linear infinite;
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 92px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(244, 230, 189, 0.18);
  transform: rotate(45deg);
  opacity: 0.32;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 30px;
  height: 1px;
  background: var(--cream);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 116px;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

h1 em {
  display: block;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.mobile-break {
  display: inline;
}

.lede {
  max-width: 560px;
  color: rgba(243, 241, 232, 0.74);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.18;
}

.hero-actions,
.micro-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 34px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  min-height: 50px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--orange);
  color: #160f07;
  box-shadow: 0 20px 44px rgba(255, 138, 31, 0.20);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(244, 230, 189, 0.07);
  color: var(--cream);
}

.full {
  width: 100%;
}

.micro-stats {
  margin-top: 54px;
}

.micro-stats div {
  min-width: 142px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.micro-stats strong {
  display: block;
  color: var(--cream);
  font-size: 30px;
  line-height: 1;
}

.micro-stats span {
  color: var(--muted);
  font-size: 13px;
}

.terminal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(17, 20, 17, 0.86);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.terminal-head,
.terminal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.terminal-head strong,
.terminal-foot b {
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.terminal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.swap-panel {
  padding: 20px;
}

.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
  padding: 18px;
  border: 1px solid rgba(244, 230, 189, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.asset-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-meta b,
.asset-meta small {
  display: block;
}

.asset-meta small {
  margin-top: 4px;
  color: var(--muted);
}

.coin {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
}

.dydx {
  background: #593ff4;
}

.arcus {
  background: var(--cream);
  color: #182117;
}

input,
output {
  width: min(180px, 42%);
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-size: 31px;
  font-weight: 800;
  outline: none;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

output {
  color: var(--cream);
}

.rate-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 2px;
  color: var(--muted);
  font-size: 13px;
}

.rate-line span {
  height: 1px;
  background: var(--line);
}

.rate-line p {
  margin: 0;
}

.rate-line b {
  color: var(--cream);
}

.output-row {
  margin-bottom: 20px;
}

.ticker {
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 230, 189, 0.04);
}

.ticker div {
  display: flex;
  width: max-content;
  gap: 54px;
  padding: 18px 0;
  color: var(--cream);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  animation: marquee 28s linear infinite;
}

.ticker span {
  white-space: nowrap;
}

.details {
  display: grid;
  grid-template-columns: 0.65fr 1fr;
  gap: 54px;
  padding: 110px 0 70px;
}

.section-title h2 {
  max-width: 480px;
  font-size: 72px;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.steps {
  display: grid;
  gap: 14px;
}

.steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 230, 189, 0.045);
  padding: 24px;
}

.steps small {
  color: var(--orange);
  font-weight: 900;
}

.steps h3 {
  margin: 16px 0 10px;
  color: var(--cream);
  font-size: 30px;
}

.steps p {
  margin: 0;
  color: rgba(243, 241, 232, 0.66);
  line-height: 1.55;
}

.rate-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.rate-board div {
  min-height: 170px;
  padding: 24px;
  background: #121511;
}

.rate-board p,
.rate-board span {
  color: var(--muted);
}

.rate-board strong {
  display: block;
  margin: 18px 0 8px;
  color: var(--cream);
  font-size: 52px;
  letter-spacing: -0.05em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.modal[hidden] {
  display: none;
}

.modal,
.modal-backdrop {
  position: fixed;
  inset: 0;
}

.modal {
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121511;
  padding: 28px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.modal-card h2 {
  margin-bottom: 12px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.modal-card p:not(.eyebrow) {
  color: rgba(243, 241, 232, 0.68);
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

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

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

  h1 {
    max-width: 680px;
    font-size: 78px;
  }

  .lede {
    max-width: 620px;
    font-size: 28px;
  }

  .section-title h2 {
    font-size: 58px;
  }

  .terminal-card {
    max-width: 560px;
  }

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

@media (max-width: 640px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1140px);
  }

  .site-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    overflow: hidden;
  }

  .brand {
    font-size: 24px;
  }

  .ghost-button {
    max-width: 126px;
    padding: 10px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding-bottom: 64px;
  }

  .hero-copy,
  .lede,
  h1 {
    max-width: 100%;
  }

  h1 {
    max-width: 100%;
    font-size: 50px;
    line-height: 0.96;
    letter-spacing: -0.062em;
  }

  .mobile-break {
    display: block;
  }

  .lede {
    max-width: 330px;
    font-size: 21px;
  }

  .hero::before {
    right: -56vw;
    top: 160px;
    width: 128vw;
    height: 128vw;
  }

  .micro-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .micro-stats div {
    min-width: 0;
    padding-left: 12px;
  }

  .micro-stats strong {
    font-size: 25px;
  }

  .micro-stats span {
    font-size: 12px;
  }

  .asset-row {
    align-items: flex-start;
    flex-direction: column;
  }

  input,
  output {
    width: 100%;
    text-align: left;
  }

  .rate-board {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 44px;
  }

  .rate-board strong {
    font-size: 42px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 28px), 362px);
    margin-left: 14px;
    margin-right: auto;
  }
}
