/* Figma: APP Website (1920px) — node 0:2 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --page-width: 1920px;
  --content-x: 360px;
  --content-width: 1200px;
  --font-open: 'Open Sans', sans-serif;
  --font-source: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-card: #1f1f1f;
  --color-divider: #4d4d4d;
  --color-muted: #9a9a9a;
  --color-placeholder: #d8d8d8;
  --gradient-title: linear-gradient(-21.37deg, #ea5b3a 5.07%, #e73487 92.45%);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-open);
  background: var(--color-black);
  color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  background: var(--color-black) url('../assets/page-bg.webp') no-repeat center top 1060px / 100% auto;
  overflow-x: hidden;
}

/* ===== Hero (1060px) ===== */
.hero {
  position: relative;
  height: 1060px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 47.77%, var(--color-black) 100%),
    url('../assets/hero-sand.webp') center bottom / cover no-repeat,
    url('../assets/hero-sand-cloud.webp') center / cover no-repeat,
    url('../assets/hero-bg.webp') center / cover no-repeat;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.logo {
  position: absolute;
  left: var(--content-x);
  top: 35px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo__icon {
  width: 120px;
  height: auto;
}

.logo__text {
  width: 99px;
  height: auto;
  margin-top: -40px;
  margin-left: 4px;
}

.nav {
  position: absolute;
  top: 92px;
  left: 628px;
  display: flex;
  align-items: center;
  gap: 68px;
}

.nav__link {
  font-family: var(--font-open);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.9px;
  color: var(--color-white);
  white-space: nowrap;
  position: relative;
}

.nav__link--active {
  font-weight: 700;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
}

.hero__body {
  position: relative;
  height: 100%;
}

.hero__content {
  position: absolute;
  left: var(--content-x);
  top: 407px;
}

.hero__tagline {
  font-family: var(--font-open);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 14px;
}

.hero__title {
  font-family: var(--font-source);
  font-size: 54px;
  font-weight: 900;
  line-height: 67.2px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 53px;
}

.store-buttons {
  display: grid;
  grid-template-columns: 170px 170px;
  gap: 16px 16px;
  width: 356px;
}

.store-btn {
  display: block;
  line-height: 0;
}

.store-btn--apk {
  grid-column: 1;
}

.store-btn img {
  width: 170px;
  height: 50px;
}

.hero__phones {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.hero__phone {
  position: absolute;
  height: auto;
}

.hero__phone--left {
  left: 811px;
  top: 314px;
  width: 227px;
}

.hero__phone--center {
  left: 1058px;
  top: 392px;
  width: 246px;
  z-index: 2;
}

.hero__phone--right {
  left: 1333px;
  top: 324px;
  width: 227px;
}

/* ===== Main content ===== */
.main {
  position: relative;
  z-index: 1;
}

/* API Features */
.api-features {
  padding-top: 68px;
  padding-bottom: 65px;
}

.api-features__title {
  font-family: var(--font-open);
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--color-white);
  margin-bottom: 24px;
}

.api-features__card {
  width: var(--content-width);
  margin: 0 auto;
  height: 195px;
  background: var(--color-card);
  border-radius: 17.276px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

.api-features__col {
  position: relative;
  padding: 43px 37px 0;
}

.api-features__col:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 46px;
  width: 2px;
  height: 102px;
  background: var(--color-divider);
  border-radius: 0.837px;
}

.api-features__col-title {
  font-family: var(--font-open);
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 4px;
}

.api-features__col:nth-child(2) .api-features__col-title,
.api-features__col:nth-child(3) .api-features__col-title,
.api-features__col:nth-child(4) .api-features__col-title {
  font-size: 17px;
}

.api-features__col-desc {
  font-family: var(--font-open);
  font-size: 16px;
  font-weight: 400;
  line-height: 27px;
  color: var(--color-white);
}

.api-features__icon {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

/* Photo to Video */
.photo-video {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--content-x);
  margin-bottom: 85px;
  align-items: flex-start;
}

.photo-video__text {
  width: 419px;
  padding-top: 15px;
}

.photo-video__title {
  font-family: var(--font-open);
  font-size: 38px;
  font-weight: 700;
  line-height: 48px;
  margin-bottom: 11px;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.photo-video__desc {
  font-family: var(--font-open);
  font-size: 20px;
  font-weight: 400;
  line-height: 38px;
  color: var(--color-white);
}

.photo-video__gallery {
  display: flex;
  gap: 6px;
  position: relative;
}

.photo-video__img-wrap {
  border-radius: 18.13px;
  overflow: hidden;
  background: var(--color-placeholder);
}

.photo-video__img-wrap:first-child {
  width: 276px;
  height: 268px;
}

.photo-video__img-wrap--play {
  width: 392px;
  height: 268px;
  position: relative;
}

.photo-video__arrow {
  position: absolute;
  top: 50%;
  left: calc(276 / (276 + 392) * 100% - 30px);
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  z-index: 10;
}

.photo-video__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-btn {
  position: absolute;
  pointer-events: none;
}

.play-btn--gallery {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn--gallery > img:first-child {
  width: 60px;
  height: 60px;
}

.play-btn__arrow {
  position: absolute;
  width: 20px;
  height: 24px;
}

/* Stats */
.stats {
  display: flex;
  justify-content: flex-start;
  padding: 0 var(--content-x);
  margin-bottom: 90px;
  gap: 0;
}

.stat {
  flex: 0 0 auto;
}

.stat:nth-child(1) { width: 210px; }
.stat:nth-child(2) { width: 330px; margin-left: 40px; }
.stat:nth-child(3) { width: 350px; margin-left: 0; }
.stat:nth-child(4) { width: 280px; margin-left: 0; }

.stat__label {
  display: block;
  font-family: var(--font-open);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0;
}

.stat__value {
  display: block;
  font-family: var(--font-open);
  font-size: 42px;
  font-weight: 700;
  line-height: 44px;
  color: var(--color-white);
}

.stat__value--large {
  font-family: var(--font-source);
  font-weight: 700;
}

/* Industry Solutions */
.industry-solutions {
  margin-bottom: 100px;
}

.industry-solutions__title {
  font-family: var(--font-open);
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  color: var(--color-white);
  margin-bottom: 66px;
}

.industry-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.industry-carousel__viewport {
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.industry-carousel__track {
  display: flex;
  align-items: center;
  gap: 36px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0 0 16px;
}

.industry-slide {
  flex: 0 0 346px;
  border-radius: 24px;
  overflow: hidden;
  opacity: 0.45;
  filter: blur(3px);
  transform: scale(0.88);
  transition: opacity 0.5s, filter 0.5s, transform 0.5s;
  cursor: pointer;
  background: var(--color-placeholder);
}

.industry-slide img {
  width: 100%;
  height: 204px;
  object-fit: cover;
  display: block;
}

.industry-slide--active {
  flex: 0 0 435px;
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.industry-slide--active img {
  height: 256px;
}

.industry-carousel__label {
  margin-top: 19px;
  font-family: var(--font-open);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
}

/* News & Stories */
.news {
  padding: 0 var(--content-x);
  margin-bottom: 80px;
}

.news__title {
  font-family: var(--font-open);
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  color: var(--color-white);
  margin-bottom: 45px;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 380px);
  gap: 29px;
  justify-content: start;
}

.news-card__image {
  width: 380px;
  height: 270px;
  border-radius: 19.2px;
  overflow: hidden;
  background: var(--color-placeholder);
  margin-bottom: 24px;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__image--placeholder {
  background: var(--color-placeholder);
}

.news-card__title {
  font-family: var(--font-open);
  font-size: 26px;
  font-weight: 700;
  line-height: 40px;
  color: var(--color-white);
  margin-bottom: 12px;
}

.news-card__desc {
  font-family: var(--font-open);
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  color: var(--color-muted);
}

/* Footer */
.footer {
  display: flex;
  justify-content: center;
  padding-bottom: 120px;
}

.footer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 438px;
  height: 54px;
  background: var(--color-white);
  border-radius: 27px;
  font-family: 'PingFang SC', var(--font-open), sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--color-black);
}

/* ===== Responsive scale ===== */
@media (max-width: 1920px) {
  .hero__phone--left { left: 42.24%; }
  .hero__phone--center { left: 55.1%; }
  .hero__phone--right { left: 69.43%; }
}

@media (max-width: 1400px) {
  :root {
    --content-x: 5%;
  }

  .nav {
    left: auto;
    right: 5%;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 60%;
  }

  .hero__phones {
    opacity: 0.6;
    transform: scale(0.85);
    transform-origin: top right;
  }

  .photo-video {
    flex-direction: column;
    gap: 40px;
  }

  .photo-video__gallery {
    align-self: center;
  }

  .stats {
    flex-wrap: wrap;
    gap: 32px;
  }

  .stat:nth-child(1),
  .stat:nth-child(2),
  .stat:nth-child(3),
  .stat:nth-child(4) {
    width: auto;
    margin-left: 0;
  }

  .news__grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }

  .api-features__card {
    width: calc(100% - 10%);
    grid-template-columns: 1fr 1fr;
    height: auto;
    padding-bottom: 24px;
  }

  .api-features__col:not(:last-child)::after {
    display: none;
  }
}

/* ===== Mobile nav toggle ===== */
.nav-toggle {
  display: none;
  position: absolute;
  top: 28px;
  right: 20px;
  z-index: 20;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 700px;
    padding-bottom: 40px;
  }

  .header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .logo {
    position: static;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    margin-top: 8px;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: rgba(0, 0, 0, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-top: 0;
    max-width: none;
  }

  .nav--open {
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    font-size: 18px;
  }

  .hero__content {
    position: static;
    padding: 20px 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .hero__title {
    font-size: 36px;
    line-height: 1.2;
  }

  .hero__phones {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 340px;
    margin-top: 20px;
    overflow: visible;
  }

  .hero__phone {
    position: relative;
    left: auto !important;
    top: auto !important;
    height: auto;
  }

  .hero__phone--left {
    display: block;
    width: 110px;
    z-index: 1;
    margin-right: -36px;
    transform: rotate(-10deg) translateY(12px);
  }

  .hero__phone--center {
    width: 150px;
    z-index: 3;
    transform: none;
  }

  .hero__phone--right {
    display: block;
    width: 110px;
    z-index: 1;
    margin-left: -36px;
    transform: rotate(10deg) translateY(12px);
  }

  .industry-carousel__viewport {
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  }

  .industry-carousel__track {
    gap: 16px;
  }

  .industry-slide,
  .industry-slide--active {
    flex: 0 0 min(72vw, 300px);
    transform: scale(0.9);
  }

  .industry-slide--active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }

  .industry-slide img,
  .industry-slide--active img {
    width: 100%;
    height: auto;
    aspect-ratio: 435 / 256;
    object-fit: cover;
  }

  .api-features {
    padding-left: 20px;
    padding-right: 20px;
  }

  .api-features__card {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .photo-video {
    padding: 0 20px;
  }

  .photo-video__text {
    width: 100%;
  }

  .photo-video__gallery {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .photo-video__img-wrap:first-child,
  .photo-video__img-wrap--play {
    width: 100%;
    max-width: 392px;
  }

  .photo-video__arrow {
    position: static;
    transform: rotate(90deg);
    margin: 8px 0;
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding: 0 20px;
  }

  .news {
    padding: 0 20px;
  }

  .news__grid {
    max-width: 100%;
  }

  .news-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 380 / 270;
  }

  .industry-solutions__title {
    font-size: 28px;
    margin-bottom: 40px;
    padding: 0 20px;
  }

  .footer {
    padding: 0 20px max(80px, env(safe-area-inset-bottom));
  }

  .footer__cta {
    width: 100%;
    max-width: 358px;
  }
}

/* iPhone 12 Pro — 390 × 844 */
@media (max-width: 390px) {
  .logo__icon {
    width: 72px;
  }

  .logo__text {
    width: 72px;
    margin-top: -24px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 32px;
  }

  .hero__tagline {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .hero__title {
    font-size: 28px;
    margin-bottom: 28px;
  }

  .store-buttons {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 170px;
  }

  .hero__phones {
    height: 280px;
    margin-top: 12px;
  }

  .hero__phone--left,
  .hero__phone--right {
    width: 90px;
    margin-right: -28px;
    margin-left: -28px;
  }

  .hero__phone--center {
    width: 130px;
  }

  .industry-slide,
  .industry-slide--active {
    flex: 0 0 72vw;
  }

  .api-features {
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .api-features__title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .api-features__col {
    padding: 24px 20px 56px;
  }

  .api-features__col-title {
    font-size: 15px;
    line-height: 22px;
  }

  .api-features__col-desc {
    font-size: 14px;
    line-height: 22px;
  }

  .photo-video {
    margin-bottom: 48px;
  }

  .photo-video__title {
    font-size: 26px;
    line-height: 34px;
  }

  .photo-video__desc {
    font-size: 15px;
    line-height: 26px;
  }

  .photo-video__desc br,
  .photo-video__title br,
  .news-card__title br,
  .news-card__desc br {
    display: none;
  }

  .stats {
    margin-bottom: 56px;
  }

  .stat__label {
    font-size: 14px;
  }

  .stat__value {
    font-size: 32px;
    line-height: 36px;
  }

  .industry-solutions {
    margin-bottom: 64px;
  }

  .industry-carousel__label {
    font-size: 20px;
  }

  .news__title {
    font-size: 26px;
    margin-bottom: 32px;
  }

  .news-card__title {
    font-size: 20px;
    line-height: 30px;
  }

  .news-card__desc {
    font-size: 15px;
    line-height: 24px;
  }

  .footer__cta {
    height: 48px;
    font-size: 20px;
    border-radius: 24px;
  }

  .page {
    background-position: center top 800px;
  }
}
