/* ============================================================
   IAPLIKADA Consulting Services — styles.css
   Sistema de diseño global: variables, reset, layout base
   Versión 1.0 | Mayo 2026
   ============================================================ */

/* ============================================================
   1. FUENTES CORPORATIVAS
   ============================================================ */
@font-face {
  font-family: 'Kontrapunkt';
  src: url('../fonts/kontrapunkt.bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kontrapunkt';
  src: url('../fonts/kontrapunkt.light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kontrapunkt';
  src: url('../fonts/kontrapunkt.light-italic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   2. VARIABLES DE MARCA (Custom Properties)
   ============================================================ */
:root {
  /* --- Colores Primarios --- */
  --azul:           #3A539F;
  --azul-profundo:  #253567;
  --azul-oscuro:    #2E427F;
  --azul-claro:     #B0BAD8;
  --azul-palido:    #E1E5F0;

  /* --- Colores Secundarios --- */
  --teal:           #16AB8D;
  --teal-profundo:  #0E6F5B;
  --teal-oscuro:    #118870;
  --teal-claro:     #A1DDD1;
  --teal-palido:    #DCF2ED;

  /* --- Neutros --- */
  --negro:          #0D1117;
  --gris-oscuro:    #2C2C3E;
  --gris-medio:     #6B7080;
  --gris-claro:     #C8CDD8;
  --gris-palido:    #F2F4F8;
  --blanco:         #FFFFFF;

  /* --- Gradientes --- */
  --grad-principal: linear-gradient(135deg, #3A539F 0%, #16AB8D 100%);
  --grad-oscuro:    linear-gradient(135deg, #253567 0%, #0E6F5B 100%);
  --grad-hero:      linear-gradient(180deg, rgba(13,17,23,0) 0%, rgba(13,17,23,0.8) 100%);
  --grad-card:      linear-gradient(135deg, rgba(58,83,159,0.08) 0%, rgba(22,171,141,0.08) 100%);

  /* --- Tipografía --- */
  --font:           'Kontrapunkt', 'Calibri', 'Inter', system-ui, sans-serif;
  --fw-bold:        700;
  --fw-light:       300;

  /* --- Escala tipográfica fluida --- */
  --text-display:   clamp(2.75rem, 6vw, 5rem);
  --text-h1:        clamp(2rem, 4vw, 3rem);
  --text-h2:        clamp(1.5rem, 2.8vw, 2rem);
  --text-h3:        clamp(1.125rem, 2vw, 1.375rem);
  --text-body:      1rem;
  --text-sm:        0.875rem;
  --text-xs:        0.75rem;
  --lh-tight:       1.25;
  --lh-normal:      1.7;

  /* --- Espaciado --- */
  --sp-xs:    0.25rem;
  --sp-sm:    0.5rem;
  --sp-md:    1rem;
  --sp-lg:    1.5rem;
  --sp-xl:    2rem;
  --sp-2xl:   3rem;
  --sp-3xl:   4rem;
  --sp-4xl:   6rem;
  --sp-5xl:   8rem;

  /* --- Layout --- */
  --container:      1200px;
  --container-pad:  clamp(1rem, 4vw, 2rem);
  --section-py:     clamp(4rem, 8vw, 7rem);

  /* --- Componentes --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:   0 4px 24px rgba(58, 83, 159, 0.12);
  --shadow-lg:   0 8px 40px rgba(22, 171, 141, 0.18);
  --shadow-xl:   0 16px 64px rgba(37, 53, 103, 0.24);

  /* --- Transiciones --- */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast:    150ms;
  --dur-normal:  300ms;
  --dur-slow:    500ms;

  /* --- Accesibilidad --- */
  --focus-ring:    3px solid #16AB8D;
  --focus-offset:  3px;

  /* --- Z-index stack --- */
  --z-base:    1;
  --z-cards:   10;
  --z-nav:     100;
  --z-fab:     200;
  --z-modal:   300;
}

/* ============================================================
   3. RESET Y NORMALIZE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  font-weight: var(--fw-light);
  font-size: var(--text-body);
  line-height: var(--lh-normal);
  color: var(--gris-oscuro);
  background-color: var(--blanco);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--azul-profundo);
}

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

a {
  color: var(--azul);
  text-decoration: none;
  transition: color var(--dur-normal) var(--ease-out);
}

a:hover { color: var(--teal); }

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

ul, ol { list-style: none; }

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

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

/* ============================================================
   4. LAYOUT — CONTENEDOR Y GRIDS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

/* Grid utilitario */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }

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

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* Flex utilitario */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-sm  { gap: var(--sp-sm); }
.gap-md  { gap: var(--sp-md); }
.gap-lg  { gap: var(--sp-lg); }
.gap-xl  { gap: var(--sp-xl); }

/* ============================================================
   5. TIPOGRAFÍA UTILITARIA
   ============================================================ */
.text-display { font-size: var(--text-display); font-weight: var(--fw-bold); line-height: 1.1; letter-spacing: -1px; }
.text-h1      { font-size: var(--text-h1);      font-weight: var(--fw-bold); line-height: 1.2; }
.text-h2      { font-size: var(--text-h2);      font-weight: var(--fw-bold); line-height: 1.25; }
.text-h3      { font-size: var(--text-h3);      font-weight: var(--fw-bold); line-height: 1.3; }
.text-body    { font-size: var(--text-body);    font-weight: var(--fw-light); }
.text-sm      { font-size: var(--text-sm);      font-weight: var(--fw-light); }
.text-xs      { font-size: var(--text-xs);      font-weight: var(--fw-light); }
.text-label   { font-size: var(--text-xs);      font-weight: var(--fw-bold); letter-spacing: 2px; text-transform: uppercase; }

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

/* Colores de texto */
.text-azul    { color: var(--azul); }
.text-teal    { color: var(--teal); }
.text-blanco  { color: var(--blanco); }
.text-negro   { color: var(--negro); }
.text-gris    { color: var(--gris-medio); }

/* Gradiente de texto */
.text-gradient {
  background: var(--grad-principal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   6. SECCIÓN — ETIQUETA DECORATIVA (EYEBROW)
   ============================================================ */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--sp-md);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--grad-principal);
  border-radius: var(--radius-full);
}

/* ============================================================
   7. SEPARADORES Y DECORATIVOS
   ============================================================ */
.divider {
  width: 64px;
  height: 3px;
  background: var(--grad-principal);
  border-radius: var(--radius-full);
  margin-block: var(--sp-lg);
}

.divider-center { margin-inline: auto; }

/* ============================================================
   8. FONDOS DE SECCIÓN
   ============================================================ */
.bg-blanco    { background-color: var(--blanco); }
.bg-palido    { background-color: var(--gris-palido); }
.bg-negro     { background-color: var(--negro); color: var(--blanco); }
.bg-azul      { background-color: var(--azul); color: var(--blanco); }
.bg-grad      { background: var(--grad-oscuro); color: var(--blanco); }
.bg-dark-pattern {
  background-color: var(--negro);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(58,83,159,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(22,171,141,0.12) 0%, transparent 50%);
}

/* ============================================================
   9. RESPONSIVE MEDIA QUERIES BASE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-py: clamp(3rem, 6vw, 5rem); }
}

@media (max-width: 768px) {
  :root { --section-py: clamp(2.5rem, 5vw, 4rem); }
}

/* ============================================================
   10. REDUCIR MOVIMIENTO — ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
