:root {
  /* VMC Labs — official palette */
  --vmc-electricBlue: #2563ff;
  --vmc-royalBlue: #1a3cff;
  --vmc-violet: #7b3dff;
  --vmc-softLavender: #c4b5fd;
  --vmc-deepNavy: #0a1026;
  --vmc-lightGray: #f5f7fa;
  --vmc-white: #ffffff;
  --vmc-black: #111111;

  /* Semantic aliases (used across includes) */
  --brand-cyan: var(--vmc-electricBlue);
  --brand-blue: var(--vmc-royalBlue);
  --brand-purple: var(--vmc-violet);

  /* Gradients */
  --brand-gradient: linear-gradient(
    135deg,
    var(--vmc-electricBlue) 0%,
    var(--vmc-royalBlue) 45%,
    var(--vmc-violet) 100%
  );
  --brand-gradient-hover: linear-gradient(
    135deg,
    var(--vmc-violet) 0%,
    var(--vmc-royalBlue) 50%,
    var(--vmc-electricBlue) 100%
  );
  --brand-glow: 0 0 40px rgba(37, 99, 255, 0.35);

  /* Backgrounds */
  --bg-color: var(--vmc-deepNavy);
  --bg-alt: #0f1630;
  --text-main: var(--vmc-white);
  --text-muted: #a8b4d4;

  /* Layout */
  --container-width: 1400px;
  --header-height: 100px;
  --section-pad-y: 4.5rem;
  --section-pad-gap: 2rem;

  /* Glassmorphism Premium */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  /* Fonts */
  --font-heading: "Outfit", sans-serif;
  --font-display: "Space Grotesk", "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.7;
}

.global-grid-bg {
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100vh;
  background-image: linear-gradient(
      rgba(37, 99, 255, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(123, 61, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg);
  pointer-events: none;
  z-index: -1;
}

/* Fondo ambiental suave (reemplaza montañas 3D) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -6;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 15% 85%, rgba(37, 99, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 85% 75%, rgba(123, 61, 255, 0.1), transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(26, 60, 255, 0.08), transparent 45%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Utilities */
.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

/* Evita doble hueco entre secciones consecutivas */
main.main > .section + .section {
  padding-top: var(--section-pad-gap);
}

.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  z-index: 1;
  box-shadow: 0 10px 40px -10px rgba(37, 99, 255, 0.55);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--brand-gradient-hover);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 50px -15px rgba(123, 61, 255, 0.45);
}

.btn-primary:hover::before {
  opacity: 1;
}

/* Glass Cards */
.card-glass {
  background: var(--glass-bg);
  border: var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2rem;
  transition: 0.4s;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  line-height: 1.15;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.2rem; /* Reduced from 2.5rem */
  }
  .container {
    padding: 0 20px;
  }
  :root {
    --section-pad-y: 3.25rem;
    --section-pad-gap: 1.5rem;
  }
}

@media (max-width: 400px) {
    .section-title {
        font-size: 1.8rem;
    }
}

/* VMC Labs — shared section utilities */
.section-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--vmc-softLavender);
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.75rem;
}

.section-title-left {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-main);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 50px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 181, 253, 0.2);
  color: white;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  font-family: var(--font-heading);
}

.btn-glass:hover {
  background: rgba(37, 99, 255, 0.12);
  border-color: var(--vmc-electricBlue);
  transform: translateY(-3px);
  box-shadow: var(--brand-glow);
}

::selection {
  background: rgba(123, 61, 255, 0.35);
  color: white;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.25);
  background: rgba(10, 16, 38, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: 0.35s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--vmc-electricBlue);
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(37, 99, 255, 0.45);
}

/* Asegurar visibilidad de grids (fallback si AOS/GSAP no disparan) */
.project-card,
.stack-card,
.value-card {
  opacity: 1;
  visibility: visible;
}

/* Magnetic CTA micro-interaction */
.btn-primary.magnetic-ready {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 94;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.sticky-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sticky-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 22px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 32px rgba(37, 99, 255, 0.45);
}

@media (max-width: 640px) {
  .sticky-cta__btn span {
    display: none;
  }
  .sticky-cta__btn {
    padding: 14px;
    border-radius: 50%;
  }
}

/* Legal & thank you pages */
.legal-page {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

.legal-page__inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--vmc-softLavender);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.legal-page__back:hover {
  color: var(--vmc-electricBlue);
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.legal-page__updated {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.legal-page section {
  margin-bottom: 1.75rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.legal-page p {
  color: var(--text-muted);
  line-height: 1.75;
}

.legal-page a {
  color: var(--vmc-electricBlue);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 50px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(37, 99, 255, 0.4);
}

.thank-you-page__inner {
  text-align: center;
}

.thank-you-icon {
  font-size: 4rem;
  color: var(--vmc-electricBlue);
  margin-bottom: 1rem;
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Case study modal */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.case-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.case-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 38, 0.85);
  backdrop-filter: blur(6px);
}

.case-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  background: #0f1630;
  border: 1px solid rgba(196, 181, 253, 0.2);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.case-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.case-modal__panel h3 {
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.case-modal__panel p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.case-card__more {
  margin-top: 0.75rem;
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
  text-transform: none;
}
