/* ============================================================
 * Dentalead — Polish layer v4
 * ------------------------------------------------------------
 * Capa ADITIVA de refinamiento. Carga DESPUÉS de main.css.
 * Objetivo: acabado más elegante y sobrio SIN tocar la
 * composición ni romper el layout. 100% reversible.
 *
 * v4: + textura de grano sutil (premium), borde de luz glass
 * unificado en cards y acabado glass en inputs.
 * v3: cursor nativo total (sin anillo), sin acento serif.
 * ============================================================ */

:root {
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── 1. Nitidez tipográfica (retina / Apple-like) ─── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tracking editorial: titulares grandes más compactos = más elegantes.
   Solo letter-spacing → no afecta a tamaños ni a saltos de línea. */
.hero-h1,
.section-h1,
.lp-hero-left h1,
.blog-header h1,
.article-header h1,
.contact-left h2,
#numbers h2 {
  letter-spacing: -0.025em;
}
.article-body h2 { letter-spacing: -0.015em; }

/* ─── 2. Cursor: 100% NATIVO (se quita el cursor custom por completo) ─── */
@media (hover: hover) and (pointer: fine) {
  body,
  a, button, [role="button"], label, select, summary,
  .faq-question, .hamburger, .theme-toggle, .lang-btn {
    cursor: auto !important;
  }
  a, button, [role="button"], summary,
  .faq-question, .hamburger, .theme-toggle, .lang-btn,
  label[for], .lgf-submit {
    cursor: pointer !important;
  }
  input, textarea, select { cursor: auto !important; }
  /* Elimina los elementos del cursor custom */
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* ─── 3. Sombras en capas en vez de glows neón (más sobrio) ─── */
.btn-primary,
.btn-green {
  box-shadow: 0 6px 20px rgba(15,209,122,0.24), 0 2px 6px rgba(0,0,0,0.28);
}
.btn-primary:hover,
.btn-green:hover {
  box-shadow: 0 12px 32px rgba(15,209,122,0.34), 0 4px 12px rgba(0,0,0,0.32);
}
.testimonial-card:hover,
.step-card:hover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.22);
}

/* ─── 4. Micro-interacciones más fluidas (mismo look, mejor tacto) ─── */
.btn-primary,
.btn-glass,
.btn-green,
.btn-outline,
.btn-nav-cta {
  transition: transform 0.35s var(--ease-premium),
              box-shadow 0.35s var(--ease-premium),
              background 0.3s var(--ease-soft),
              border-color 0.3s var(--ease-soft);
}
.btn-primary .arrow { transition: transform 0.35s var(--ease-premium); }

/* Sheen sutil que recorre el CTA principal al pasar el cursor */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s var(--ease-premium);
  pointer-events: none;
  z-index: 0;
}
.btn-primary:hover::after { left: 130%; }

.step-card,
.number-card,
.testimonial-card,
.problem-item,
.blog-card,
.service-card,
.recurso-card,
.faq-item {
  transition: transform 0.4s var(--ease-premium),
              box-shadow 0.4s var(--ease-premium),
              border-color 0.3s var(--ease-soft),
              background 0.3s var(--ease-soft);
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 56px rgba(0,0,0,0.34);
}

/* ─── 5. Selección de texto con color de marca ─── */
::selection { background: rgba(107,175,192,0.30); color: #fff; }
body.light-mode ::selection { background: rgba(22,114,192,0.22); color: #0B1F3A; }

/* ─── 6. Scroll: las anclas no quedan bajo el navbar fijo ─── */
html { scroll-padding-top: 96px; }

/* ─── 7. Scrollbar custom (sutil, acorde al tema) ─── */
@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: rgba(107,175,192,0.45) transparent; }
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: rgba(107,175,192,0.35);
    border-radius: 50px;
    border: 3px solid transparent;
    background-clip: content-box;
  }
  ::-webkit-scrollbar-thumb:hover { background: rgba(120,210,225,0.55); background-clip: content-box; }
  body.light-mode * { scrollbar-color: rgba(22,114,192,0.4) transparent; }
  body.light-mode ::-webkit-scrollbar-thumb { background: rgba(22,114,192,0.3); background-clip: content-box; }
}

/* ─── 8. Foco accesible por teclado (no afecta al ratón) ─── */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.faq-question:focus-visible,
.lang-btn:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 3px;
  border-radius: 6px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* Enlaces de texto en artículos: subrayado fluido */
.article-body a:not([class]) {
  text-decoration-color: rgba(107,175,192,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s var(--ease-soft);
}
.article-body a:not([class]):hover { text-decoration-color: var(--cyan-bright); }

img { -webkit-user-drag: none; }

/* ─── 10. Textura de grano sutil (premium, tipo Linear/Apple) ─── */
/* Overlay fijo, no interactivo, casi imperceptible: da "cuerpo" y
   profundidad al fondo plano sin oscurecer el contenido. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.light-mode::after { opacity: 0.035; }

/* ─── 11. Borde de luz glass unificado en cards (acabado premium) ─── */
.step-card,
.number-card,
.testimonial-card,
.blog-card,
.service-card,
.recurso-card {
  box-shadow: 0 8px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ─── 12. Inputs con acabado glass sutil ─── */
.lgf-input,
.lgf-textarea {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.lgf-input:focus,
.lgf-textarea:focus {
  box-shadow: 0 0 0 3px rgba(107,175,192,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ─── 9. prefers-reduced-motion: respeto total (accesibilidad) ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary::after { display: none !important; }
  #cursor-dot, #cursor-ring { display: none !important; }
}
