/* ==========================================================================
   Grupo @lfatec — base de diseño
   Una sola página: header fijo, secciones alternadas (blanco / gris azulado / azul).
   Los estilos de cada sección se añaden en la fase 2, debajo de este archivo base.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color de marca */
  --brand: #0e1f71;
  --brand-deep: #08124a;
  --brand-mid: #1b34a8;
  --brand-soft: #e8ebf8;
  --accent: #e6e92b;
  --accent-deep: #cfd311;

  /* Neutros con tono azulado */
  --ink: #0c1233;
  --muted: #4a5278;
  --line: #dde1f0;
  --bg: #ffffff;
  --bg-alt: #f4f6fc;

  /* Estados y canales */
  --wa: #0b7a3e;
  --wa-hover: #096633;
  --focus: #1b34a8;

  /* Tipografía */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-h3: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.4rem + 4.2vw, 4.25rem);

  /* Espacios, radios y sombras */
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 72px;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(14 31 113 / 0.06), 0 2px 8px rgb(14 31 113 / 0.05);
  --shadow-md: 0 8px 24px rgb(14 31 113 / 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--brand);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

[hidden] { display: none !important; }

/* ---------- Accesibilidad ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Sobre fondos azules el foco azul no se ve: se usa el amarillo de marca */
.section--dark :focus-visible,
.contact-card--brand :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--brand);
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Estructura ---------- */
.container {
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: var(--brand);
  color: #fff;
}
.section--dark h2,
.section--dark h3 { color: #fff; }

.section-head {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-mid);
}
.section--dark .eyebrow { color: var(--accent); }

.lead {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 62ch;
}
.section--dark .lead { color: rgb(255 255 255 / 0.8); }

/* Palabra resaltada del titular (amarillo solo sobre azul) */
.resalte { color: var(--accent); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-mid); box-shadow: var(--shadow-md); }

.btn--accent { background: var(--accent); color: var(--brand); }
.btn--accent:hover { background: var(--accent-deep); box-shadow: var(--shadow-md); }

.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }
.section--dark .btn--outline { color: #fff; border-color: rgb(255 255 255 / 0.6); }
.section--dark .btn--outline:hover { background: #fff; color: var(--brand); border-color: #fff; }

.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); box-shadow: var(--shadow-md); }

/* ---------- Tarjeta base ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Contenido pendiente ---------- */
/* Añadir class="revision" a <body> para ver qué falta por recibir de Alfatec. */
body.revision [data-pendiente] {
  position: relative;
  outline: 2px dashed #d9480f;
  outline-offset: 4px;
  background-image: linear-gradient(rgb(255 200 0 / 0.14), rgb(255 200 0 / 0.14));
}
body.revision [data-pendiente]::before {
  content: "Pendiente";
  position: absolute;
  transform: translateY(-100%);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #d9480f;
  border-radius: 4px 4px 0 0;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover { transform: none; }
}
