/* ==========================================================================
   6 Sigma · componentes reutilizables: botones, listas, apariciones, campos
   ========================================================================== */

/* Botones */
.btn {
  --bg: transparent;
  --fg: var(--ink);
  --bd: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 50px;
  padding: 0 1.4em;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease-out), background-color .3s, border-color .3s, color .3s, box-shadow .35s var(--ease-out);
}
/* Barrido suave al pasar el cursor */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--sweep, rgba(255, 255, 255, .14));
  transform: translateX(-101%);
  transition: transform .5s var(--ease-out);
}
.btn:hover::before { transform: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary { --bg: var(--green); --fg: #fff; box-shadow: 0 6px 20px rgba(18, 106, 56, .22); }
.btn-primary:hover { --bg: var(--green-hover); box-shadow: 0 10px 28px rgba(18, 106, 56, .3); }
.btn-dark { --bg: var(--ink); --fg: #fff; --sweep: rgba(255, 255, 255, .1); }
.btn-ghost { --bd: var(--line-strong); --fg: var(--ink); --sweep: rgba(18, 106, 56, .07); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { --bd: var(--green); }
.btn-line { --bd: var(--line-strong); --fg: var(--ink); --sweep: var(--green-soft); }
.btn-line:hover { --bd: var(--green); --fg: var(--green); }
.dark .btn-line { --bd: var(--dark-line); --fg: var(--on-dark); --sweep: rgba(125, 187, 87, .12); }
.btn-sm { min-height: 40px; padding: 0 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }

.ico-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease-out); }
.btn:hover .ico-arrow { transform: translateX(3px); }

.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

@media (pointer: coarse) {
  .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Etiquetas de sección */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  color: var(--green);
  margin-bottom: 18px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.dark .kicker { color: var(--green-on-dark); }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .lead { margin-top: 20px; }
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); max-width: 54ch; }
.dark .lead { color: var(--on-dark-2); }

/* Listas con marca */
.checks li {
  position: relative;
  padding-left: 28px;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: .97rem;
  line-height: 1.45;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: .2em;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%23126A38' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checks b { color: var(--ink); font-weight: 600; }
.dark .checks li { color: var(--on-dark-2); }
.dark .checks li::before { background-color: rgba(125, 187, 87, .14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%237DBB57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Marcas "Por confirmar" visibles solo en modo revisión */
.tbc { display: none; }
[data-review="on"] .tbc {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px dashed #B7791F;
  color: #8A5A12;
  background: #FFF7E8;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Apariciones al entrar en pantalla (solo cuando JS está activo) */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Líneas que se dibujan */
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out); }
.draw.in path { stroke-dashoffset: 0; }

/* Campos */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(18, 106, 56, .14); }
.field [aria-invalid="true"] { border-color: #B42318; }
.select { position: relative; }
.select select { appearance: none; padding-right: 42px; }
.select::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.8px solid var(--ink-2);
  border-bottom: 1.8px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.hint { margin-top: 6px; font-size: .84rem; color: var(--ink-3); }
.err { margin-top: 6px; font-size: .86rem; color: #B42318; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
