/* ===== Tokens (colores tomados del logo de B2 Grow) ===== */
:root {
  --navy: #245b87;
  --navy-deep: #173e5e;
  --sky: #38b6ff;
  --sky-soft: #e3f3fd;
  --ink: #1a2a38;
  --muted: #56687a;
  --paper: #ffffff;
  --line: #d5e2ec;

  --font: "Archivo", system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ===== Base ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  width: 88px;
  height: 88px;
  margin: -4px 0;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.nav a:not(.nav-cta) {
  background: linear-gradient(var(--sky), var(--sky)) no-repeat left bottom / 0 2px;
  padding-bottom: 3px;
  transition: color 0.2s, background-size 0.25s;
}

.nav a:not(.nav-cta):hover { color: var(--navy); background-size: 100% 2px; }

.nav .nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
}

.nav .nav-cta:hover { background: var(--navy-deep); color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 40px;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: -0.02em;
  line-height: 1.06;
  max-width: 17ch;
}

.hero .lead {
  margin-top: 22px;
  max-width: 48ch;
  font-size: 1.125rem;
  color: #d4e8f6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(10, 30, 50, 0.6);
}

.btn-light { background: var(--sky); color: var(--navy-deep); }
.btn-light:hover { background: #fff; }

.btn-ghost { border: 2px solid rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* Chevrones de crecimiento, tomados del logo */
.chevrons {
  display: grid;
  justify-items: center;
  gap: 0;
}

.chevrons span {
  display: block;
  width: min(220px, 60%);
  aspect-ratio: 2 / 1;
  margin-top: -6%;
  background: var(--sky);
  clip-path: polygon(50% 0, 100% 50%, 100% 85%, 50% 35%, 0 85%, 0 50%);
  animation:
    rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both,
    glow 2.8s ease-in-out infinite;
}

.chevrons { animation: float 6s ease-in-out 1.2s infinite; }

.chevrons span:first-child { margin-top: 0; }
/* Suben de abajo hacia arriba y luego se iluminan en la misma dirección */
.chevrons span:nth-child(1) { animation-delay: 0.45s, 2.05s; }
.chevrons span:nth-child(2) { animation-delay: 0.3s, 1.8s;  opacity: 0.75; }
.chevrons span:nth-child(3) { animation-delay: 0.15s, 1.55s; opacity: 0.5; }
.chevrons span:nth-child(4) { animation-delay: 0s, 1.3s;   opacity: 0.28; }

@keyframes rise {
  from { transform: translateY(40px); opacity: 0; }
}

@keyframes glow {
  0%, 30%, 100% { background-color: var(--sky); }
  12% { background-color: #bfe7ff; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0 0; }
}

/* Entrada del texto del hero */
.hero h1,
.hero .lead,
.hero-actions {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero .lead { animation-delay: 0.15s; }
.hero-actions { animation-delay: 0.3s; }

/* ===== Dos líneas de negocio ===== */
.offer {
  padding: clamp(56px, 7vw, 88px) 0;
}

.offer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 20px;
}

.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.offer-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.offer-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(23, 62, 94, 0.55);
}

.offer-consult {
  background: var(--sky-soft);
  color: var(--ink);
  border-top: 6px solid var(--sky);
}

.offer-bpo {
  background: var(--navy);
  color: #fff;
  border-top: 6px solid var(--navy-deep);
}

.offer-item h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
}

.offer-consult h3 { color: var(--navy); }

.offer-item p {
  max-width: 44ch;
  flex: 1;
}

.offer-consult p { color: var(--muted); }
.offer-bpo p { color: #d4e8f6; }

.offer-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.offer-consult .offer-link { color: var(--navy); text-decoration-color: var(--sky); }
.offer-bpo .offer-link { color: #fff; text-decoration-color: var(--sky); }

/* ===== Secciones ===== */
.section {
  padding: clamp(72px, 9vw, 120px) 0;
  scroll-margin-top: 72px;
}

.section-tint { background: var(--sky-soft); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-bottom: 24px;
  background: linear-gradient(var(--navy), var(--navy)) no-repeat left bottom / 100% 3px;
}

.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-head p {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--sky);
}

/* Consultoría: lista de temas */
.topics { margin: 0; }

.topic {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 16px 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.topic dt {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}

.topic dd {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

/* Servicios administrados: problemas que resolvemos */
.fixes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
}

.fixes li {
  padding: 30px 0 30px 22px;
  border-bottom: 1px solid #c3dcee;
  position: relative;
}

.fixes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 38px;
  width: 10px;
  height: 7px;
  background: var(--sky);
  clip-path: polygon(50% 0, 100% 70%, 100% 100%, 50% 30%, 0 100%, 0 70%);
}

.fixes h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.fixes p {
  margin-top: 8px;
  max-width: 50ch;
  color: var(--muted);
}

/* ===== Contacto ===== */
.contact {
  background: var(--navy-deep);
  color: #fff;
  padding: clamp(72px, 9vw, 112px) 0;
  scroll-margin-top: 72px;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.02em;
  max-width: 12ch;
}

.contact .lead {
  margin-top: 18px;
  max-width: 40ch;
  font-size: 1.15rem;
  color: #c3d9ea;
}

.contact-list {
  font-style: normal;
  display: grid;
  gap: 0;
}

.contact-list > div {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.contact-list > div:first-child { padding-top: 0; }

.contact-label {
  display: block;
  font-size: 0.9rem;
  color: var(--sky);
  margin-bottom: 4px;
}

.contact-list a {
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--sky); }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-deep);
  color: #8fb0c9;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ===== Interacciones al pasar el cursor ===== */
.topic dt { transition: color 0.2s, transform 0.25s; }
.topic:hover dt { color: var(--sky); transform: translateX(6px); }

.fixes li::before { transition: transform 0.25s; }
.fixes li:hover::before { transform: translateY(-4px); }

.contact-list a { transition: color 0.2s; }
.contact-list a:hover { color: var(--sky); }

/* ===== Animaciones al hacer scroll (navegadores compatibles) ===== */
@keyframes drawLine {
  from { background-size: 0% 3px; }
}

@keyframes headerShadow {
  to { box-shadow: 0 6px 24px -12px rgba(23, 62, 94, 0.35); }
}

@supports (animation-timeline: view()) {
  .offer-item,
  .topic,
  .fixes li,
  .contact-inner > div,
  .contact-list > div {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 70%;
  }

  .offer-bpo,
  .fixes li:nth-child(even) {
    animation-range: entry 15% entry 80%;
  }

  .section-head {
    animation: drawLine linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 35%;
  }

  .site-header {
    animation: headerShadow linear both;
    animation-timeline: scroll();
    animation-range: 0 120px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .chevrons { display: none; }

  .offer-grid { grid-template-columns: 1fr; }

  .topic { grid-template-columns: 1fr; gap: 8px; padding: 26px 0; }
  .fixes { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
