/* =============================================================
   v4 — AI consulting site
   Sistema: minimalismo conservador + acentos digitales sutiles
   ============================================================= */

:root {
  /* Inteli-K brand palette */
  --ik-dark-blue: #132238;
  --ik-glauco: #00C8C8;
  --ik-glauco-soft: #4FDCDC;
  --ik-marine: #155DCE;
  --ik-celeste: #5FCEFF;
  --ik-iris: #765FFF;

  --bg: #F7F9FC;              /* paper */
  --bg-2: #EEF2F7;            /* mist */
  --ink: #0B1525;             /* near-black blue */
  --ink-2: #1A2540;
  --ink-soft: #4B5872;        /* graphite */
  --ink-mute: #8893A7;        /* steel */
  --rule: #D9DFE8;            /* fog */
  --rule-soft: #EEF2F7;
  --accent: #00C8C8;          /* glauco — primary brand accent */
  --accent-soft: #4FDCDC;
  --accent-deep: #009C9C;
  --invert-bg: #132238;       /* dark blue */
  --invert-ink: #F7F9FC;

  --font-display: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  --shadow-1: 0 1px 2px rgba(14,14,12,.04), 0 4px 16px rgba(14,14,12,.04);
  --shadow-2: 0 2px 6px rgba(14,14,12,.06), 0 18px 48px rgba(14,14,12,.07);

  --maxw: 1280px;
  --pad-x: clamp(20px, 4vw, 56px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }

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

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

/* =============================================================
   Layout
   ============================================================= */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(64px, 8vw, 110px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,200,200,.18);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,200,200,.18); }
  50%       { box-shadow: 0 0 0 8px rgba(0,200,200,.05); }
}

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(40px, 6.5vw, 92px);
  color: var(--ink);
}
.h-section {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.08;
  font-size: clamp(32px, 4.4vw, 60px);
  margin: 12px 0 22px;
}
.h-card {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.18;
  font-size: clamp(20px, 1.6vw, 26px);
  margin: 0 0 12px;
}
.lead {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* =============================================================
   Buttons
   ============================================================= */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.005em;
  transition: transform .25s var(--ease-out), background .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-soft); color: #FFFFFF; box-shadow: 0 10px 28px rgba(0,200,200,.35); }
.btn-accent {
  background: var(--accent); color: #FFFFFF;
}
.btn-accent:hover { background: var(--accent-soft); color: #FFFFFF; box-shadow: 0 8px 24px rgba(0,200,200,.35); }
.btn-ghost {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.btn .arr { transition: transform .3s var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }

/* =============================================================
   Nav
   ============================================================= */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,247,.78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--rule);
  background: rgba(250,250,247,.92);
}
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand img { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; padding: 10px 14px; border-radius: 999px;
  font-size: 14.5px; color: var(--ink-soft); font-weight: 450;
  transition: color .2s, background .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--ink); background: rgba(14,14,12,.04); }
.nav__link--has-menu::after {
  content: ""; display: inline-block; margin-left: 6px;
  width: 5px; height: 5px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s;
}
.nav__group:hover .nav__link--has-menu::after { transform: rotate(225deg) translateY(0); }

.nav__group { position: relative; }
.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 18px;
  padding: 16px; min-width: 580px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s var(--ease-out);
}
.nav__group:hover .nav__menu, .nav__group:focus-within .nav__menu {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav__menu-item {
  display: block; padding: 12px 14px; border-radius: 12px;
  transition: background .18s;
}
.nav__menu-item:hover { background: var(--bg-2); }
.nav__menu-item-t { font-weight: 500; font-size: 14.5px; color: var(--ink); margin-bottom: 4px; }
.nav__menu-item-s { font-size: 13px; color: var(--ink-mute); line-height: 1.45; }

.nav__right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0;
  background: rgba(14,14,12,.04); border-radius: 999px; padding: 4px;
}
.lang-toggle button {
  height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; letter-spacing: .04em; font-weight: 500;
  color: var(--ink-soft); transition: background .2s, color .2s;
}
.lang-toggle button.is-active { background: var(--ink); color: var(--bg); }

/* =============================================================
   Footer
   ============================================================= */

.footer { background: var(--invert-bg); color: var(--invert-ink); padding: 90px 0 36px; margin-top: 80px; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__brand img { height: 28px; }
.footer__tag { color: rgba(255,255,255,.6); margin-top: 16px; font-size: 14.5px; max-width: 30ch; line-height: 1.5; }
.footer__col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 500; margin: 0 0 18px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__col a { color: rgba(255,255,255,.85); font-size: 14.5px; transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__bot { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; color: rgba(255,255,255,.5); font-size: 13px; }
.footer__bot-links { display: flex; gap: 24px; }

/* =============================================================
   Animations — scroll reveal + utility motion
   ============================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1; transform: translateY(0);
}
[data-reveal-up] { transform: translateY(40px); }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
[data-stagger].is-in > * { opacity: 1; transform: translateY(0); }
[data-stagger].is-in > *:nth-child(1) { transition-delay: .04s; }
[data-stagger].is-in > *:nth-child(2) { transition-delay: .12s; }
[data-stagger].is-in > *:nth-child(3) { transition-delay: .2s; }
[data-stagger].is-in > *:nth-child(4) { transition-delay: .28s; }
[data-stagger].is-in > *:nth-child(5) { transition-delay: .36s; }
[data-stagger].is-in > *:nth-child(6) { transition-delay: .44s; }

/* Hero line-by-line type reveal */
.kt-line {
  display: block; overflow: hidden;
}
.kt-line > span {
  display: inline-block; transform: translateY(110%);
  transition: transform 1s var(--ease-out);
  will-change: transform;
}
.kt-line.is-in > span { transform: translateY(0); }
.kt-line.d2 > span { transition-delay: .1s; }
.kt-line.d3 > span { transition-delay: .2s; }
.kt-line.d4 > span { transition-delay: .3s; }

/* Underline draw on hover */
.link-line {
  position: relative; padding-bottom: 2px;
}
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.link-line:hover::after { transform: scaleX(1); }

/* Marquee */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  display: flex; gap: 80px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-wrap:hover .marquee { animation-play-state: paused; }

/* Card hover lift */
.card-lift { transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s; }
.card-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

/* Number counter */
.count-num {
  font-feature-settings: "tnum" 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-stagger] > *, .kt-line > span { opacity: 1 !important; transform: none !important; }
  .marquee { animation: none; }
  .eyebrow::before { animation: none; }
}

/* =============================================================
   Responsive helpers
   ============================================================= */
@media (max-width: 880px) {
  .nav__links { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bot { flex-wrap: wrap; gap: 12px 24px; }
  .footer__bot-links { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 40px; }
  .footer { padding: 64px 0 28px; }
  .footer__bot { flex-direction: column; align-items: flex-start; }
}


/* === Platforms nav link === */
/* Plataformas Inteligentes link — subtle Glauco dot before label */
.nav__link { white-space: nowrap; }
.nav__link--platforms { display: inline-flex; align-items: center; gap: 8px; }
.nav__link-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ik-glauco, #00C8C8);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(0, 200, 200, 0.55);
  animation: nav-dot-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes nav-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 200, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(0, 200, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 200, 200, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav__link-dot { animation: none; }
}
/* Slimmer dropdown now that Servicios has 3 items instead of 4 */
.nav__menu { min-width: 320px; grid-template-columns: 1fr; }

/* Tight nav at narrow desktop widths so 5-item links + CTA don't overflow */
@media (max-width: 1100px) {
  .nav__links { gap: 2px; }
  .nav__link { padding: 10px 10px; font-size: 13.5px; }
  .nav__link--platforms { gap: 6px; }
  .nav__link-dot { width: 6px; height: 6px; }
  .nav__right { gap: 10px; }
}


/* 2x2 fallback when the row gets too tight to keep 4 across */
@media (max-width: 980px) {
  .pf-partner-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
  .pf-partner-tag { font-size: 11px; }
}
@media (max-width: 520px) {
  .pf-partner-row { grid-template-columns: 1fr; gap: 22px; }
}

/* === Plataformas hero — partners infinite marquee === */
.pf-marquee-wrap {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.pf-marquee {
  display: flex;
  width: max-content;
  gap: 64px;
  align-items: center;
  animation: pf-marquee-scroll 36s linear infinite;
}
.pf-marquee-wrap:hover .pf-marquee { animation-play-state: paused; }
@keyframes pf-marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-33.3333%, 0, 0); }
}
.pf-marquee-item {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pf-marquee-logo {
  height: 26px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.pf-marquee-tag {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .pf-marquee { animation: none; }
}
