/* ==========================================================================
   Prevemind — hoja de estilos
   Paleta sobria: base slate + acento teal. Minimalista, profesional.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --accent:        #0f766e;
  --accent-hover:  #0d5f59;
  --accent-soft:   #ecfdf7;
  --accent-ring:   rgba(15, 118, 110, .25);

  --bg:            #ffffff;
  --bg-alt:        #f7f9fa;
  --bg-elev:       #ffffff;
  --bg-deep:       #0f172a;

  --text:          #0f172a;
  --text-soft:     #475569;
  --text-muted:    #64748b;
  --text-invert:   #f8fafc;

  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --warn:          #d97706;

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow:    0 4px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .10);

  --max-width: 1140px;
  --header-h: 72px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --accent:        #2dd4bf;
  --accent-hover:  #5eead4;
  --accent-soft:   rgba(45, 212, 191, .12);
  --accent-ring:   rgba(45, 212, 191, .3);

  --bg:            #0b1120;
  --bg-alt:        #0f172a;
  --bg-elev:       #111c31;
  --bg-deep:       #060b16;

  --text:          #e8eef7;
  --text-soft:     #a8b6cb;
  --text-muted:    #8496ae;
  --text-invert:   #0b1120;

  --border:        #1e2b42;
  --border-strong: #2b3b57;

  --warn:          #fbbf24;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 4px 20px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a  { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px var(--accent-ring);
}
.btn-primary:hover { background: var(--accent-hover); }
[data-theme="dark"] .btn-primary { color: #06231f; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm    { padding: 9px 18px; font-size: .875rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); flex-shrink: 0; }
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.logo-text span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}
.nav > a:not(.btn) {
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: color .18s var(--ease);
}
.nav > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--bg-alt); }
.icon-btn svg {
  width: 19px; height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, var(--accent-ring) 0%, transparent 68%);
  opacity: .55;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-ring);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-ring); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  letter-spacing: -.035em;
  margin-bottom: 20px;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-soft);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  font-size: .87rem;
  color: var(--text-muted);
}
.hero-notes li { display: flex; align-items: center; gap: 8px; }
.hero-notes li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Mock del producto ---------- */
.mock-window {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.mock-bar .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.mock-title {
  margin-left: 12px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.mock-body { padding: 22px; display: grid; gap: 20px; }

.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mock-stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.mock-stat-label { display: block; font-size: .72rem; color: var(--text-muted); }
.mock-stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 4px 0 10px;
}
.bar { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar i.warn { background: var(--warn); }

.mock-list { display: grid; gap: 2px; }
.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .84rem;
  color: var(--text-soft);
}
.mock-row:nth-child(odd) { background: var(--bg-alt); }
.mock-row em { margin-left: auto; font-style: normal; font-size: .76rem; color: var(--text-muted); }
.tick {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tick.ok   { background: var(--accent); }
.tick.warn { background: var(--warn); }

/* ---------- Franja de métricas ---------- */
.stats-strip {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: .89rem;
  color: var(--text-soft);
  max-width: 34ch;
  margin-inline: auto;
}

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 700px;
  margin: 0 auto clamp(38px, 5vw, 56px);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 14px;
}
.section-sub { color: var(--text-soft); font-size: 1.02rem; }

/* ---------- Normativa ---------- */
.normativa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.norm-card {
  background: var(--bg);
  padding: 30px 26px;
  transition: background-color .2s var(--ease);
}
.norm-card:hover { background: var(--bg-alt); }
.norm-card h3 { font-size: 1.03rem; margin-bottom: 10px; }
.norm-card p  { font-size: .92rem; color: var(--text-soft); }

/* ---------- Tarjetas de módulos ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 20px;
}
.card {
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { font-size: 1.03rem; margin-bottom: 8px; }
.card p  { font-size: .92rem; color: var(--text-soft); }

/* ---------- Pasos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--border);
}
.step-num {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p  { font-size: .93rem; color: var(--text-soft); }

/* ---------- Beneficios ---------- */
.benefits-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.benefits-copy .section-sub { margin-bottom: 26px; }
.benefits-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 14px; }

.benefits-list { display: grid; gap: 26px; }
.benefits-list li { display: flex; gap: 16px; }
.check {
  position: relative;
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  margin-top: 2px;
}
.check::after {
  content: '';
  position: absolute;
  left: 9px; top: 6px;
  width: 6px; height: 11px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.benefits-list h3 { font-size: 1.02rem; margin-bottom: 5px; }
.benefits-list p  { font-size: .93rem; color: var(--text-soft); }

/* ---------- CTA + formulario ---------- */
.cta-section { padding-bottom: clamp(72px, 10vw, 120px); }

.cta-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  padding: clamp(32px, 5vw, 52px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.cta-copy h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-bottom: 14px; }
.cta-copy p  { color: var(--text-soft); }

.cta-contact { margin-top: 26px; display: grid; gap: 12px; }
.cta-contact li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: .93rem;
  color: var(--text-soft);
}
.cta-contact svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cta-contact a:hover { color: var(--accent); }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.form .btn, .form-note, .form-status { grid-column: 1 / -1; }

.field label {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-soft);
}
.field .opt { color: var(--text-muted); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: .93rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field.invalid input,
.field.invalid select { border-color: #dc2626; }

.error {
  font-size: .78rem;
  color: #dc2626;
  min-height: 0;
}

.form-note   { font-size: .78rem; color: var(--text-muted); text-align: center; margin-top: -4px; }
.form-status { font-size: .88rem; font-weight: 500; color: var(--accent); text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-invert);
  padding: 56px 0 28px;
}
[data-theme="dark"] .site-footer { color: var(--text); border-top: 1px solid var(--border); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand { max-width: 340px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo-mark { color: var(--accent); }
.footer-brand p { font-size: .89rem; opacity: .7; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start; }
.footer-nav a { font-size: .89rem; opacity: .72; transition: opacity .18s var(--ease); }
.footer-nav a:hover { opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px;
  display: grid;
  gap: 10px;
  font-size: .8rem;
  opacity: .6;
}
[data-theme="dark"] .footer-bottom { border-top-color: var(--border); }
.disclaimer { max-width: 78ch; }

/* ---------- Animación de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner,
  .benefits-layout,
  .cta-card { grid-template-columns: 1fr; }

  .hero-visual { order: -1; }
  .stats-grid  { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 24px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav > a:not(.btn) { padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav > a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 14px; }

  .mock-stats { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
