/* ============================================================
   MiSD Soluciones – Stylesheet
   ============================================================ */

/* ---- Variables ---- */
:root {
  --clr-bg:         #07071a;
  --clr-bg-2:       #0d0d26;
  --clr-bg-card:    rgba(255,255,255,0.04);
  --clr-border:     rgba(255,255,255,0.08);

  --clr-primary:    #6366f1;
  --clr-primary-2:  #818cf8;
  --clr-violet:     #8b5cf6;
  --clr-cyan:       #06b6d4;

  /* product colors */
  --clr-agenda-a:   #0ea5e9;
  --clr-agenda-b:   #6366f1;
  --clr-clinical-a: #10b981;
  --clr-clinical-b: #06b6d4;
  --clr-web-a:      #f59e0b;
  --clr-web-b:      #ef4444;
  --clr-labs-a:     #a855f7;
  --clr-labs-b:     #ec4899;

  --clr-text:       #f1f5f9;
  --clr-muted:      #94a3b8;
  --clr-muted-2:    #64748b;
  --clr-white:      #ffffff;

  --font-body:      'Inter', system-ui, sans-serif;
  --font-display:   'Poppins', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 4px 30px rgba(0,0,0,0.4);
  --transition:       0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast:  0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow:  0.7s  cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 72px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  animation: pageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body.page-exit {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}



img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(270deg,
    var(--clr-primary) 0%,
    var(--clr-violet) 33%,
    var(--clr-cyan) 66%,
    var(--clr-primary) 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
}
/* Ripple layer */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.btn:hover::after  { transform: scaleX(1); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn--lg { padding: 0.85rem 2rem; font-size: 1rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-violet));
  color: var(--clr-white);
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn--primary:hover { box-shadow: 0 8px 30px rgba(99,102,241,0.5); }

.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.14); }

.btn--ghost-dark {
  background: rgba(255,255,255,0.06);
  color: var(--clr-text);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn--ghost-dark:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  color: var(--clr-primary-2);
  border: 1px solid rgba(99,102,241,0.4);
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.btn--outline:hover { background: rgba(99,102,241,0.1); border-color: var(--clr-primary); }

.btn--nav {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-violet));
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  border-radius: 50px;
}
.btn--nav:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.4); transform: translateY(-2px); }

.btn--whatsapp {
  background: #25d366;
  color: var(--clr-white);
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}
.btn--whatsapp:hover { box-shadow: 0 8px 30px rgba(37,211,102,0.5); background: #1ebe5d; }

/* ---- Section helpers ---- */
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-primary-2);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.section-tag--center { display: block; text-align: center; }
.section-tag--light { color: var(--clr-cyan); background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.25); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-white);
  margin-bottom: 1rem;
}
.section-title--center { text-align: center; }
.section-title--light { color: var(--clr-white); }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 600px;
  text-align: center;
  margin-inline: auto;
}
.section-subtitle--light { color: rgba(255,255,255,0.7); }

.section-header { margin-bottom: 3.5rem; }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* ---- Hero entrance animation ---- */
.hero-enter {
  opacity: 0;
  transform: translateY(30px);
  animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroEntrance {
  to { opacity: 1; transform: translateY(0); }
}
.hero-enter--1 { animation-delay: 0.1s; }
.hero-enter--2 { animation-delay: 0.25s; }
.hero-enter--3 { animation-delay: 0.4s; }
.hero-enter--4 { animation-delay: 0.55s; }
.hero-enter--5 { animation-delay: 0.7s; }

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition:
    background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform   0.5s cubic-bezier(0.16, 1, 0.3, 1);
  animation: navSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.nav--scrolled {
  background: rgba(7,7,26,0.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--clr-border);
}

.nav__container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.nav__logo:hover { opacity: 0.85; }
.nav__logo-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: -0.01em;
  line-height: 1;
  transform: translateY(6px);
}
.nav__logo-name span {
  background: linear-gradient(135deg, var(--clr-primary-2), var(--clr-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 6px rgba(14, 100, 200, 0.25));
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav__logo:hover .nav__logo-img {
  filter: drop-shadow(0 0 12px rgba(14, 100, 200, 0.45));
}

.nav__logo-img--footer {
  height: 32px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 4px rgba(14, 100, 200, 0.2));
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-muted);
  transition: color var(--transition-fast);
  position: relative;
}
/* Underline slide effect */
.nav__links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-cyan));
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav__links a:not(.btn):hover::after,
.nav__links a.nav-active::after { width: 100%; }
.nav__links a:not(.btn):hover,
.nav__links a.nav-active { color: var(--clr-white); }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}
.nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.nav__mobile {
  display: none;
  background: rgba(7,7,26,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  padding: 1rem 1.5rem 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.nav__mobile.active {
  display: block;
  max-height: 400px;
}
.nav__mobile ul { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__mobile li a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--clr-muted);
  border-bottom: 1px solid var(--clr-border);
  transition: color var(--transition);
}
.nav__mobile li:last-child a { border-bottom: none; }
.nav__mobile li a:hover { color: var(--clr-white); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Background */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero__orb--1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
  top: -200px;
  left: -150px;
  animation: orbFloat 12s ease-in-out infinite;
}
.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.25), transparent 70%);
  top: 30%;
  right: -120px;
  animation: orbFloat 10s ease-in-out infinite reverse;
  animation-delay: -4s;
}
.hero__orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.2), transparent 70%);
  bottom: -100px;
  left: 40%;
  animation: orbFloat 14s ease-in-out infinite;
  animation-delay: -8s;
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  animation: gridPan 20s linear infinite;
}
@keyframes gridPan {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}

/* ── Particle canvas ─── */
#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.06); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* Hero inner */
.hero__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-block: 5rem 3rem;
}

/* Hero content */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--clr-border);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
/* shimmer sweep */
.hero__badge::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: badgeShimmer 3s ease-in-out infinite;
}
@keyframes badgeShimmer {
  0%   { left: -100%; }
  50%, 100% { left: 140%; }
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clr-cyan);
  box-shadow: 0 0 8px var(--clr-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--clr-white);
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin-bottom: 2.25rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Hero stats */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  width: fit-content;
  position: relative;
  overflow: hidden;
}
/* animated border glow */
.hero__stats::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 60%,
    rgba(99,102,241,0.5) 70%,
    rgba(6,182,212,0.5) 80%,
    transparent 90%
  );
  animation: borderSpin 4s linear infinite;
  z-index: -1;
  border-radius: var(--radius-md);
}
.hero__stats::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: rgba(7,7,26,0.95);
  border-radius: calc(var(--radius-md) - 1px);
  z-index: -1;
}
@property --border-angle {
  syntax: '<angle>'; inherits: false; initial-value: 0deg;
}
@keyframes borderSpin {
  to { --border-angle: 360deg; }
}
.hero__stat { text-align: center; }
.hero__stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-white);
  line-height: 1;
}
.hero__stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-muted);
  font-weight: 500;
}
.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--clr-border);
}

/* Hero visual (floating cards) */
.hero__visual {
  position: relative;
  height: 400px;
}

.hero__card-mock {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(20px);
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}
.hero__card-mock:hover {
  box-shadow: 0 20px 50px rgba(99,102,241,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(99,102,241,0.35);
}

/* card--2 (Clinical)  → top-left   */
.hero__card-mock--2 { top: 15px;  left: 10px;  z-index: 3; }
/* card--1 (Agenda)    → top-right  */
.hero__card-mock--1 { top: 60px;  right: 5px;  left: auto; z-index: 2; }
/* card--3 (WebFactory)→ bottom-left*/
.hero__card-mock--3 { bottom: 30px; left: 10px; z-index: 1; }
/* card--4 (Labs)      → bottom-right*/
.hero__card-mock--4 { bottom: 15px; right: 5px; left: auto; z-index: 2; }

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  align-self: flex-start;
}
.mock-dot--green  { background: #10b981; box-shadow: 0 0 6px #10b981; }
.mock-dot--blue   { background: var(--clr-primary); box-shadow: 0 0 6px var(--clr-primary); }
.mock-dot--orange { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.mock-dot--purple { background: #a855f7; box-shadow: 0 0 6px #a855f7; }

.mock-line {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.12);
}
.mock-line--wide   { width: 100%; }
.mock-line--medium { width: 70%; }
.mock-line--short  { width: 45%; }

.mock-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.mock-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--clr-primary-2);
}
.mock-chip--cyan   { background: rgba(6,182,212,0.2); border-color: rgba(6,182,212,0.3); color: var(--clr-cyan); }
.mock-chip--green  { background: rgba(16,185,129,0.2); border-color: rgba(16,185,129,0.3); color: #34d399; }
.mock-chip--orange { background: rgba(245,158,11,0.2); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.mock-chip--purple { background: rgba(168,85,247,0.2); border-color: rgba(168,85,247,0.3); color: #c084fc; }

/* Scroll indicator */
.hero__scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 2rem;
  color: var(--clr-muted-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 2px solid var(--clr-border);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}
.scroll-mouse__dot {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--clr-muted-2);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ================================================================
   ABOUT
   ================================================================ */
.about {
  padding-block: 7rem;
  background: var(--clr-bg-2);
  position: relative;
}
.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
  opacity: 0.3;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about__text .section-title { max-width: 480px; }
.about__lead {
  font-size: 1.05rem;
  color: var(--clr-text);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.about__text p {
  color: var(--clr-muted);
  margin-bottom: 1.75rem;
}
.about__text strong { color: var(--clr-primary-2); font-weight: 600; }

.about__values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.value-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition:
    border-color var(--transition),
    transform    var(--transition),
    box-shadow   var(--transition),
    background   var(--transition);
}
.value-card:hover {
  border-color: rgba(99,102,241,0.35);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(99,102,241,0.12);
  background: rgba(99,102,241,0.06);
}
.value-card__icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.value-card:hover .value-card__icon { transform: scale(1.2) rotate(-5deg); }

.value-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-white);
  margin-bottom: 0.4rem;
}
.value-card p {
  font-size: 0.85rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

/* ================================================================
   PRODUCTS
   ================================================================ */
.products {
  padding-block: 7rem;
  background: var(--clr-bg);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ─── Card Flip ──────────────────────────────────────────── */
.card-flip-outer {
  perspective: 1600px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 100%;
}

/* Card faces */
.card-face {
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-face--front {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  overflow: hidden;
}
.card-face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  overflow: hidden;
  border-radius: inherit;
}
/* Per-product back face backgrounds — fallback */
.product-card--clinical   .card-face--back { background: #030f0a; }
.product-card--agenda     .card-face--back { background: #030a18; }
.product-card--webfactory .card-face--back { background: #120a00; }
.product-card--labs       .card-face--back { background: #0a0318; }

/* Screenshot image inside back face */
.card-back__screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.9;
  z-index: 0;
  border-radius: inherit;
}

/* Dark gradient overlay for readability */
.card-back__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.product-card--clinical   .card-back__overlay { background: linear-gradient(to top, rgba(3,15,10,0.88) 0%, rgba(16,185,129,0.12) 55%, rgba(0,0,0,0.45) 100%); }
.product-card--agenda     .card-back__overlay { background: linear-gradient(to top, rgba(3,10,24,0.88) 0%, rgba(14,165,233,0.12) 55%, rgba(0,0,0,0.45) 100%); }
.product-card--webfactory .card-back__overlay { background: linear-gradient(to top, rgba(18,10,0,0.88) 0%, rgba(245,158,11,0.12) 55%, rgba(0,0,0,0.45) 100%); }
.product-card--labs       .card-back__overlay { background: linear-gradient(to top, rgba(10,3,24,0.88) 0%, rgba(168,85,247,0.12) 55%, rgba(0,0,0,0.45) 100%); }

/* Mobile-only glow background */
.card-back__mobile-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  display: none;
}
.product-card--clinical   .card-back__mobile-bg { background: radial-gradient(ellipse at 50% 30%, rgba(16,185,129,0.25) 0%, #030f0a 70%); }
.product-card--agenda     .card-back__mobile-bg { background: radial-gradient(ellipse at 50% 30%, rgba(14,165,233,0.25) 0%, #030a18 70%); }
.product-card--webfactory .card-back__mobile-bg { background: radial-gradient(ellipse at 50% 30%, rgba(245,158,11,0.25) 0%, #120a00 70%); }
.product-card--labs       .card-back__mobile-bg { background: radial-gradient(ellipse at 50% 30%, rgba(168,85,247,0.25) 0%, #0a0318 70%); }

/* Desktop: screenshot visible, icon hidden */
.card-back__icon { font-size: 3.5rem; position: relative; z-index: 2; display: none; }

@media (max-width: 768px) {
  /* Mobile: hide screenshot/overlay, show glow bg + icon */
  .card-back__screenshot,
  .card-back__overlay { display: none; }
  .card-back__mobile-bg { display: block; }
  .card-back__icon { display: block; }
}
.card-back__name  {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}
.card-back__prefix { color: var(--clr-muted-2); font-weight: 600; }
.card-back__hint  {
  font-size: 0.8rem;
  color: var(--clr-muted);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-back__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: backDotPulse 1.2s ease-in-out infinite;
}
.product-card--clinical  .card-back__dot { background: #10b981; }
.product-card--agenda    .card-back__dot { background: #0ea5e9; }
.product-card--webfactory .card-back__dot { background: #f59e0b; }
.product-card--labs      .card-back__dot { background: #a855f7; }
@keyframes backDotPulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.3; transform:scale(0.6); } }

/* Zoom overlay */
.card-zoom-overlay {
  position: fixed;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Product card base */
.product-card {
  position: relative;
  height: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  transition:
    transform    0.7s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow   0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform-style: preserve-3d;
}
.product-card:not(.is-flipping):hover { transform: translateY(-10px); }
.product-card.is-flipping {
  transform: rotateY(180deg) !important;
  pointer-events: none;
}

/* CTA as button reset */
button.product-card__cta {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  padding: 0;
}
/* mouse-tracking glow — position set via JS CSS vars */
.product-card .card-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.06),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.product-card:hover .card-spotlight { opacity: 1; }

/* Top accent line */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transition: opacity var(--transition);
}

/* Glow on hover */
.product-card__glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.product-card:hover .product-card__glow { opacity: 0.18; }

/* Agenda */
.product-card--agenda::before  { background: linear-gradient(90deg, var(--clr-agenda-a), var(--clr-agenda-b)); }
.product-card--agenda .product-card__glow { background: var(--clr-agenda-a); }
.product-card--agenda:hover { border-color: rgba(14,165,233,0.35); box-shadow: 0 20px 60px rgba(14,165,233,0.12); }

/* Clinical */
.product-card--clinical::before  { background: linear-gradient(90deg, var(--clr-clinical-a), var(--clr-clinical-b)); }
.product-card--clinical .product-card__glow { background: var(--clr-clinical-a); }
.product-card--clinical:hover { border-color: rgba(16,185,129,0.35); box-shadow: 0 20px 60px rgba(16,185,129,0.12); }

/* WebFactory */
.product-card--webfactory::before  { background: linear-gradient(90deg, var(--clr-web-a), var(--clr-web-b)); }
.product-card--webfactory .product-card__glow { background: var(--clr-web-a); }
.product-card--webfactory:hover { border-color: rgba(245,158,11,0.35); box-shadow: 0 20px 60px rgba(245,158,11,0.12); }

/* Labs */
.product-card--labs::before  { background: linear-gradient(90deg, var(--clr-labs-a), var(--clr-labs-b)); }
.product-card--labs .product-card__glow { background: var(--clr-labs-a); }
.product-card--labs:hover { border-color: rgba(168,85,247,0.35); box-shadow: 0 20px 60px rgba(168,85,247,0.12); }

/* Card header */
.product-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.product-card__icon {
  font-size: 2rem;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  background: rgba(255,255,255,0.04);
}

.product-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
}

/* Card name */
.product-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--clr-white);
  line-height: 1;
}
.product-name-prefix {
  color: var(--clr-muted-2);
  font-weight: 600;
}

/* Card description */
.product-card__desc {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

/* Card features */
.product-card__features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
}
.product-card__features li {
  font-size: 0.85rem;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.5;
}
.product-card__features li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  flex-shrink: 0;
}
.product-card--agenda   .product-card__features li::before { background: rgba(14,165,233,0.2); color: var(--clr-agenda-a); }
.product-card--clinical .product-card__features li::before { background: rgba(16,185,129,0.2); color: var(--clr-clinical-a); }
.product-card--webfactory .product-card__features li::before { background: rgba(245,158,11,0.2); color: var(--clr-web-a); }
.product-card--labs      .product-card__features li::before { background: rgba(168,85,247,0.2); color: var(--clr-labs-a); }

/* Card CTA */
.product-card__cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--clr-muted);
  margin-top: 0.5rem;
  transition:
    color var(--transition-fast),
    gap   var(--transition-fast),
    letter-spacing var(--transition-fast);
  gap: 0.25rem;
}
.product-card__cta:hover {
  color: var(--clr-white);
  gap: 0.5rem;
  letter-spacing: 0.01em;
}

/* Coming soon card */
.coming-soon-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px dashed rgba(99,102,241,0.3);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
}
.coming-soon-card__content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.coming-soon-card__icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}
.coming-soon-card__text { flex: 1; min-width: 240px; }
.coming-soon-card__text h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--clr-white);
  margin-bottom: 0.4rem;
}
.coming-soon-card__text p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

/* ================================================================
   WHY MISD
   ================================================================ */
.why-misd {
  padding-block: 7rem;
  background: var(--clr-bg-2);
  position: relative;
  overflow: hidden;
}
.why-misd::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-cyan), transparent);
  opacity: 0.25;
}
.why-misd::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.06), transparent 70%);
  bottom: -200px;
  right: -100px;
  pointer-events: none;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.why-item {
  display: flex;
  gap: 1.5rem;
  padding: 2.5rem;
  background: rgba(255,255,255,0.02);
  border-right: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  transition:
    background  var(--transition),
    transform   var(--transition);
  position: relative;
  overflow: hidden;
}
/* Sweeping shine on hover */
.why-item::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.07), transparent);
  transition: left 0.7s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.why-item:hover::before { left: 150%; }
.why-item:hover { background: rgba(99,102,241,0.06); }
.why-item:nth-child(even) { border-right: none; }
.why-item:nth-child(3),
.why-item:nth-child(4) { border-bottom: none; }

.why-item__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(99,102,241,0.15);
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}
.why-item:hover .why-item__number {
  color: rgba(99,102,241,0.4);
  transform: scale(1.08);
}

.why-item__content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-white);
  margin-bottom: 0.6rem;
}
.why-item__content p {
  font-size: 0.88rem;
  color: var(--clr-muted);
  line-height: 1.75;
}

/* ================================================================
   CTA SECTION
   ================================================================ */
.cta-section {
  position: relative;
  padding-block: 7rem;
  background: var(--clr-bg);
  overflow: hidden;
}
.cta-section__bg { position: absolute; inset: 0; pointer-events: none; }
.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.cta-orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%);
  left: -150px; top: 50%;
  transform: translateY(-50%);
}
.cta-orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
  right: -100px; top: 50%;
  transform: translateY(-50%);
}

.cta__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--clr-white);
  line-height: 1.2;
  margin-block: 1rem 1.25rem;
}
.cta__subtitle {
  font-size: 1.05rem;
  color: var(--clr-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.cta__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: #050510;
  border-top: 1px solid var(--clr-border);
  padding-top: 4rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--clr-border);
}

.footer__brand .nav__logo { margin-bottom: 1rem; }
.footer__brand p {
  font-size: 0.85rem;
  color: var(--clr-muted-2);
  line-height: 1.7;
  max-width: 260px;
}

.footer__links h4,
.footer__contact h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text);
  margin-bottom: 1rem;
}
.footer__links ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__links a {
  font-size: 0.88rem;
  color: var(--clr-muted-2);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--clr-text); }

.footer__contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--clr-muted-2);
  margin-bottom: 0.6rem;
}
.footer__contact svg { opacity: 0.7; flex-shrink: 0; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}
.footer__bottom p { font-size: 0.82rem; color: var(--clr-muted-2); }
.footer__made { opacity: 0.6; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet – 1024px */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: 4rem 2rem;
  }
  .hero__subtitle { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__stats { margin-inline: auto; }
  .hero__visual { display: none; }

  .about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__text .section-title { max-width: 100%; }

  .products__grid { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mobile – 768px */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .hero__title { font-size: 2rem; }
  .hero__stats { flex-wrap: wrap; gap: 1rem; }

  .about__values { grid-template-columns: 1fr; }

  .products__grid { grid-template-columns: 1fr; }


  .why-grid { grid-template-columns: 1fr; }
  .why-item { border-right: none !important; }
  .why-item:nth-child(3) { border-bottom: 1px solid var(--clr-border) !important; }

  .coming-soon-card__content { flex-direction: column; text-align: center; }
  .coming-soon-card__content .btn { margin-inline: auto; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* Small mobile – 480px */
@media (max-width: 480px) {
  .hero__badge { font-size: 0.75rem; }
  .hero__title { font-size: 1.75rem; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats { flex-direction: column; gap: 1rem; width: 100%; }
  .hero__stat-divider { width: 100%; height: 1px; }

  .cta__actions { flex-direction: column; align-items: center; }
  .cta__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}

/* ================================================================
   SCROLL-DRIVEN SECTION SEPARATOR (aurora line)
   ================================================================ */
.section-aurora-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(99,102,241,0.5) 30%,
    rgba(6,182,212,0.5) 70%,
    transparent 100%
  );
  animation: auroraLine 4s ease-in-out infinite alternate;
}
@keyframes auroraLine {
  from { opacity: 0.3; filter: blur(0px); }
  to   { opacity: 0.8; filter: blur(1px); }
}

/* ================================================================
   PRODUCT CARD 3D TILT (applied via JS)
   ================================================================ */
.product-card { perspective: 1000px; }
.product-card__inner-tilt {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================================================================
   FLOATING LABEL ANIMATION on section tags
   ================================================================ */
.section-tag {
  animation: tagFloat 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes tagFloat {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   FOOTER LINK HOVER (underline grow)
   ================================================================ */
.footer__links a {
  position: relative;
}
.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--clr-primary-2);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.footer__links a:hover::after { width: 100%; }

/* ================================================================
   REDUCE MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}
