/* =========================================================
   BIDATA - ESTILOS GENERALES
   ========================================================= */

:root {
  --bg: #080b16;
  --bg-soft: #10162a;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f7ff;
  --muted: #aeb8d6;
  --accent: #7c5cff;
  --accent-2: #26d3c2;
  --danger: #ff5a6e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(38, 211, 194, 0.14), transparent 30rem),
    var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}


/* =========================================================
   HEADER / NAVEGACIÓN
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(8, 11, 22, 0.78);
  border-bottom: 1px solid var(--border);
  transform: translateY(0);
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-scrolled {
  background: rgba(8, 11, 22, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--text) !important;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.25);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  border-radius: 999px;
}


/* =========================================================
   HERO PRINCIPAL
   ========================================================= */

.hero {
  padding: 110px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-content p {
  max-width: 620px;
  font-size: 1.15rem;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}


/* =========================================================
   BOTONES
   ========================================================= */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(124, 92, 255, 0.28);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
}


/* =========================================================
   HERO VISUAL - ANTES / DESPUÉS
   ========================================================= */

.hero-card {
  padding: 18px;
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.dashboard-preview {
  overflow: hidden;
  min-height: 430px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(38, 211, 194, 0.22), transparent 18rem),
    linear-gradient(180deg, #121932, #090d1b);
  border: 1px solid var(--border);
}

.preview-header {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.preview-header span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card-strong);
}

.before-after-preview {
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.preview-column {
  min-height: 360px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.preview-column h3 {
  margin-bottom: 20px;
}

.preview-label {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.before {
  background:
    radial-gradient(circle at top left, rgba(255, 80, 100, 0.14), transparent 14rem),
    rgba(255, 255, 255, 0.04);
}

.after {
  background:
    radial-gradient(circle at top right, rgba(38, 211, 194, 0.18), transparent 14rem),
    rgba(255, 255, 255, 0.06);
}

.messy-sheet {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.sheet-row {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.sheet-row.short {
  width: 68%;
}

.sheet-row.red {
  background: rgba(255, 90, 110, 0.55);
}

.warning-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  color: #ffd8de;
  background: rgba(255, 80, 100, 0.12);
  border: 1px solid rgba(255, 80, 100, 0.22);
  font-size: 0.9rem;
}

.warning-box span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 80, 100, 0.24);
  font-weight: 900;
}

.clean-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.clean-metrics div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.clean-metrics small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.clean-metrics strong {
  font-size: 1.8rem;
}

.clean-chart {
  height: 140px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.clean-chart span {
  flex: 1;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.clean-chart span:nth-child(1) { height: 42%; }
.clean-chart span:nth-child(2) { height: 62%; }
.clean-chart span:nth-child(3) { height: 78%; }
.clean-chart span:nth-child(4) { height: 94%; }


/* =========================================================
   SECCIONES GENERALES
   ========================================================= */

.section {
  padding: 100px 0;
}

.section-soft {
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 46px;
}


/* =========================================================
   CARDS / GRILLAS
   ========================================================= */

.steps-grid,
.services-grid,
.levels-grid {
  display: grid;
  gap: 22px;
}

.steps-grid {
  grid-template-columns: repeat(4, 1fr);
}

.services-grid {
  grid-template-columns: repeat(2, 1fr);
}

.levels-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card,
.step-card,
.level-card,
.cta-box,
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.step-card,
.service-card,
.level-card {
  padding: 28px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.step-card:hover,
.service-card:hover,
.level-card:hover {
  transform: translateY(-6px);
  border-color: rgba(38, 211, 194, 0.35);
  background: rgba(255, 255, 255, 0.085);
}

.step-card i,
.service-card i {
  width: 34px;
  height: 34px;
  color: var(--accent-2);
  margin-bottom: 22px;
}


/* =========================================================
   NIVELES DE TRABAJO
   ========================================================= */

.level-number {
  display: inline-flex;
  margin-bottom: 30px;
  font-size: 0.9rem;
  color: var(--accent-2);
  font-weight: 800;
}

.featured {
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.22), transparent 18rem),
    var(--card);
  border-color: rgba(124, 92, 255, 0.35);
}


/* =========================================================
   CTA INTERMEDIO
   ========================================================= */

.cta-section {
  padding: 40px 0 100px;
}

.cta-box {
  padding: clamp(32px, 6vw, 70px);
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(38, 211, 194, 0.16), transparent 22rem),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.22), transparent 22rem),
    var(--card);
}

.cta-box p {
  max-width: 720px;
  margin: 0 auto 30px;
}


/* =========================================================
   CONTACTO / FORMULARIO
   ========================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  padding: 28px;
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(38, 211, 194, 0.55);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-content p {
  margin: 0;
}


/* =========================================================
   MODAL DIAGNÓSTICO
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100;
}

.modal.is-open {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: min(92%, 580px);
  margin: 80px auto;
  padding: 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.18), transparent 18rem),
    radial-gradient(circle at bottom left, rgba(38, 211, 194, 0.12), transparent 16rem),
    #0e1428;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: modalIn 0.35s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-step {
  display: none;
  animation: stepIn 0.28s ease;
}

.modal-step.active {
  display: block;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal-step h3 {
  max-width: 460px;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.modal-result-text {
  margin-bottom: 22px;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.options button {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.options button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(38, 211, 194, 0.55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.options button.is-selected {
  border-color: rgba(38, 211, 194, 0.8);
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(38, 211, 194, 0.16));
  box-shadow: 0 18px 40px rgba(38, 211, 194, 0.14);
}

.diagnostic-summary {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
}

.diagnostic-summary div {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
}

.diagnostic-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.diagnostic-summary strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.modal-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.modal-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 28px;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 920px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 82px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px;
    background: rgba(12, 17, 34, 0.96);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px;
  }

  .nav-cta {
    margin-top: 10px;
    text-align: center;
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 78px;
  }

  .steps-grid,
  .services-grid,
  .levels-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-preview {
    min-height: auto;
  }
}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    height: 72px;
  }

  .brand-logo {
    height: 36px;
  }

  .nav-links {
    top: 72px;
  }

  .hero {
    padding: 70px 0;
  }

  h1 {
    font-size: 3.2rem;
  }

  .section {
    padding: 72px 0;
  }

  .before-after-preview {
    grid-template-columns: 1fr;
  }

  .preview-column {
    min-height: auto;
  }

  .footer-content {
    flex-direction: column;
  }

  .modal-content {
    width: calc(100% - 28px);
    margin: 72px auto 24px;
    padding: 28px 22px;
    border-radius: 24px;
  }

  .modal-final-actions {
    flex-direction: column;
  }

  .modal-final-actions .btn,
  .modal-footer .btn {
    width: 100%;
  }
}