/* ==========================================================================
   SOLUCIONES HOSPITALARIAS — BASE & RESET CSS
   Versión: 1.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. MODERN RESET & BOX SIZING
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* --------------------------------------------------------------------------
   02. TIPOGRAFÍA BASE (MANUAL DE MARCA: MONTSERRAT FUNCIONAL & TÍTULOS)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--text-hero);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

/* Kinetic Typography: Letras y titulares que se acomodan suavemente al scrollear */
.kinetic-text {
  opacity: 0;
  transform: translateY(22px);
  letter-spacing: 0.02em;
  transition: opacity 0.85s var(--ease-natural), transform 0.85s var(--ease-natural), letter-spacing 0.85s var(--ease-natural);
  will-change: transform, opacity;
}

.kinetic-text.is-settled {
  opacity: 1;
  transform: translateY(0);
  letter-spacing: var(--letter-spacing-tight);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

p.lead {
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

strong, b {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

small {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   03. ENLACES & ELEMENTOS DE FORMULARIO
   -------------------------------------------------------------------------- */
a {
  color: var(--color-brand-blue);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-natural), opacity var(--duration-fast) var(--ease-natural);
}

a:hover {
  color: var(--color-brand-cyan);
}

button {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

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

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   04. ACCESIBILIDAD & FOCO VISIBLE (WCAG AA/AAA)
   -------------------------------------------------------------------------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-brand-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip-to-content {
  position: fixed;
  top: -120px;
  left: var(--space-4);
  background: var(--color-brand-blue-deep);
  color: #FFFFFF;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  z-index: 10000;
  transition: top 0.25s var(--ease-natural);
  border: 2px solid var(--color-brand-cyan);
  box-shadow: 0 10px 30px rgba(0, 74, 173, 0.4);
}

.skip-to-content:focus {
  top: var(--space-4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background-color: var(--color-brand-cyan-soft);
  color: var(--color-brand-blue-deep);
}

/* --------------------------------------------------------------------------
   05. UTILITY CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: var(--container-narrow-w);
}

/* --------------------------------------------------------------------------
   06. PREFERS-REDUCED-MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .cloud-layer,
  .hero-product-item,
  .preloader-symbol {
    animation: none !important;
    transform: none !important;
  }
}
