/* ============================================
   OptiFlow Solutions - Modern Pastel Theme
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Pastel Palette */
  --primary: #7C6FE0;
  --primary-light: #B8A9E8;
  --primary-lighter: #E8E4F8;
  --primary-dark: #5A4FBF;
  --secondary: #E8618C;
  --secondary-light: #F2B5D4;
  --secondary-lighter: #FFF0F5;
  --accent-teal: #4ECDC4;
  --accent-teal-light: #A8E6CF;
  --accent-orange: #FFB347;
  --accent-orange-light: #FFD4A0;
  --accent-blue: #87CEEB;
  --accent-blue-light: #C5E8F7;
  --accent-green: #98D8A0;
  --accent-yellow: #FBE7A1;

  /* Backgrounds */
  --bg: #FAFAFE;
  --bg-alt: #F3F1FB;
  --bg-warm: #FFF8F5;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.7);

  /* Text */
  --text: #2D3436;
  --text-light: #636E72;
  --text-lighter: #B2BEC3;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7C6FE0 0%, #E8618C 100%);
  --gradient-cool: linear-gradient(135deg, #4ECDC4 0%, #87CEEB 100%);
  --gradient-warm: linear-gradient(135deg, #FFB347 0%, #E8618C 100%);
  --gradient-soft: linear-gradient(135deg, #B8A9E8 0%, #F2B5D4 100%);
  --gradient-hero: linear-gradient(135deg, #F3F1FB 0%, #FFF0F5 50%, #E8F4F8 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(124, 111, 224, 0.08);
  --shadow-md: 0 4px 20px rgba(124, 111, 224, 0.12);
  --shadow-lg: 0 8px 40px rgba(124, 111, 224, 0.15);
  --shadow-xl: 0 16px 60px rgba(124, 111, 224, 0.18);
  --shadow-card: 0 4px 24px rgba(124, 111, 224, 0.1);
  --shadow-hover: 0 12px 40px rgba(124, 111, 224, 0.2);

  /* Borders */
  --border: rgba(124, 111, 224, 0.1);
  --border-light: rgba(124, 111, 224, 0.06);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container-max: 1200px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease-out); }
ul { list-style: none; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-light); line-height: 1.8; }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-light);
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 111, 224, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 111, 224, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary-light);
}

.btn-secondary:hover {
  background: var(--primary-lighter);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.3s var(--ease-out);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease-out);
}

.navbar.scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
}

.nav-logo .logo-icon-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all 0.3s var(--ease-out);
  color: var(--text);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-lighter);
  color: var(--primary);
}

.nav-links .btn-primary {
  padding: 10px 24px;
  font-size: 0.85rem;
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  margin-bottom: 40px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 80%;
  z-index: 1;
}

/* Floating Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-light);
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: var(--secondary-light);
  bottom: 20%;
  right: 25%;
  animation-delay: -3s;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: var(--accent-teal-light);
  top: 30%;
  right: 35%;
  animation-delay: -5s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 50%; }
  25% { transform: translate(25px, -35px) scale(1.08) rotate(5deg); border-radius: 48% 52% 55% 45%; }
  50% { transform: translate(-15px, 15px) scale(0.95) rotate(-5deg); border-radius: 55% 45% 48% 52%; }
  75% { transform: translate(20px, 25px) scale(1.03) rotate(3deg); border-radius: 45% 55% 52% 48%; }
}

/* Floating shapes for decoration */
.floating-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.shape-ring {
  border: 2px solid var(--primary);
  border-radius: 50%;
}

.shape-dot {
  background: var(--secondary);
}

.shape-square {
  border-radius: var(--radius-sm) !important;
  border: 2px solid var(--accent-teal);
}

/* ---------- Page Hero (subpages) ---------- */
.page-hero {
  padding: clamp(140px, 18vw, 200px) 0 clamp(60px, 8vw, 100px);
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.page-hero .floating-shapes { opacity: 0.5; }

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.page-hero .section-label { margin-bottom: 20px; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero p {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
  max-width: 560px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { color: var(--text-lighter); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-light);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
}

.card-icon.purple { background: var(--primary-lighter); }
.card-icon.pink { background: var(--secondary-lighter); }
.card-icon.teal { background: rgba(78, 205, 196, 0.12); }
.card-icon.orange { background: rgba(255, 179, 71, 0.12); }
.card-icon.blue { background: rgba(135, 206, 235, 0.15); }
.card-icon.green { background: rgba(152, 216, 160, 0.15); }

.card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.3s var(--ease-out);
}

.card-link:hover { gap: 10px; }

/* Service Detail Card */
.service-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-light);
  transition: all 0.4s var(--ease-out);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-card p {
  margin-bottom: 24px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
}

.service-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-lighter);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- Section Styles ---------- */
section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-warm {
  background: var(--bg-warm);
}

/* ---------- Feature Section ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 40px 0;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-image {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.feature-image-inner {
  font-size: 4rem;
  position: relative;
  z-index: 2;
}

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-content p {
  margin-bottom: 24px;
}

/* ---------- Process/Steps ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.process-step {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--border-light);
  position: relative;
  transition: all 0.4s var(--ease-out);
  counter-increment: step;
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.process-step h3 {
  margin-bottom: 12px;
}

/* ---------- Tech Stack ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.tech-tag {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s var(--ease-out);
}

.tech-tag:hover {
  border-color: var(--primary-light);
  background: var(--primary-lighter);
  transform: translateY(-2px);
}

/* ---------- Stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--gradient-primary);
  padding: clamp(60px, 8vw, 100px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cta-section .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

/* ---------- Contact Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: all 0.3s var(--ease-out);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-lighter);
}

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

.contact-info-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.contact-info-card h4 {
  margin-bottom: 16px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.95rem;
}

.contact-info-item .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 16px;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.footer-logo .logo-icon-svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1100;
  transition: none;
}

/* ---------- Navbar Auto-Hide ---------- */
.navbar.nav-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger children with spring animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-spring);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.48s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.56s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.64s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Hero Text Word Reveal ---------- */
.text-revealed .word-reveal {
  display: inline-block;
  opacity: 0;
  animation: wordReveal 0.6s var(--ease-out) forwards;
}

/* ---------- Card Shimmer Effect ---------- */
.card > .card-shimmer,
.service-card > .card-shimmer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--shimmer-x, 50%) var(--shimmer-y, 50%),
    rgba(124, 111, 224, 0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover > .card-shimmer,
.service-card:hover > .card-shimmer {
  opacity: 1;
}

/* ---------- Card Icon Hover Animation ---------- */
.card:hover .card-icon {
  transform: scale(1.1) rotate(-3deg);
  transition: transform 0.4s var(--ease-spring);
}

.card .card-icon {
  transition: transform 0.4s var(--ease-out);
}

/* ---------- Service List Check Animation ---------- */
.service-list li.check-animate {
  animation: checkPop 0.5s var(--ease-spring) forwards;
  opacity: 0;
}

/* ---------- Feature Image Float ---------- */
.feature-image.float-animate {
  animation: featureFloat 4s ease-in-out infinite;
}

/* ---------- Card Hover Glow Border ---------- */
.card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--primary-lighter);
}

/* ---------- Button Ripple Effect ---------- */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  border-radius: inherit;
}

.btn-primary:active::before {
  transform: scale(2);
  opacity: 1;
  transition: transform 0s, opacity 0s;
}

/* ---------- Process Step Hover ---------- */
.process-step:hover {
  border-color: var(--primary-light);
}

/* ---------- Step Number Pulse ---------- */
.process-step:hover .step-number {
  animation: stepPulse 0.6s var(--ease-spring);
}

@keyframes stepPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ---------- Tech Tag Hover Glow ---------- */
.tech-tag {
  position: relative;
  overflow: hidden;
}

.tech-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124, 111, 224, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.tech-tag:hover::after {
  transform: translateX(100%);
}

/* ---------- Stats Counter Glow ---------- */
.stat-number {
  transition: text-shadow 0.5s ease;
}

.stat-item:hover .stat-number {
  text-shadow: 0 0 30px rgba(124, 111, 224, 0.3);
}

/* ---------- CTA Floating Orbs ---------- */
.cta-section::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  right: -50px;
  bottom: -100px;
  animation: ctaOrb 8s ease-in-out infinite;
}

@keyframes ctaOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -20px) scale(1.1); }
}

/* ---------- Form Success Animation ---------- */
.form-success {
  text-align: center;
  padding: 48px 0;
  animation: successPop 0.5s var(--ease-spring) forwards;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  animation: successPop 0.5s var(--ease-spring) forwards;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinnerSpin 0.6s linear infinite;
  vertical-align: middle;
}

/* ---------- Form Input Animation ---------- */
.form-group {
  transition: transform 0.3s var(--ease-out);
}

.form-group.input-focused {
  transform: translateY(-2px);
}

.form-group.input-focused label {
  color: var(--primary);
}

/* ---------- Nav Link Active Indicator ---------- */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

.nav-links .btn-primary::after {
  display: none;
}

/* ---------- Footer Link Arrow Animation ---------- */
.footer-links a {
  position: relative;
  padding-left: 0;
  transition: all 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}

.footer-links a::before {
  content: '→';
  position: absolute;
  left: -16px;
  opacity: 0;
  transition: all 0.3s var(--ease-out);
}

.footer-links a:hover {
  padding-left: 20px;
}

.footer-links a:hover::before {
  left: 0;
  opacity: 0.7;
}

/* Marquee for tech logos */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  gap: 32px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

/* Gradient shift */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient {
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

/* ---------- Section Divider Gradient Lines ---------- */
.section-divider {
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: 3px;
  opacity: 0.3;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row { gap: 40px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    z-index: 999;
  }

  .nav-links.active { display: flex; }

  .nav-links a {
    font-size: 1.2rem;
    padding: 12px 32px;
  }

  .nav-toggle { display: flex; z-index: 1001; }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero-visual { display: none; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { justify-content: center; }
  .blob { display: none; }

  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 24px; }
  .service-card { padding: 28px; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }

/* Page-specific accent colors */
.accent-erp .card-icon { background: var(--primary-lighter); }
.accent-ai .card-icon { background: rgba(78, 205, 196, 0.12); }
.accent-finance .card-icon { background: rgba(152, 216, 160, 0.15); }
.accent-food .card-icon { background: rgba(255, 179, 71, 0.12); }
.accent-supply .card-icon { background: rgba(135, 206, 235, 0.15); }
.accent-crm .card-icon { background: var(--secondary-lighter); }

/* Service page detail sections */
.detail-section { padding: var(--section-pad) 0; }
.detail-section:nth-child(even) { background: var(--bg-alt); }

/* Glassmorphism card variant */
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* Badge */
.badge {
  display: inline-flex;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-purple { background: var(--primary-lighter); color: var(--primary); }
.badge-pink { background: var(--secondary-lighter); color: var(--secondary); }
.badge-teal { background: rgba(78, 205, 196, 0.12); color: #2DA89E; }
.badge-orange { background: rgba(255, 179, 71, 0.12); color: #E09020; }

/* ---------- Splash Screen ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0a1e 0%, #1a1040 40%, #2a0f35 100%);
  overflow: hidden;
}

#splash::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.25) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: splashGlow 3s ease-in-out infinite;
}

#splash.splash-exit {
  animation: splashExit 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.splash-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
  opacity: 0;
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.splash-ring {
  stroke-dasharray: 82;
  stroke-dashoffset: 82;
  animation: splashDraw 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.splash-tail {
  stroke-dasharray: 17;
  stroke-dashoffset: 17;
  animation: splashDraw 0.4s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
}

.splash-brand {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(20px);
  animation: splashTextIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;
}

.splash-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.05rem;
  font-weight: 400;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(15px);
  animation: splashTextIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.7s forwards;
  font-style: italic;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.3) rotate(-15deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes splashDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes splashOrbitIn {
  to { opacity: 0.3; }
}

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

@keyframes splashGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

@keyframes splashExit {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.97); }
}

/* ---------- Questionnaire Modal ---------- */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
  padding: 24px;
}
.quiz-overlay.active { opacity: 1; visibility: visible; }

.quiz-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.5s var(--ease-spring);
}
.quiz-overlay.active .quiz-modal { transform: translateY(0) scale(1); }

.quiz-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  z-index: 10;
}
.quiz-close:hover { background: var(--secondary-lighter); color: var(--secondary); transform: rotate(90deg); }

.quiz-progress { height: 4px; background: var(--bg-alt); border-radius: var(--radius-full); margin-bottom: 24px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: var(--gradient-primary); border-radius: var(--radius-full); width: 16.66%; transition: width 0.5s var(--ease-out); }

.quiz-steps { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; }
.quiz-step-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-lighter);
  transition: all 0.4s var(--ease-out);
}
.quiz-step-dot.active { border-color: var(--primary); background: var(--gradient-primary); color: #fff; transform: scale(1.1); }
.quiz-step-dot.completed { border-color: var(--primary); background: var(--primary-lighter); color: var(--primary); }

.quiz-panel { display: none; animation: quizFadeIn 0.5s var(--ease-out); }
.quiz-panel.active { display: block; }
.quiz-panel.active.quiz-slide-back { animation: quizFadeInBack 0.5s var(--ease-out); }
@keyframes quizFadeIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes quizFadeInBack { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

.quiz-title { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 8px; text-align: center; }
.quiz-subtitle { font-size: 0.95rem; color: var(--text-light); text-align: center; margin-bottom: 28px; }

.quiz-options { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz-options-row { justify-content: center; }
.quiz-options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quiz-options-col { flex-direction: column; }

.quiz-option {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 20px; cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 500;
  color: var(--text); transition: all 0.3s var(--ease-out);
  display: flex; align-items: center; gap: 12px; text-align: left;
}
.quiz-option:hover { border-color: var(--primary-light); background: var(--primary-lighter); transform: translateY(-2px); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-lighter); box-shadow: 0 0 0 3px rgba(124, 111, 224, 0.15); }
.quiz-option.selected::after {
  content: '\2713'; margin-left: auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gradient-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.quiz-options-row .quiz-option { flex: 1; justify-content: center; min-width: 0; text-align: center; }
.quiz-option-wide { width: 100%; }

.quiz-option-icon {
  font-size: 1.5rem; flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  transition: background 0.3s var(--ease-out);
}
.quiz-option.selected .quiz-option-icon { background: rgba(124, 111, 224, 0.2); }
.quiz-option-label { font-weight: 600; font-size: 0.9rem; }
.quiz-option-text { display: flex; flex-direction: column; gap: 2px; }
.quiz-option-desc { font-size: 0.8rem; color: var(--text-light); font-weight: 400; }

.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.quiz-btn-next { margin-left: auto; }

.quiz-results { display: grid; gap: 16px; margin-bottom: 32px; }
.quiz-result-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  background: var(--bg-alt); border-radius: var(--radius-md); border: 1px solid var(--border-light);
  transition: all 0.3s var(--ease-out); text-decoration: none; color: inherit;
}
.quiz-result-card:hover { background: var(--primary-lighter); border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quiz-result-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--gradient-primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.quiz-result-info { flex: 1; }
.quiz-result-info h4 { font-size: 1rem; margin-bottom: 4px; }
.quiz-result-info p { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.quiz-result-arrow { color: var(--primary); font-weight: 600; font-size: 1.2rem; flex-shrink: 0; transition: transform 0.3s var(--ease-out); }
.quiz-result-card:hover .quiz-result-arrow { transform: translateX(4px); }
.quiz-match-badge {
  display: inline-flex; padding: 3px 10px; font-size: 0.7rem; font-weight: 600;
  border-radius: var(--radius-full); background: var(--gradient-primary); color: #fff;
  text-transform: uppercase; letter-spacing: 0.05em; margin-left: 8px;
}
.quiz-results-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .quiz-modal { padding: 24px; max-height: 95vh; }
  .quiz-options-grid { grid-template-columns: 1fr; }
  .quiz-options-row .quiz-option { flex: 0 0 calc(50% - 6px); }
  .quiz-steps { gap: 8px; }
  .quiz-step-dot { width: 28px; height: 28px; font-size: 0.7rem; }
  .quiz-results-cta { flex-direction: column; align-items: stretch; }
  .quiz-results-cta .btn { justify-content: center; }
}
@media (max-width: 480px) {
  .quiz-modal { padding: 20px 16px; border-radius: var(--radius-lg); }
  .quiz-options-row .quiz-option { flex: 0 0 100%; }
  .quiz-option { padding: 12px 16px; }
}
