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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #0a0a0f;
  color: #f0f0f5;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn--primary {
  background: linear-gradient(135deg, #6c63ff, #7b73ff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
  position: relative;
  isolation: isolate;
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7b73ff, #8b83ff);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6c63ff, #a78bfa);
  z-index: -1;
  opacity: 0;
  filter: blur(14px);
  transition: opacity 0.3s ease;
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(108, 99, 255, 0.5);
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--primary:hover::after {
  opacity: 0.4;
}

.btn--primary > * {
  position: relative;
  z-index: 1;
}

.btn--full {
  width: 100%;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.5rem 0;
  box-shadow: 0 1px 0 rgba(108, 99, 255, 0.1);
}

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

.header__logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  z-index: 1;
}

.header__logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(18, 18, 26, 0.8);
  border: 1px solid rgba(108, 99, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.header__logo:hover .header__logo-wrapper {
  border-color: rgba(108, 99, 255, 0.35);
  box-shadow: 0 0 20px rgba(108, 99, 255, 0.1);
}

.header__logo-img {
  max-height: 50px;
  width: auto;
  display: block;
}

.header__logo-fallback {
  display: none;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6c63ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  padding: 0 4px;
}

/* ===== Navigation ===== */
.nav__list {
  display: flex;
  gap: 2.5rem;
}

.nav__link {
  position: relative;
  font-weight: 500;
  color: #a0a0b8;
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #6c63ff;
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: #fff;
}

.nav__link:hover::after {
  width: 100%;
}

/* ===== Burger ===== */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.burger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: #f0f0f5;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(108, 99, 255, 0.15), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(108, 99, 255, 0.06), transparent),
    radial-gradient(ellipse 40% 30% at 20% 60%, rgba(167, 139, 250, 0.05), transparent);
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='rgba(108,99,255,0.03)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23grid)'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ===== Hero Orbs ===== */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: rgba(108, 99, 255, 0.15);
  top: -10%;
  right: -10%;
  animation: orbFloat1 20s ease-in-out infinite;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: rgba(167, 139, 250, 0.1);
  bottom: -5%;
  left: -5%;
  animation: orbFloat2 25s ease-in-out infinite;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: rgba(108, 99, 255, 0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, 40px) scale(1.1); }
  66% { transform: translate(40px, -30px) scale(0.9); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.15); }
  66% { transform: translate(-30px, 30px) scale(0.85); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ===== Hero Inner ===== */
.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #6c63ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #a0a0b8;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Hero Decorative Divider ===== */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.3), transparent);
}

/* ===== Section ===== */
.section {
  padding: 6rem 0;
}

.section--dark {
  background: #0e0e16;
  position: relative;
}

.section--dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.15), transparent);
}

.section__header {
  text-align: center;
  margin-bottom: 4rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6c63ff, #a78bfa);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

.section__desc {
  color: #a0a0b8;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Services ===== */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services {
    grid-template-columns: 1fr;
  }
}

.service-card {
  position: relative;
  background: linear-gradient(135deg, #14141e, #12121a);
  border: 1px solid rgba(108, 99, 255, 0.08);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
  isolation: isolate;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #6c63ff, #a78bfa, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(108, 99, 255, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(108, 99, 255, 0.25);
  box-shadow:
    0 12px 40px rgba(108, 99, 255, 0.1),
    inset 0 1px 0 rgba(108, 99, 255, 0.05);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.12), rgba(167, 139, 250, 0.08));
  border: 1px solid rgba(108, 99, 255, 0.1);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  color: #6c63ff;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover .service-card__icon {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(167, 139, 250, 0.12));
  transform: scale(1.08) rotate(-3deg);
  border-color: rgba(108, 99, 255, 0.2);
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
  position: relative;
}

.service-card__text {
  color: #a0a0b8;
  font-size: 0.925rem;
  line-height: 1.7;
}

/* ===== Contact ===== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact__info {
  position: relative;
  background: linear-gradient(135deg, #14141e, #12121a);
  border: 1px solid rgba(108, 99, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
  overflow: hidden;
}

.contact__info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at 30% 20%, rgba(108, 99, 255, 0.06), transparent 60%);
  pointer-events: none;
}

.contact__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
  position: relative;
}

.contact__heading::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #6c63ff, #a78bfa);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #a0a0b8;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.contact__list li:hover {
  transform: translateX(4px);
}

.contact__list li i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(108, 99, 255, 0.1);
  color: #6c63ff;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.contact__list li:hover i {
  background: rgba(108, 99, 255, 0.18);
}

.contact__list a {
  color: #a0a0b8;
  transition: color 0.3s ease;
}

.contact__list a:hover {
  color: #6c63ff;
}

.contact__map {
  margin-top: 1.5rem;
  height: 200px;
  border-radius: 12px;
  border: 1px solid rgba(108, 99, 255, 0.1);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.contact__map .leaflet-control-attribution {
  font-size: 0.65rem;
  opacity: 0.6;
}

.contact__map .leaflet-control-attribution a {
  color: #a0a0b8;
}

.contact__map .leaflet-control-zoom {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.contact__map .leaflet-control-zoom a {
  background: #1a1a26;
  color: #f0f0f5;
  border: 1px solid rgba(108, 99, 255, 0.15);
}

.contact__map .leaflet-control-zoom a:hover {
  background: #24243a;
}

.contact__map .leaflet-tile-pane {
  filter: brightness(0.7) invert(1) hue-rotate(200deg);
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: #c0c0d0;
  margin-bottom: 0.4rem;
}

.contact__form {
  background: linear-gradient(135deg, #14141e, #12121a);
  border: 1px solid rgba(108, 99, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.5);
  color: #f0f0f5;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1), 0 0 20px rgba(108, 99, 255, 0.05);
  background: rgba(10, 10, 15, 0.7);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #444;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ff4d4d;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #ff4d4d;
  margin-top: 0.3rem;
  min-height: 1rem;
}

.form-message {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.925rem;
  display: none;
}

.form-message--success {
  display: block;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  color: #00d4aa;
}

.form-message--error {
  display: block;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.25);
  color: #ff4d4d;
}

/* ===== Footer ===== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(108, 99, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.2), transparent);
}

.footer__inner {
  text-align: center;
  color: #555;
  font-size: 0.875rem;
}

/* ===== Scroll Animation ===== */
.scroll-anim {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-anim--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Page Load Animation ===== */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  animation: pageFadeIn 0.4s ease-out;
}

/* ===== Section Divider ===== */
.section:not(.hero) {
  position: relative;
}

.section:not(.hero)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.06), transparent);
}

.section:last-child::after {
  display: none;
}

/* ===== Responsive Nav ===== */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100dvh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 5rem 2rem 2rem;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(108, 99, 255, 0.1);
  }

  .nav--open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav__link {
    font-size: 1.15rem;
  }
}
