:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: rgba(20, 22, 27, 0.78);
  --surface-solid: #15171d;
  --surface-soft: #20232b;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f2ec;
  --muted: #9ca3af;
  --muted-2: #747c88;
  --orange: #f7931a;
  --orange-soft: rgba(247, 147, 26, 0.18);
  --green: #38d897;
  --blue: #7ab4ff;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(247, 147, 26, 0.14), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(122, 180, 255, 0.1), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(24px);
}

.brand,
.network-pill,
.nav {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: #050506;
  font-size: 22px;
  font-weight: 860;
}

.nav {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav a {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.network-pill {
  justify-self: end;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  min-height: calc(100vh - 106px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  align-items: center;
  gap: 34px;
  padding: 48px 0 28px;
}

.hero-copy {
  min-width: 0;
}

.kicker,
.micro {
  margin: 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-size: clamp(56px, 9vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  margin: 0;
  color: #c9ced6;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.35;
}

.checkout-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(rgba(10, 12, 16, 0.42), rgba(10, 12, 16, 0.9)),
    url("./assets/flow-backdrop.png") center / cover,
    var(--surface-solid);
  box-shadow: var(--shadow);
}

.checkout-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: inherit;
}

.checkout-head,
.quote-grid,
.controls {
  position: relative;
  z-index: 1;
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 22px;
}

h2 {
  margin: 5px 0 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

.status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 740;
}

.status-chip.running {
  border-color: rgba(247, 147, 26, 0.5);
  background: rgba(247, 147, 26, 0.16);
}

.status-chip.done {
  border-color: rgba(56, 216, 151, 0.48);
  background: rgba(56, 216, 151, 0.16);
}

.controls {
  display: grid;
  gap: 15px;
}

label,
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.destination-row {
  grid-template-columns: 130px minmax(0, 1fr);
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(12, 14, 18, 0.7);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(247, 147, 26, 0.74);
}

input[type="range"] {
  padding: 0;
  accent-color: var(--orange);
}

.segmented {
  display: grid;
  gap: 8px;
}

.segmented legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.segmented legend {
  grid-column: 1 / -1;
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segmented span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 14, 18, 0.66);
  color: var(--muted);
}

.segmented input:checked + span {
  border-color: rgba(247, 147, 26, 0.7);
  background: var(--orange-soft);
  color: var(--text);
}

.primary-action {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--text);
  color: #07080a;
  cursor: pointer;
  font-weight: 850;
}

.primary-action:hover {
  background: #ffffff;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.order-result {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(56, 216, 151, 0.38);
  border-radius: 8px;
  background: rgba(56, 216, 151, 0.1);
  color: #d8fff0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.order-result a {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.quote-grid div {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.58);
}

.quote-grid span {
  color: var(--muted);
  font-size: 12px;
}

.quote-grid strong {
  font-size: clamp(18px, 2.2vw, 28px);
  white-space: nowrap;
}

.flow-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px 0;
}

.flow-visual {
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 9, 11, 0.1), rgba(8, 9, 11, 0.76)),
    url("./assets/flow-backdrop.png") center / cover;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.step {
  min-height: 156px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  backdrop-filter: blur(18px);
}

.step span {
  font-size: 12px;
  font-weight: 800;
}

.step strong {
  color: var(--text);
  font-size: 20px;
}

.step small {
  font-size: 13px;
}

.step.active {
  border-color: rgba(247, 147, 26, 0.78);
  background: rgba(247, 147, 26, 0.14);
}

.step.done {
  border-color: rgba(56, 216, 151, 0.62);
  background: rgba(56, 216, 151, 0.13);
}

.stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 0 52px;
}

.stack article {
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dot {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  margin-bottom: 28px;
}

.orange {
  background: var(--orange);
}

.blue {
  background: var(--blue);
}

.green {
  background: var(--green);
}

.stack h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.stack p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .network-pill {
    justify-self: start;
  }

  .hero,
  .flow-section,
  .stack {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 42px 0 18px;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .checkout-card {
    padding: 16px;
  }

  .checkout-head,
  .quote-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .quote-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .destination-row,
  .amount-row {
    grid-template-columns: 1fr;
  }
}
