/* base.css — Reset y estilos globales del sitio Fulbito */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-cal);
  background: linear-gradient(180deg, var(--color-noche) 0%, #142a10 50%, var(--color-cesped) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Césped stripes — textura CSS liviana */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 80px,
    rgba(255,255,255,0.008) 80px,
    rgba(255,255,255,0.008) 160px
  );
  pointer-events: none;
  z-index: 0;
}

/* Semicírculo central decorativo */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  border: 2px solid var(--color-cal);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

/* ── Tipografía ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

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

@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-xl); }
}

a {
  color: var(--color-oro);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-oro-light); }
a:focus-visible {
  outline: 2px solid var(--color-oro);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

ul, ol { list-style: none; }

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

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

/* ── Section spacing ── */
.section {
  position: relative;
  padding: var(--space-4xl) 0;
  z-index: var(--z-base);
}

@media (max-width: 640px) {
  .section {
    padding: var(--space-3xl) 0;
  }
}

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

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-oro);
  color: var(--color-noche);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 999;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-md);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-noche); }
::-webkit-scrollbar-thumb {
  background: var(--color-tierra);
  border-radius: var(--radius-full);
}
