:root {
  --bg-0: #0b1210;
  --bg-1: #121c18;
  --ink: #f2f5f1;
  --muted: #9aab9f;
  --line: rgba(242, 245, 241, 0.12);
  --accent: #d4ff4f;
  --accent-ink: #142010;
  --teal: #3fd6a8;
  --danger: #ff7a6e;
  --success: #7dffb3;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(63, 214, 168, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 255, 79, 0.1), transparent 50%),
    linear-gradient(165deg, var(--bg-0), #0e1713 45%, #101a16);
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: drift 16s ease-in-out infinite alternate;
}

.orb-a {
  width: 420px;
  height: 420px;
  left: -80px;
  top: 20%;
  background: rgba(63, 214, 168, 0.35);
}

.orb-b {
  width: 380px;
  height: 380px;
  right: -60px;
  top: 8%;
  background: rgba(212, 255, 79, 0.2);
  animation-delay: -6s;
}

.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 245, 241, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 245, 241, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -28px, 0) scale(1.08); }
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 0 24px rgba(212, 255, 79, 0.45);
  animation: mark-pulse 2.4s ease-in-out infinite;
}

@keyframes mark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.88); opacity: 0.75; }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav a {
  transition: color 160ms ease;
}

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

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 80px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
}

.eyebrow.success {
  color: var(--success);
}

.logo-hero {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 10vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: linear-gradient(120deg, #fff 10%, var(--accent) 55%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-in 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.lede {
  margin: 24px 0 0;
  max-width: 34ch;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 300;
  animation: fade-up 700ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  animation: fade-up 700ms 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 40px rgba(212, 255, 79, 0.22);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #e7ff7a;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: rgba(242, 245, 241, 0.35);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 160ms ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.hero-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.pulse-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(212, 255, 79, 0.25);
  animation: ring 3.2s ease-out infinite;
}

.pulse-ring.delay {
  animation-delay: 1.1s;
}

@keyframes ring {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

.node-map {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 0;
  animation: float-y 5s ease-in-out infinite;
}

.node {
  min-width: 96px;
  text-align: center;
  padding: 14px 12px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.node.buy {
  background: rgba(63, 214, 168, 0.15);
  color: var(--teal);
}

.node.sell {
  background: rgba(212, 255, 79, 0.14);
  color: var(--accent);
}

.link-line {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  position: relative;
  overflow: hidden;
}

.link-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: dash 1.6s linear infinite;
}

@keyframes dash {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes title-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.how {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.how h2,
.analysis h2,
.result-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-lead {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.55;
}

.how-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.how-steps li {
  padding: 28px 24px;
  border-top: 1px solid var(--line);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.how-steps h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.how-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.analysis {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

.analysis-panel {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(8, 14, 12, 0.55);
  animation: fade-up 500ms ease both;
}

.result {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
  animation: fade-up 500ms ease both;
}

.scan-head {
  display: flex;
  gap: 18px;
  align-items: center;
}

.scan-head h2 {
  margin: 0;
  font-size: 1.6rem;
}

.scan-status {
  margin: 6px 0 0;
  color: var(--muted);
}

.scan-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(212, 255, 79, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
  flex-shrink: 0;
}

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

.progress {
  margin-top: 28px;
  height: 6px;
  border-radius: 999px;
  background: rgba(242, 245, 241, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  transition: width 280ms ease;
}

.scan-log {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.scan-log li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  animation: fade-up 280ms ease both;
}

.scan-log li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(63, 214, 168, 0.7);
}

.scan-log li.done {
  color: var(--ink);
}

.scan-log li.done::before {
  background: var(--accent);
}

.result-top {
  margin-bottom: 28px;
}

.route-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.route-card {
  padding: 28px 8px 28px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(14px);
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px 24px;
  align-items: start;
}

.route-card.visible {
  animation: fade-up 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.route-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-row: 1 / span 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--accent);
}

.badge.accent {
  color: var(--success);
}

.exchange {
  color: var(--muted);
  font-size: 0.82rem;
}

.route-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  grid-column: 2;
}

.route-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  grid-column: 2;
  grid-row: 2;
}

.price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.04em;
  font-weight: 700;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.price.profit {
  color: var(--success);
}

.profit-card .price {
  text-shadow: 0 0 28px rgba(125, 255, 179, 0.25);
}

.profit-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  grid-column: 2 / span 2;
}

@media (max-width: 700px) {
  .route-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
  }

  .route-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    grid-row: auto;
  }

  .route-card h3,
  .route-detail,
  .price,
  .profit-sub {
    grid-column: auto;
    grid-row: auto;
  }

  .price {
    text-align: left;
    margin-top: 4px;
  }
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.error-banner {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 122, 110, 0.12);
  border: 1px solid rgba(255, 122, 110, 0.35);
  color: #ffc7c2;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer .brand-name {
  color: var(--ink);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 40px 24px 64px;
    gap: 36px;
  }

  .hero-visual {
    min-height: 220px;
  }

  .logo-hero {
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-steps li {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 20px;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .lede {
    font-size: 1.05rem;
  }

  .node-map {
    width: 100%;
    justify-content: flex-start;
  }
}
