/* ========================================
   MINDEXA DESIGN — Premium Landing
   ======================================== */

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 3px; }

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

body,
a, button, input, textarea, select,
[role="button"], label {
  cursor: none !important;
}

/* --- Animated Background Canvas --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #8b5cf6;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor--hover {
  width: 48px;
  height: 48px;
  background: rgba(139, 92, 246, 0.15);
}

.cursor-follower--hover {
  width: 56px;
  height: 56px;
  border-color: rgba(139, 92, 246, 0.6);
}

@media (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
  body { cursor: auto; }
}

/* --- Nav --- */
.nav-blur {
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* --- Hero --- */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.hero-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  top: -200px;
  right: -100px;
}

.hero-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
  bottom: -100px;
  left: -150px;
}

.hero-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-gradient-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Cases image parallax --- */
.case-image-wrap {
  position: relative;
}

.case-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;    /* natural proportions — no side cropping */
  display: block;
}

/* --- Cases Parallax Glow --- */
.case-card {
  position: relative;
}

.case-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
}

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

.case-card[data-case="1"]:hover::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.1));
}

.case-card[data-case="2"]:hover::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.1));
}

.case-card[data-case="3"]:hover::before {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(59, 130, 246, 0.1));
}

/* --- Approach connector line --- */
@media (min-width: 768px) {
  .approach-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), transparent);
  }
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.4s;
}

.modal.is-open {
  visibility: visible;
  pointer-events: all;
  transition: visibility 0s 0s;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s;
}

.modal.is-open .modal__backdrop {
  opacity: 1;
}

.modal__window {
  position: relative;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(32px) scale(0.96);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}

.modal.is-open .modal__window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  cursor: none;
  transition: all 0.2s;
}

.modal__close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.modal__header {
  margin-bottom: 28px;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal__field-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.modal__input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.modal__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.modal__input:focus {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.03);
}

.modal__field.has-error .modal__input {
  border-color: #ef4444;
}

.modal__field-error {
  font-size: 0.75rem;
  color: #ef4444;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.modal__field.has-error .modal__field-error {
  opacity: 1;
}

.modal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: #8b5cf6;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: none;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}

.modal__submit:hover {
  background: #7c3aed;
}

.modal__submit:active {
  transform: scale(0.98);
}

.modal__submit:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.modal__success {
  text-align: center;
  padding: 20px 0;
}

.modal__success .text-4xl {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 50%;
  color: #8b5cf6;
  font-size: 1.5rem;
}

/* --- CTA Orb --- */
.cta-orb {
  position: absolute;
  width: 800px;
  height: 800px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 60%);
  border-radius: 50%;
  filter: blur(80px);
}

/* --- Scroll indicator --- */
.scroll-indicator {
  animation: fadeInUp 1s 1.5s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-orb--1 { width: 300px; height: 300px; }
  .hero-orb--2 { width: 250px; height: 250px; }

  /* case-img height handled globally */
}

/* --- Utility animations --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-fade {
  opacity: 0;
}

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