/* ============================================================
   TM Quant — styles.css
   Orden: tokens → reset → base → typography → utilities →
          layout → buttons → forms → animations → responsive
   ============================================================ */


/* ── 1. TOKENS (Custom Properties) ──────────────────────────── */

:root {
  /* Colores principales */
  --color-ink:        #0b1829;
  --color-ink-mid:    #1d3354;
  --color-ink-soft:   #2e4e73;
  --color-grove:      #1e4d3b;
  --color-grove-lt:   #2a6652;
  --color-grove-glow: #7ddeb8;

  /* Neutros / UI */
  --color-fog:   #8fa3bc;
  --color-mist:  #d4dde8;
  --color-paper: #f4f6f9;
  --color-white: #ffffff;
  --color-body:  #5a6e84;
  --color-prose: #374151;

  /* Tipografías */
  --font-display: 'Changa One', Impact, sans-serif;
  --font-body:    'Changa One', Impact, sans-serif;
  --font-mono:    'Changa One', monospace;

  /* Escala tipográfica (fluid) */
  --text-xs:   0.6875rem;   /* 11px */
  --text-sm:   0.8125rem;   /* 13px */
  --text-base: 1rem;        /* 16px */
  --text-md:   1.0625rem;   /* 17px */
  --text-lg:   clamp(1.125rem, 2vw, 1.25rem);
  --text-h3:   0.9375rem;   /* 15px */
  --text-h2:   clamp(1.7rem,  3vw,   2.4rem);
  --text-h2-lg: clamp(1.8rem, 3.5vw, 2.6rem);
  --text-h1:   clamp(2.4rem,  5vw,   3.8rem);
  --text-hero-cta: clamp(1.8rem, 3.5vw, 2.8rem);

  /* Espaciado */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-9:  36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-section: clamp(64px, 10vw, 100px);

  /* Layout */
  --max-width:      1100px;
  --gutter:         clamp(20px, 5vw, 60px);
  --nav-height:     64px;

  /* Bordes */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  8px;

  /* Sombras */
  --shadow-card: 0 8px 28px rgba(11, 24, 41, 0.07);

  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-mid:  0.3s ease;
}


/* ── 2. RESET ────────────────────────────────────────────────── */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* Eliminar outline nativo solo cuando el foco viene de mouse/touch;
   mantenerlo para teclado (a11y). */
:focus:not(:focus-visible) {
  outline: none;
}

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


/* ── 3. TIPOGRAFÍA BASE ──────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--color-ink);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2-lg); }
h3 { font-size: var(--text-h3); font-family: var(--font-body); font-weight: 600; }

p { line-height: 1.75; }

strong { font-weight: 600; }

em { font-style: italic; }


/* ── 4. UTILIDADES ───────────────────────────────────────────── */

/* Contenedor principal */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Etiqueta mono en mayúsculas (eyebrow) */
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-grove);
  margin-bottom: 14px;
}

/* Encabezado de sección reutilizable */
.section-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header h2 {
  font-size: var(--text-h2-lg);
  line-height: 1.2;
}

.section-header p {
  margin-top: 14px;
  font-size: var(--text-base);
  color: var(--color-body);
  max-width: 560px;
  line-height: 1.75;
}

/* Texto en "color en blanco" para secciones oscuras */
.text-white  { color: var(--color-white) !important; }
.text-fog    { color: var(--color-fog)   !important; }
.text-grove  { color: var(--color-grove-glow) !important; }

/* Visibilidad accesible (sr-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: 0;
}


/* ── 5. BOTONES ──────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast);
  white-space: nowrap;
}

/* Botón sólido verde */
.btn-dark {
  background-color: var(--color-grove);
  color: var(--color-white);
}
.btn-dark:hover,
.btn-dark:focus-visible {
  background-color: var(--color-grove-lt);
}

/* Botón outline claro (sobre fondos oscuros) */
.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.08);
}


/* ── 6. SECCIONES: padding base ──────────────────────────────── */

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