/* 
  =========================================
  DESIGN SYSTEM & VARIABLES
  =========================================
  CHANGE_FONT_HERE: 'Space Grotesk' is used as primary font.
  COLOR SCHEME: Dark Tech / Cyan & Violet
*/

:root {
  --bg-color: #0a0e1a;
  --bg-card: #151b2d;
  --primary: #00e5ff;
  --primary-hover: #00b8cc;
  --secondary: #7c4dff;
  --secondary-hover: #6a3de8;
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --white: #ffffff;
  --error: #ff5252;
  --success: #4caf50;

  --overlay: rgba(10, 14, 26, 0.85);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

  --container-width: 1200px;
  --header-height: 80px;
  --radius: 1.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button,
input,
textarea {
  font: inherit;
  border: none;
  outline: none;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section__title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

/* Animations & UI Utils */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--bg-color);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3);
}

.btn--outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background-color: rgba(0, 229, 255, 0.1);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ===================== HEADER ===================== */
.header {
  height: var(--header-height);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.nav__menu {
  display: flex;
  gap: 2.5rem;
}

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

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  width: 30px;
}

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

/* ===================== HERO ===================== */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at 70% 30%, rgba(124, 77, 255, 0.1), transparent 40%);
}

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

.hero__badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--primary);
  border-radius: 5px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero__cta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--secondary);
  font-weight: 500;
}

.hero__visual {
  position: relative;
}

.hero__shapes {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero__circle--1 {
  width: 100%;
  height: 100%;
  animation: spin 20s linear infinite;
  border-top-color: var(--primary);
}

.hero__circle--2 {
  width: 80%;
  height: 80%;
  animation: spin 15s linear infinite reverse;
  border-bottom-color: var(--secondary);
}

.hero__circle--3 {
  width: 60%;
  height: 60%;
}

.hero__code-block {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transform: rotate(-10deg);
  font-family: monospace;
}

.hero__code-line {
  display: block;
  color: var(--text-muted);
}

.hero__code-accent {
  color: var(--primary);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ===================== ABOUT ===================== */
.about {
  padding: 8rem 0;
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-10px);
}

.feature-card__icon {
  margin-bottom: 1.5rem;
}

.feature-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.feature-card__text {
  color: var(--text-muted);
}

/* ===================== SERVICES (MASONRY) ===================== */
.services {
  padding: 8rem 0;
  background-color: rgba(255, 255, 255, 0.02);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 1.5rem;
}

.service-card {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  height: 100%;
}

.service-card--tall {
  grid-row: span 2;
}

.service-card:hover {
  background-color: #1a2238;
  border-color: var(--primary);
  transform: translateY(-5px);
}

.service-card__icon {
  margin-bottom: 1.5rem;
  display: flex;
}

.service-card__title {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.service-card__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.service-card__link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.service-card__link:hover {
  gap: 0.75rem;
}

/* ===================== REVIEWS ===================== */
.reviews {
  padding: 8rem 0;
}

.reviews__slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.review-card {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.review-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.review-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  /* Placeholder blur effect */
  background-color: #2a2f3e;
  filter: blur(0);
}

.review-card__avatar.lazy {
  filter: blur(10px);
}

.review-card__name {
  font-size: 1.125rem;
  color: var(--white);
}

.review-card__role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.review-card__stars {
  color: #fbc02d;
  margin-bottom: 1rem;
}

.review-card__text {
  font-style: italic;
}

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

.reviews__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.reviews__dots {
  display: flex;
  gap: 0.5rem;
}

.reviews__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
}

.reviews__dot--active {
  background: var(--primary);
  width: 24px;
  border-radius: 50px;
}

/* ===================== CONTACT ===================== */
.contact {
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg-color), rgba(124, 77, 255, 0.05));
}

.contact__wrapper {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-card);
  padding: 3.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group--checkbox {
  grid-column: span 2;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.form-group:nth-child(4),
.form-group:nth-child(5) {
  grid-column: span 2;
}

.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--white);
}

.form-input {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  color: var(--white);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.06);
}

.form-textarea {
  resize: vertical;
}

.form-error {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 1rem;
}

.form-status {
  grid-column: span 2;
  text-align: center;
  margin-top: 1rem;
}

.form-status.success {
  color: var(--success);
}

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

.captcha-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.form-input--captcha {
  width: 120px;
  text-align: center;
}

.btn--submit {
  width: 100%;
  grid-column: span 2;
  padding: 1rem;
  font-size: 1.125rem;
  margin-top: 1rem;
}

.btn__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(10, 14, 26, 0.3);
  border-top-color: var(--bg-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submitting .btn__text {
  display: none;
}

.submitting .btn__spinner {
  display: block;
}

/* ===================== FOOTER ===================== */
.footer {
  padding: 6rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer__heading {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer__list--contacts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer__bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===================== COOKIES & MODALS ===================== */
.cookie-popup {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  max-width: 500px;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--primary);
  box-shadow: var(--shadow);
  z-index: 2000;
  display: none;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-popup__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-popup__actions {
  display: flex;
  gap: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--overlay);
  backdrop-filter: blur(5px);
}

.modal__content {
  position: relative;
  background-color: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  z-index: 1;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
  background: transparent;
  width: 30px;
  height: 30px;
  line-height: normal;
}

.modal__close:hover {
  color: var(--primary);
}

.modal__title {
  margin-bottom: 2rem;
  color: var(--white);
  text-align: left;
}

.modal__body h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--primary);
}

.modal__body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ===================== MOBILE ADAPTIVE ===================== */
@media (max-width: 1100px) {
  .hero__title {
    font-size: 3rem;
  }
}

@media (max-width: 1024px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 6rem 3rem;
    transition: 0.5s;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav__menu.active {
    right: 0;
  }

  .burger {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

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

  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero__content {
    order: 2;
  }

  .hero__visual {
    order: 1;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta {
    justify-content: center;
  }

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

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

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

@media (max-width: 768px) {
  .section__title {
    font-size: 2rem;
  }

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

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

  .service-card--tall {
    grid-row: auto;
  }

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

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

  .form-group:nth-child(n) {
    grid-column: span 1;
  }

  .contact__wrapper {
    padding: 2rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .modal__content {
    padding: 2rem;
  }
}