/* ==========================================================================
   Base & Reset
   ========================================================================== */
:root {
  --bg-main: #05050a;
  --bg-secondary: #0a0d14;
  --bg-glass: rgba(10, 13, 20, 0.7);
  --bg-glass-light: rgba(255, 255, 255, 0.03);

  --color-text: #e2e8f0;
  --color-muted: #94a3b8;
  --color-heading: #ffffff;

  --accent-cyan: #00f0ff;
  --accent-purple: #7000ff;
  --accent-pink: #ff0055;

  --gradient-primary: linear-gradient(
    135deg,
    var(--accent-cyan),
    var(--accent-purple)
  );
  --gradient-glow: linear-gradient(
    90deg,
    var(--accent-cyan),
    var(--accent-purple),
    var(--accent-pink),
    var(--accent-cyan)
  );

  --font-heading: "Orbitron", sans-serif;
  --font-body: "Poppins", sans-serif;

  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --z-header: 1000;
  --z-modal: 2000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-purple) var(--bg-main);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: var(--accent-purple);
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.2;
}
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}
.section-padding {
  padding: 120px 0;
}
.text-center {
  text-align: center;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-4 {
  margin-bottom: 4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  z-index: 1;
  font-size: 0.9rem;
}
.btn-primary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
  z-index: -1;
}
.btn-primary:hover::before {
  left: 0;
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(112, 0, 255, 0.4);
  border-color: transparent;
}

/* 3D & Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 {
  transition-delay: 0.1s;
}
.delay-2 {
  transition-delay: 0.2s;
}
.delay-3 {
  transition-delay: 0.3s;
}

.mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    radial-gradient(
      circle at 15% 50%,
      rgba(112, 0, 255, 0.08),
      transparent 25%
    ),
    radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08), transparent 25%);
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: 20px 0;
  transition: var(--transition-fast);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo img {
  height: 40px;
}
.nav-menu {
  display: flex;
  gap: 30px;
}
.nav-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: var(--transition-fast);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.hamburger {
  display: none;
  cursor: pointer;
}
.bar {
  width: 25px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* ==========================================================================
   Hero Section (Index)
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-content p {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 30px;
  max-width: 500px;
}
.hero-visual {
  position: relative;
  height: 500px;
  perspective: 1000px;
}
.cube-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  animation: floatCube 8s ease-in-out infinite;
}
.floating-card {
  position: absolute;
  background: var(--bg-glass-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.fc-1 {
  top: 10%;
  left: 10%;
  transform: translateZ(50px) rotateY(-15deg);
  width: 250px;
}
.fc-2 {
  bottom: 10%;
  right: 10%;
  transform: translateZ(100px) rotateX(10deg);
  width: 280px;
  border-top: 2px solid var(--accent-cyan);
}
.chart-bar-mini {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0;
  animation: fillBar 2s forwards 1s;
}
.fc-1 .chart-fill {
  width: 85%;
}
.fc-2 .chart-fill {
  width: 92%;
}

@keyframes floatCube {
  0%,
  100% {
    transform: translateY(0) rotateX(5deg) rotateY(-5deg);
  }
  50% {
    transform: translateY(-20px) rotateX(-5deg) rotateY(5deg);
  }
}
@keyframes fillBar {
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   Ticker / Stats Section
   ========================================================================== */
.ticker-section {
  background: var(--bg-secondary);
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  animation: scrollTicker 30s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-right: 50px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}
.ticker-item span {
  color: var(--accent-cyan);
}
@keyframes scrollTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.service-card {
  background: var(--bg-secondary);
  padding: 40px 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at top right,
    rgba(112, 0, 255, 0.1),
    transparent
  );
  opacity: 0;
  transition: var(--transition-fast);
}
.service-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-10px);
}
.service-card:hover::before {
  opacity: 1;
}
.service-icon {
  font-size: 2.5rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  display: inline-block;
}
.service-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}
.service-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Interactive Calculator Section
   ========================================================================== */
.calc-wrapper {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.calc-inputs label {
  display: block;
  font-family: var(--font-heading);
  margin-bottom: 10px;
  color: var(--color-text);
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: var(--bg-main);
  height: 6px;
  border-radius: 3px;
  margin-bottom: 30px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan);
}
.calc-output {
  background: var(--bg-main);
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.calc-output::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    var(--accent-purple),
    transparent 30%
  );
  animation: rotateGlow 4s linear infinite;
  z-index: 0;
  opacity: 0.3;
}
.calc-output::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--bg-main);
  border-radius: 13px;
  z-index: 1;
}
.calc-content {
  position: relative;
  z-index: 2;
}
.result-val {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  font-weight: 900;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 3s linear infinite;
}
@keyframes rotateGlow {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* ==========================================================================
   Reports / Data Visualization
   ========================================================================== */
.reports-visual {
  position: relative;
  height: 400px;
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 250px;
  margin-top: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.bar-column {
  width: 12%;
  background: var(--bg-main);
  border-radius: 5px 5px 0 0;
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.bar-inner {
  width: 100%;
  background: var(--gradient-primary);
  border-radius: 5px 5px 0 0;
  height: 0;
  transition: height 1.5s ease-out;
  box-shadow: 0 0 15px rgba(112, 0, 255, 0.3);
}
.bar-column span {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.testi-card {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.quote-icon {
  font-size: 3rem;
  color: rgba(0, 240, 255, 0.1);
  position: absolute;
  top: 20px;
  right: 20px;
}
.client-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}
.client-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: bold;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  margin-bottom: 25px;
  position: relative;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #fff;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-fast);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-group label {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--color-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.02);
}
.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
  top: -10px;
  left: 10px;
  font-size: 0.8rem;
  background: var(--bg-main);
  padding: 0 5px;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #020305;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 20px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 50px;
}
.footer-logo img {
  height: 45px;
  margin-bottom: 20px;
}
.footer-about p {
  color: var(--color-muted);
  font-size: 0.95rem;
  max-width: 300px;
}
.footer h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--color-muted);
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}
.contact-info li {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.contact-info i {
  color: var(--accent-purple);
  font-size: 1.2rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}
.legal-links a {
  margin-left: 20px;
}
.legal-links a:hover {
  color: #fff;
}

/* ==========================================================================
   Legal Pages Formatting
   ========================================================================== */
.page-hero {
  padding: 150px 0 80px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.legal-content-box {
  background: var(--bg-secondary);
  padding: 50px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: -40px;
  position: relative;
  z-index: 10;
}
.legal-content-box h2 {
  margin: 40px 0 20px;
  color: var(--accent-cyan);
  font-size: 1.5rem;
}
.legal-content-box p {
  margin-bottom: 20px;
  color: var(--color-text);
}
.legal-content-box ul {
  margin-bottom: 20px;
  padding-left: 20px;
}
.legal-content-box li {
  margin-bottom: 10px;
  color: var(--color-text);
  list-style-type: square;
  color: var(--color-muted);
}
.legal-content-box strong {
  color: #fff;
}

/* Contact Page Specific */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}
.info-card {
  background: var(--bg-secondary);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
}
.info-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-5px);
}
.info-card i {
  font-size: 2.5rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}
.info-card h3 {
  margin-bottom: 10px;
}
.info-card p {
  color: var(--color-muted);
}

/* ==========================================================================
   Live Chat Simulation (UI Only)
   ========================================================================== */
.chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: var(--z-modal);
}
.chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(112, 0, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-btn:hover {
  transform: scale(1.1);
}
.chat-box {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: var(--transition-fast);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.chat-box.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.chat-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
}
.chat-body {
  padding: 20px;
  height: 250px;
  overflow-y: auto;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 0.85rem;
  max-width: 80%;
}
.msg.bot {
  background: rgba(0, 240, 255, 0.1);
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.msg.user {
  background: var(--accent-purple);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-input {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-input input {
  flex: 1;
  padding: 15px;
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  font-family: var(--font-body);
}
.chat-input button {
  padding: 0 20px;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .calc-wrapper {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    height: 400px;
    order: -1;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 100px 40px;
    transition: var(--transition-fast);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
  .nav-menu.active {
    right: 0;
  }
  .hamburger {
    display: block;
    z-index: 1001;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .contact-info-grid {
    grid-template-columns: 1fr;
  }
}
