.tokenomics-functions-wrap {
  position: relative;
  z-index: 2;
  background: #f3f3f3;
  color: #111111;
}

.tokenomics-functions-stage {
  position: relative;
}

.tokenomics-functions-pin {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 3vh, 2.5rem);
  padding: clamp(2.5rem, 5vh, 4rem) clamp(2rem, 5vw, 6.4rem);
  padding-right: clamp(48px, 6vw, 90px);
  box-sizing: border-box;
  overflow: hidden;
}

.tokenomics-functions-intro {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  flex-shrink: 0;
}

.tokenomics-functions-intro-title {
  margin: 0 0 0.85rem;
  font-family: "Marcellus", "Playfair Display", Georgia, serif;
  font-size: var(--tk-section-heading-size);
  font-weight: 400;
  line-height: var(--tk-section-heading-line);
  letter-spacing: var(--tk-section-heading-spacing);
  color: #111111;
}

.tokenomics-functions-intro-subtitle {
  max-width: 640px;
  margin: 0 auto;
  font-family: "Montserrat", sans-serif;
  font-size: var(--tk-section-desc-size);
  font-weight: 450;
  line-height: var(--tk-section-desc-line);
  color: var(--tk-section-desc-color);
}

.tokenomics-functions-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-right: clamp(20px, 3vw, 40px);
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}

.tokenomics-functions-copy {
  position: relative;
  min-height: clamp(11rem, 20vh, 16rem);
}

.tokenomics-functions-headings {
  position: relative;
  min-height: clamp(4.5rem, 8vh, 6.5rem);
}

.tokenomics-functions-bodies {
  position: relative;
  min-height: clamp(10rem, 16vh, 14rem);
  max-width: 520px;
}

.tokenomics-functions-heading {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  max-width: 520px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  font-family: "Marcellus", "Playfair Display", Georgia, serif;
  font-size: clamp(32px, 2.8vw, 44px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: #111111;
  will-change: transform, opacity, filter;
}

.tokenomics-functions-heading:first-child {
  opacity: 1;
  visibility: visible;
}

.tokenomics-functions-body-panel:not(:first-child) {
  opacity: 0;
  visibility: hidden;
}

.tokenomics-functions-body-panel {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  will-change: transform, opacity, filter;
}

.tokenomics-functions-text {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.012em;
  max-width: 520px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.tokenomics-functions-word {
  color: #c0c4c9;
}

.tokenomics-functions-word.is-bold {
  font-weight: 700;
}

.tokenomics-functions-visuals {
  position: relative;
  height: min(56vh, 560px);
  min-height: 18rem;
}

.tokenomics-functions-visual-panel:not(:first-child) {
  opacity: 0;
  visibility: hidden;
}

.tokenomics-functions-visual-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity, filter;
}

.tokenomics-functions-visual-frame {
  height: 100%;
  width: auto;
  max-width: min(100%, 440px);
  aspect-ratio: 794 / 960;
  border-radius: clamp(16px, 1.8vw, 22px);
  overflow: hidden;
  background: transparent;
  box-shadow: 0 20px 52px rgba(17, 17, 17, 0.1);
}

.tokenomics-functions-visual-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.tokenomics-functions-heading,
.tokenomics-functions-body-panel,
.tokenomics-functions-visual-panel,
.tokenomics-functions-rail {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tokenomics-functions-rail {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1.2rem;
  pointer-events: none;
  z-index: 10;
  will-change: transform, opacity, filter;
}

.tokenomics-functions-rail-line {
  display: block;
  width: 5.6rem;
  height: 1px;
  background: #d4d8dd;
  transform-origin: right center;
  transition:
    background-color 0.4s ease,
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.3s ease;
}

.tokenomics-functions-rail-line.is-active {
  width: 10.5rem;
  height: 2px;
  background: #0e1722;
}

@media screen and (max-width: 991px) {
  .tokenomics-functions-pin {
    padding-right: 48px;
  }

  .tokenomics-functions-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-right: 32px;
  }

  .tokenomics-functions-copy {
    min-height: clamp(12rem, 20vh, 18rem);
  }

  .tokenomics-functions-visuals {
    height: min(42vh, 380px);
    min-height: 16rem;
  }

  .tokenomics-functions-visual-frame {
    width: min(100%, 360px);
    max-height: 100%;
  }

  .tokenomics-functions-rail-line {
    width: 3.6rem;
  }

  .tokenomics-functions-rail-line.is-active {
    width: 6.8rem;
  }
}

@media screen and (max-width: 767px) {
  .tokenomics-functions-stage.is-scroll-stage {
    height: var(--tokenomics-functions-scroll-height, 336vh);
  }

  .tokenomics-functions-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: max(5.2rem, env(safe-area-inset-top, 0px)) 3.2rem 1.6rem 1.6rem;
    justify-content: space-between;
    gap: 0.8rem;
    transform: translateZ(0);
  }

  .tokenomics-functions-intro {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
  }

  .tokenomics-functions-intro-title {
    font-size: var(--tk-section-heading-size);
    margin-bottom: 0.5rem;
  }

  .tokenomics-functions-intro-subtitle {
    font-size: var(--tk-section-desc-size);
  }

  .tokenomics-functions-heading,
  .tokenomics-functions-body-panel,
  .tokenomics-functions-visual-panel,
  .tokenomics-functions-rail {
    will-change: auto;
  }

  .tokenomics-functions-rail-line {
    transition: none;
  }

  .tokenomics-functions-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding-right: 1.6rem;
    gap: 0;
  }

  .tokenomics-functions-copy {
    order: 2;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 10.5rem;
    margin-top: auto;
  }

  .tokenomics-functions-headings,
  .tokenomics-functions-bodies {
    width: 100%;
    min-width: 0;
  }

  .tokenomics-functions-headings {
    min-height: 3.2rem;
  }

  .tokenomics-functions-bodies {
    min-height: 7.4rem;
    max-width: 100%;
  }

  .tokenomics-functions-heading,
  .tokenomics-functions-body-panel {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .tokenomics-functions-heading {
    font-size: clamp(1.65rem, 6.5vw, 2rem);
  }

  .tokenomics-functions-text {
    max-width: 100%;
    font-size: clamp(1rem, 4.2vw, 1.15rem);
    line-height: 1.4;
  }

  .tokenomics-functions-visuals {
    order: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: min(calc(100% - 5.2rem), 32rem);
    height: auto;
    min-height: 0;
    max-height: 34vh;
    aspect-ratio: 2 / 2;
    transform: translate(-50%, -50%);
  }

  .tokenomics-functions-visual-panel {
    align-items: center;
    justify-content: center;
  }

  .tokenomics-functions-visual-frame {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1.4rem;
  }

  .tokenomics-functions-visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .tokenomics-functions-rail {
    top: 50%;
    right: 0;
    bottom: auto;
    transform: translateY(-50%);
    gap: 0.9rem;
  }

  .tokenomics-functions-rail-line {
    width: 2.2rem;
  }

  .tokenomics-functions-rail-line.is-active {
    width: 4.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tokenomics-functions-word {
    color: #111111;
  }

  .tokenomics-functions-rail {
    opacity: 1;
    visibility: visible;
  }

  .tokenomics-functions-heading:not(:first-child),
  .tokenomics-functions-body-panel:not(:first-child),
  .tokenomics-functions-visual-panel:not(:first-child) {
    display: none;
  }
}
