:root {
  --bg: #f6faff;
  --surface: #ffffff;
  --surface-soft: #fafdff;
  --ink: #102033;
  --muted: #637286;
  --faint: #8a98aa;
  --line: rgba(25, 62, 98, 0.10);
  --line-strong: rgba(25, 62, 98, 0.16);
  --accent: #1e9bff;
  --accent-dark: #0877d8;
  --accent-soft: rgba(30, 155, 255, 0.12);
  --accent-glow: rgba(30, 155, 255, 0.26);
  --shadow: 0 30px 80px -44px rgba(20, 64, 105, 0.40);
  --shadow-soft: 0 18px 48px -34px rgba(20, 64, 105, 0.35);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 18%, rgba(30, 155, 255, 0.11), transparent 28%),
    linear-gradient(180deg, #f6faff 0%, #ffffff 64%, #f5faff 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: grid;
  grid-template-rows: auto 1fr;
}

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

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

h1,
p {
  margin: 0;
}

button {
  font: inherit;
}

.topbar {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4.2vw, 56px) 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 8px 18px -12px var(--accent-glow);
}

.spacer {
  flex: 1 1 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2.8vw, 34px);
}

.nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 640;
  letter-spacing: 0;
  transition: color 160ms ease;
}

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

.page {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.hero {
  width: min(100%, 1210px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(18px, 3.6vh, 46px) clamp(18px, 4.2vw, 56px) clamp(16px, 3vh, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(370px, 0.76fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
}

.copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

.copy-inner {
  width: min(100%, 650px);
}

h1 {
  color: var(--ink);
  font-size: clamp(2.9rem, 6.25vw, 5.1rem);
  line-height: 0.98;
  font-weight: 830;
  letter-spacing: 0;
}

.deck {
  max-width: 48ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.35vw, 1.19rem);
  line-height: 1.62;
}

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

.chips {
  list-style: none;
  max-width: 650px;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #34475d;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 17px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 18px 36px -24px rgba(8, 119, 216, 0.72);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 22px 42px -24px rgba(8, 119, 216, 0.82);
}

.hero-cta {
  margin-top: 30px;
  min-width: 176px;
  padding: 0 28px;
}

.swap-card {
  position: relative;
  width: min(100%, 456px);
  justify-self: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.90)),
    var(--surface);
  box-shadow: var(--shadow);
}

.swap-card::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(30, 155, 255, 0.13), transparent 68%);
  pointer-events: none;
}

.card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.selector,
.preview-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

.selector {
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #2c435c;
}

.preview-pill {
  gap: 8px;
  padding: 0 12px 0 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.4s ease-out infinite;
}

.route {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.token-panel {
  min-width: 0;
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.token-panel:first-child {
  border-radius: 18px 12px 12px 18px;
}

.token-panel:last-child {
  border-radius: 12px 18px 18px 12px;
}

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

.token-row {
  min-height: 44px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-row img {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 12px 22px -18px rgba(16, 32, 51, 0.55);
}

.token-name {
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 830;
  letter-spacing: 0;
}

.switch {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 28px -20px rgba(20, 64, 105, 0.48), 0 0 0 8px #ffffff;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.switch span {
  display: block;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.switch:hover {
  border-color: rgba(30, 155, 255, 0.44);
  background: #f8fcff;
  transform: translate(-50%, -50%) scale(1.04);
}

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

.route-meta {
  position: relative;
  z-index: 1;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 2px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 720;
}

.hop-line {
  min-width: 64px;
  height: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(90deg, transparent, rgba(30, 155, 255, 0.22), transparent);
}

.hop-line i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(30, 155, 255, 0.40);
}

.card-cta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 10px;
}

.texture-band {
  width: 100%;
  height: 46px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 0 clamp(18px, 4.2vw, 56px);
  opacity: 0.88;
}

.texture-band span {
  width: min(31vw, 390px);
  border: 1px solid rgba(30, 155, 255, 0.12);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background:
    linear-gradient(135deg, rgba(30, 155, 255, 0.09) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(225deg, rgba(30, 155, 255, 0.07) 25%, transparent 25%) 0 0 / 22px 22px,
    rgba(255, 255, 255, 0.68);
}

.footer {
  width: min(100%, 1210px);
  margin: 0 auto;
  padding: 10px clamp(18px, 4.2vw, 56px) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--faint);
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer p:first-child {
  color: #53657a;
  font-weight: 760;
  white-space: nowrap;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(30, 155, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(30, 155, 255, 0);
  }
}

@media (min-width: 901px) {
  body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  h1 {
    font-size: clamp(4rem, 6.25vw, 5.1rem);
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .topbar {
    min-height: 60px;
    padding-top: 12px;
  }

  .hero {
    padding-top: 14px;
    padding-bottom: 12px;
    gap: clamp(28px, 5vw, 64px);
  }

  .deck {
    margin-top: 16px;
    line-height: 1.52;
  }

  .chips {
    margin-top: 20px;
  }

  .hero-cta {
    margin-top: 22px;
  }

  .token-panel {
    min-height: 108px;
    padding: 15px 17px;
  }

  .token-row {
    margin-top: 16px;
  }

  .texture-band {
    height: 34px;
  }

  .footer {
    padding-top: 7px;
    padding-bottom: 11px;
  }
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  .topbar {
    min-height: 64px;
    padding: 15px 18px 8px;
    gap: 12px;
  }

  .nav {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .page {
    display: block;
  }

  .hero {
    padding: 22px 18px 24px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .copy-inner,
  .deck {
    max-width: none;
  }

  h1 {
    font-size: clamp(3.05rem, 16vw, 4.4rem);
  }

  .deck {
    margin-top: 16px;
    font-size: 1.02rem;
    line-height: 1.58;
  }

  .chips {
    margin-top: 22px;
    gap: 8px;
  }

  .chips li {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .hero-cta {
    width: 100%;
    margin-top: 24px;
  }

  .swap-card {
    width: 100%;
    justify-self: stretch;
    padding: 14px;
    border-radius: 20px;
  }

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

  .token-panel {
    min-height: 108px;
    padding: 16px;
  }

  .token-panel:first-child {
    border-radius: 18px 18px 12px 12px;
  }

  .token-panel:last-child {
    border-radius: 12px 12px 18px 18px;
  }

  .switch {
    width: 46px;
    height: 46px;
  }

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

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

  .route-meta {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    font-size: 0.78rem;
  }

  .footer {
    padding: 12px 18px 18px;
    display: grid;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 3.55rem);
  }

  .chips {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chips li {
    justify-content: flex-start;
  }

  .card-head {
    align-items: flex-start;
  }

  .route-meta {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 7px;
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .hop-line {
    width: 100%;
  }

  .texture-band {
    height: 34px;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
