:root {
  --font-sans: "Instrument Sans", sans-serif;
  --font-display: "Schibsted Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --color-canvas: #fff;
  --color-surface: #fff;
  --color-well: #f5f5f5;
  --color-well-2: #ebebeb;
  --color-ink: #131313;
  --color-ink-2: #7d7d7d;
  --color-ink-3: #bcbcbc;
  --color-neon: #00c805;
  --color-neon-deep: #00a804;
  --radius-card: 24px;
  --radius-well: 18px;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 12px 40px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--color-canvas);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 200, 5, 0.08), transparent 55%),
    linear-gradient(180deg, #fafbf8 0%, #ffffff 40%, #f7f8f5 100%);
}

button,
input {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

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

::selection {
  background: rgba(0, 200, 5, 0.18);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 12px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 0 16px;
    height: 72px;
    gap: 16px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

@media (min-width: 640px) {
  .brand-logo {
    width: 36px;
    height: 36px;
  }
}

.brand-name {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.025em;
  color: var(--color-neon);
  transition: opacity 0.15s;
}

.brand:hover .brand-name {
  opacity: 0.8;
}

@media (min-width: 1024px) {
  .brand-name {
    display: block;
  }
}

.main-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

.nav-link {
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink-2);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--color-ink);
  background: var(--color-well);
}

.nav-link.active {
  color: var(--color-ink);
}

.search-pill {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 22.5rem;
  height: 40px;
  margin-inline: auto;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--color-well);
  color: var(--color-ink-2);
  transition: background 0.15s;
}

.search-pill:hover {
  background: var(--color-well-2);
}

.search-pill span {
  font-size: 14px;
}

.search-pill kbd {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--color-ink-3);
}

@media (min-width: 768px) {
  .search-pill {
    display: flex;
  }
}

.connect-btn {
  margin-left: auto;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--color-neon);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s;
}

.connect-btn:hover {
  background: var(--color-neon-deep);
}

@media (min-width: 768px) {
  .connect-btn {
    margin-left: 0;
  }
}

/* Main */
.page {
  position: relative;
  z-index: 10;
  padding: 56px 16px 96px;
  max-width: 464px;
  margin: 0 auto;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-copy {
  text-align: center;
  margin-bottom: 28px;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero-copy h1 span {
  color: var(--color-neon-deep);
}

.hero-copy p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-ink-2);
}

/* Swap card */
.swap-card {
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: 8px;
}

.swap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 4px;
}

.swap-top > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink-2);
}

.fee-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 200, 5, 0.1);
  color: var(--color-neon-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s;
}

.fee-chip:hover {
  background: rgba(0, 200, 5, 0.18);
}

.token-well {
  border-radius: var(--radius-well);
  background: var(--color-well);
  padding: 16px;
}

.well-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-2);
  margin-bottom: 8px;
}

.well-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.well-row input,
.buy-amount {
  flex: 1;
  min-width: 0;
  background: transparent;
  outline: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
}

.well-row input::placeholder,
.buy-amount {
  color: var(--color-ink-3);
}

.token-pill {
  flex-shrink: 0;
  height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  transition: box-shadow 0.15s;
}

.token-pill:hover {
  box-shadow: var(--shadow-pop);
}

.token-img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
}

.token-icon.eth {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #627eea 0%, #3c5fe0 100%);
  position: relative;
}

.token-icon.eth::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: #fff;
  clip-path: polygon(50% 0, 50% 55%, 0 70%, 50% 100%, 100% 70%, 50% 55%);
  opacity: 0.95;
}

.flip-wrap {
  position: relative;
  height: 8px;
  z-index: 2;
}

.flip-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  color: var(--color-ink-2);
  transition: color 0.2s, transform 0.3s;
}

.flip-btn:hover {
  color: var(--color-neon-deep);
  transform: translate(-50%, -50%) rotate(180deg);
}

.swap-cta {
  display: block;
  width: 100%;
  margin-top: 8px;
  height: 52px;
  border-radius: var(--radius-well);
  background: var(--color-neon);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  transition: background 0.15s, transform 0.1s;
}

.swap-cta:hover {
  background: var(--color-neon-deep);
}

.swap-cta:active {
  transform: scale(0.995);
}

.fee-note {
  text-align: center;
  font-size: 12px;
  color: var(--color-ink-3);
  margin-top: 16px;
  line-height: 1.5;
}

/* Bottom social + CA */
.bottom-bar {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 480px) {
  .bottom-bar {
    flex-direction: row;
    align-items: center;
  }
}

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.x-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ca-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.ca-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-neon-deep);
  background: rgba(0, 200, 5, 0.1);
  padding: 4px 8px;
  border-radius: 999px;
}

.ca-box code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--color-ink-2);
  background: var(--color-well);
  transition: background 0.15s, color 0.15s;
}

.copy-btn svg {
  grid-area: 1 / 1;
  display: block;
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn:hover {
  background: var(--color-well-2);
  color: var(--color-neon-deep);
}

.copy-btn.copied {
  color: var(--color-neon-deep);
  background: rgba(0, 200, 5, 0.12);
}

.copy-btn.copied .icon-copy {
  display: none;
}

.copy-btn.copied .icon-check {
  display: block;
}

.site-footer {
  position: relative;
  z-index: 10;
  padding: 16px 16px 32px;
  text-align: center;
  font-size: 11px;
  color: var(--color-ink-3);
  line-height: 1.625;
}

.site-footer p {
  max-width: 42rem;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .site-footer {
    padding-bottom: 40px;
  }
}
