/* ==========================================================================
   Base
   ========================================================================== */

:root {
  --color-blue: #2F4D85;
  --color-blue-dark: #17354D;
  --color-blue-light: #6A88C1;
  --color-blue-mid: #5270A9;
  --color-pink: #C8134C;
  --color-white: #FFF;
  --color-grey-bg: #EEEEF1;
  --color-grey-border: #C9C9C9;
  --color-grey-text: #797979;
  --color-dot: #CECFD0;
  --color-dot-active: #A4B9E3;

  --iglas: linear-gradient(222deg, #2F4D85 -14.1%, #6A88C1 21.5%, #2F4D85 53.2%, #17354D 86.01%);
  --iglas-secondary: linear-gradient(105deg, #5270A9 6.21%, #17354D 77.52%);

  --font-heading: 'Sofia Sans', -apple-system, Roboto, Helvetica, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, Roboto, Helvetica, sans-serif;

  --container-width: 122.8rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px, matches figma px values / 10 */
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--color-blue-dark);
  background: var(--color-white);
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 5rem;
  line-height: 1.03;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
}

.section-title--dark {
  color: var(--color-blue);
}

.section-title--light {
  color: var(--color-white);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25.1rem;
  padding: 1.1rem 2.4rem;
  border-radius: 2.4rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  text-align: center;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.button--pink {
  background: var(--color-pink);
  border: 1px solid #FFFDFD;
  color: var(--color-white);
}

.button--pink:hover {
  opacity: 0.9;
}

.button--outline {
  background: transparent;
  border: 1px solid var(--color-white);
  color: var(--color-white);
}

.button--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding-block: 2rem;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header__logo-icon {
  display: block;
}

.header__nav-list {
  display: flex;
  gap: 4rem;
}

.header__nav-link {
  font-size: 2rem;
  color: var(--color-white);
  transition: opacity 0.2s ease;
}

.header__nav-link:hover {
  opacity: 0.75;
}

.header__burger {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  width: 3rem;
}

.header__burger-line {
  height: 0.2rem;
  background: var(--color-white);
  border-radius: 0.2rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  z-index: 1;
  padding-top: 12rem;
  padding-bottom: 8rem;
  background: var(--iglas);
  overflow: visible;
}

.hero__decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero__title,
.hero__subtitle {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 6rem;
  line-height: 1.03;
  text-transform: uppercase;
  color: var(--color-white);
}

.hero__subtitle {
  margin-top: 4rem;
  margin-bottom: 6rem;
}

.hero__media {
  margin-bottom: -16rem;
}

.hero__device {
  width: 100%;
  display: block;
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  padding-block: 8rem 4rem;
}

.about__text {
  max-width: 122.8rem;
  margin-inline: auto;
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--color-blue-dark);
  text-align: left;
}

.about__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12rem;
  max-width: 122.8rem;
  margin: 5rem auto 0;
}

.about__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 20rem;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  background: var(--color-grey-bg);
  box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
}

.about__stat-icon {
  fill: var(--color-blue);
}

.about__stat-value {
  font-size: 4.8rem;
  font-weight: 500;
  color: var(--color-blue-dark);
  text-transform: uppercase;
  line-height: 1;
}

.about__stat-label {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-blue-dark);
  text-transform: uppercase;
}

/* ==========================================================================
   Workflow ("Как мы работаем")
   ========================================================================== */

.workflow {
  padding-block: 4rem 8rem;
}

.workflow__text {
  max-width: 122.8rem;
  margin-inline: auto;
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--color-blue-dark);
  text-align: left;
  margin-bottom: 6rem;
}

.workflow__scheme {
  position: relative;
  height: 22rem;
  margin-top: 2rem;
}

.workflow__step {
  position: absolute;
  top: 50%;
  padding: 1.4rem 2.8rem;
  border-radius: 2.4rem;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 1.8rem;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.workflow__step--1 { left: 9%;  top: 18%; }
.workflow__step--2 { left: 25%; top: 82%; }
.workflow__step--3 { left: 42%; top: 18%; }
.workflow__step--4 { left: 59%; top: 82%; }
.workflow__step--5 { left: 76%; top: 18%; }
.workflow__step--6 { left: 92%; top: 82%; }

.workflow__connector {
  position: absolute;
  top: 50%;
  width: 5rem;
  height: 5.5rem;
  fill: #9C9B9B;
  stroke: #9C9B9B;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.workflow__connector--c1 { left: 17%; }
.workflow__connector--c2 { left: 33.5%; }
.workflow__connector--c3 { left: 50.5%; }
.workflow__connector--c4 { left: 67.5%; }
.workflow__connector--c5 { left: 84%; }

/* ==========================================================================
   Business ("Для бизнеса и госсектора")
   ========================================================================== */

.business {
  padding-block: 8rem 0;
  background: var(--iglas);
  overflow: visible;
}

.business__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.business__features {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.business__feature {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.business__feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--color-white);
  box-shadow: 0 1rem 2.5rem rgba(23, 53, 77, 0.25);
}

.business__feature-icon {
  fill: var(--color-blue);
  color: var(--color-blue);
}

.business__feature-lead {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.business__feature-text {
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.35;
}

.business__features--left .business__feature-text {
  text-align: right;
}

.business__features--right .business__feature-text {
  text-align: left;
}

.business__media {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: -8rem;
}

.business__device {
  width: 100%;
  max-width: 42rem;
  height: auto;
}

.business__actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding-block: 6rem;
}

/* ==========================================================================
   Advantages
   ========================================================================== */

.advantages {
  padding-block: 8rem;
}

.advantages__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2.5rem;
}

.advantages__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  aspect-ratio: 1;
  padding: 2.8rem 2rem 2rem;
  border-radius: 0.5rem;
  background: var(--color-grey-bg);
  box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
}

.advantages__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.6rem;
}

.advantages__icon {
  fill: var(--color-blue);
}

.advantages__label {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-blue-dark);
  text-align: center;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.portfolio {
  padding-block: 8rem;
  background: var(--iglas);
}

.portfolio__slider {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.portfolio__slider img,
.demo__devices img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.portfolio__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44rem;
  flex-shrink: 0;
  aspect-ratio: 702 / 467;
  overflow: visible;
  background: transparent;
  z-index: 2;
}

.portfolio__side {
  position: relative;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  width: 31.5rem;
  aspect-ratio: 502 / 373;
  border: 1px solid #CDCDCD;
  border-radius: 0.6rem;
}

.portfolio__side--left {
  margin-right: -3rem;
}

.portfolio__side--right {
  margin-left: -3rem;
}

.portfolio__side-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio__content {
  position: absolute;
  left: 14.25%;
  top: 4.07%;
  width: 71.5%;
  height: 79.9%;
  object-fit: cover;
  border-radius: 0.3rem;
}

.portfolio__device-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.portfolio__dots {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 4rem;
}

.portfolio__dot {
  width: 1.2rem;
  height: 1.2rem;
  background: var(--color-dot);
  cursor: pointer;
  transition: background 0.2s ease;
}

.portfolio__dot--active {
  background: var(--color-dot-active);
}

/* ==========================================================================
   Demo stand
   ========================================================================== */

.demo {
  padding-block: 8rem;
  text-align: center;
}

.demo__devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 4rem;
  user-select: none;
}

.demo__devices > *:nth-child(2) {
  margin-left: -3rem;
}

.demo__devices > *:nth-child(3) {
  margin-left: -1rem;
}

.demo__devices > *:nth-child(4) {
  margin-left: -1rem;
}

.demo__devices > *:nth-child(5) {
  margin-left: -3rem;
}

.demo__device {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #CDCDCD;
  border-radius: 1.2rem;
}

.demo__device-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* статичная рамка телефона - лежит поверх контента и никогда не подменяется */
.demo__device-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.demo__device--phone {
  width: 23.3rem;
  aspect-ratio: 233 / 428;
}

.demo__device--tablet {
  width: 23.6rem;
  aspect-ratio: 236 / 427;
  z-index: 1;
}

.demo__device--main {
  width: 30.1rem;
  aspect-ratio: 301 / 466;
  z-index: 2;
  border: none;
}

.demo__dots {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 4rem;
}

.demo__dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--color-dot);
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo__dot--active {
  background: var(--color-blue);
}

/* ==========================================================================
   Contacts
   ========================================================================== */

.contacts {
  padding-block: 8rem;
  background: var(--color-grey-bg);
}

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.7rem;
  max-width: 120.4rem;
  margin-inline: auto;
}

.contacts__form,
.contacts__info {
  padding: 4rem;
  border-radius: 0.5rem;
  background: var(--color-white);
  box-shadow: 0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);
}

.contacts__form-title,
.contacts__info-title {
  font-family: var(--font-body);
  font-size: 2.4rem;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-blue-dark);
  margin-bottom: 3rem;
}

.contacts__field {
  margin-bottom: 1.5rem;
}

.contacts__row {
  display: flex;
  gap: 1.5rem;
}

.contacts__field--half {
  flex: 1;
  margin-bottom: 1.5rem;
}

.contacts__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: var(--color-grey-text);
}

.contacts__input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid var(--color-grey-border);
  border-radius: 0.5rem;
  background: var(--color-white);
  font: inherit;
  font-size: 1.6rem;
  color: var(--color-blue-dark);
}

.contacts__input:focus {
  outline: none;
  border-color: var(--color-blue);
}

.contacts__input--textarea {
  min-height: 10.6rem;
  resize: vertical;
}

.contacts__submit {
  display: flex;
  margin-inline: auto;
  margin-top: 2rem;
}

.contacts__info-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contacts__info-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.contacts__info-icon {
  flex-shrink: 0;
  fill: var(--color-blue);
}

.contacts__info-value {
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-blue-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1440px) {
  :root {
    --container-width: 90%;
  }

  .hero__title,
  .hero__subtitle {
    font-size: 4.6rem;
  }

  .section-title {
    font-size: 4rem;
  }

  .demo__device--phone {
    width: 17.5rem;
  }

  .demo__device--tablet {
    width: 17.7rem;
  }

  .demo__device--main {
    width: 22.6rem;
  }

  .demo__devices > *:nth-child(2) {
    margin-left: -2.3rem;
  }

  .demo__devices > *:nth-child(3) {
    margin-left: -0.8rem;
  }

  .demo__devices > *:nth-child(4) {
    margin-left: -0.8rem;
  }

  .demo__devices > *:nth-child(5) {
    margin-left: -2.3rem;
  }
}

@media (max-width: 1024px) {
  .header__nav-list {
    gap: 2rem;
  }

  .hero {
    padding-top: 10rem;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__button {
    margin-inline: auto;
  }

  .about__stats {
    gap: 5rem;
  }

  .advantages__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 2rem;
    column-gap: 2.5rem;
  }

  .business__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .business__features {
    gap: 3rem;
  }

  .business__feature {
    flex-direction: column;
    align-items: center;
  }

  .business__feature-badge {
    margin-inline: auto;
  }

  .business__features--left .business__feature-text,
  .business__features--right .business__feature-text {
    text-align: center;
  }

  .business__media {
    order: -1;
    margin: 0 auto 2rem;
  }

  .contacts__grid {
    grid-template-columns: 1fr;
    max-width: 60rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 56%;
  }

  .header {
    padding-block: 1.5rem;
  }

  .header__nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--color-blue-dark);
    padding: 10rem 3rem 3rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 20;
  }

  .header.is-open .header__nav {
    transform: translateX(0);
  }

  .header__nav-list {
    flex-direction: column;
    gap: 2.5rem;
  }

  .header__burger {
    display: flex;
    z-index: 30;
  }

  .hero__title,
  .hero__subtitle {
    font-size: 3.4rem;
  }

  .workflow__scheme {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
  }

  .workflow__step {
    position: static;
    left: auto;
    top: auto;
    transform: none;
  }

  .workflow__step:not(.workflow__step--6) {
    position: relative;
    left: auto;
    top: auto;
  }

  .workflow__step:not(.workflow__step--6)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 0;
    height: 3rem;
    border-left: 0.2rem solid #9C9B9B;
    transform: translateX(-50%);
  }

  .workflow__connector {
    display: none;
  }

  .about__stats {
    gap: 3rem;
  }

  .advantages__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .demo__devices {
    flex-wrap: wrap;
  }

  .demo__device--tablet {
    display: none;
  }

  .business__badge {
    position: static;
    display: inline-block;
    margin: 0.4rem;
  }

  .business__media {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 3rem;
  }

  .advantages__list {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .about__stats {
    gap: 2rem;
  }

  .about__stat {
    width: 14rem;
  }

  .contacts__row {
    flex-direction: column;
  }

  .business__actions {
    flex-direction: column;
    align-items: center;
  }

  .button {
    min-width: 20rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--color-blue-dark);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem 4rem;
  padding-block: 4rem;
}

.footer__logo-icon {
  display: block;
}

.footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer__nav-link {
  font-size: 1.7rem;
  color: var(--color-white);
  transition: opacity 0.2s ease;
}

.footer__nav-link:hover {
  opacity: 0.75;
}

.footer__social {
  display: flex;
  gap: 1.2rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: background 0.2s ease;
}

.footer__social-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.footer__bottom {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 2rem;
  padding-top: 3rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__policy {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  transition: color 0.2s ease;
}

.footer__policy:hover {
  color: var(--color-white);
}

@media (max-width: 1024px) {
  .footer__inner {
    justify-content: center;
    text-align: center;
  }

  .footer__nav-list {
    justify-content: center;
  }
}
