/* ============================================================
   Growketing — Global styles
   Minimal, vanilla, no Tailwind. Tokens come from theme.json
   and are auto-exposed as --wp--preset--* CSS variables.
   ============================================================ */

/* Fonts loaded from Google Fonts CDN (see inc/enqueue.php) */

/* --------- Reset / base --------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--wp--preset--color--verde-oscuro);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
img { border-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }

/* --------- Tokens (hardcoded so we don't depend on wp-block-library global-styles) --------- */
:root {
  --gk-vo:    #17261c;   /* Verde oscuro */
  --gk-dg:    #1f5332;   /* Verde (dark green) */
  --gk-vc:    #00ac3f;   /* Verde claro */
  --gk-vf:    #12f266;   /* Verde fluor */
  --gk-vi:    #7d60f4;   /* Violeta */
  --gk-gy:    #afbbb3;   /* Gris */
  --gk-gm:    #515a54;   /* Gris texto */
  --gk-bd:    #d3d3d3;   /* Borde */
  --gk-wt:    #ffffff;
  --gk-hero-gradient: linear-gradient(180deg, #00ac3f, #1f5332);
}

/* --------- Accessibility helpers --------- */
.gk-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.gk-skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  padding: .5rem 1rem; background: var(--gk-vc); color: #fff;
}
.gk-skip-link:focus { left: 0; }

/* --------- Utility: container --------- */
.gk-container { max-width: 1400px; margin-inline: auto; padding-inline: 2rem; }
@media (max-width: 768px) { .gk-container { padding-inline: 1rem; } }

/* --------- Skip render for below-fold sections until near viewport --------- */
.gk-cv { content-visibility: auto; contain-intrinsic-size: 1px 600px; }

/* --------- Marquees (used by logo-marquee, pills-marquee, partner-marquee) --------- */
@keyframes gk-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gk-marquee {
  display: flex;
  width: max-content;
  animation: gk-marquee linear infinite;
  animation-duration: var(--gk-marquee-dur, 30s);
}
html.gk-anims-paused .gk-marquee,
html.gk-anims-paused .gk-spin-slow { animation-play-state: paused; }
@media (max-width: 768px) {
  .gk-marquee, .gk-spin-slow { animation: none !important; }
}
.gk-marquee > * { flex-shrink: 0; }
.gk-marquee-wrap { overflow: hidden; }

/* --------- Spinner --------- */
@keyframes gk-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.gk-spin-slow { animation: gk-spin-slow 20s linear infinite; }

/* --------- Scroll-snap carousel --------- */
.gk-scroll-x {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1rem;
}
.gk-scroll-x::-webkit-scrollbar { display: none; }
.gk-scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* --------- Button primitives --------- */
.gk-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .625rem 1.5rem;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 400;
  transition: background-color .2s, color .2s, border-color .2s;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.gk-btn--outline-white { border-color: #fff; color: #fff; background: transparent; }
.gk-btn--outline-white:hover { background: #fff; color: var(--gk-vo); }
.gk-btn--outline-green { border-color: var(--gk-vc); color: var(--gk-vc); background: transparent; }
.gk-btn--outline-green:hover { background: var(--gk-vc); color: #fff; }
.gk-btn--solid-green { background: var(--gk-vc); color: #fff; }
.gk-btn--solid-green:hover { background: var(--gk-dg); }
.gk-btn--sm { padding: .5rem 1rem; font-size: 14px; border-radius: 10px; }

/* --------- Typography primitives --------- */
.gk-eyebrow { text-transform: uppercase; letter-spacing: 0.02em; font-size: 12px; font-weight: 600; }
.gk-display { font-weight: 400; line-height: 1.2; }

/* --------- Focus ring --------- */
:where(a, button, [role="button"], input, select, textarea):focus-visible {
  outline: 2px solid var(--gk-vc);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------- 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;
  }
  .gk-marquee, .gk-spin-slow { animation: none; }
}
