/* ==========================================================================
   BASE — reset, tipografía y utilidades mínimas
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background-color: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

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

img {
  height: auto;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Foco visible y consistente para navegación por teclado. */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Íconos --------------------------------------------------------------
   Todos los SVG se dibujan con currentColor, así heredan el color del padre. */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.icon--xs { width: 0.875rem; height: 0.875rem; }
.icon--sm { width: 1rem;     height: 1rem; }
.icon--md { width: 1.5rem;   height: 1.5rem; }
.icon--lg { width: 2rem;     height: 2rem; }
.icon--xl { width: 2.5rem;   height: 2.5rem; }
.icon--2xl { width: 3rem;    height: 3rem; }

/* --- Utilidades ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

.section {
  padding-block: var(--space-16);
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

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

.is-hidden {
  display: none !important;
}

/* --- Animaciones de entrada ---------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-bottom {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes pulse {
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fade-in var(--duration-slow) var(--ease);
}

.animate-zoom-in {
  animation: zoom-in var(--duration-slow) var(--ease);
}

.animate-pulse {
  animation: pulse 2s var(--ease) infinite;
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-12);
  }

  .section {
    padding-block: var(--space-24);
  }
}
