/* =====================================================================
   Don Tata · Sistema de diseño (tokens base)
   ===================================================================== */

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

/* ---------- Tokens ---------- */
:root {
  /* Marca (exactos del isotipo) */
  --brand-orange: #fd8263;   /* oklch(0.74 0.13 39)  */
  --brand-lila:   #9671f2;   /* oklch(0.61 0.18 292) */
  --brand-lila-ink: #6b46c1; /* lila accesible para texto pequeño (~6:1) */
  --brand-gradient: linear-gradient(135deg, #fd8263 0%, #9671f2 100%);

  /* Tinta / texto */
  --ink:       #2d3561;      /* oklch(0.31 0.07 274) — titulares y cuerpo */
  --ink-soft:  #5a6178;      /* oklch(0.47 0.03 274) — texto secundario (~6:1) */

  /* Superficies */
  --bg:        #fcfcfd;      /* blanco con leve frío, NO cream */
  --surface:   #f3f4f8;
  --border:    #e4e6ee;

  /* Semánticos (uso mínimo) */
  --danger:    #e5484d;
  --success:   #30a46c;

  /* Texto sobre superficies oscuras */
  --on-dark:        #ffffff;
  --on-dark-soft:   #c7cad8;

  /* Tipografía */
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* Escala tipográfica fluida (ratio ~1.25) */
  --text-sm:   clamp(0.79rem, 0.77rem + 0.09vw, 0.86rem);
  --text-base: clamp(0.9rem, 0.86rem + 0.18vw, 1.01rem);
  --text-lg:   clamp(1.01rem, 0.95rem + 0.32vw, 1.22rem);
  --text-xl:   clamp(1.08rem, 0.99rem + 0.45vw, 1.4rem);
  --text-2xl:  clamp(1.3rem, 1.08rem + 0.95vw, 1.8rem);
  --text-3xl:  clamp(1.62rem, 1.26rem + 1.53vw, 2.6rem);
  --text-hero: clamp(2rem, 1.3rem + 2.9vw, 4.4rem); /* otro ~10% menos; máx ≤6rem (skill) */

  /* Espaciado (base 4px) */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;  --space-6: 2rem;
  --space-8: 3rem;     --space-10: 4rem;   --space-12: 6rem;
  --space-16: 8rem;
  --section-y: clamp(3.5rem, 8vw, 7rem); /* ritmo vertical entre secciones */

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 14px;   /* tarjetas: 12–16px (skill) */
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Sombras (sin ghost-card: borde O sombra, nunca ambos) */
  --shadow-sm: 0 1px 2px rgba(45, 53, 97, 0.06);
  --shadow-md: 0 8px 24px rgba(45, 53, 97, 0.10);
  --shadow-lg: 0 24px 60px rgba(45, 53, 97, 0.16);

  /* z-index semántico */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  /* (el preloader usa 9999, excepción ya cerrada) */

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1320px;
  --container-pad: clamp(1rem, 4vw, 3rem);
  --nav-h: 4.5rem; /* alto aprox. del navbar fijo */
}

/* ---------- Base ---------- */
html {
  font-size: clamp(14px, 0.8rem + 0.4vw, 18px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* contiene desbordes de auras decorativas y transforms GSAP en móvil */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em; /* piso -0.04em (skill) */
  color: var(--ink);
  text-wrap: balance;
}

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

p { text-wrap: pretty; max-width: 70ch; }

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

strong { font-weight: 700; }

/* ---------- Media responsive ---------- */
img, picture, video, canvas, svg {
  max-width: 100%;
  display: block;
}

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

/* ---------- Accesibilidad ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-lila);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Saltar al contenido */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--on-dark);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Componentes base ---------- */
.section { padding-block: var(--section-y); }

/* Secciones a pantalla completa (100svh menos el navbar), contenido centrado
   para que se vean uniformes. El padding-top reserva el navbar fijo. */
.section--screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + clamp(1rem, 3vh, 2rem));
  padding-bottom: clamp(2rem, 5vh, 3rem);
}
/* En móvil/tablet el contenido apila y crece: altura natural para no
   esconder el inicio bajo el navbar fijo */
@media (max-width: 860px) {
  .section--screen {
    min-height: 0;
    display: block;
    padding-block: var(--section-y);
  }
}

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__kicker {
  display: inline-block;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--brand-lila-ink);
  margin-bottom: var(--space-3);
}
.section__title { margin-bottom: var(--space-4); }
.section__lead { font-size: var(--text-lg); color: var(--ink-soft); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn--primary {
  background-image: var(--brand-gradient);
  color: var(--on-dark);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-soft); }
.btn--lg { font-size: var(--text-lg); min-height: 54px; padding: var(--space-4) var(--space-6); }
.btn--sm { font-size: var(--text-sm); min-height: 40px; padding: var(--space-2) var(--space-4); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
}

.badge--available {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}

/* ---------- Reduced motion ---------- */
@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;
  }
}

/* ---------- Móvil ---------- */
@media (max-width: 600px) {
  body { line-height: 1.5; }
}
