* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body.dark {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at top left, #050505, #0b0b14);
  color: #e8e8ff;
  overflow-x: hidden;
  line-height: 1.6;
}

body.light {
  font-family: 'Poppins', sans-serif;
  background: #f7f8fc;
  color: #0a0a0f;
}

body.light {
  --bg-card: rgba(10, 10, 20, 0.05);
  --text-light: #0a0a0f;
  --text-dim: #4a4a55;
}
body.light .site-header {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.light .site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
}
body.light .nav-list a {
  color: #0a0a0f;
}
body.light .nav-list a:hover {
  color: var(--accent);
}

:root {
  --accent: #7b61ff;
  --accent-glow: #a18aff;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-light: #e8e8ff;
  --text-dim: #999;
  --radius: 20px;
  --transition: all 0.35s ease;
  --max-width: 1200px;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 8px;
}

.container {
  width: min(90%, var(--max-width));
  margin-inline: auto;
}

.preloader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}
.preloader-logo {
  width: 100px;
  animation: float 3.5s ease-in-out infinite;
}
.preloader-text {
  margin-top: 1rem;
  color: var(--text-dim);
}
.preloader-dots span {
  width: 10px;
  height: 10px;
  background: var(--accent);
  display: inline-block;
  border-radius: 50%;
  margin: 0 3px;
  animation: dots 1s infinite alternate;
}
@keyframes dots {
  to {
    opacity: 0.4;
    transform: translateY(-6px);
  }
}
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.site-header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  backdrop-filter: blur(10px);
  background: rgba(10, 10, 20, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 10, 20, 0.85);
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-header.scrolled .header-inner {
  padding: 0.6rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 65px;
  animation: float 4s ease-in-out infinite;
}

.brand-title {
  font-weight: 700;
  font-size: 1.6rem;
}

.neon {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow), 0 0 25px var(--accent);
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.nav-list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-list a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-list a:hover {
  color: var(--accent);
}

.nav-list a:hover::after {
  width: 100%;
}

.nav-list a.active {
  color: var(--accent);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero-right {
  position: relative;
  perspective: 1000px;
}
.hero-right img {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  filter: drop-shadow(0 10px 30px rgba(123,97,255,0.25));
  animation: heroFloat 6s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
}

@keyframes heroFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.hero-right::before {
  content: "";
  position: absolute;
  inset: -40px 0 0 0;
  margin: auto;
  width: min(520px, 90%);
  height: min(520px, 90%);
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7b61ff, transparent 30%, #a18aff, transparent 60%, #7b61ff);
  filter: blur(40px) saturate(140%);
  opacity: 0.35;
  animation: spinHalo 12s linear infinite;
  z-index: -1;
}

@keyframes spinHalo {
  to { transform: rotate(360deg); }
}

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

.hero-right img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 200px at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hero-right:hover img::after { opacity: 1; }

.hero-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-orbits .dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #a18aff;
  border-radius: 50%;
  box-shadow: 0 0 12px #a18aff;
  transform-origin: -120px 0;
  animation: orbit 8s linear infinite;
}
.hero-orbits .dot:nth-child(2) { transform-origin: -160px 0; animation-duration: 11s; opacity: 0.8; }
.hero-orbits .dot:nth-child(3) { transform-origin: -200px 0; animation-duration: 14s; opacity: 0.6; }

@keyframes orbit {
  from { transform: rotate(0deg) translate(-50%, -50%); }
  to { transform: rotate(360deg) translate(-50%, -50%); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
}

.hero-desc {
  margin-top: 1rem;
  color: #b0b0c0;
}

.hero-ctas {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid var(--accent);
  background: transparent;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

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

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, #fff, transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  color: #0a0a0f;
  background: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-4px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent)33, transparent);
  filter: blur(80px);
  animation: float 6s ease-in-out infinite;
}
.orb-1 { width: 180px; height: 180px; top: 20%; left: 8%; }
.orb-2 { width: 240px; height: 240px; bottom: 20%; right: 8%; }
.orb-3 { width: 120px; height: 120px; top: 50%; left: 45%; }

.section {
  padding: 6rem 0;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.cards-grid, .portfolio-grid, .pricing-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 20px var(--accent)33;
}

[data-anim] {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: transform 0.8s ease, opacity 0.8s ease, box-shadow 0.6s ease;
}

[data-anim].in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover img {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.portfolio-item {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.portfolio-item h5 {
  margin-top: 0.8rem;
  text-align: center;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.portfolio-tag {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(123,97,255,0.15);
  color: #cfc8ff;
  border: 1px solid rgba(123,97,255,0.35);
}
body.light .portfolio-tag {
  background: rgba(123,97,255,0.1);
  color: #3b2fb0;
  border-color: rgba(123,97,255,0.3);
}

.order-form input, .order-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #222;
  border-radius: 10px;
  background: #111;
  color: #fff;
  transition: var(--transition);
}
.order-form input::placeholder, .order-form textarea::placeholder {
  color: #7a7a85;
}
body.light .order-form input, body.light .order-form textarea {
  background: #fff;
  color: #0a0a0f;
  border-color: #e6e6ef;
}
body.light .order-form input:focus, body.light .order-form textarea:focus {
  box-shadow: 0 0 8px #c9c2ff;
}
.order-form input:focus, .order-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  outline: none;
}

.site-footer {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid #1a1a1a;
  color: var(--text-dim);
}
body.light .site-footer {
  border-top-color: #e6e6ef;
}
.footer-links a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 10px;
  transition: var(--transition);
}
.footer-links a:hover {
  text-shadow: 0 0 10px var(--accent);
}

.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 15px #25d36655;
  transition: var(--transition);
  z-index: 1100;
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px #25d366aa;
}
 .whatsapp-fab img {
  width: 22px;
  height: 22px;
  display: block;
}
.whatsapp-fab span {
  line-height: 1;
}

.theme-toggle {
  margin-left: 1rem;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--text-light);
  border-radius: 50px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.theme-toggle:hover {
  background: var(--accent);
  color: #0a0a0f;
  box-shadow: 0 0 15px var(--accent-glow);
}

:where(a, button, input, textarea).focus-visible,
:where(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    text-align: center;
  }
  .nav-list {
    display: none;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 4rem 0;
  }
  .card {
    padding: 1.5rem;
  }
  .btn {
    padding: 0.7rem 1.4rem;
  }
}
