:root {
  --bg: #f6f3ee;
  --bg-soft: #fbfaf7;
  --surface: #ffffff;
  --surface-muted: #f2f0ec;
  --ink: #151514;
  --muted: #696b70;
  --faint: #989898;
  --accent: #8A94A6;
  --accent-soft: rgba(138, 148, 166, 0.16);
  --line: rgba(21, 21, 20, 0.1);
  --line-strong: rgba(21, 21, 20, 0.16);
  --shadow: 0 28px 80px -46px rgba(37, 39, 42, 0.52);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -18%, rgba(138, 148, 166, 0.2), transparent 42%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 64%, #efebe4 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

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

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

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px clamp(18px, 4vw, 42px);
}

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

.brand img {
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 30px);
  margin-left: 10px;
}

.nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 520;
  line-height: 1;
  white-space: nowrap;
  transition: color 160ms ease;
}

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

.spacer {
  flex: 1;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 680;
  white-space: nowrap;
  box-shadow: 0 12px 28px -24px rgba(21, 21, 20, 0.48);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 148, 166, 0.52);
  background: #ffffff;
}

.stage {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  padding: clamp(10px, 2.2vh, 24px) clamp(18px, 4vw, 42px) clamp(10px, 2vh, 20px);
  text-align: center;
}

.hero {
  width: min(100%, 760px);
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 5.35rem);
  line-height: 0.98;
  font-weight: 820;
  letter-spacing: 0;
}

.sub {
  max-width: 49ch;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.55;
}

.sub strong {
  color: var(--ink);
  font-weight: 760;
}

.swap-card {
  width: min(100%, 570px);
  margin-top: clamp(26px, 4.8vh, 46px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88)),
    var(--surface);
  box-shadow: var(--shadow);
}

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

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

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

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

.chip img {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(21, 21, 20, 0.08);
}

.switch {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 16px 30px -24px rgba(21, 21, 20, 0.54);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.switch span {
  font-size: 1.18rem;
  line-height: 1;
}

.switch:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 148, 166, 0.56);
  background: var(--accent-soft);
  color: var(--ink);
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  width: 100%;
  margin-top: 16px;
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 780;
  box-shadow: 0 18px 42px -28px rgba(138, 148, 166, 0.78);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary:hover {
  transform: translateY(-1px);
  background: var(--ink);
  box-shadow: 0 22px 46px -28px rgba(21, 21, 20, 0.42);
}

.foot {
  flex: 0 0 auto;
  padding: 12px 18px 22px;
  color: var(--faint);
  font-size: 0.86rem;
  font-weight: 560;
  text-align: center;
}

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
    padding: 15px 16px 10px;
  }

  .nav {
    display: none;
  }

  .brand {
    font-size: 0.95rem;
  }

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

  .stage {
    padding: 8px 16px 8px;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.15rem);
  }

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

  .swap-card {
    margin-top: 24px;
    padding: 16px;
    border-radius: 21px;
  }

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

  .leg {
    padding: 14px 15px;
  }

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

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

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

  .foot {
    padding-bottom: 16px;
  }
}

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

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

  .foot {
    padding-top: 8px;
    padding-bottom: 12px;
  }
}
