:root {

  --canvas:          #eef1ef;
  --glass:           rgba(255, 255, 255, .66);
  --glass-strong:    rgba(255, 255, 255, .82);
  --hairline:        rgba(18, 32, 24, .07);
  --hairline-soft:   rgba(18, 32, 24, .05);
  --highlight:       rgba(255, 255, 255, .85);

  --ink:             #1c2321;
  --ink-soft:        #4a5450;
  --ink-mute:        #78837e;
  --ink-faint:       #9aa39f;

  --brand:           #0e9d5e;
  --brand-bright:    #14ce71;
  --brand-ink:       #ffffff;
  --brand-wash:      rgba(20, 206, 113, .10);
  --brand-line:      rgba(14, 157, 94, .22);

  --r-xl:            30px;
  --r-lg:            24px;
  --r-sm:            11px;
  --r-pill:          999px;

  --lift-1: 0 1px 2px rgba(18, 32, 24, .04),
            0 6px 16px -8px rgba(18, 32, 24, .10);
  --lift-2: 0 1px 2px rgba(18, 32, 24, .04),
            0 10px 28px -12px rgba(18, 32, 24, .14),
            0 32px 64px -32px rgba(18, 32, 24, .18);
  --inner-top: inset 0 1px 0 var(--highlight);

  --flow-line:   rgba(18, 32, 24, .3);
  --hero-bg:     var(--glass);
  --hero-shadow: var(--lift-2), var(--inner-top);
  --chip-bg:     rgba(255, 255, 255, .9);
  --chip-ring:   var(--hairline);
  --chip-shadow: var(--lift-1);

  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2 { margin: 0; font-weight: 300; letter-spacing: -.03em; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed; top: 10px; left: 50%; z-index: 99;
  transform: translate(-50%, -180%);
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--brand); color: var(--brand-ink);
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: transform .22s var(--ease);
}
.skip:focus-visible { transform: translate(-50%, 0); }

.shell {
  position: relative; z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 64px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 72px;
}
.logo { width: 112px; height: 30px; background: url("/brand/logo.png") left center / contain no-repeat; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.intro { max-width: 640px; margin: 0 auto 52px; text-align: center; }

h1 {
  font-size: clamp(2.15rem, 6.2vw, 3.5rem);
  line-height: 1.02;
  font-weight: 200;
  letter-spacing: -.045em;
  margin-bottom: 20px;
}
h1 em { font-style: normal; font-weight: 300; color: inherit; }

.lead {
  font-size: clamp(.94rem, 1.6vw, 1.06rem);
  line-height: 1.65; font-weight: 300;
  color: var(--ink-mute);
  max-width: 42ch; margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.col-hero { display: flex; flex-direction: column; min-width: 0; }
.col-cards { display: flex; flex-direction: column; min-width: 0; gap: 22px; }

.hero {
  position: relative; margin: 0;
  flex: 1; min-height: 520px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 15px;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background: var(--hero-bg);
  box-shadow: var(--hero-shadow);
}

.chips {
  position: static;
  display: flex; z-index: 2;
}
.chip {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  margin-left: -9px;
  border-radius: var(--r-sm);
  background: var(--chip-bg);
  border: 1px solid var(--chip-ring);
  box-shadow: var(--chip-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  transition: margin-left .45s var(--ease), transform .45s var(--ease);
}
.chip:first-child { margin-left: 0; }
.chip { color: var(--ink); }
.chip svg { width: 17px; height: 17px; }
.chips:hover .chip { margin-left: 5px; transform: translateY(-2px); }
.chips:hover .chip:first-child { margin-left: 0; }

.hero-flow {
  display: flex; flex: 1; min-height: 0;
  align-items: center; padding: 2px 0;
}
.flow {
  --gap: 20px;
  --elbow: 40px;
  --drop: 14px;
  width: 100%;
  display: flex; flex-direction: column; gap: var(--gap);
}

.step { position: relative; display: flex; align-items: stretch; width: 66%; }
.step:nth-child(2), .step:nth-child(4) { align-self: flex-end; }
.step:nth-child(3) { margin-left: 7%; }

.step-time {
  flex: none; width: 19px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 8.5px; font-weight: 500; letter-spacing: .05em;
  color: #fff;
}
.step-body {
  flex: 1; min-width: 0;
  margin-left: -10px;
  padding: 11px 13px 12px 21px;
  border-radius: 15px;
}

.s-green .step-time { background: #14653a; }
.s-green .step-body { background: rgb(194 249 221 / 19%); }
.s-green .step-ico  { color: var(--brand); background: rgba(24, 190, 105, .16); }

.s-dark .step-time  { background: #17201c; }
.s-dark .step-body  { background: rgba(18, 32, 24, .045); }
.s-dark .step-ico   { color: var(--ink); background: #fff; }

.step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.step-ico {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
}
.step-ico svg { width: 12px; height: 12px; }
.step-title {
  margin: 0; min-width: 0;
  font-size: .8rem; font-weight: 500;
  letter-spacing: -.015em; color: var(--ink);
}
.step-n { margin-right: 1px; }
.step-txt {
  font-size: .69rem; font-weight: 300; line-height: 1.45;
  color: var(--ink-mute);
}
.step-txt b { font-weight: 500; color: var(--ink-soft); }

.step:not(:last-child)::after {
  content: ''; position: absolute; pointer-events: none;
  top: 58%; bottom: calc(-1 * var(--drop));
  width: var(--elbow);
  border-style: dashed;
  border-color: var(--flow-line);
  border-width: 1.4px 0 0 0;
}
.step:nth-child(odd)::after  { left: 100%;  border-right-width: 1.4px; border-top-right-radius: 12px; }
.step:nth-child(even)::after { right: 100%; border-left-width: 1.4px;  border-top-left-radius: 12px; }

.step:not(:last-child)::before {
  content: ''; position: absolute; pointer-events: none;
  bottom: calc(-1 * var(--drop) - 2px);
  width: 6px; height: 6px;
  border-right: 1.4px solid var(--flow-line);
  border-bottom: 1.4px solid var(--flow-line);
  transform: rotate(45deg);
}
.step:nth-child(odd)::before  { left:  calc(100% + var(--elbow) - 3.7px); }
.step:nth-child(even)::before { right: calc(100% + var(--elbow) - 3.7px); }

.hero-bar {
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 17px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 34px -12px rgba(18, 32, 24, .16);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}

.copy-lg {
  flex: none; width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 13px;
  background: rgba(18, 32, 24, .06);
  color: var(--ink-soft); cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.copy-lg svg { width: 17px; height: 17px; grid-area: 1 / 1; }
.copy-lg:hover { background: rgba(18, 32, 24, .1); transform: translateY(-1px); }
.copy-lg:active { transform: translateY(0) scale(.96); }
.copy-lg.done { background: var(--brand); color: #fff; }

.card-endpoint { display: none; padding: 18px 22px; }
.ep { display: flex; align-items: center; gap: 14px; }
.ep-text { min-width: 0; flex: 1; }
.ep-label {
  display: block; margin-bottom: 4px;
  font-size: 9.5px; font-weight: 400;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-mute);
}
.endpoint {
  display: block;
  font-family: inherit;
  font-size: clamp(13px, 1.7vw, 15px);
  font-weight: 300; letter-spacing: -.005em;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.endpoint .scheme { color: var(--ink-faint); font-weight: 200; }
.ep-btn { flex: none; padding: 10px 16px; }

.i-check { opacity: 0; transform: scale(.5); transition: opacity .22s var(--ease), transform .22s var(--ease); }
.i-copy  { opacity: 1; transform: scale(1);  transition: opacity .22s var(--ease), transform .22s var(--ease); }
.done .i-check { opacity: 1; transform: scale(1); }
.done .i-copy  { opacity: 0; transform: scale(.5); }

.card {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--glass);
  border: 1px solid var(--hairline);
  box-shadow: var(--lift-2), var(--inner-top);
  -webkit-backdrop-filter: blur(30px) saturate(175%);
  backdrop-filter: blur(30px) saturate(175%);
  padding: 26px 26px 10px;
  overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 255, 255, .10), transparent 42%);
}

.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.card-head > div { min-width: 0; }
.card-ico {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--brand-wash);
  border: 0;
  color: var(--brand);
}
.card-ico svg { width: 19px; height: 19px; }
.card h2 {
  font-size: 1.09rem; font-weight: 500;
  letter-spacing: -.02em; line-height: 1.3;
}
.card-sub {
  margin-top: 4px;
  font-size: .795rem; font-weight: 300; line-height: 1.55;
  color: var(--ink-mute);
}

.rows { margin: 0 -26px; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 26px;
  border-top: 1px solid var(--hairline-soft);
  transition: background .2s var(--ease);
}
.row:hover { background: var(--glass-strong); }

.tile {
  position: relative;
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  box-shadow: var(--lift-1), var(--inner-top);
  color: var(--ink);
  transition: transform .3s var(--ease);
}
.row:hover .tile { transform: translateY(-2px) rotate(-2.5deg); }
.tile > svg { width: 19px; height: 19px; }
.tile-duo > svg:first-child { transform: translate(-3px, -2px); }
.tile-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 21px; height: 21px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: #0d0f0e; color: #fff;
  border: 1.5px solid var(--glass-strong);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .5);
}
.tile-badge svg { width: 11px; height: 11px; }

.meta { flex: 1; min-width: 0; display: block; }
.name {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: .875rem; font-weight: 500; letter-spacing: -.012em;
  color: var(--ink);
}
.desc {
  display: block; margin-top: 2px;
  font-size: .755rem; font-weight: 300; line-height: 1.45;
  color: var(--ink-mute);
}
.tag {
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--brand-wash);
  border: 0;
  font-size: 9.5px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--brand);
}

.btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit; font-size: .795rem; font-weight: 500;
  letter-spacing: -.005em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), border-color .2s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; }

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}
.btn-primary:hover { background: var(--brand-bright); transform: translateY(-1.5px); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary svg { transition: transform .25s var(--ease); }
.btn-primary:hover svg { transform: translateX(2.5px); }

.btn-ghost {
  position: relative;
  background: var(--glass-strong);
  border-color: var(--hairline);
  color: var(--ink-soft);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--brand-line); transform: translateY(-1.5px); }
.btn-ghost:active { transform: translateY(0) scale(.985); }
.btn-ghost.done { color: var(--brand); border-color: var(--brand-line); background: var(--brand-wash); }

.btn-ghost .i-check { position: absolute; left: 15px; top: 50%; margin-top: -7px; }

.btn-wide { flex: 1; padding: 11px 18px; }
.card-actions { display: flex; gap: 10px; padding-bottom: 16px; }

.card-token .card-head { margin-bottom: 18px; }

.link-quiet {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: var(--r-pill);
  font-size: .795rem; font-weight: 400;
  color: var(--ink-mute); text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.link-quiet:hover { color: var(--ink); background: var(--glass); }
.i-out { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.link-quiet:hover .i-out { transform: translate(1.5px, -1.5px); }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  transform: translate(-50%, 140%);
  padding: 11px 20px; border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  box-shadow: var(--lift-2), var(--inner-top);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--ink);
  font-size: .795rem; font-weight: 400;
  opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { color: #c0392b; }

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
  transition-delay: calc(var(--d, 0) * 55ms);
}
.js .reveal.vis { opacity: 1; transform: none; }

.row:nth-child(1) { --d: 1 }
.row:nth-child(2) { --d: 2 }
.row:nth-child(3) { --d: 3 }
.row:nth-child(4) { --d: 4 }
.row:nth-child(5) { --d: 5 }
.step:nth-child(1) { --d: 1 }
.step:nth-child(2) { --d: 2 }
.step:nth-child(3) { --d: 3 }
.step:nth-child(4) { --d: 4 }

@media (max-width: 940px) {
  .shell { padding: 22px 20px 56px; }
  .topbar { margin-bottom: 44px; }
  .intro { margin-bottom: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .col-cards { gap: 18px; }
  .hero { flex: none; min-height: 0; }

  .col-hero  { order: 2; }
  .col-cards { order: 1; }
  .hero-bar { display: none; }
  .card-endpoint { display: block; }
}

@media (max-width: 620px) {
  .shell { padding: 16px 14px 40px; }
  .topbar { margin-bottom: 32px; }
  .intro { margin-bottom: 26px; }
  .grid, .col-cards { gap: 14px; }

  .card { border-radius: var(--r-lg); padding: 20px 16px 6px; }
  .card-endpoint { padding: 15px 16px; }
  .ep { gap: 11px; }
  .ep-btn { padding: 9px 13px; }
  .card-head { gap: 12px; margin-bottom: 16px; }
  .card-ico { width: 36px; height: 36px; border-radius: 11px; }
  .card-ico svg { width: 17px; height: 17px; }

  .rows { margin: 0 -16px; }
  .row { gap: 11px; padding: 12px 16px; }
  .tile { width: 36px; height: 36px; border-radius: 11px; }
  .tile > svg { width: 17px; height: 17px; }
  .tile-badge { width: 18px; height: 18px; border-radius: 6px; }
  .tile-badge svg { width: 9px; height: 9px; }
  .name { font-size: .82rem; }
  .desc { font-size: .7rem; }
  .tag { font-size: 9px; padding: 2px 6px; }
  .btn { padding: 8px 12px; font-size: .75rem; }
  .btn svg { width: 13px; height: 13px; }

  .row .btn-ghost .btn-txt { display: none; }
  .row .btn-ghost { width: 38px; height: 34px; padding: 0; }
  .row .btn-ghost .i-check { left: 50%; margin-left: -7px; }

  .card-actions { flex-direction: column; gap: 8px; padding-bottom: 14px; }
  .btn-wide { padding: 12px 18px; font-size: .8rem; }

  .hero { border-radius: var(--r-lg); padding: 12px; }
  .chips { margin-bottom: 2px; }
  .chip { width: 34px; height: 34px; }
  .chip svg { width: 15px; height: 15px; }

  .js .reveal { transform: translateY(18px); transition-duration: .72s; }
  .flow { --gap: 20px; }
  .step, .step:nth-child(2), .step:nth-child(4) { width: 100%; align-self: stretch; }
  .step:nth-child(3) { margin-left: 0; }
  .step-body { padding: 11px 13px 12px 22px; }

  .step:nth-child(odd)::after,
  .step:nth-child(even)::after {
    top: 100%; bottom: calc(-1 * var(--gap));
    left: 9px; right: auto;
    width: 0;
    border-width: 0 0 0 1.4px;
    border-radius: 0;
  }
  .step:nth-child(odd)::before,
  .step:nth-child(even)::before {
    left: 6px; right: auto;
    bottom: calc(-1 * var(--gap) + 2px);
  }
}

@media (max-width: 400px) {

  .ep { flex-direction: column; align-items: stretch; gap: 10px; }
  .ep-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .toast { display: none; }
  body { background: #fff; }
}
