@import url("https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Inter:wght@300;400;500;600&display=swap");

:root {
  --bg-color: #030305;
  --text-primary: #ffffff;
  --text-secondary: #8892b0;
  --accent-1: #6d28d9;
  --accent-2: #2dd4bf;
  --accent-glow: rgba(109, 40, 217, 0.5);
  --font-head: "Syncopate", sans-serif;
  --font-body: "Inter", sans-serif;
  --spring-ease: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --nav-height: 90px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: auto; /* Handled by JS smooth scroll */
  font-size: 16px;
  background: var(--bg-color);
}
body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

/* Custom Cursor */
#cursor,
#cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s,
    background 0.3s;
}
#cursor {
  width: 10px;
  height: 10px;
  background: var(--accent-2);
  mix-blend-mode: difference;
}
#cursor-trail {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  transition:
    transform 0.1s linear,
    width 0.3s,
    height 0.3s;
}
body:hover #cursor {
  opacity: 1;
}
.hover-target:hover ~ #cursor {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
.loader-text {
  font-family: var(--font-head);
  font-size: 2vw;
  letter-spacing: 0.5em;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseGlow 2s infinite alternate;
}
.progress-bar {
  width: 200px;
  height: 2px;
  background: #222;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-2);
  transition: width 0.1s;
}

/* Global Utilities & Typography */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-head);
  text-transform: uppercase;
  line-height: 1.1;
}
p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
a {
  text-decoration: none;
  color: inherit;
}
.text-gradient {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.container {
    width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  position: relative;
  z-index: 2;
}
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  overflow: hidden;
  transition: border-color 0.4s;
  cursor: none; /* Let custom cursor handle */
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
  z-index: -1;
}
.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}
.btn-primary:hover {
  border-color: transparent;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition:
    background 0.4s,
    backdrop-filter 0.4s,
    transform 0.4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(3, 3, 5, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo {
  height: 60px;
  filter: invert(1) drop-shadow(0 0 10px var(--accent-glow));
  transition: transform 0.3s var(--spring-ease);
}
.logo-link:hover .logo {
  transform: scale(1.05) rotate(-2deg);
}
.nav-list {
  display: flex;
  gap: 3rem;
  list-style: none;
}
.nav-link {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  padding: 5px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-2);
  transform: translateX(-101%);
  transition: transform 0.4s var(--spring-ease);
}
.nav-link:hover::after {
  transform: translateX(0);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.sound-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.sound-toggle:hover {
  opacity: 1;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 6px;
  cursor: none;
  z-index: 1001;
}
.mobile-toggle .bar {
  width: 30px;
  height: 2px;
  background: #fff;
  transition: 0.4s;
}

/* Hero 3D Section */
.hero {
  position: relative;
  padding: 10rem 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  perspective: 1200px;
  transform-style: preserve-3d;
}
.hero-3d-grid {
  position: absolute;
  width: 200vw;
  height: 200vh;
  bottom: -50vh;
  left: -50vw;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: rotateX(75deg);
  transform-origin: center top;
  animation: gridMove 20s linear infinite;
  z-index: 0;
  mask-image: linear-gradient(to top, transparent, black);
}
.hero-content {
  position: relative;
  z-index: 2;
  transform: translateZ(50px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
}
.hero-title {
  font-size: 4.5vw;
  leading-trim: both;
  text-edge: cap;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-title .word {
  display: inline-block;
  overflow: hidden;
}
.hero-title .char {
  display: inline-block;
  transform: translateY(100%) rotateX(-90deg);
  transform-origin: bottom;
  opacity: 0;
}
.hero-subtitle {
  font-size: 1.25rem;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
}
.hero-actions {
  display: flex;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  margin-top: 2rem;
}

/* KPI Ticker Section */
.ticker-section {
  background: var(--accent-1);
  padding: 1.5rem 0;
  overflow: hidden;
  position: relative;
  border-block: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(-1deg) scale(1.02);
  z-index: 10;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}
.ticker-item {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: #fff;
  margin-right: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ticker-item i {
  color: var(--accent-2);
}

/* 3D Services Section */
.services-section {
  padding: 10rem 0;
  position: relative;
  z-index: 5;
}
.section-header {
  margin-bottom: 5rem;
  text-align: center;
}
.section-header h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  perspective: 1000px;
}
.service-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.1s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.service-card:hover::before {
  opacity: 1;
}
.service-icon {
  font-size: 2.5rem;
  color: var(--accent-2);
  margin-bottom: 2rem;
  transform: translateZ(30px);
  display: inline-block;
}
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transform: translateZ(40px);
}
.service-card p {
  transform: translateZ(20px);
  font-size: 1rem;
}

/* Interactive ROI Calculator */
.roi-section {
  padding: 10rem 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(109, 40, 217, 0.05),
    transparent
  );
  position: relative;
}
.roi-container {
  display: flex;
  align-items: center;
  gap: 5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.roi-inputs,
.roi-outputs {
  flex: 1;
}
.roi-group {
  margin-bottom: 2rem;
}
.roi-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--accent-2);
}
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--accent-2);
  border-radius: 50%;
  cursor: none;
  box-shadow: 0 0 20px var(--accent-2);
}
.roi-outputs {
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 5rem;
}
.output-val {
  font-size: 5rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 30px var(--accent-glow);
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
}

/* 3D Testimonial Deck */
.testimonials {
  padding: 10rem 0;
  position: relative;
  overflow: hidden;
}
.deck-container {
  position: relative;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1500px;
}
.t-card {
  position: absolute;
  width: 400px;
  background: rgba(20, 20, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition:
    transform 0.6s var(--spring-ease),
    opacity 0.6s;
  cursor: none;
}
.t-content {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 2rem;
}
.t-author h4 {
  color: var(--accent-2);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

/* AI Matcher / CTA */
.ai-cta {
  padding: 10rem 0;
  text-align: center;
  position: relative;
}
.chat-window {
  max-width: 600px;
  margin: 3rem auto;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  text-align: left;
}
.chat-msg {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInMsg 0.5s forwards;
}
.chat-msg.bot .avatar {
  background: var(--accent-1);
  color: #fff;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 0 20px 20px 20px;
  font-size: 1rem;
  color: #fff;
}

/* Subpages & Legal */
.subpage {
  background-color: var(--bg-color);
}
.page-header {
  padding: 12rem 0 5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.page-header h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.breadcrumbs {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.breadcrumbs a {
  color: var(--accent-2);
  transition: color 0.3s;
}
.breadcrumbs a:hover {
  color: #fff;
}
.legal-content,
.contact-section-page {
  padding: 5rem 0 10rem;
}
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  padding: 4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.content-wrapper h2 {
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
  color: #fff;
}
.content-wrapper p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Contact Form */
.contact-wrapper {
  display: flex;
  gap: 5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.contact-info-col {
  flex: 1;
}
.contact-info-col h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.contact-methods {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}
.method-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-2);
}
.contact-form-wrapper {
  flex: 1.5;
  background: rgba(0, 0, 0, 0.3);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.form-group {
  flex: 1;
  position: relative;
}
.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent-2);
}

/* Footer */
.footer {
  background: #000;
  padding: 6rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.footer-logo {
  height: 60px;
  margin-bottom: 1.5rem;
  filter: invert(1);
}
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
.social-link:hover {
  background: var(--accent-1);
  transform: translateY(-3px);
}
.footer-col-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #fff;
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.8rem;
}
.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s;
}
.footer-links a:hover {
  color: var(--accent-2);
  padding-left: 5px;
}
.contact-info li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.contact-info i {
  color: var(--accent-1);
  margin-top: 4px;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations */
@keyframes pulseGlow {
  0% {
    opacity: 0.5;
    filter: drop-shadow(0 0 10px var(--accent-glow));
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 30px var(--accent-glow));
  }
}
@keyframes gridMove {
  0% {
    transform: rotateX(75deg) translateY(0);
  }
  100% {
    transform: rotateX(75deg) translateY(50px);
  }
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@keyframes fadeInMsg {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-on-scroll {
  opacity: 0;
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up {
  transform: translateY(40px);
}
.fade-in-left {
  transform: translateX(-40px);
}
.fade-in-right {
  transform: translateX(40px);
}
.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Responsive */
@media (max-width: 1024px) {
  .roi-container {
    flex-direction: column;
    text-align: center;
  }
  .roi-outputs {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
    padding-top: 3rem;
    margin-top: 3rem;
  }
  .contact-wrapper {
    flex-direction: column;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .hero-title {
    font-size: 10vw;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  #cursor,
  #cursor-trail {
    display: none;
  }
  body {
    cursor: auto;
  }
}
