/* ==================== MAIN LAYOUT & SECTIONS ==================== */

/* Header */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: 18px 0;
  transition: padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.header--scrolled {
  padding: 9px 0;
  background-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo__text {
  font-weight: var(--font-extrabold);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: font-size 0.25s ease;
}

.logo__icon {
  flex: 0 0 auto;
  transition: width 0.25s ease, height 0.25s ease;
}

.header--scrolled .logo__text {
  font-size: 1.08rem;
}

.header--scrolled .logo__icon {
  width: 32px;
  height: 32px;
}

.nav__mobile-head,
.nav__mobile-cta {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 36px;
  transition: gap 0.25s ease;
}

.header--scrolled .nav__list {
  gap: 26px;
}

.nav__link {
  font-weight: var(--font-bold);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 32px;
  height: 32px;
  justify-content: center;
  padding: 4px;
}

.burger span {
  width: 100%;
  height: 2px;
  background-color: var(--accent-black);
  transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 660px;
  padding: 100px 0 60px;
  overflow: hidden;
}

.hero__network {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  opacity: 0.72;
  mask-image: linear-gradient(to bottom, #000 8%, #000 76%, transparent 100%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: min(56vw, 760px);
  aspect-ratio: 1;
  top: 42%;
  right: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 17, 17, 0.055), transparent 68%);
  transform: translateY(-50%);
}

.hero__container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero__title {
  position: relative;
  z-index: 2;
  font-size: var(--h1-size);
  font-weight: var(--font-extrabold);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  max-width: 760px;
}

.btn--hero {
  padding: 20px 40px;
  font-size: 1rem;
}

.hero__graphic {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__picture {
  display: block;
  width: 100%;
  max-width: 480px;
}

.hero__ai-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.04));
}

/* Services Section */
.services__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.services,
.expertise {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.services > .container,
.expertise > .container {
  position: relative;
  z-index: 1;
}

.section-network {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.38;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

.services .card,
.expertise .card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
}

/* AI Systems Section */
.ai-systems__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

/* Why Us Section */
.why-us__container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: center;
}

.why-us__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.why-us__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.why-us__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
}

.why-us__text {
  font-size: 0.8125rem;
  font-weight: var(--font-bold);
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.why-us__radar {
  position: relative;
  width: 300px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 17, 17, 0.035), transparent 66%);
}

.why-us__radar canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.why-us__radar-core {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 7px rgba(17, 17, 17, 0.04);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .why-us__radar canvas {
    animation: none;
  }
}

/* Statistics Section */
.chart-container {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 32px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

#growthChart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 380px;
}

/* Expertise Section */
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* CTA Banner */
.cta {
  background-color: var(--accent-black);
  color: var(--accent-white);
  border-radius: 24px;
  margin: 60px 0 80px;
}

.cta__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 64px 80px;
}

.cta__title {
  font-size: 2.75rem;
  font-weight: var(--font-extrabold);
  letter-spacing: -0.02em;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 80px 0 60px;
  background-color: #FFFFFF;
}

.footer__container {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr) 1.2fr;
  gap: 40px;
}

.footer__tagline {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 0.9375rem;
  font-weight: var(--font-regular);
  max-width: 260px;
}

.footer__heading {
  font-size: 0.8125rem;
  font-weight: var(--font-bold);
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer__list a {
  transition: color var(--transition-fast);
}

.footer__list a:hover {
  color: var(--accent-black);
}

.footer__link-button {
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.footer__link-button:hover {
  color: var(--accent-black);
}

.footer__socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */

@media (max-width: 1200px) {
  :root {
    --h1-size: 3.75rem; /* ~60px */
    --h2-size: 2.25rem; /* ~36px */
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ai-systems__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .expertise__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-us__list {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 768px) {
  :root {
    --h1-size: var(--h1-mobile);
    --h2-size: var(--h2-mobile);
    --section-padding-desktop: var(--section-padding-mobile);
  }

  .nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: min(88vw, 390px);
    height: 100dvh;
    background-color: #FFFFFF;
    padding: 24px 24px 28px;
    z-index: 98;
    border-right: 1px solid var(--border-color);
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.1);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  }

  .nav.nav--active {
    transform: translateX(0);
    visibility: visible;
  }

  .nav::after {
    content: "";
    position: fixed;
    inset: 0 0 0 min(88vw, 390px);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(4px);
  }

  .nav__mobile-head {
    display: flex;
    justify-content: space-between;
    padding: 2px 52px 22px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.65rem;
    font-weight: var(--font-bold);
    letter-spacing: 0.08em;
    color: var(--text-secondary);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 18px;
    counter-reset: menu;
  }

  .nav__item {
    counter-increment: menu;
    border-bottom: 1px solid var(--border-color);
  }

  .nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    letter-spacing: -0.03em;
  }

  .nav__link::after {
    content: "0" counter(menu);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
  }

  .nav__mobile-cta {
    display: inline-flex;
    width: 100%;
    margin-top: auto;
  }

  .burger {
    display: flex;
    position: relative;
    z-index: 101;
    width: 44px;
    height: 44px;
    padding: 10px;
  }

  .burger.burger--active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger.burger--active span:nth-child(2) {
    opacity: 0;
  }

  .burger.burger--active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .service-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    padding: 20px 24px;
  }

  .footer__list a,
  .footer__link-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .service-card__icon-wrapper {
    margin-bottom: 0;
    width: 32px;
    height: 32px;
  }

  .service-card__icon-wrapper svg {
    width: 32px;
    height: 32px;
  }

  .service-card__arrow {
    display: block;
  }

  .ai-systems__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-us__container {
    grid-template-columns: 1fr;
  }

  .why-us__radar {
    display: none;
  }

  .why-us__list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .cta__container {
    flex-direction: column;
    text-align: center;
    gap: 32px;
    padding: 40px 24px;
  }

  .cta__title {
    font-size: 1.875rem;
  }

  .footer__container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Mobile refinement */
@media (max-width: 768px) {
  .header {
    padding: 12px 0;
  }

  .header__actions > .btn {
    display: none;
  }

  .logo {
    gap: 9px;
  }

  .logo__icon {
    width: 24px;
    height: 24px;
  }

  .logo__text {
    font-size: 0.94rem;
  }

  .hero {
    min-height: 690px;
    padding: 64px 0 28px;
  }

  .hero__network {
    opacity: 0.58;
    mask-image: linear-gradient(to bottom, #000, #000 84%, transparent);
  }

  .hero__container {
    gap: 20px;
  }

  .hero__title {
    max-width: 350px;
    margin-bottom: 30px;
    line-height: 1.02;
  }

  .btn--hero {
    width: 100%;
    padding: 16px 18px;
    font-size: 0.76rem;
  }

  .hero__graphic {
    min-height: 260px;
    justify-content: flex-end;
  }

  .hero__picture {
    width: min(92%, 370px);
    margin-right: -16%;
  }

  .service-card {
    gap: 16px;
  }

  .service-card__icon-wrapper img {
    width: 32px;
    height: 32px;
  }

  .service-card__title {
    flex: 1;
    font-size: 0.82rem;
  }

  .why-us__radar {
    display: block;
    width: min(78vw, 280px);
    margin: 12px auto -24px;
  }

  .why-us__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 18px;
  }

  .why-us__item:last-child {
    grid-column: 1 / -1;
  }

  .why-us__text {
    font-size: 0.72rem;
  }

  .expertise__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .expertise-card {
    min-height: 142px;
    padding: 22px 12px;
  }

  .expertise-card__title {
    font-size: 0.69rem;
  }

  .chart-container {
    padding: 18px 4px 10px;
  }

  #growthChart {
    height: 280px;
  }

  .footer {
    padding: 56px 0 36px;
  }

  .footer__socials {
    flex-direction: row;
  }

  .btn-social {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .ai-card {
    min-height: 118px;
    padding: 22px 10px;
  }

  .ai-card__logo,
  .ai-card__logo img {
    width: 38px;
    height: 38px;
  }

  .ai-card__name {
    font-size: 0.75rem;
  }

  .cta {
    margin: 32px 14px 56px;
    border-radius: 18px;
  }

  .cta__container {
    padding: 34px 18px;
  }
}
