/* ============================================================
   RQ MEDICAL — DESIGN SYSTEM
   "Clinical Tech Minimal"
   Reset + tokens + tipografía + componentes compartidos
   ============================================================ */

/* === 1. TOKENS === */
:root {
  --ink: #0A1E22;
  --teal: #315F63;
  --aqua: #58aeb5;
  --steel: #649399;
  --mist: #EAF3F5;
  --mist-strong: #D8E7EF;
  --white: #ffffff;

  /* Serif de alto contraste, en itálica: contrasta con la grotesca neutra del
     cuerpo, así la jerarquía se lee por la forma de la letra y no solo por el
     tamaño. Se usa únicamente en titulares de display; las etiquetas técnicas
     (specs, precios, kickers) siguen en la tipografía de cuerpo. */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  /* Inter es una grotesca neutra, muy cercana a Arial/Helvetica, pero con
     pesos ligeros reales (Arial no tiene Light: su mínimo es 400). Arial queda
     como respaldo si la fuente web no llega a cargar. */
  --font-body: 'Inter', Arial, Helvetica, sans-serif;
  --font-body-weight: 300;

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;

  --gradient-accent: linear-gradient(90deg, var(--teal), var(--aqua));

  --shadow-sm: 0 2px 12px rgba(10, 30, 34, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 30, 34, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 30, 34, 0.16);
  --shadow-glow: 0 8px 24px rgba(88, 174, 181, 0.28);

  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* === 2. RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* === 3. TIPOGRAFÍA === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 600;
  /* Playfair es ancha y de remates finos: el tracking negativo que servía para
     la grotesca anterior aquí apelmaza las letras */
  letter-spacing: normal;
  line-height: 1.15;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

p {
  color: var(--steel);
}

.section-dark p {
  color: rgba(234, 243, 245, 0.75);
}

/* === 4. LAYOUT === */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--ink);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

.section-mist {
  background: var(--mist);
}

/* minmax(0, 1fr) permite que las celdas se encojan bajo su min-content
   (evita que contenido de ancho fijo, como el reCAPTCHA, desborde el grid) */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* === 5. SECTION HEAD (kicker + título + subtítulo) === */
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--aqua);
  margin-bottom: 16px;
}

.kicker::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.section-head h2 {
  margin-bottom: 18px;
}

.section-head .section-subtitle {
  font-size: 1.08rem;
  color: var(--steel);
  line-height: 1.7;
}

.section-dark .section-subtitle {
  color: rgba(234, 243, 245, 0.75);
}

/* === 6. BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  border: 1.5px solid transparent;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  border-color: var(--teal);
  color: var(--teal);
  background: transparent;
}

.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover {
  box-shadow: var(--shadow-glow);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}

.btn-whatsapp:hover {
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.82rem;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

/* === 7. BADGE === */
.badge-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--mist);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === 8. TEXTO GRADIENTE === */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* === 9. SCROLL REVEAL === */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
  will-change: opacity, transform;
}

html.js [data-reveal="left"] {
  transform: translateX(-36px);
}

html.js [data-reveal="right"] {
  transform: translateX(36px);
}

html.js [data-reveal="zoom"] {
  transform: scale(0.92);
}

html.js [data-reveal].revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* === 10. HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 22px 0;
  background: transparent;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mist-strong);
  box-shadow: var(--shadow-sm);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo img {
  height: 44px;
  width: auto;
  transition: height 0.4s ease;
}

.site-header.scrolled .logo img {
  height: 36px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav .nav-links a {
  position: relative;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  padding-bottom: 4px;
}

.main-nav .nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: width 0.35s var(--ease-smooth);
}

.main-nav .nav-links a:hover::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  z-index: 1001;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-smooth), opacity 0.25s ease;
}

body.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Panel menú móvil */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 30, 34, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-smooth), visibility 0.4s var(--ease-smooth);
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.mobile-menu .nav-links a {
  /* Igual que la navegación de escritorio: los enlaces son funcionales, no
     titulares, y deben leerse de un vistazo */
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--white);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth);
}

body.menu-open .mobile-menu .nav-links a {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open .mobile-menu .nav-links a:nth-child(1) {
  transition-delay: 0.05s;
}

body.menu-open .mobile-menu .nav-links a:nth-child(2) {
  transition-delay: 0.1s;
}

body.menu-open .mobile-menu .nav-links a:nth-child(3) {
  transition-delay: 0.15s;
}

body.menu-open .mobile-menu .nav-links a:nth-child(4) {
  transition-delay: 0.2s;
}

body.menu-open .mobile-menu .nav-links a:nth-child(5) {
  transition-delay: 0.25s;
}

body.menu-open {
  overflow: hidden;
}

/* === 11. HERO / PARTÍCULAS === */
.hero-particles-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* === 12. PRODUCT CARD === */
.product-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-smooth);
  z-index: 2;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card .card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--mist);
}

.product-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.product-card:hover .card-media img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-card .card-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.product-card .card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
}

.product-card .card-desc {
  font-size: 0.92rem;
  color: var(--steel);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-card .card-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.product-card .card-actions .btn {
  flex: 1;
}

/* === 13. FORMULARIOS === */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.form-control {
  width: 100%;
  padding: 15px 18px;
  background: var(--mist);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  /* Los controles de formulario no heredan font-weight del body: si no se
     declara, quedarían en 400 y se verían más gruesos que el resto del texto */
  font-weight: var(--font-body-weight);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-control::placeholder {
  color: var(--steel);
  opacity: 0.8;
}

.form-control:focus {
  outline: none;
  border-color: var(--aqua);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(88, 174, 181, 0.14);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

/* Honeypot oculto */
.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* === 14. TABLA DE ESPECIFICACIONES === */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  text-align: left;
  padding: 16px 14px;
  border-bottom: 1px solid var(--mist-strong);
  font-size: 0.95rem;
}

.specs-table th {
  color: var(--teal);
  font-weight: 700;
  width: 34%;
  /* Etiquetas técnicas en mayúsculas: en serif itálica se vuelven ilegibles */
  font-family: var(--font-body);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
  border-bottom: none;
}

/* === 15. ALERTS === */
.alert-success,
.alert-error {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-top: 16px;
}

.alert-success {
  background: rgba(88, 174, 181, 0.12);
  border: 1px solid rgba(88, 174, 181, 0.4);
  color: var(--teal);
}

.alert-success h3 {
  color: var(--teal);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.alert-error {
  background: rgba(214, 59, 59, 0.08);
  border: 1px solid rgba(214, 59, 59, 0.35);
  color: #B23A3A;
}

/* === 16. FOOTER === */
.site-footer {
  position: relative;
  background: var(--ink);
  color: rgba(234, 243, 245, 0.85);
  padding: 80px 0 0;
  border-top: 3px solid transparent;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(234, 243, 245, 0.12);
}

.footer-brand .footer-logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(234, 243, 245, 0.65);
  font-size: 0.92rem;
  max-width: 260px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col a,
.footer-col address {
  font-style: normal;
  color: rgba(234, 243, 245, 0.7);
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--aqua);
}

.footer-col svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: var(--aqua);
  margin-top: 2px;
}

.footer-cta p {
  color: rgba(234, 243, 245, 0.65);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.footer-bottom {
  padding: 26px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(234, 243, 245, 0.5);
}

/* === 17. BOTÓN FLOTANTE WHATSAPP === */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 800;
  transition: transform 0.35s var(--ease-smooth);
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

.wa-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: wa-pulse 2.5s infinite;
  pointer-events: none;
}

.wa-float:hover {
  transform: scale(1.08);
}

.wa-float .wa-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--ink);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wa-float:hover .wa-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

@keyframes wa-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::after {
    animation: none;
  }
}

/* === 18. SCROLLBAR Y SELECCIÓN === */
::selection {
  background: var(--aqua);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--mist);
}

::-webkit-scrollbar-thumb {
  background: var(--steel);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal);
}

/* === 19. RESPONSIVE === */
@media (max-width: 1200px) {
  .container {
    padding: 0 20px;
  }
}

@media (max-width: 992px) {
  .section {
    padding: 70px 0;
  }

  .main-nav .nav-links {
    display: none;
  }

  .header-cta .btn:not(.nav-toggle) {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 14px 26px;
    font-size: 0.88rem;
  }

  .wa-float {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 18px;
  }

  .wa-float svg {
    width: 26px;
    height: 26px;
  }
}