/* Brand Jungle — base: reset, tipografía, botones, utilidades */

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

* { margin: 0; }

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

body {
  font-family: var(--f-ui);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-platinum);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

ul, ol { padding: 0; }

/* ---------- Tipografía ---------- */
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--c-stone);
}

.eyebrow-mark {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--c-green);
}

.wordmark {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: var(--track-label);
  text-decoration: none;
  color: var(--c-ink);
}

.nav .wordmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  padding-left: 74px;
  min-height: 60px;
  white-space: nowrap;
}

/* Logo desnudo sobre el fondo — el brandbook prohíbe cajas/outlines sobre la marca.
   60px = tamaño mínimo del full mark según guidelines v3.0. */
.nav-logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.wordmark span { font-weight: 400; }

.wordmark .nav-brand-text { font-weight: 700; }
.nav-brand-text span { font-weight: 400; }

.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--space-band); }
.band-lg { padding-block: var(--space-band-lg); }
.band-mist { background: var(--c-mist); }

.band-dark {
  background: linear-gradient(180deg, var(--c-ink), var(--c-deepmoss));
  color: var(--c-platinum);
}

.section-head { max-width: 620px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head-wide { max-width: 780px; }

.section-sub {
  margin-top: 0.875rem;
  color: var(--c-stone);
  max-width: 54ch;
}

.band-dark .section-sub { color: var(--c-linen); }

[id] { scroll-margin-top: 104px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--f-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Único color de acción: green con texto ink (8.5:1) */
.btn-primary {
  background: var(--c-green);
  color: var(--c-ink);
}

.btn-primary:hover { background: #a9bd0d; }

.btn-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn-ghost {
  border-color: var(--c-linen);
  color: var(--c-ink);
}

.btn-ghost:hover {
  background: var(--c-mist);
  border-color: var(--c-moss);
}

.btn-card {
  width: 100%;
  border-color: var(--c-linen);
  color: var(--c-ink);
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
}

.btn-card:hover {
  background: var(--c-green);
  border-color: var(--c-green);
}

.btn-wide { width: 100%; }

.link-cta {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--c-green);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) ease;
}

.link-cta:hover { border-color: var(--c-moss); }

/* ---------- Chips ---------- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.chip-list li {
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--c-mist);
  border: 1px solid var(--c-linen);
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--c-ink);
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--c-ink);
  color: var(--c-platinum);
  border-radius: 0 0 12px 12px;
  text-decoration: none;
  font-size: var(--fs-small);
}

.skip-link:focus { top: 0; }

.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;
}

/* Honeypot anti-spam (api/lead.php): fuera de la vista Y del tabbing —
   a diferencia de .visually-hidden, este campo no debe ser alcanzable ni
   anunciado por lectores de pantalla (no es contenido real). */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--c-moss);
  outline-offset: 2px;
}

.band-dark :focus-visible { outline-color: var(--c-chartreuse); }

::selection { background: var(--c-chartreuse); color: var(--c-ink); }

/* ---------- Sistema de reveals (gated a html.js) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}
