.hero {
  min-height: clamp(720px, calc(100svh - 82px), 960px);
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: clamp(40px, 6vw, 110px);
  width: 100%;
  padding: clamp(72px, 8vw, 120px) clamp(24px, 7vw, 110px);
  background:
    radial-gradient(circle at 78% 43%, rgba(31, 119, 112, 0.34), transparent 28%),
    radial-gradient(circle at 16% 18%, rgba(211, 169, 75, 0.1), transparent 24%),
    linear-gradient(135deg, #07110f 0%, #061816 58%, #07110f 100%);
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(211, 169, 75, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(211, 169, 75, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
  content: "";
  pointer-events: none;
}

.hero-visual {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: min(100%, 470px);
  padding: 54px 46px 44px;
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  inset: 8% 0;
  border: 1px solid rgba(211, 169, 75, 0.22);
  border-radius: 50%;
  content: "";
  transform: rotate(-8deg);
}

.hero-visual::after {
  inset: 15% 4%;
  border-color: rgba(31, 119, 112, 0.48);
  transform: rotate(12deg);
}

.hero-phone {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: min(100%, 350px);
  margin: 0 auto;
  border: 5px solid rgba(211, 169, 75, 0.82);
  border-radius: 34px;
  background: #030807;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.58), 0 0 70px rgba(31, 119, 112, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-screenshot {
  width: 100%;
  height: auto;
}

.hero-status,
.hero-visual-note {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(211, 169, 75, 0.42);
  color: #d9c68f;
  background: rgba(5, 15, 13, 0.92);
  font: 700 0.62rem/1 "Courier New", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.hero-status {
  top: 28px;
  right: 0;
  padding: 12px 14px;
}

.hero-visual-note {
  right: 4px;
  bottom: 21px;
  display: grid;
  gap: 5px;
  min-width: 178px;
  padding: 14px 16px;
}

.hero-visual-note b { color: #f0e6c7; }
.hero-visual-note span { color: #718f86; font-size: 0.54rem; }

.hero-shade {
  z-index: 0;
  background: linear-gradient(90deg, rgba(3, 9, 9, 0.3), transparent 58%), linear-gradient(0deg, rgba(3, 9, 9, 0.4), transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  max-width: 820px;
  padding: 0;
}

.hero h1 {
  font-size: clamp(4.8rem, 8.6vw, 9.2rem);
}

.gallery header {
  gap: 50px;
}

.gallery header > div > p {
  margin: 0 0 16px;
}

.gallery-intro {
  max-width: 440px !important;
  margin: 0 !important;
  color: #5d675e !important;
  font: 400 1rem/1.65 "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.gallery-intro span {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 11px;
  border: 1px solid #a99a72;
  color: #6f6447;
  font: 700 0.66rem/1 "Courier New", monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: start;
}

.gallery figure,
.gallery figure:first-child {
  position: relative;
  flex: 0 1 calc((100% - 90px) / 4);
  width: calc((100% - 90px) / 4);
  max-width: 390px;
  padding: 11px;
  border: 1px solid #25423d;
  border-radius: 28px;
  background: linear-gradient(145deg, #0c1a17, #050b0a);
  box-shadow: 0 25px 70px rgba(9, 25, 22, 0.2);
}

.gallery figure a {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 19px;
  background: #050a09;
}

.gallery figure a::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  box-shadow: inset 0 0 45px rgba(1, 7, 6, 0.2);
  content: "";
  pointer-events: none;
}

.gallery img {
  width: 100%;
  max-width: 390px;
  height: auto;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery figure a:hover img {
  transform: scale(1.015);
}

.gallery figcaption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  min-height: 55px;
  padding: 17px 8px 6px;
}

.gallery figcaption span {
  color: #72837c;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 88px 22px 72px;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-visual {
    grid-column: 1;
    grid-row: 2;
    width: min(92vw, 460px);
    padding: 46px 38px 40px;
  }

  .hero-phone {
    width: min(76vw, 350px);
  }

  .gallery figure,
  .gallery figure:first-child {
    flex-basis: calc((100% - 30px) / 2);
    width: calc((100% - 30px) / 2);
  }

  .gallery header {
    gap: 25px;
  }
}

@media (max-width: 1300px) and (min-width: 901px) {
  .gallery figure,
  .gallery figure:first-child {
    flex-basis: calc((100% - 60px) / 3);
    width: calc((100% - 60px) / 3);
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 64px;
  }

  .hero h1 {
    margin-block: 18px 24px;
    font-size: clamp(3.8rem, 19vw, 5.4rem);
  }

  .hero-copy > p:not(:first-child) {
    font-size: 0.98rem;
  }

  .hero-copy > div {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-copy a {
    text-align: center;
  }

  .hero-visual {
    padding-inline: 24px;
  }

  .hero-status {
    right: 4px;
  }

  .hero-visual-note {
    right: 0;
  }

  .gallery figure,
  .gallery figure:first-child {
    flex-basis: 100%;
    width: 100%;
  }
}
