/* ============================================================
   PACTO COLLECTIVE — reconstrucción estática
   Fuentes: Familjen Grotesk (títulos) + Inter (texto)
   Tema oscuro, gradiente violeta→azul→durazno, acento verde (logo)
   ============================================================ */

:root {
  --bg: #08080d;
  --bg-2: #0e0e16;
  --bg-3: #14141f;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --muted-2: rgba(255, 255, 255, 0.45);
  --blue: #6c6cff;
  --violet: #9b6cff;
  --peach: #e6ad8f;
  --green: #0e7a4d;
  --green-line: #1aa06a;
  --grad: linear-gradient(100deg, #8f7bff 0%, #6c8cff 38%, #c99bce 72%, #e6ad8f 100%);
  --grad-soft: linear-gradient(120deg, #5b5bff 0%, #9b6cff 50%, #e6ad8f 100%);
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: "Familjen Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: "Familjen Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  margin-bottom: 18px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  color: #0b0b12;
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 12px 12px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(120,120,255,.25); }
.btn .arrow {
  width: 34px; height: 34px; border-radius: 50%;
  background: #0b0b12; color: #fff;
  display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }
.btn.ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  padding: 13px 28px;
}
.btn.ghost:hover { background: rgba(255,255,255,.08); box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8,8,13,.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--card-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand img { height: 30px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 38px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: 16px; color: rgba(255,255,255,.85);
  font-weight: 500; transition: color .2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--grad); border-radius: 2px;
}
.nav-links .mobile-cta { display: none; }
.brand { margin-right: 28px; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; color: #fff;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, #1a1440 0%, #0a0a12 55%, #08080d 100%);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center right;
  opacity: .85;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8,8,13,.9) 0%, rgba(8,8,13,.35) 55%, rgba(8,8,13,0) 100%);
}
.hero .container { position: relative; z-index: 2; padding-top: 90px; }
.hero-inner { max-width: 920px; }

/* Texto rotativo (código de Nick, adaptado) */
#scrollingTextContainer {
  width: 100%; height: 66px; overflow: hidden;
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 60px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.05em; color: #fff; text-align: left;
}
#scrollingText { display: flex; flex-direction: column; transition: transform .6s ease-in-out; }
#scrollingText div {
  height: 66px; display: flex; align-items: center; justify-content: flex-start;
  white-space: nowrap;
}
.hero-sub {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 42px; font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.1; margin: 10px 0 34px; white-space: nowrap;
}
.hero .btn { margin-top: 8px; }

/* ---------- Secciones ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-sm { padding: 80px 0; }
.section-head { max-width: 760px; margin-bottom: 60px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 54px); margin-bottom: 8px; }
.section-head p { font-size: 19px; }

.bg-alt { background: var(--bg-2); }
.divider { height: 1px; background: var(--card-border); border: none; margin: 0; }

/* Numeración de pasos */
.step-num {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: .1em;
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  margin-bottom: 14px; display: block;
}

/* Grid de 2 (cómo funciona) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(155,108,255,.4); background: rgba(255,255,255,.06); }
.card h3 { font-size: 26px; margin-bottom: 12px; }
.card p { margin-bottom: 0; }
.card.feature h3 { font-size: 22px; }

/* Beneficios */
.benefit { text-align: left; }
.benefit .icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 1px solid var(--card-border);
  display: grid; place-items: center; margin-bottom: 22px;
}
.benefit .icon img { width: 32px; height: 32px; }
.benefit h3 { font-size: 20px; margin-bottom: 8px; }
.benefit .metric {
  font-family: "Familjen Grotesk", sans-serif; font-weight: 700;
  font-size: 15px; color: var(--peach); margin-bottom: 6px; letter-spacing: -0.01em;
}
.benefit p { font-size: 15px; margin: 0; }

/* CTA band */
.cta-band {
  background: var(--grad-soft);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(28px, 3.6vw, 44px); color: #0b0b12; max-width: 620px; }
.cta-band p { color: rgba(11,11,18,.8); margin: 12px 0 0; font-size: 18px; max-width: 560px; }
.cta-band .btn { background: #0b0b12; color: #fff; }
.cta-band .btn .arrow { background: #fff; color: #0b0b12; }

/* Nosotros teaser (imagen + texto) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split .media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .lead p { font-size: 19px; color: rgba(255,255,255,.8); }

/* Marcas */
.marcas { text-align: center; }
.marcas-strip {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 40px;
}
.marca-chip {
  padding: 18px 30px; border: 1px dashed var(--card-border); border-radius: 14px;
  color: var(--muted-2); font-family: "Familjen Grotesk", sans-serif; font-weight: 600;
  letter-spacing: .04em;
}

/* Marquee de marcas (logos negros → blancos sobre el dark) */
.marquee {
  width: 100%; overflow: hidden; margin-top: 46px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.marquee .track { display: flex; width: max-content; animation: marquee-scroll 34s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .logos { display: flex; align-items: center; gap: 26px; padding-right: 26px; }
.marquee a {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 14px; height: 82px; padding: 0 34px; min-width: 150px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.marquee a:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.marquee img { height: 38px; width: auto; object-fit: contain; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Equipo */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 20px; }
.member {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px 22px 26px; text-align: center;
  transition: transform .4s var(--ease), border-color .4s;
}
.member:hover { transform: translateY(-4px); border-color: rgba(155,108,255,.4); }
.member .avatar {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--grad-soft); display: grid; place-items: center; overflow: hidden;
  font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: 26px; color: #0b0b12;
}
.member .photo {
  width: 100%; aspect-ratio: 4/5; border-radius: 14px; margin-bottom: 16px;
  object-fit: cover; object-position: center top; background: var(--bg-3);
}
.member h4 { font-size: 18px; margin-bottom: 4px; }
.member span { font-size: 14px; color: var(--muted-2); display: block; }
.member .li {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--muted-2); font-size: 13px; font-weight: 500; transition: color .2s;
}
.member .li:hover { color: #fff; }
.member .li svg { width: 16px; height: 16px; }

/* Stack de tarjetas / items */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack .card { padding: 26px 28px; }
.stack .card h3 { font-size: 21px; }

/* Nuestra Tecnología */
.tech-sub {
  font-family: "Familjen Grotesk", sans-serif; font-size: 13px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--muted-2); margin: 0 0 20px; font-weight: 600;
}
.tech-main { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 50px; }
.tech-pill {
  display: flex; align-items: center; gap: 14px; padding: 15px 26px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 100px;
  transition: border-color .3s, transform .3s var(--ease);
}
.tech-pill:hover { border-color: rgba(155,108,255,.45); transform: translateY(-2px); }
.tech-pill .ico { width: 24px; height: 24px; color: var(--violet); flex: none; }
.tech-pill h4 { font-size: 17px; }
.tech-add { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tech-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .3s, transform .3s var(--ease);
}
.tech-card:hover { border-color: rgba(155,108,255,.45); transform: translateY(-3px); }
.tech-card .ico { width: 30px; height: 30px; color: var(--violet); margin-bottom: 16px; }
.tech-card h4 { font-size: 17px; margin-bottom: 6px; }
.tech-card p { font-size: 14px; margin: 0; }

/* Separador horizontal de imagen (contenido, no full-bleed) */
.img-separator { padding: 0 28px; margin: 4px 0; }
.img-separator img {
  display: block; width: 100%; max-width: var(--maxw); margin: 0 auto;
  height: 300px; object-fit: cover; object-position: center 52%;
  border-radius: var(--radius-lg);
}

/* Anclas con offset por el header fijo */
[id] { scroll-margin-top: 96px; }

/* tech-pill como link navegable */
a.tech-pill { text-decoration: none; }
a.tech-pill h4 { color: var(--text); }

/* Columna de imagen que llena la altura de la sección */
.showcase-fill {
  align-self: stretch; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(90% 120% at 50% 0%, #1a1440 0%, #0e0e16 62%);
  min-height: 100%;
}
.showcase-fill img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Showcase (imágenes de programas reales) */
.showcase-media { border-radius: var(--radius-lg); overflow: hidden; }
.showcase-media img { width: 100%; height: auto; display: block; }
.showcase-plain img { width: 100%; height: auto; display: block; }
.showcase-programas {
  background: radial-gradient(90% 120% at 50% 0%, #1a1440 0%, #0e0e16 60%);
  border-radius: var(--radius-lg); padding: 20px; overflow: hidden;
}
.showcase-programas img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Prosa (misión / nosotros largo) */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 18px; color: rgba(255,255,255,.78); }
.prose .lead-first { font-size: 22px; color: #fff; }

/* Lista con check */
.check-list { list-style: none; padding: 0; margin: 24px 0 0; }
.check-list li {
  display: flex; gap: 14px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--card-border); color: rgba(255,255,255,.82); font-size: 16px;
}
.check-list li:last-child { border-bottom: none; }
.check-list .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad-soft); display: grid; place-items: center; margin-top: 2px;
}
.check-list .tick svg { width: 12px; height: 12px; color: #0b0b12; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  background: rgba(255,255,255,.04); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 16px; color: #fff; font-size: 16px;
  font-family: inherit; transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--violet); background: rgba(255,255,255,.06);
}
.field textarea { resize: vertical; min-height: 130px; }
.field button { align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--card-border); padding: 80px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-news h3 { font-size: 22px; margin-bottom: 8px; }
.footer-news p { font-size: 15px; }
.news-form { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.news-form input {
  flex: 1; min-width: 200px; background: rgba(255,255,255,.05);
  border: 1px solid var(--card-border); border-radius: 100px; padding: 13px 20px; color: #fff;
}
.news-form input:focus { outline: none; border-color: var(--violet); }
.footer-col h4 {
  font-family: "Familjen Grotesk", sans-serif; text-transform: uppercase;
  letter-spacing: .14em; font-size: 12px; color: var(--muted-2); margin-bottom: 18px; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--muted); font-size: 15px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 60px; padding-top: 28px; border-top: 1px solid var(--card-border);
  color: var(--muted-2); font-size: 14px; flex-wrap: wrap; gap: 16px;
}
.footer-bottom .social { display: flex; gap: 16px; }
.footer-bottom .social a { color: var(--muted); transition: color .2s; }
.footer-bottom .social a:hover { color: #fff; }
.footer-bottom .social svg { width: 20px; height: 20px; }

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
  padding: 170px 0 70px;
  background: radial-gradient(90% 120% at 85% 0%, #1a1440 0%, #0a0a12 60%, #08080d 100%);
}
.page-hero .eyebrow { color: var(--peach); }
.page-hero h1 { font-size: clamp(38px, 6vw, 72px); max-width: 900px; }
.page-hero p { font-size: 20px; max-width: 620px; margin-top: 20px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  #scrollingTextContainer { font-size: 52px; height: 58px; }
  #scrollingText div { height: 58px; }
  .hero-sub { font-size: 34px; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links.open {
    display: flex; position: fixed; inset: 78px 0 auto 0; flex-direction: column;
    gap: 0; background: rgba(8,8,13,.97); backdrop-filter: blur(20px);
    padding: 20px 28px 30px; border-bottom: 1px solid var(--card-border);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; padding: 16px 0; border-bottom: 1px solid var(--card-border); font-size: 18px; }
  .nav-links.open .mobile-cta { display: block; }
  .nav-links.open .mobile-cta .btn { display: inline-flex; margin-top: 18px; border-bottom: none; color: #0b0b12; padding: 13px 14px 13px 26px; }
  .grid-2, .grid-3, .grid-4, .split, .form-grid, .footer-top { grid-template-columns: 1fr; }
  /* En mobile, la imagen del Recommerce va debajo del texto (como las demás secciones) */
  .split .showcase-media { order: 2; }
  .tech-add { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
  .split { gap: 32px; }
  .split .media { aspect-ratio: 3/4; }
  .cta-band { padding: 44px 30px; }
  #scrollingTextContainer { font-size: 30px; height: 38px; letter-spacing: -0.03em; }
  #scrollingText div { height: 38px; }
  .hero-sub { font-size: 24px; white-space: normal; }
  .card { padding: 32px 26px; }
  .marquee a { height: 66px; padding: 0 24px; min-width: 120px; }
  .marquee img { height: 30px; }
  .marquee .logos { gap: 18px; padding-right: 18px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  #scrollingTextContainer { font-size: 27px; height: 34px; }
  #scrollingText div { height: 34px; }
  .team-grid { grid-template-columns: 1fr; }
}
