:root {
  --bg: #161617;
  --card: #1f1f21;
  --card-2: #262628;
  --line: #333336;
  --text: #f5f5f7;
  --muted: #98989f;
  --blue: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --radius: 28px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;  
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

/* Navbar */

.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 24px 20px 0;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(1080px, 100%);
  margin-inline: auto;
  padding: 14px 14px 14px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(38, 38, 40, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
}

.brand {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
}

.navbar .download {
  justify-self: end;
}

/* Download button */

.download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.download:hover {
  opacity: 0.9;
}

.download:active {
  transform: scale(0.97);
}

.download img {
  width: 18px;
  height: 18px;
  margin-top: -3px;
}

.download.small {
  padding: 9px 18px;
  font-size: 15px;
}

.download.small img {
  width: 15px;
  height: 15px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 112px 0 128px 40px;
}

.pill {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 440px;
  margin: 22px 0 32px;
  font-size: 21px;
  line-height: 1.45;
  color: #d8d8dc;
}

/* Hero screenshot */

.hero-shot {
  justify-self: center;
  width: 330px;
  max-width: 80vw;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 80px rgba(10, 132, 255, 0.16));
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

/* Bento */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.tile h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.tile p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tile .viz {
  display: grid;
  place-items: center;
  height: 170px;
  margin-bottom: 24px;
}

.tile.wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.tile.wide .tile-copy {
  flex: 1;
}

.tile.wide h2 {
  font-size: 34px;
  line-height: 1.1;
}

.tile.wide p {
  font-size: 18px;
}

.tile.wide .viz {
  flex: 1;
  height: auto;
  margin: 0;
}

.breakdown {
  width: 100%;
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--card-2);
  font-size: 15px;
}

.breakdown div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.breakdown div + div {
  border-top: 1px solid var(--line);
}

.breakdown span {
  color: var(--muted);
}

.breakdown .total span {
  color: var(--text);
  font-weight: 600;
}

.goal .viz {
  position: relative;
}

.ring {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke: var(--card-2);
  stroke-width: 12;
}

.ring .ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 68 100;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.ring-label b {
  font-size: 32px;
  font-weight: 800;
}

.ring-label span {
  color: var(--muted);
  font-size: 14px;
}

.tile .bars {
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  padding-top: 10px;
}

.bars span {
  width: 18px;
  height: var(--h);
  border-radius: 6px;
  background: var(--green);
}

.bars .future {
  background: transparent;
  border: 2px dashed rgba(48, 209, 88, 0.6);
}

.bench {
  width: 100%;
  height: 120px;
}

.tile .brokers {
  position: relative;
  display: block;
  width: 230px;
  margin-inline: auto;
}

.broker {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.b-xtb {
  top: 10px;
  left: 0;
  width: 112px;
  height: 112px;
}

.b-mbank {
  top: 0;
  right: 6px;
  width: 92px;
  height: 92px;
}

.b-bossa {
  bottom: 0;
  left: 112px;
  width: 78px;
  height: 78px;
}

/* Sections */

.section-title {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-lead {
  max-width: 480px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 140px 0 40px;
}

.chips-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.chips-cloud span {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-weight: 600;
}

.chips-cloud span:nth-child(-n + 3) {
  background: var(--blue);
  border-color: var(--blue);
}

.values {
  padding: 120px 0 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.value {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.value svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value h3 {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 600;
}

.value p {
  margin: 6px 0 0;
  color: var(--muted);
}

.final {
  padding: 140px 0;
  text-align: center;
}

.final h2 {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.final p {
  margin: 12px auto 30px;
  color: var(--muted);
  font-size: 19px;
}

/* Footer */

footer {
  padding-bottom: 0;
  overflow: hidden;
}

.footer-card {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand p {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.footer-cols {
  display: flex;
  gap: 72px;
}

.footer-cols div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-cols h4 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-cols a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.9;
}

.footer-cols a:hover {
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-wordmark {
  margin: 8px 0 -0.24em;
  font-size: clamp(120px, 25vw, 300px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 245, 247, 0.14), rgba(245, 245, 247, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

/* Privacy policy */

.doc {
  width: min(720px, 100% - 40px);
  margin-inline: auto;
  padding: 72px 0 96px;
}

.doc .wrap {
  width: 100%;
}

.doc h1 {
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.doc .updated {
  margin: 12px 0 40px;
  color: var(--muted);
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 22px;
  font-weight: 600;
}

.doc p {
  margin: 0 0 14px;
  color: #d8d8dc;
}

.doc a {
  color: var(--blue);
}

/* Account cards */

.account-cards {
  position: relative;
  display: grid;
  justify-items: center;
}

.account-card {
  width: min(100%, 380px);
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #1a1a1c;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.account-card img {
  display: block;
  width: 100%;
  height: auto;
}

.account-card:first-child {
  transform: translateX(-28px) rotate(-2deg);
}

.account-card:last-child {
  margin-top: 16px;
  transform: translateX(28px) rotate(1.5deg);
}

/* FAQ */

.faq {
  max-width: 760px;
  padding: 120px 0 0;
}

.faq .section-title {
  margin-bottom: 24px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: -8px 0 22px;
  color: var(--muted);
}

/* Release notes */

.release {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.release h2 {
  margin-top: 0;
}

.doc .release-date {
  margin: 0 0 14px;
  color: var(--muted);
}

.release ul {
  margin: 0;
  padding-left: 20px;
  color: #d8d8dc;
}

.release li + li {
  margin-top: 6px;
}

/* Responsive */

@media (max-width: 900px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 56px;
    padding-left: 0;
    text-align: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

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

  .split {
    padding-top: 100px;
  }
}

@media (max-width: 640px) {
  .account-card:first-child,
  .account-card:last-child {
    transform: none;
  }

  .navbar-wrap {
    padding: 12px 12px 0;
  }

  .navbar {
    grid-template-columns: 1fr auto;
    padding-left: 22px;
  }

  .nav-links {
    display: none;
  }

  .bento,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .tile.wide {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .tile.wide h2 {
    font-size: 28px;
  }

  .footer-card {
    padding: 28px;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-top {
    gap: 36px;
  }

  .footer-cols {
    gap: 48px;
  }
}

/* Scroll animations */

.animate .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate .reveal.shown {
  opacity: 1;
  transform: none;
}

.animate .ring .ring-fill {
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.animate .shown .ring .ring-fill {
  stroke-dasharray: 68 100;
}

.animate .bars span {
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate .shown .bars span {
  transform: scaleY(1);
}

.animate .bars span:nth-child(2) { transition-delay: 0.35s; }
.animate .bars span:nth-child(3) { transition-delay: 0.4s; }
.animate .bars span:nth-child(4) { transition-delay: 0.45s; }
.animate .bars span:nth-child(5) { transition-delay: 0.5s; }
.animate .bars span:nth-child(6) { transition-delay: 0.55s; }
.animate .bars span:nth-child(7) { transition-delay: 0.6s; }
.animate .bars span:nth-child(8) { transition-delay: 0.65s; }
.animate .bars span:nth-child(9) { transition-delay: 0.7s; }
.animate .bars span:nth-child(1) { transition-delay: 0.3s; }

.animate .bench path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.6s ease 0.3s;
}

.animate .shown .bench path {
  stroke-dashoffset: 0;
}

.animate .broker {
  transform: scale(0.4);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease;
}

.animate .shown .broker {
  transform: none;
  opacity: 1;
}

.animate .shown .b-mbank { transition-delay: 0.45s; }
.animate .shown .b-bossa { transition-delay: 0.6s; }
.animate .shown .b-xtb { transition-delay: 0.3s; }

/* Smooth scroll (Lenis) */

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.lenis.lenis-stopped {
  overflow: clip;
}

/* Page transitions */

@view-transition {
  navigation: auto;
}

.navbar {
  view-transition-name: navbar;
}

::view-transition-old(root) {
  animation: page-out 0.25s ease both;
}

::view-transition-new(root) {
  animation: page-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
