/* ============================================================
   NUEVOS HORIZONTES — Sistema de Diseño Principal
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — Design Tokens
   ============================================================ */
:root {
  /* Colores principales de marca */
  --color-black-inst: #0E0E0E;
  --color-oliva-deep: #3D4A1E;
  --color-verde-service: #4A7C44;
  --color-marfil: #F5F0E8;
  --color-white: #FAFAFA;
  --color-arena: #D4C9A8;
  --color-dorado: #C8A84B;
  --color-petroleo: #30434A;
  
  --color-graphite-light: #2c3539;
  --color-muted: #5e666a;
  --color-border: #DDD8CC;
  --color-border-dark: #C5BFAF;

  /* Semánticos */
  --color-primary: var(--color-black-inst);
  --color-secondary: var(--color-oliva-deep);
  --color-accent: var(--color-verde-service);
  --color-bg: var(--color-marfil);
  --color-text: var(--color-black-inst);
  --color-text-muted: var(--color-muted);

  /* Mapeo para compatibilidad con código existente */
  --color-deep-blue: var(--color-black-inst);
  --color-steel-blue: var(--color-petroleo);
  --color-teal: var(--color-verde-service);
  --color-teal-light: #52894c;
  --color-sand: var(--color-arena);
  --color-sand-light: var(--marfil);
  --color-warm-white: var(--color-white);
  --color-graphite: var(--color-black-inst);

  /* Tipografía */
  --font-heading: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* Espaciado */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Bordes y sombras */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(19, 38, 61, 0.08);
  --shadow-md:  0 4px 16px rgba(19, 38, 61, 0.10);
  --shadow-lg:  0 8px 32px rgba(19, 38, 61, 0.14);
  --shadow-xl:  0 16px 48px rgba(19, 38, 61, 0.18);

  /* Transiciones */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --nav-height: 72px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-deep-blue);
}

h1 { font-size: clamp(2rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.6rem, 4vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 3vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p { line-height: var(--leading-normal); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-primary  { color: var(--color-deep-blue); }
.text-accent   { color: var(--color-teal); }
.text-steel    { color: var(--color-steel-blue); }
.text-muted    { color: var(--color-text-muted); }
.text-white    { color: var(--color-white); }
.text-sand     { color: var(--color-sand); }

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-graphite-light);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

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

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

.section--sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--lg {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-8);
}

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

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing helpers */
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Backgrounds */
.bg-white      { background-color: var(--color-white); }
.bg-warm-white { background-color: var(--color-warm-white); }
.bg-sand       { background-color: var(--color-sand-light); }
.bg-deep-blue  { background-color: var(--color-deep-blue); }
.bg-steel      { background-color: var(--color-steel-blue); }
.bg-teal       { background-color: var(--color-teal); }
.bg-graphite   { background-color: var(--color-graphite); }

/* Section label / badge */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

.section-label--light {
  color: var(--color-sand);
  opacity: 0.8;
}

/* Section header */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-12);
}

.section-header p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Divider */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-teal);
  border-radius: var(--radius-full);
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   ANIMACIONES AL SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .section { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .section--lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }

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

  .container { padding-left: var(--space-5); padding-right: var(--space-5); }
}

@media (max-width: 480px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
}
