:root {
  --bg: #f7f4ef;
  --bg-soft: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f5f3ef;
  --ink: #161412;
  --muted: #6c6760;
  --faint: #9b948b;
  --line: rgba(22, 20, 18, .10);
  --line-strong: rgba(22, 20, 18, .16);
  --accent: #F59E0B;
  --accent-soft: rgba(245, 158, 11, .14);
  --shadow: 0 28px 70px -36px rgba(22, 20, 18, .40);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -18%, rgba(245, 158, 11, .16), transparent 34rem),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  display: grid;
  grid-template-rows: auto 1fr auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  display: block;
  max-width: 100%;
}

.topbar {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 6px;
}

.nav a {
  color: var(--muted);
  font-size: .93rem;
  font-weight: 600;
}

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

.spacer {
  flex: 1;
}

.ghost {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 800;
  box-shadow: 0 12px 30px -24px rgba(22, 20, 18, .50);
}

.ghost:hover {
  border-color: rgba(245, 158, 11, .48);
}

.stage {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero {
  display: contents;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3.15rem, 7vw, 5.35rem);
  line-height: .98;
  font-weight: 850;
  letter-spacing: 0;
}

.sub {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.55;
  font-weight: 500;
}

.sub strong {
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 -.48em 0 var(--accent-soft);
}

.trade-card {
  width: min(600px, 100%);
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .88)),
    var(--surface);
  box-shadow: var(--shadow);
}

.route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.leg {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: left;
}

.label {
  display: block;
  color: var(--faint);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.chip {
  margin-top: 10px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1;
}

.chip img {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
}

.switch {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 30px -24px rgba(22, 20, 18, .45);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .18s ease;
}

.switch span {
  display: block;
  font-size: 1.15rem;
  line-height: 1;
}

.switch:hover {
  border-color: rgba(245, 158, 11, .48);
  background: var(--accent-soft);
  color: var(--ink);
}

.switch.is-swapped {
  transform: rotate(180deg);
}

.primary {
  margin-top: 16px;
  min-height: 56px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 900;
  box-shadow: 0 18px 36px -24px rgba(245, 158, 11, .92);
  transition: transform .14s ease, box-shadow .14s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 44px -25px rgba(245, 158, 11, .98);
}

.footer {
  padding: 10px 24px 22px;
  color: var(--faint);
  text-align: center;
  font-size: .86rem;
  font-weight: 650;
}

@media (max-width: 760px) {
  .topbar {
    width: min(100% - 32px, var(--max));
    padding-top: 16px;
    gap: 12px;
  }

  .brand {
    max-width: 196px;
    font-size: .88rem;
  }

  .nav {
    display: none;
  }

  .ghost {
    min-height: 38px;
    padding: 0 14px;
    font-size: .86rem;
  }

  .stage {
    width: min(100% - 32px, var(--max));
    padding-top: 4px;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(2.58rem, 14vw, 3.45rem);
    line-height: 1;
  }

  .sub {
    margin-top: 14px;
    font-size: .98rem;
    line-height: 1.46;
  }

  .trade-card {
    margin-top: 22px;
    padding: 16px;
    border-radius: 18px;
  }

  .route {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .leg {
    padding: 13px 14px;
  }

  .switch {
    justify-self: center;
    width: 40px;
    height: 40px;
  }

  .switch span {
    transform: rotate(90deg);
  }

  .switch.is-swapped {
    transform: rotate(180deg);
  }

  .primary {
    min-height: 52px;
    margin-top: 14px;
  }

  .footer {
    padding-bottom: 16px;
    font-size: .82rem;
  }
}

@media (max-height: 720px) {
  .topbar {
    padding-top: 12px;
  }

  .stage {
    padding-top: 0;
  }

  h1 {
    font-size: clamp(2.7rem, 6vw, 4.4rem);
  }

  .sub {
    margin-top: 12px;
  }

  .trade-card {
    margin-top: 22px;
  }

  .footer {
    padding-bottom: 14px;
  }
}
