.features-page,
main {
  overflow-x: clip;
}

.features-intro {
  padding-block: 64px 44px;
}

.features-intro .page-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.features-intro .page-heading h1,
.feature-copy h2,
.screen-set h3,
.cta-band h2 {
  letter-spacing: 0;
}

.features-intro .page-heading h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.features-intro .page-heading p {
  max-width: 720px;
}

.feature-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.feature-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #485960;
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 700;
}

.feature-jump a:hover,
.feature-jump a:focus-visible {
  border-color: #81cbb6;
  color: var(--green);
  outline: none;
}

.feature-section {
  scroll-margin-top: 76px;
  border-top: 1px solid var(--line);
}

.feature-section:nth-of-type(even) {
  background: var(--white);
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(38px, 6vw, 76px);
  align-items: start;
  padding-block: 82px;
}

.feature-copy {
  position: sticky;
  top: 112px;
}

.feature-copy--long {
  position: static;
}

.feature-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.08;
}

.feature-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  width: max-content;
  margin-bottom: 14px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
  font-size: 0.74rem;
  font-weight: 800;
}

.tag.green,
.tag.gold,
.tag.coral {
  color: var(--green);
  background: var(--mint);
}

.function-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.function-list li {
  position: relative;
  padding-left: 25px;
  color: #43545c;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.function-list li::before {
  content: "";
  position: absolute;
  top: 0.56em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-2);
}

.function-list .function-sublist {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.function-list .function-sublist li {
  font-weight: 500;
}

.function-list .function-sublist li::before {
  width: 6px;
  height: 6px;
  background: #d9a625;
}

.brand-showcase {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: clamp(24px, 6vw, 64px);
}

.brand-showcase img {
  display: block;
  width: min(450px, 100%);
  height: auto;
}

.screen-gallery {
  display: grid;
  grid-column: 2;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 4px 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-color: #9db8b1 transparent;
  scrollbar-width: thin;
  cursor: grab;
}

.screen-gallery-shell {
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
}

.gallery-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
}

.gallery-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.gallery-arrow:hover:not(:disabled),
.gallery-arrow:focus-visible {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
  outline: none;
}

.gallery-arrow:disabled {
  color: #9bada9;
  background: #edf2f1;
  cursor: default;
  opacity: 0.65;
}

.screen-gallery.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.screen-gallery::-webkit-scrollbar {
  height: 7px;
}

.screen-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.screen-gallery::-webkit-scrollbar-thumb {
  border-radius: 7px;
  background: #9db8b1;
}

.screen-set {
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.screen-set h3 {
  margin: 0 0 4px;
  color: #485960;
  font-size: 0.92rem;
  text-align: center;
}

.screen-pair {
  display: grid;
  grid-template-columns: 105px 170px;
  justify-content: center;
  gap: 0;
  align-items: center;
  padding: 12px 8px 22px;
  perspective: 900px;
  perspective-origin: 72% 48%;
}

.phone-gallery {
  grid-template-columns: repeat(2, 105px);
}

.screen-frame {
  width: 100%;
  margin: 0;
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

.screen-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 24px 42px rgba(19, 51, 64, 0.14),
    0 5px 14px rgba(19, 51, 64, 0.08);
}

.screen-frame--phone {
  position: relative;
  z-index: 2;
  max-width: 105px;
  justify-self: end;
  transform: translate3d(38px, 12px, 0) rotateY(-20deg) rotateZ(-3deg);
  transform-origin: center center;
}

.screen-frame--tablet {
  position: relative;
  z-index: 1;
  max-width: 170px;
  justify-self: start;
  transform: translateX(-3px) rotateY(-20deg) rotateZ(-3deg);
  transform-origin: center center;
}

.phone-gallery .screen-frame--phone {
  justify-self: center;
  transform: rotateY(-20deg) rotateZ(-3deg);
}

.screen-frame--phone:hover {
  transform: translate3d(38px, 6px, 0) rotateY(-20deg) rotateZ(-3deg);
}

.screen-frame--tablet:hover {
  transform: translate3d(-3px, -6px, 0) rotateY(-20deg) rotateZ(-3deg);
}

.phone-gallery .screen-frame--phone:hover {
  transform: translateY(-6px) rotateY(-20deg) rotateZ(-3deg);
}

.cta-band p {
  margin: 0;
  color: #bcd0d5;
}

@media (max-width: 900px) {
  .feature-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 64px;
  }

  .feature-copy {
    position: static;
  }

  .screen-gallery {
    grid-column: auto;
  }

  .screen-gallery-shell {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    column-gap: 16px;
  }

  .site-header .header-actions {
    display: flex;
    margin-left: auto;
  }

  .features-intro {
    padding-block: 42px 30px;
  }

  .features-intro .page-heading {
    margin-bottom: 25px;
  }

  .feature-jump {
    flex-wrap: nowrap;
    margin-inline: -12px;
    padding-inline: 12px;
    padding-bottom: 5px;
    overflow-x: auto;
  }

  .feature-jump a {
    flex: 0 0 auto;
  }

  .feature-section {
    scroll-margin-top: 112px;
  }

  .feature-layout {
    gap: 26px;
    padding-block: 52px;
  }

  .feature-copy h2 {
    font-size: 1.75rem;
    overflow-wrap: anywhere;
  }

  .screen-pair {
    grid-template-columns: 75px 115px;
    gap: 0;
    padding: 10px 4px 18px;
  }

  .phone-gallery {
    grid-template-columns: repeat(2, 75px);
  }

  .screen-frame--phone {
    max-width: 75px;
    transform: translate3d(27px, 9px, 0) rotateY(-17deg) rotateZ(-2.5deg);
  }

  .screen-frame--tablet {
    max-width: 115px;
    transform: translateX(-2px) rotateY(-17deg) rotateZ(-2.5deg);
  }

  .screen-frame--phone:hover {
    transform: translate3d(27px, 5px, 0) rotateY(-17deg) rotateZ(-2.5deg);
  }

  .screen-frame--tablet:hover {
    transform: translate3d(-2px, -4px, 0) rotateY(-17deg) rotateZ(-2.5deg);
  }

  .phone-gallery .screen-frame--phone,
  .phone-gallery .screen-frame--phone:hover {
    transform: rotateY(-17deg) rotateZ(-2.5deg);
  }

  .screen-gallery {
    grid-auto-columns: 210px;
    gap: 12px;
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .screen-set h3 {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .screen-frame {
    transition: none;
  }
}
