:root {
  --bg: #0b0f1a;
  --bg-soft: #10172a;
  --surface: #121d33;
  --surface-2: #182746;
  --text: #f4f7ff;
  --muted: #adb8d4;
  --accent: #4f7cff;
  --accent-2: #3d63d4;
  --border: #243455;
  --stroke: 0.5px;
  --ok: #5fe0a1;
  --error: #ff7d7d;
  --header-height: 84px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 85% 0%, #1f335f 0%, var(--bg) 34%);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.logo__text,
.eyebrow {
  font-family: "Unbounded", "Manrope", sans-serif;
  font-weight: 900;
}

h1 {
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  letter-spacing: 0;
  margin-bottom: 28px;
}

.container {
  width: min(100% - 36px, 1200px);
  margin-inline: auto;
}

.section {
  padding: 116px 0;
}

.section--alt {
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.16) 0%, rgba(46, 78, 164, 0.12) 38%, rgba(13, 20, 38, 0.28) 100%);
}

.lead {
  color: var(--muted);
  max-width: 780px;
  font-size: 1.08rem;
  margin-bottom: 36px;
}

.about__text {
  color: #cad5ee;
  max-width: 560px;
  font-size: 1.02rem;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
  background: rgba(11, 15, 26, 0.84);
  border-bottom: var(--stroke) solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.header__inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo__mark {
  width: 40px;
  aspect-ratio: 1;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.86rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6e8eff);
}

.logo__text {
  font-weight: 900;
  font-size: 1.05rem;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav__link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--text);
}

.btn {
  min-height: 48px;
  padding: 0 24px;
  border: var(--stroke) solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(79, 124, 255, 0.25);
}

.btn--small {
  min-height: 40px;
  padding: 0 16px;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: var(--stroke) solid var(--border);
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  padding-top: 140px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --hero-parallax-x: 0px;
  --hero-parallax-y: 0px;
  --hero-scroll-y: 0px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/hero-generated-tech.jpg");
  background-size: cover;
  background-position: right center;
  opacity: 0.72;
  z-index: -2;
  transform: translate3d(var(--hero-parallax-x), calc(var(--hero-parallax-y) + var(--hero-scroll-y)), 0) scale(1.08);
  transform-origin: center center;
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(6, 11, 21, 0.9) 0%, rgba(8, 14, 26, 0.78) 36%, rgba(8, 14, 26, 0.42) 66%, rgba(8, 14, 26, 0.34) 100%);
  z-index: -1;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    transform: none;
  }
}

#works {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --works-parallax-x: 0px;
  --works-parallax-y: 0px;
  --works-scroll-y: 0px;
}

#works::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/works-generated-tech.jpg");
  background-size: cover;
  background-position: right center;
  opacity: 0.52;
  z-index: -2;
  transform: translate3d(var(--works-parallax-x), calc(var(--works-parallax-y) + var(--works-scroll-y)), 0) scale(1.06);
  transform-origin: center center;
  will-change: transform;
}

#works::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(7, 12, 24, 0.86) 0%, rgba(8, 14, 26, 0.68) 38%, rgba(8, 14, 26, 0.48) 72%, rgba(8, 14, 26, 0.52) 100%);
  z-index: -1;
}

#works .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  #works::before {
    transform: none;
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 30px;
  min-height: 560px;
}

.hero__content {
  max-width: 760px;
}

.eyebrow {
  color: #8da9ff;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0;
}

.hero__description {
  margin-top: 24px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.stat-card {
  border: var(--stroke) solid var(--border);
  background: #101a30;
  padding: 36px 30px;
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 18px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.stat-card::before,
.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.stat-card::before {
  background-image: var(--stat-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.52;
  transform: scale(1.02);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.stat-card::after {
  background: linear-gradient(100deg, rgba(8, 13, 25, 0.94) 0%, rgba(9, 15, 29, 0.78) 48%, rgba(9, 15, 29, 0.42) 100%);
  z-index: -1;
}

.stat-card--websites {
  --stat-bg: url("images/stats/websites-bg.png");
}

.stat-card--ecommerce {
  --stat-bg: url("images/stats/ecommerce-bg.png");
}

.stat-card--services {
  --stat-bg: url("images/stats/services-bg.png");
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: #5a7eea;
}

.stat-card:hover::before {
  opacity: 0.66;
  transform: scale(1.07);
}

.stat-card__icon {
  width: 58px;
  height: 58px;
  border: var(--stroke) solid #3c5ba9;
  color: #8eacff;
  display: inline-grid;
  place-items: center;
}

.stat-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card h3 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 900;
}

.stat-card p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 340px;
}

.section__head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.carousel-controls {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  width: 42px;
  aspect-ratio: 1;
  border: var(--stroke) solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.carousel-btn:disabled {
  cursor: not-allowed;
}

.works-viewport {
  overflow: hidden;
  padding: 16px 0;
}

.works-track {
  display: flex;
  gap: 18px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.work-card {
  flex: 0 0 calc((100% - 36px) / 3);
  border: var(--stroke) solid var(--border);
  padding: 0;
  background: linear-gradient(170deg, #1a2f5c 0%, #132343 48%, #0e172b 100%);
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, border-color 0.24s ease;
  transform-origin: center center;
  overflow: hidden;
}

.work-card:hover {
  transform: scale(1.04);
  border-color: #5e83f2;
  z-index: 3;
}

.work-card__image {
  width: 100%;
  height: 198px;
  object-fit: cover;
  border: 0;
  display: block;
}

.work-card__body {
  display: grid;
  gap: 12px;
  padding: 16px;
  flex: 1;
}

.work-card h3 {
  font-size: 1.12rem;
  font-weight: 900;
}

.work-card p {
  color: var(--muted);
}

.work-card__tech {
  font-size: 0.94rem;
}

.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(340px, 1fr));
  gap: 22px;
  min-width: 0;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.team-card {
  border: var(--stroke) solid var(--border);
  padding: 34px 30px;
  min-height: 300px;
  display: grid;
  align-content: start;
  gap: 20px;
  background: linear-gradient(160deg, #203a71 0%, #162a52 52%, #101a30 100%);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.65);
}

.team-card--violet {
  background: linear-gradient(155deg, #8447ff 0%, #4c3de1 48%, #243e8f 100%);
}

.team-card--blue {
  background: linear-gradient(155deg, #22a8ff 0%, #2e6dff 50%, #2440ae 100%);
}

.team-card--orange {
  background: linear-gradient(155deg, #ff9a45 0%, #ff6e4a 46%, #c74378 100%);
}

.team-card__number {
  width: 44px;
  height: 44px;
  border: var(--stroke) solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 700;
  font-size: 0.96rem;
  display: inline-grid;
  place-items: center;
}

.team-card h3 {
  font-size: 1.44rem;
  font-weight: 900;
  color: #fff;
}

.team-card p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 320px;
}

.contact-form {
  border: var(--stroke) solid var(--border);
  padding: 28px;
  background: linear-gradient(165deg, #1e3565 0%, #16284d 52%, #101b32 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  border: var(--stroke) solid var(--border);
  background: #0d1525;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  outline: 0;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field.error input,
.field.error textarea {
  border-color: var(--error);
}

.field--full {
  grid-column: 1 / -1;
}

.form-message {
  min-height: 22px;
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
}

.form-message.is-error {
  color: var(--error);
}

.form-message.is-ok {
  color: var(--ok);
}

.footer {
  border-top: var(--stroke) solid rgba(255, 255, 255, 0.1);
  margin-top: 48px;
}

.footer__grid {
  padding: 58px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 26px;
}

.footer__text {
  margin-top: 12px;
  color: var(--muted);
  max-width: 420px;
}

.footer__menu {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer__menu a {
  color: var(--muted);
}

.footer__menu a:hover {
  color: var(--text);
}

.footer__bottom {
  border-top: var(--stroke) solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .section {
    padding: 94px 0;
  }

  .hero {
    padding-top: 120px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    flex-basis: calc((100% - 18px) / 2);
  }

  .stats,
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .team {
    margin-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 860px) {
  .header .btn--small {
    display: none;
  }

  .burger {
    display: block;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    padding: 16px;
    display: grid;
    gap: 12px;
    background: rgba(11, 15, 26, 0.98);
    border-bottom: var(--stroke) solid var(--border);
    transform: translateY(-125%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .contact-form,
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .section {
    padding: 76px 0;
  }

  .hero {
    padding-top: 102px;
  }

  .hero__grid {
    min-height: 520px;
  }

  h1 {
    font-size: clamp(1.85rem, 9.2vw, 2.45rem);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(1.55rem, 7.2vw, 2rem);
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  .btn {
    width: 100%;
  }

  .hero__actions {
    width: 100%;
  }

  .stats,
  .team {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 0;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "icon number"
      "icon label";
    align-content: center;
    align-items: center;
    column-gap: 16px;
    row-gap: 4px;
    padding: 22px 18px;
  }

  .stat-card::after {
    background: linear-gradient(95deg, rgba(8, 13, 25, 0.94) 0%, rgba(9, 15, 29, 0.76) 58%, rgba(9, 15, 29, 0.52) 100%);
  }

  .stat-card__icon {
    grid-area: icon;
  }

  .stat-card h3 {
    grid-area: number;
    font-size: 2rem;
  }

  .stat-card p {
    grid-area: label;
    min-width: 0;
    font-size: 0.95rem;
  }

  .section__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-controls {
    margin-top: -8px;
  }

  .work-card {
    flex-basis: 100%;
  }
}
