*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  font-weight: 600;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-2);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 60;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-3);
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: min(1180px, 100% - 2 * clamp(16px, 4vw, 40px));
  margin-inline: auto;
}

.logo--dark {
  display: none;
}
[data-theme="dark"] .logo--light {
  display: none;
}
[data-theme="dark"] .logo--dark {
  display: block;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: min(1180px, 100% - 2 * clamp(16px, 4vw, 40px));
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.nav__links {
  display: flex;
  gap: var(--space-5);
  margin-inline-start: var(--space-4);
}
.nav__links a {
  text-decoration: none;
  color: var(--fg-2);
  font-size: 0.9375rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  overflow: hidden;
}
.seg button {
  font: inherit;
  font-size: 0.8125rem;
  min-width: 40px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-soft-fg);
  font-weight: 600;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  list-style: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
.icon-btn:active {
  transform: scale(0.97);
}
summary.icon-btn::-webkit-details-marker {
  display: none;
}
.menu {
  display: none;
  position: relative;
}
.menu__panel {
  position: absolute;
  inset-inline-end: 0;
  top: 44px;
  min-width: 220px;
  padding: var(--space-2);
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-4);
  box-shadow: 0 12px 32px color-mix(in oklab, var(--fg) 14%, transparent);
}
.menu__panel a {
  padding: 10px 12px;
  text-decoration: none;
  border-radius: var(--r-2);
}
.menu__panel a:hover {
  background: var(--surface-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-3);
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) ease;
}
.btn--small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
  .btn--ghost:hover {
    background: var(--surface-2);
    border-color: var(--line-strong);
  }
  .nav__links a:hover {
    color: var(--fg);
  }
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
html[lang="ar"] .hero h1 {
  letter-spacing: 0;
  line-height: 1.25;
}
[data-avatar] {
  display: inline-block;
  line-height: 0;
}
[data-avatar="lg"] {
  width: 6rem;
  height: 6rem;
}
[data-avatar="md"] {
  width: 3rem;
  height: 3rem;
}
[data-avatar="sm"] {
  width: 2rem;
  height: 2rem;
}
.hero__guide {
  margin-bottom: var(--space-4);
}
.step-guide {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-start: 10px;
}
.step-guide .avatar,
.step-guide.avatar {
  width: 3rem;
  height: 3rem;
}
.lead {
  margin-block: var(--space-5) var(--space-6);
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--fg-2);
  text-wrap: pretty;
}

.section {
  padding-block: clamp(56px, 8vw, 112px);
}
.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.section h2 {
  font-size: var(--step-4);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
html[lang="ar"] .section h2 {
  letter-spacing: 0;
  line-height: 1.3;
}
.section__lead {
  margin-top: var(--space-4);
  max-width: 40rem;
  color: var(--fg-2);
  font-size: var(--step-1);
  line-height: 1.5;
  text-wrap: pretty;
}

.steps {
  list-style: none;
  margin: var(--space-7) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 48px);
  counter-reset: step;
}
.steps > li {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: var(--space-2);
  counter-increment: step;
}
.steps .mk-ill {
  height: 100%;
  min-height: 290px;
  margin-bottom: var(--space-3);
  position: relative;
}
.steps .mk-ill::before {
  content: counter(step);
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  font-size: 0.8125rem;
}
.steps > li:not(:last-child) .mk-ill::after {
  content: "";
  position: absolute;
  inset-block-start: 22px;
  inset-inline-start: calc(100% + 1px);
  width: clamp(24px, 3.5vw, 48px);
  border-top: 2px dashed var(--accent-line);
}
.steps h3 {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}
.steps p {
  color: var(--fg-2);
  max-width: 34ch;
  text-wrap: pretty;
}

.asks {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.asks h3 {
  font-size: var(--step-1);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--accent);
  margin-bottom: var(--space-3);
}
.asks ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}
.asks li {
  color: var(--fg-2);
  text-wrap: pretty;
}

.trust {
  margin: var(--space-7) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.trust > div {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-strong);
}
.trust dt {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.trust dd {
  margin: var(--space-2) 0 0;
  color: var(--fg-2);
  text-wrap: pretty;
}
.ticks {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  color: var(--fg-2);
}
.ticks li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.ticks li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b6b6e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
[data-theme="dark"] .ticks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fe3dc' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
}
.t-lock {
  fill: var(--accent);
}
.topology {
  margin: var(--space-8) 0 0;
}
.topology svg {
  width: 100%;
  height: auto;
}
.t-zone {
  fill: none;
  stroke: var(--line-strong);
  stroke-dasharray: 5 6;
}
.t-zone--in {
  fill: var(--accent-soft);
  stroke: var(--accent-line);
  stroke-dasharray: none;
}
.t-node {
  fill: var(--surface);
  stroke: var(--line-strong);
}
.t-node--key {
  stroke: var(--accent);
  stroke-width: 2;
}
.t-line {
  fill: none;
  stroke: var(--fg-3);
  stroke-width: 1.5;
}
.t-arrow {
  fill: none;
  stroke: var(--fg-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.t-cap {
  fill: var(--fg-3);
  font: 600 13px var(--font-sans);
}
.t-lbl {
  fill: var(--fg);
  font: 600 17px var(--font-sans);
}
.t-sub {
  fill: var(--fg-3);
  font: 400 12px var(--font-sans);
}

.pair {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-5);
  overflow: hidden;
  background: var(--surface);
}
.pair__col {
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
  align-content: start;
  color: var(--fg-2);
}
.pair__col + .pair__col {
  border-inline-start: 1px solid var(--line);
  background: var(--surface-2);
}
.pair__q {
  color: var(--fg);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.4;
}

.embed {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.embed .btn {
  margin-top: var(--space-6);
}
.int {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: clamp(24px, 5vw, 72px);
}
.int h3 {
  font-size: var(--step-1);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--accent);
  margin-bottom: var(--space-3);
}
.int ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
  color: var(--fg-2);
}

.closer {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--ink-bg);
  color: var(--ink-fg);
}
.closer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-7);
  justify-content: space-between;
  align-items: center;
}
.closer h2 {
  font-size: var(--step-4);
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 18ch;
}
html[lang="ar"] .closer h2 {
  letter-spacing: 0;
  line-height: 1.3;
}
.closer .btn {
  background: #4fb9d6;
  border-color: #4fb9d6;
  color: #04202a;
}
.closer .btn--ghost {
  background: transparent;
  color: var(--ink-fg);
  border-color: #38596a;
}
@media (hover: hover) and (pointer: fine) {
  .closer .btn:hover {
    background: #7fe7ff;
    border-color: #7fe7ff;
  }
  .closer .btn--ghost:hover {
    background: #152a33;
    border-color: #38596a;
  }
}

.foot {
  padding-block: var(--space-6) 6rem;
  border-top: 1px solid var(--line);
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: center;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.foot nav a {
  color: var(--fg-2);
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}
.foot p {
  margin-inline-start: auto;
  color: var(--fg-3);
  font-size: var(--step--1);
}

@media (prefers-reduced-motion: no-preference) {
  .menu__panel {
    animation: pop 160ms var(--ease-out);
    transform-origin: top right;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (max-width: 1000px) {
  .nav__links {
    display: none;
  }
  .nav__cta {
    display: none;
  }
  .menu {
    display: block;
  }
  .hero__grid,
  .embed {
    grid-template-columns: minmax(0, 1fr);
  }
  .int {
    grid-template-columns: minmax(0, 1fr);
  }
  .asks,
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 34rem;
  }
  .steps > li:not(:last-child) .mk-ill::after {
    display: none;
  }
}
@media (max-width: 700px) {
  .asks,
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps p {
    max-width: none;
  }
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .pair__col + .pair__col {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
  .foot p {
    margin-inline-start: 0;
  }
}
@media (max-width: 400px) {
  .nav__inner {
    gap: var(--space-2);
  }
  .nav__tools {
    gap: 6px;
  }
  .logo {
    width: 110px;
    height: auto;
  }
  .btn {
    width: 100%;
  }
}
.topology__stacked {
  display: none;
}
@media (max-width: 700px) {
  .topology svg {
    display: none;
  }
  .topology svg.topology__stacked {
    display: block;
    max-width: 420px;
    margin-inline: auto;
  }
}
