/* ============================================
   ALMAS EN RUTA — Global Styles
   ============================================ */

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Skip navigation (accesibilidad) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-primary);
  color: var(--text-on-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ── Headings ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

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

h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
}

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

h4 {
  font-size: var(--text-lg);
  font-weight: 500;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: var(--text-base);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ── Section ── */
.section {
  padding: var(--space-4xl) 0;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-alt {
  background-color: var(--bg-surface);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  margin: var(--space-md) auto 0;
  border-radius: var(--radius-full);
}

.section-header .section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-primary-color { color: var(--color-primary); }
.text-secondary-color { color: var(--color-secondary); }
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

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

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

  .section {
    padding: var(--space-2xl) 0;
  }
}
