/* TDF Connect — base compartida (landing + admin)
   Tokens de marca, reset, botones, formularios, foco visible. */

:root {
  --verde: #2ECC71;
  --verde-hover: #27B863;
  --verde-texto: #1B7F44;      /* verde para texto/links sobre claro (AA 5.0:1) */
  --verde-suave: #A8E6CF;
  --verde-tinte: #EAF9F1;
  --negro: #1A1A1A;
  --texto-suave: #5D6B6C;      /* gris medio con contraste AA */
  --gris-medio: #7F8C8D;       /* solo decorativo */
  --gris-claro: #F5F5F5;
  --slate: #2C3E50;
  --borde: #E3E7E7;
  --blanco: #FFFFFF;
  --rojo: #B42318;
  --rojo-tinte: #FDECEA;
  --ambar: #8A5A00;
  --ambar-tinte: #FFF4D6;
  --azul: #1F5F99;
  --azul-tinte: #E7F1FB;

  --fuente: 'Outfit', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radio: 16px;
  --radio-s: 10px;
  --sombra-s: 0 1px 2px rgba(26, 26, 26, .06), 0 2px 8px rgba(26, 26, 26, .04);
  --sombra-m: 0 10px 30px -10px rgba(26, 26, 26, .18);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-weight: 400;
  font-size: 1.0625rem;      /* 17 px */
  line-height: 1.55;
  color: var(--negro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; color: var(--negro); }
h1 { font-weight: 600; }
h2, h3 { font-weight: 500; }
p { margin: 0; }
a { color: var(--verde-texto); }
strong, b { font-weight: 500; }

/* Foco visible, siempre */
:focus-visible {
  outline: 3px solid var(--slate);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-color: var(--slate); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--negro); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.5rem;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primario { background: var(--verde); color: var(--negro); box-shadow: 0 6px 18px -8px rgba(46, 204, 113, .9); }
.btn--primario:hover { background: var(--verde-hover); transform: translateY(-2px); box-shadow: 0 10px 22px -8px rgba(46, 204, 113, .9); }
.btn--secundario { background: transparent; color: var(--negro); border-color: var(--negro); }
.btn--secundario:hover { background: var(--negro); color: #fff; transform: translateY(-2px); }
.btn--suave { background: var(--verde-tinte); color: var(--verde-texto); }
.btn--suave:hover { background: var(--verde-suave); color: var(--negro); }
.btn--fantasma { background: transparent; color: var(--negro); border-color: var(--borde); }
.btn--fantasma:hover { border-color: var(--negro); }
.btn--peligro { background: var(--rojo-tinte); color: var(--rojo); }
.btn--peligro:hover { background: var(--rojo); color: #fff; }
.btn--chico { min-height: 44px; padding: .45rem 1.05rem; font-size: 1rem; }
.btn--bloque { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* Formularios */
.campo { display: grid; gap: .4rem; }
.campo label, .campo .etiqueta { font-weight: 500; font-size: 1rem; }
.campo .opcional { font-weight: 400; color: var(--texto-suave); }
.campo input, .campo textarea, .campo select {
  width: 100%; min-height: 50px;
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--negro);
  background: #fff; border: 1.5px solid #C9D0D0; border-radius: 12px; padding: .7rem .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.campo textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.campo input::placeholder, .campo textarea::placeholder { color: #6F7B7C; font-weight: 400; }
.campo input:hover, .campo textarea:hover, .campo select:hover { border-color: #8FA0A0; }
.campo input:focus, .campo textarea:focus, .campo select:focus {
  outline: none; border-color: var(--verde-texto); box-shadow: 0 0 0 4px rgba(46, 204, 113, .28);
}
.campo [aria-invalid="true"] { border-color: var(--rojo); background: #FFFAF9; }
.campo [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .18); }
.campo__error { color: var(--rojo); font-weight: 400; font-size: 1rem; display: flex; gap: .4rem; align-items: flex-start; }
.campo__error:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
